Skip to content

AIFSENS

GlobalMRF202548 GBECMWFPyTorch

Import path: earth2studio.models.px.AIFSENS

View source on GitHub View install commands

Documentation

Bases: Module, AutoModelMixin, PrognosticMixin

Artificial Intelligence Forecasting System Ensemble (AIFS ENS v1.0), a probabilistic, ensemble-based forecast model from the European Centre for Medium-Range Weather Forecasts (ECMWF). AIFS ENS uses a GNN encoder/decoder with a sliding-window transformer processor, trained on ERA5 reanalysis and operational NWP analyses, and is run four times daily with a 6-hour time step. The model is trained with a CRPS objective over a small ensemble to provide calibrated probabilistic output.

Note

This model uses the checkpoints provided by ECMWF. For additional information see the following resources:

Parameters:

  • model (Module) –

    Core PyTorch module with the pretrained AIFSENS weights loaded.

  • latitudes (Tensor) –

    Latitude values for the native model grid, registered as a buffer for interpolation.

  • longitudes (Tensor) –

    Longitude values for the native model grid, registered as a buffer for interpolation.

  • interpolation_matrix (Tensor) –

    CSR sparse matrix mapping ERA5 lat/lon inputs onto the native model grid.

  • inverse_interpolation_matrix (Tensor) –

    CSR sparse matrix mapping outputs from the native model grid back to ERA5 lat/lon.

  • invariants (Tensor) –

    Tensor of shape [4, 721, 1440] containing the invariant fields "lsm", "sdor", "slor" and "z"

Warning

We encourage users to familiarize themselves with the license restrictions of this model's checkpoints.

__call__

__call__(x: DataArray) -> DataArray

Sample a six-hour forecast from two input frames, without hooks.

Parameters:

  • x (DataArray) –

    Initial history matching input_coords().

Returns:

  • DataArray –

    First sampled forecast matching output_coords(x).

create_iterator

create_iterator(
    x: DataArray,
) -> Generator[DataArray, None, None]

Yield six-hour forecasts while retaining explicit native-grid history.

Parameters:

  • x (DataArray) –

    Initial history matching input_coords().

Yields:

  • DataArray –

    Forecasts starting with initialization's prediction. The rear hook runs before every yield and the front hook before subsequent steps.

load_default_package classmethod

load_default_package() -> Package

Load prognostic package

load_model classmethod

load_model(package: Package) -> PrognosticModel

Load prognostic from package