  We use available measurements to estimate the unknown parameters (variance,
smoothness parameter, and covariance length) of a covariance function by
maximizing the joint Gaussian log-likelihood function. To overcome cubic
complexity in the linear algebra, we approximate the discretized covariance
function in the hierarchical (H-) matrix format. The H-matrix format has a
log-linear computational cost and storage $O(kn \log n)$, where the rank $k$ is
a small integer and $n$ is the number of locations. The H-matrix technique
allows us to work with general covariance matrices in an efficient way, since
H-matrices can approximate inhomogeneous covariance functions, with a fairly
general mesh that is not necessarily axes-parallel, and neither the covariance
matrix itself nor its inverse have to be sparse. We demonstrate our method with
Monte Carlo simulations and an application to soil moisture data. The C, C++
codes and data are freely available.
