earth2studio.perturbation.LaggedEnsemble#

class earth2studio.perturbation.LaggedEnsemble(source, lags)[source]#

Lagged Ensemble perturbation method. This method creates an ensemble by collecting initial conditions from different times, but verifying at the same time.

Parameters:
  • source (DataSource) – The source for which to draw initial conditions from.

  • lags (LeadTimeArray) –

    The list lags, in the form of LeadTimeArray, i.e., np.timedelta64, to include. Positive lags refer to future times whereas negative lags refer to previous times. Using positive lags should not be used for forecasting purposes but can be used for hindcasting. A lag of zero is effectively an unperturbed ensemble member.

    For example,

    lags = np.array([np.timedelta64(-6, “h”), np.timedelta64(0, “h”)]) creates an ensemble with two lags, one of which is the current time and one is 6 hours in the past.

Note

For additional information:

__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

Returns:

Output tensor and respective coordinate system dictionary

Return type:

tuple[torch.Tensor, CoordSystem]