credit.ensemble.utils#
Functions#
|
Add spatially correlated Gaussian noise using a convolutional filter. |
|
Linearly interpolate scaling in the tropics between 20S and 20N. |
Module Contents#
Add spatially correlated Gaussian noise using a convolutional filter.
Applies correlated noise independently at each time step.
- Parameters:
x (torch.Tensor) – Input tensor of shape (B, C, T, H, W).
correlation_scale (float) – Standard deviation of the Gaussian kernel in pixels.
- Returns:
- Tensor of the same shape as input with added spatially
correlated noise.
- Return type:
torch.Tensor
- credit.ensemble.utils.hemispheric_rescale(perturbation, latitudes, north_scale=1.0, south_scale=1.0)#
Linearly interpolate scaling in the tropics between 20S and 20N.
- Parameters:
latitudes (torch.Tensor) – Tensor of shape (H,) with latitude values ranging from +90 to -90.