Keywords

1 Introduction

Random fields defined on the unit sphere \(\mathbb {S}^2 = \{s \in \mathbb {R}^3: |s |= 1 \}\) are used in astronomy, geophysics, geotechnics, oceanography, climatology and remote sensing applications, where it is frequent to deal with multivariate data. Under an assumption of isotropy and multivariate normality, the only parameters to infer are the first-order moment (expectation vector), constant over the sphere and hereafter assumed to be zero, and the second-order moment (scalar or matrix-valued covariance function), which only depends on the geodesic distance \(\delta \) between any two points on the sphere.

Regrettably, although many computationally efficient algorithms are available to accurately simulate Gaussian random fields in Euclidean spaces, the same does not occur with random fields defined on the sphere. Simulation achieved through approximations into cosine waves or into spherical harmonics often reproduce the spatial correlation structure approximately. The objective of this work is to present two algorithms to simulate isotropic Gaussian random fields on \(\mathbb {S}^2\) that exactly reproduce the target covariance and are efficient from a computational standpoint. Both algorithms rely on the spectral representation of isotropic covariances on the sphere, which is reminded in the next section.

2 Mathematical Background

According to Yaglom in [1], the covariance function of an isotropic vector random field on the sphere can be expanded as follows:

$$\begin{aligned} C \bigl ( \delta (s, s^\prime ) \bigr ) = \sum _{k=0}^{+\infty } B_k \, P_k ( s \cdot s^\prime ) , \qquad s,s^\prime \in \mathbb {S}^2, \end{aligned}$$
(1)

where \(\cdot \) is the usual scalar product in \(\mathbb {R}^3\), \(P_k\) is the Legendre polynomial of degree k and \( ( B_k: k \in \mathbb {N})\) is a sequence of real-valued, symmetric, positive semidefinite matrices, called Schoenberg matrices, that are componentwise summable, i.e., such that \( C(0) = \sum _{k=0}^{+\infty } B_k\) exists.

For any \(s \in \mathbb {S}^2\) with colatitude \(\theta \in [0, \pi ]\) and longitude \(\phi \in [0, 2 \pi ]\), the spherical harmonics of degree \(k\in \mathbb {N}\) and order \(m\in \{ -k, \ldots , k \}\) is defined as:

