earth2studio.perturbation.SphericalGaussian#

class earth2studio.perturbation.SphericalGaussian(noise_amplitude=0.05, alpha=2.0, tau=3.0, sigma=None)[source]#

Gaussian random field on the sphere with Matern covariance peturbation method output to a lat lon grid

Warning

Presently this method generates noise on equirectangular grid of size [N, 2*N] when N is even or [N+1, 2*N] when N is odd.

Parameters:
  • noise_amplitude (float | Tensor, optional) – Noise amplitude, by default 0.05. If a tensor, this must be broadcastable with the input data.

  • alpha (float, optional) – Regularity parameter. Larger means smoother, by default 2.0

  • tau (float, optional) – Length-scale parameter. Larger means more scales, by default 3.0

  • sigma (Union[float, None], optional) – Scale parameter. If None, sigma = tau**(0.5*(2*alpha - 2.0)), by default None

__call__(x, coords)[source]#

Apply perturbation method

Parameters:
  • x (torch.Tensor) – Input tensor intended to apply perturbation on

  • coords (CoordSystem) – Ordered dict representing coordinate system that describes the tensor, must contain “lat” and “lon” coordinates

Returns:

Output tensor and respective coordinate system dictionary

Return type:

tuple[torch.Tensor, CoordSystem]

Examples using earth2studio.perturbation.SphericalGaussian#

Running Ensemble Inference

Running Ensemble Inference

Single Variable Perturbation Method

Single Variable Perturbation Method