Skip to content

GenCastMini

GlobalMRF202440 GBGoogleJAX

Import path: earth2studio.models.px.GenCastMini

View source on GitHub View install commands

Documentation

Bases: Module, AutoModelMixin, PrognosticMixin

GenCast Mini diffusion-based weather prediction model.

A stochastic weather prediction model based on conditional diffusion that predicts in 12-hour time steps. This mini variant operates at 1.0-degree (181x360) resolution with 13 pressure levels. The model takes 2 input frames (t-12h and t) and predicts 12 hours ahead.

The mini variant trained on ERA5 reanalysis data (pre-2019), offering significantly lower memory requirements (~16 GB vRAM) compared to the full 0.25-degree operational model. This wrapper runs the model with operational inputs which includes a zero 12hr total precipitation input.

Note

As of July 2026, GenCast was renamed to WeatherNext 1-Gen in the WeatherNext codebase. This Earth2Studio wrapper keeps the GenCast name for backwards compatibility.

For more information see the following references:

Warning

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

Parameters:

  • ckpt (CheckPoint) –

    Model checkpoint containing weights and configuration

  • diffs_stddev_by_level (Dataset) –

    Standard deviation of differences by level for normalization

  • mean_by_level (Dataset) –

    Mean values by level for normalization

  • stddev_by_level (Dataset) –

    Standard deviation by level for normalization

  • min_by_level (Dataset) –

    Minimum values by level for NaN cleaning

  • land_sea_mask (ndarray) –

    Land-sea mask on lat-lon grid

  • geopotential_at_surface (ndarray) –

    Geopotential at surface on lat-lon grid

  • sst_nan_mask (ndarray) –

    Boolean mask indicating where SST values are NaN (ocean vs land)

  • jit_compile (bool, default: True ) –

    JIT-compile the model forward pass, requires 24GB of host RAM. JIT compilation adds a one-time cost (several minutes for the first call) but makes subsequent calls significantly faster, by default True.

__call__

__call__(x: DataArray) -> DataArray

Sample a twelve-hour forecast without hooks.

Parameters:

  • x (DataArray) –

    Initial history matching input_coords().

Returns:

  • DataArray –

    First forecast matching output_coords(x).

create_iterator

create_iterator(x: DataArray) -> Iterator[DataArray]

Yield twelve-hour forecasts, starting with initialization's prediction.

Parameters:

  • x (DataArray) –

    Initial history matching input_coords().

Yields:

  • DataArray –

    Forecasts after the rear hook. The front hook runs before subsequent steps; both hooks feed recurrence directly.

load_default_package classmethod

load_default_package() -> Package

Load default pre-trained GenCast Mini model package from Google Cloud.

Returns:

load_model classmethod

load_model(
    package: Package, jit_compile: bool = True
) -> PrognosticModel

Load prognostic model from package.

Parameters:

  • package (Package) –

    Package to load model from

  • jit_compile (bool, default: True ) –

    JIT-compile the model forward pass with, by default True.

Returns:

  • PrognosticModel –

    Prognostic model