Skip to content

Pangu3

GlobalMRF202340 GBONNX

Import path: earth2studio.models.px.Pangu3

View source on GitHub View install commands

Documentation

Bases: PanguBase

Pangu Weather 3 hour model. This model consists of three underlying auto-regressive models with a time-step size of 24, 6 and 3 hours. These three models are interweaved during prediction. Pangu Weather operates on 0.25 degree lat-lon grid (south-pole including) equirectangular grid with 69 atmospheric/surface variables.

Note

This model uses the ONNX checkpoints from the original publication. For additional information see the following resources:

Note

To avoid ONNX init session overhead of this model we recommend setting the default Pytorch device to the correct target prior to model construction.

Warning

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

Parameters:

  • ort_24hr (str) –

    Path to Pangu 24 hour onnx file

  • ort_6hr (str) –

    Path to Pangu 6 hour onnx file

  • ort_3hr (str) –

    Path to Pangu 3 hour onnx file

  • eager_sessions (bool, default: False ) –

    Build the 24 and 6 hour sessions at construction instead of on first use in a rollout. Either way each session is built once and cached; eager keeps the build cost out of the first rollout steps, by default False

__call__

__call__(x: DataArray) -> DataArray

Predict one step using this variant's shortest-step model, without hooks.

Parameters:

  • x (DataArray) –

    Initial fields matching input_coords().

Returns:

  • DataArray –

    First forecast at this variant's three-, six-, or 24-hour step. Use initialize and step to retain cascade anchors.

create_iterator

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

Yield interleaved forecasts starting with the first prediction.

Parameters:

  • x (DataArray) –

    Initial fields matching input_coords().

Yields:

  • DataArray –

    Forecasts at the variant's cadence after the rear hook. The front hook runs before subsequent steps; cascade anchors remain in state.

load_default_package classmethod

load_default_package() -> Package

Load prognostic package

load_model classmethod

load_model(
    package: Package, eager_sessions: bool = False
) -> PrognosticModel

Load prognostic from package