earth2studio.perturbation.HemisphericCentredBredVector#

class earth2studio.perturbation.HemisphericCentredBredVector(model, data, time, seeding_perturbation_method, noise_amplitude=0.35, integration_steps=3)[source]#

Bred Vector perturbation method, following the approach introduced in ‘Huge Ensembles Part I: Design of Ensemble Weather Forecasts using Spherical Fourier Neural Operators’. The vector is bred by advancing in time. The bred vector is scaled seperately in the northern and southern extra-tropics and interpolated in the tropics. Additionally, it applies a centred perturbation, ie generating two perturbed stated by adding and subtracting the bred vector, respecitvely.

Parameters:
  • model (PrognosticModel) – Dynamical model, typically this is the prognostic AI model

  • data (DataSource) – data source for obtaining warmup time steps

  • time (datetime) – Time from which initial conditions are taken

  • seeding_perturbation_method (Perturbation, optional) – Method to seed the Bred Vector perturbation

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

  • integration_steps (int, optional) – Number of integration steps to use in forward call, by default 20

__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 coordinates (Any, “time”, “lead_time”, “variable”, “lat”, “lon”). Time and lead_time must have size 1.

Returns:

Output tensor and respective coordinate system dictionary

Return type:

tuple[torch.Tensor, CoordSystem]