Skip to content

HealDAv2

GlobalDA202640 GBNVIDIAPyTorch

Import path: earth2studio.models.da.HealDAv2

View source on GitHub View install commands

Documentation

Bases: Module, AutoModelMixin

HealDA v2 maps 48 hours of observations to a global, 104-channel atmospheric analysis on a 0.25 degree latitude-longitude grid (721 x 1440).

This stateless, deterministic model uses eight six-hourly frames ending at analysis time t, with observations spanning [t - 45h, t + 3h].

Pass wide DataFrames as model(prepbufr, gpsro, satwnd, *sensors), following the schemas and sensor order in input_coords(). default_sources() provides matching NNJA sources for use with earth2studio.data.fetch_dataframes. Streams may be None or empty, and trailing streams may be omitted. HealDA filters channels in dated denial windows and satellite footprints flagged by provider quality columns.

Recommended environment, set before Python starts:

  • MALLOC_ARENA_MAX=16 keeps host memory level over repeated analyses in one process.
  • PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True avoids GPU out-of-memory from fragmentation over repeated analyses.
  • OMP_NUM_THREADS=1.

Parameters:

  • model (DAModel) –

    Trained network and observation pipeline from healda.inference.load_da_model

Note

For more information see the following references:

__call__

__call__(*obs: DataFrame | None) -> DataArray

Run HealDA v2 from NNJA observations.

Frames should cover [t - 45h, t + 3h] and share analysis times in attrs["request_time"], as set by earth2studio.data.fetch_dataframe.

Parameters:

  • *obs (DataFrame | None, default: () ) –

    Wide frames in input_coords() order. Streams may be None or empty; trailing streams may be omitted. At least one frame is required.

Returns:

  • DataArray –

    Global analysis with dimensions [time, variable, lat, lon], backed by CuPy on GPU or NumPy on CPU

Raises:

  • ValueError –

    If frames are missing, excessive, or long-layout, or analysis times are missing or inconsistent

set_rng

set_rng(seed: int, reset: bool = True) -> None

No-op: HealDA v2 inference is deterministic.

Parameters:

  • seed (int) –

    Unused seed

  • reset (bool, default: True ) –

    Unused reset flag, by default True

input_coords

input_coords() -> tuple[FrameSchema, ...]

Return the required observation schemas.

Returns:

  • tuple[FrameSchema, ...] –

    Wide schemas in (prepbufr, gpsro, satwnd, *sensors) order. Sensors follow the model's order. Each schema lists request variables under variable and DataFrame columns under the remaining keys.

output_coords

output_coords(
    *input_coords: FrameSchema,
    request_time: ndarray | None = None
) -> CoordinateSystem

Return analysis coordinates on the fixed 0.25 degree grid.

Parameters:

  • *input_coords (FrameSchema, default: () ) –

    Input schemas; unused for the fixed output grid

  • request_time (ndarray | None, default: None ) –

    Analysis times, or a NaT placeholder if None, by default None

Returns:

  • CoordinateSystem –

    Analysis coordinates with dimensions [time, variable, lat, lon]

default_sources

default_sources() -> tuple[DataFrameSource, ...]

Return wide-layout NNJA sources for the 48-hour observation window.

Returns:

  • tuple[DataFrameSource, ...] –

    Sources in input_coords() order: NNJAObsConv for PrepBUFR and GPS-RO, NNJAObsSatwnd for winds, and NNJAObsSat for sensors. All use a (-45h, +3h) time tolerance around each analysis time.

load_default_package classmethod

load_default_package() -> Package

Load the default HealDA v2 model package from HuggingFace.

Returns:

  • Package –

    Model package pointing to the HuggingFace repository

load_model classmethod

load_model(
    package: Package,
    checkpoint_name: str = "healda_v2.checkpoint",
) -> AssimilationModel

Load HealDA v2 from a model package.

Loads on CPU; use .to("cuda") for single-GPU inference. ERA5 static fields are downloaded to the HealDA cache on first use.

Parameters:

  • package (Package) –

    Package containing a healda-train checkpoint

  • checkpoint_name (str, default: 'healda_v2.checkpoint' ) –

    Checkpoint filename, by default "healda_v2.checkpoint"

Returns:

  • AssimilationModel –

    Loaded HealDA v2 assimilation model

Examples using earth2studio.models.da.HealDAv2