earth2studio.perturbation
.CorrelatedSphericalGaussian#
- class earth2studio.perturbation.CorrelatedSphericalGaussian(noise_amplitude, sigma=1.0, length_scale=500000.0, time_scale=48.0)[source]#
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, 2*N] when N is even or [N+1, 2*N] when N is odd.
- Parameters:
noise_amplitude (float | torch.Tensor) – Overall amplitude scaling factor for the noise field. Must be provided.
sigma (float, optional) – Standard deviation of the noise field, by default 1.0
length_scale (float, optional) – Spatial correlation length scale in meters, by default 5.0e5
time_scale (float, optional) – Temporal correlation scale in hours for the AR(1) process, by default 48.0
- Raises:
ValueError – If noise_amplitude is not provided
- __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]