$$\begin{aligned} Y_{k,m} ( s) = (-1)^m \, \sqrt{\frac{(2k+1)(k - )}{4\pi (k + )}} \, P_k^{} (\cos \theta ) \times {\left\{ \begin{array}{ll} \, \sqrt{2} \sin ( \phi ) &{} \text {if }m < 0 \\ \, 1 &{} \text {if }m=0 \\ \, \sqrt{2} \cos (\phi ) &{} \text {if }m > 0 \end{array}\right. } \end{aligned}$$
(2)

where \(P_k^m\) is the associated Legendre function of degree k and order m. The spherical harmonics satisfy the following two properties.

  1. (1)

    Addition theorem:

    $$\begin{aligned} \frac{4 \pi }{2 k + 1} \sum _{m=-k}^{+k} Y_{k,m} (s) Y_{k,m} (s^\prime ) = P_k ( s \cdot s^\prime ), \qquad k \in \mathbb {N}. \end{aligned}$$
    (3)
  2. (2)

    Orthogonality:

    $$\begin{aligned} 4 \pi \int _{\mathbb {S}^2} Y_{k,m} (s) Y_{k^\prime ,m^\prime } (s) \, U (d s) = {\left\{ \begin{array}{ll} 1 &{} \text {if }k=k^\prime ~\text {and }m=m^\prime \\ 0 &{} \text {otherwise,} \end{array}\right. } \end{aligned}$$
    (4)

    where \(k, k^\prime \in \mathbb {N} \), \( m \in \{ - k, \ldots , +k \}\), \(m^\prime \in \{ - k^\prime , \ldots , +k^\prime \}\), and U is the uniform distribution on \(\mathbb {S}^2\).

3 Simulation Algorithms

3.1 Random Mixture of Spherical Harmonics (RMSH)

Let f be a probability mass function on \(\mathbb {N}\) such that \(f(k) > 0\) whenever \(B_k\) is not a zero matrix. If \(K \sim f\), then Schoenberg’s formula (1) becomes

$$\begin{aligned} C \bigl ( \delta (s, s^\prime ) \bigr ) = \mathbb {E} \Bigl \{ \frac{B_K}{f(K)} \, P_K ( s \cdot s^\prime ) \Bigr \} . \end{aligned}$$
(5)

Moreover, if M is uniform over \( \{-K , \ldots , +K \} \), then the addition formula (3) gives

$$\begin{aligned} P_K ( s \cdot s^\prime ) = 4 \pi \, \mathbb {E} \bigl \{ Y_{K,M} (s) \, Y_{K,M} (s^\prime ) \, \big \vert \, K \bigr \}. \end{aligned}$$
(6)

Then, combining Eqs. (5) and (6), one obtains

$$\begin{aligned} C \bigl ( \delta (s, s^\prime ) \bigr ) = 4 \pi \, \mathbb {E} \Bigl \{ \frac{B_K}{f(K)} \, Y_{K,M} (s) \, Y_{K,M} (s^\prime ) \Bigr \}. \end{aligned}$$

Letting \(A_k\) be a symmetric square root of \(B_k\) (\(k \in \mathbb {N}\)) and \(A_k(\cdot ,J)\) be the J-th column of \(A_k\), with J an integer uniform over \(\{1,\ldots ,p\}\), one furthermore has:

$$\begin{aligned} \mathbb {E} \Bigl \{A_k(\cdot ,J) A_k(\cdot ,J)^{\top }\Bigr \} = \frac{1}{p} \sum _{j=1}^p A_k(\cdot ,j) A_k(\cdot ,j)^{\top } = \frac{1}{p} B_k. \end{aligned}$$

The previous equations suggest the following construction for simulating a random field on \(\mathbb {S}^2\) with covariance C:

$$\begin{aligned} \tilde{Z} (s) = \varepsilon \, \sqrt{\frac{4 \pi \, p}{f(K)}} \, A_K(\cdot ,J) \, Y_{K,M} (s), \qquad s \in \mathbb {S}^2, \end{aligned}$$
(7)

with \(\varepsilon \) a random variable with zero mean and unit variance independent of (KM) and J an integer uniform over \(\{1,\ldots ,p\}\) and independent of \((\varepsilon ,K,M)\).

3.2 Random Mixture of Legendre Waves (RMLW)

The second simulation algorithm rests on the following identity:

$$\begin{aligned} \int _{\mathbb {S}^2} P_k ( \omega \cdot s ) \, P_k ( \omega \cdot s^\prime ) \, U ( d \omega ) = \frac{1}{2 k + 1} \, P_k ( s \cdot s^\prime ) , \qquad k \in \mathbb {N}, \end{aligned}$$
(8)

which can be derived from the addition theorem (3) and the orthogonality of spherical harmonics (4). Equation (8) can be rewritten in probabilistic terms:

$$\begin{aligned} \frac{1}{2 k + 1} \, P_k ( s \cdot s^\prime ) = \mathbb {E} \bigl \{ P_k ( \varOmega \cdot s ) \, P_k ( \varOmega \cdot s^\prime ) \bigr \} , \qquad k \in \mathbb {N}, \end{aligned}$$
(9)

where \(\varOmega \) is a random point (pole) uniformly distributed on \(\mathbb {S}^2\). The covariance function (5) of an isotropic vector random field Z becomes:

$$\begin{aligned} C \bigl ( \delta (s, s^\prime ) \bigr ) = \mathbb {E} \Bigl \{ \frac{2\,K +1}{f(K)} B_K P_K ( \varOmega \cdot s ) P_K ( \varOmega \cdot s^\prime ) \Bigr \} , \qquad s,s^\prime \in \mathbb {S}^2, \end{aligned}$$

where K is a random integer with probability mass function f, independent of \(\varOmega \). Following the same reasoning as in the previous section, a random field \(\tilde{Z}\) sharing the same first two moments as Z is obtained by putting

$$\begin{aligned} \tilde{Z} (s) = \varepsilon \, \sqrt{\frac{(2\,K + 1)p}{f(K)}} \, A_K(\cdot ,J) \, \, P_K ( \varOmega \cdot s ), \qquad s \in \mathbb {S}^2, \end{aligned}$$
(10)

with \(\varepsilon \) a random variable with zero mean and unit variance independent of \((K,\varOmega )\), J an integer uniform in \(\{1,\ldots ,p\}\) and independent of \((\varepsilon ,K,\varOmega )\), and \(A_K(\cdot ,J)\) the J-th column of a symmetric square root \(A_K\) of the Schoenberg matrix \(B_K\). The construction (10) has been named “turning arcs” by Alegría et al. in [2], as it is the exact analogue of the turning bands method in which a random field defined along a straight line is spread to the multidimensional Euclidean space; here, a Legendre wave \( P_K ( \varOmega \cdot s )\) that is constant over the arcs perpendicular to \(\varOmega \) is spread to the sphere.

3.3 Discussion

The two previous proposals can be classified as continuous spectral algorithms, in which the simulated field is a basic random field (harmonic) defined continuously on the sphere, consisting of a spherical harmonic with random degree and order or a Legendre wave with random degree and pole. This basic harmonic is weighted by a random vector that ensures the reproduction of the target spatial correlation structure, which reminds of importance sampling techniques.

Both algorithms provide continuous representations of isotropic random fields on \(\mathbb {S}^2\) with finite-dimensional distributions that are not multivariate Gaussian. A central limit approximation can be used to obtain a Gaussian random field, based on L independent copies of \(\tilde{Z}\) defined either by (7) or (10). The computational complexity is proportional to the number L and the number n of locations targeted for simulation, i.e., \({\mathcal O}( n \times L)\); this compares favorably with the covariance matrix decomposition algorithm, whose numerical complexity is proportional to \(n^3\). Interestingly, both algorithms can be adapted to the simulation of isotropic random fields on the d-sphere, with \(d > 2\), by replacing the spherical harmonics by hyperspherical harmonics in the RMSH algorithm, or the Legendre polynomial by a Gegenbauer polynomial in the RMLW algorithm. The validity of these adapted algorithms stems from the addition theorem and the orthogonality of hyperspherical harmonics.

4 Examples

As a first example, consider the univariate multiquadric covariance on the sphere:

$$\begin{aligned} C \bigl ( \delta (s, s^\prime ) \bigr ) = \frac{1 - \mu }{\sqrt{1 - 2 \mu \cos \delta (s,s^\prime ) + \mu ^2}} , \qquad s,s^\prime \in \mathbb {S}^2, \end{aligned}$$

whose Schoenberg sequence is the geometric probability mass function \((1 - \mu ) \mu ^ k\) (see [3]). In the following we set \( \mu = 0.7\) and discretize the sphere into \(500 \times 500\) points with regularly-spaced colatitudes and longitudes. Both algorithms are applied to generate one realization using \( L = 10\) and 100 basic random fields, with \(\varepsilon \) following a Rademacher distribution and \(K+1\) having a zeta distribution with parameter 2. The latter distribution is long tailed and allows sampling high degree harmonics (K large) with a non-negligible probability. The realizations obtained by both algorithms look the same when the number of basic random fields is high (\(L \ge 100\)), which suggests that the central limit approximation is acceptable for such a number of basic random fields (Fig. 1).

Fig. 1
figure 1

Realizations of a scalar random field with a multiquadric covariance (parameter \(\mu = 0.7\)), constructed with the RMSH (left) and RMLW (right) algorithms, for \(L = 10\) and 100 basic random fields.

Fig. 2
figure 2

Realizations of a scalar random field with a Chentsov covariance, constructed with the RMSH (left) and RMLW (right) algorithms, for \(L = 1000\) and 10,000 basic random fields.

The second example is the univariate Chentsov covariance:

$$\begin{aligned} C \bigl ( \delta (s, s^\prime ) \bigr ) = 1 - \frac{2 \delta (s,s^\prime )}{\pi } , \qquad s,s^\prime \in \mathbb {S}^2. \end{aligned}$$

The associated Schoenberg sequence is (see [4]):

$$\begin{aligned} b_k = {\left\{ \begin{array}{ll} 0 &{} \text {if }k~\text {is even} \\ \frac{2 k + 1}{4 \pi } \frac{\Gamma ^2 ( k / 2)}{\Gamma ^2 ((k+3)/2)} &{} \text {if }k~\text {is odd.} \end{array}\right. } \end{aligned}$$

Again, the two algorithms are applied to generate one realization using \(L = 1000\) and 10,000 basic random fields, and considering the same discretization of the sphere and the same distributions for K and \(\varepsilon \) (Fig. 2). The convergence to normality turns out to be slower here, which is explained because the Chentsov covariance corresponds to a random field that is continuous but not differentiable, whereas the spherical harmonics and Legendre waves are smooth functions: many such functions (\(L\ge \) 10,000) are necessary to sample the tail of the zeta distribution sufficiently to reproduce the short-scale behavior of the target random field. With fewer functions, a striation effect is perceptible in the realizations.

The last example is a bivariate (\(p=2\)) spectral Matérn covariance, defined through its Schoenberg matrices (see [3]):

$$\begin{aligned} B_k = \begin{bmatrix} S(v_{11})^{-1} (1+k^2)^{-v_{11}-1/2} &{} \rho S(v_{12})^{-1} (1+k^2)^{-v_{12}-1/2} \\ \rho S(v_{12})^{-1} (1+k^2)^{-v_{12}-1/2} &{} S(v_{22})^{-1} (1+k^2)^{-v_{22}-1/2} \\ \end{bmatrix} , \qquad k \in \mathbb {N}, \end{aligned}$$

with \(v_{11} > 0\), \(v_{22} > 0\), \(v_{12} = \frac{v_{11}+v_{22}}{2}\), \(\vert \rho |\le 1\) and \(S(v) = \sum _{k=0}^{+\infty } (1 + k^2)^{-v-1/2}\).

We set \(\rho = -0.9\), \(v_{11} = 0.75 < 1\) and \(v_{22} = 1.25 > 1\), so that the second random field component is mean-square differentiable, while the first component is not. Figure 3 shows one realization obtained with the RMLW algorithm by using a zeta distribution for \(K+1\) and a Rademacher distribution for \(\varepsilon \), for \(L = \) 10,000 (similar results are obtained with the RMSH algorithm and are not displayed here). As expected, the first component is irregular whereas the second is smooth, both components being negatively correlated (\(\rho = -0.9\)). The striation effect is hardly perceptible, suggesting that the chosen number of basic random fields is sufficient for the central limit approximation to be acceptable.

Fig. 3
figure 3

One realization of a bivariate random field with a spectral Matérn covariance (parameters \(v_{11} = 0.75\) and \(v_{22} = 1.25\)), constructed with the RMLW algorithm and \(L = \) 10,000 basic random fields.

5 Conclusions

Two algorithms have been proposed to simulate vector Gaussian random fields on the two-dimensional sphere. Both rest on the spectral decomposition of the covariance function. They provide continuous simulations, in the sense that they start by building basic ingredients that subsequently allow computing the value of the simulated field at any point on the sphere. Moreover, they can be generalized to perform simulations on hyperspheres. Convergence to multivariate normality is reached with fewer basic random fields when using the RMSH algorithm in comparison with the RMLW algorithm, because spherical harmonics are comparatively more multichromatic than Legendre waves. Compensatorily, it takes less time to compute Legendre polynomials than spherical harmonics.