Skip to content

StormScopeMeteosatEU

EUNWC202680 GBNVIDIAPyTorch

Import path: earth2studio.models.px.StormScopeMeteosatEU

View source on GitHub

Documentation

Bases: Module, AutoModelMixin, PrognosticMixin

Generative diffusion nowcasting model for MTG-I1 FCI satellite imagery.

Predicts MTG Full Combined Imager (FCI) frames from len(input_times) consecutive input frames at 10-min resolution. Uses an "ensemble of experts" denoising strategy: the diffusion sampler is invoked in stages, each using a different set of model weights applicable to a specific sigma range, as defined by model_spec.

The model runs on a crop of the 2 km FCI full-disk grid (mtg-fci-fulldisk-2km) over Europe, labelled by FCI scan angles. default_sources fetches every channel on that crop, block-averaging the 1 km visible and near-infrared channels. Regional views from with_region run on the full domain, because the networks' positional embeddings fix their input size, and crop_output crops forecasts to the requested region.

Parameters:

  • model_spec (list[dict[str, Any]]) –

    Sequence of stage specifications. Each entry must contain:

    • model: torch.nn.Module
    • sigma_min: float
    • sigma_max: float

    The sigma interval determines which expert is applied during denoising. The ranges must combine to a single continuous interval with no gaps or overlaps.

  • means (Tensor) –

    Per-channel mean of raw pixel counts used for normalisation, shape (C, 1, 1).

  • stds (Tensor) –

    Per-channel standard deviation of raw pixel counts used for normalisation, shape (C, 1, 1).

  • scale_factor (Tensor) –

    Per-channel multiplicative factor for the raw-to-physical radiance conversion, shape (C, 1, 1).

  • add_offset (Tensor) –

    Per-channel additive offset for the raw-to-physical radiance conversion, shape (C, 1, 1).

  • invariants (Tensor) –

    Static invariant fields (e.g. orography, land-sea mask) on the model grid, shape (1, C_inv, H, W).

  • latitudes (Tensor) –

    Latitudes of the model grid used for solar angles, shape (H, W).

  • longitudes (Tensor) –

    Longitudes of the model grid used for solar angles, shape (H, W).

  • earth_mask (Tensor) –

    Boolean mask where True indicates pixels over Earth (land or ocean), shape (H, W).

  • y_coords (ndarray) –

    FCI y scan angles (radians) of the model grid rows, a contiguous run of the 2 km full-disk grid, shape (H,).

  • x_coords (ndarray) –

    FCI x scan angles (radians) of the model grid columns, a contiguous run of the 2 km full-disk grid, shape (W,).

  • variables (ndarray, default: array(VARIABLES) ) –

    Channel names corresponding to the 16 FCI bands, by default np.array(VARIABLES)

  • sampler_args (dict[str, float | int] | None, default: None ) –

    Overrides for the EDM sampler/scheduler. Recognised keys: sigma_min, sigma_max, rho (scheduler), num_steps (sampling steps, 48 by default) and S_churn, S_min, S_max, S_noise (solver). sigma_min/sigma_max must fall within the combined sigma range spanned by model_spec and default to that combined range if not given. Other unspecified keys use sensible defaults, by default None

  • input_times (ndarray, default: arange(-5, 1) * timedelta64(10, 'm') ) –

    Context-window time offsets relative to the analysis time; each element is a np.timedelta64. The number of elements L determines the sliding-window length, by default a 6-frame window [-50 min, …, 0 min]

  • output_times (ndarray, default: array([timedelta64(10, 'm')]) ) –

    Output time offsets relative to the analysis time; single-step prediction only, by default [10 min]

  • ir_38_warm_scale_factor (float, default: 0.024222141 ) –

    Multiplier applied to the above-threshold branch of the ir_38 channel after raw-to-physical conversion, by default 0.024222141

  • ir_38_warm_threshold (float, default: 4095.0 ) –

    Raw digital-count boundary (the 12-bit maximum) above which the warm/HDR ir_38 scaling is applied, by default 4095.0

  • batch_size (int, default: 1 ) –

    Maximum number of samples processed per forward pass, by default 1

  • amp (bool, default: True ) –

    Whether to use automatic mixed precision (bfloat16) during the diffusion forward pass, by default True

  • compile (bool, default: False ) –

    Compile each denoising expert with torch.compile; see compile_experts. Default is False.

__call__

__call__(x: DataArray) -> DataArray

Compute the first Meteosat imagery forecast without iterator hooks.

Parameters:

  • x (DataArray) –

    Imagery history matching input_coords().

Returns:

  • DataArray –

    Forecast imagery matching output_coords(x) with off-Earth pixels masked to zero.

create_iterator

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

Yield imagery forecasts beginning with the first prediction.

Parameters:

  • x (DataArray) –

    Initial imagery history matching input_coords().

Yields:

  • DataArray –

    Forecast DataArray. The rear hook runs before every yield and the front hook before each subsequent step.

load_default_package classmethod

load_default_package() -> Package

Load prognostic package

load_model classmethod

load_model(
    package: Package,
    amp: bool = True,
    compile: bool = False,
) -> PrognosticModel

Load the prognostic model from a package.

Parameters:

  • package (Package) –

    Model package containing checkpoints and metadata.

  • amp (bool, default: True ) –

    Use automatic mixed precision (bfloat16) in the experts, by default True

  • compile (bool, default: False ) –

    Compile each expert with torch.compile, by default False

Returns:

  • PrognosticModel –

    Loaded and initialised StormScopeMeteosatEU model.

Examples using earth2studio.models.px.StormScopeMeteosatEU