Skip to content

CorrelatedSphericalGaussian

Import path: earth2studio.perturbation.CorrelatedSphericalGaussian

View source on GitHub

Documentation

Produces 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, 2N] when N is even or [N+1, 2N] when N is odd.

Parameters:

  • noise_amplitude (float | Tensor) –

    Overall amplitude scaling factor for the noise field. Must be provided.

  • sigma (float, default: 1.0 ) –

    Standard deviation of the noise field, by default 1.0

  • length_scale (float, default: 500000.0 ) –

    Spatial correlation length scale in meters, by default 5.0e5

  • time_scale (float, default: 48.0 ) –

    Temporal correlation scale in hours for the AR(1) process, by default 48.0

Note

Draws from the global Torch RNG until set_rng seeds it, after which draws come from an isolated stream that leaves global RNG state untouched.

Raises:

  • ValueError –

    If noise_amplitude is not provided

__call__

__call__(x: DataArray) -> DataArray

Apply perturbation method

Parameters:

  • x (DataArray) –

    xarray DataArray intended to apply perturbation on, must contain "lat" and "lon" dimensions in the last two dims

Returns:

  • DataArray –

    Perturbed DataArray with the coordinates of the input

Examples using earth2studio.perturbation.CorrelatedSphericalGaussian