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=16keeps host memory level over repeated analyses in one process.PYTORCH_CUDA_ALLOC_CONF=expandable_segments:Trueavoids 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__ ¶
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 ¶
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 undervariableand 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:NNJAObsConvfor PrepBUFR and GPS-RO,NNJAObsSatwndfor winds, andNNJAObsSatfor 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 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-traincheckpoint -
checkpoint_name(str, default:'healda_v2.checkpoint') –Checkpoint filename, by default "healda_v2.checkpoint"
Returns:
-
AssimilationModel–Loaded HealDA v2 assimilation model