StormCastConusSDA¶
NADANWC2026NVIDIAPyTorch
Import path: earth2studio.models.da.StormCastConusSDA
View source on GitHub View install commands
Documentation¶
Bases: Module, AutoModelMixin
StormCast-CONUS with score-based observation guidance and explicit state.
Wraps the CONUS diffusion model, retaining its cropped projected grid, sampler,
normalization, and observation mapping. Conditioning and observations both
describe the output valid time, one hour after the input. Observations use
physical units and the wrapped model's time_tolerance window (unfiltered
when unset). Pass None for an unguided forecast.
Install the stormcast-conus extra. Configure domain and SDA settings through
load_model or the wrapped StormCastCONUS constructor.
Parameters:
-
model(StormCastCONUS) –Configured CONUS model, including its observation noise and sampler settings.
__call__ ¶
Compute one analysis without hooks; see initialize for slots.
Parameters:
-
x(DataArray) –Initial fields matching
input_coords(). -
conditioning(DataArray) –Gridded conditioning at the output valid time (+1 hour).
-
obs(DataFrame or None, default:None) –Physical-unit observations; None disables guidance.
Returns:
-
DataArray–One-hour-ahead analysis.
set_rng ¶
initialize ¶
initialize(
x: DataArray,
conditioning: DataArray,
obs: DataFrame | None = None,
) -> tuple[DataArray, tuple[int, dict[str, Tensor]]]
Compute the first analysis and return serializable seed/RNG state.
Inputs follow the declared background, conditioning, observation order. Required conditioning is already on the model grid at output valid time. Neither inputs nor observations are modified; hooks are iterator-only.
Parameters:
-
x(DataArray) –Initial fields matching
input_coords(). -
conditioning(DataArray) –Conditioning on the model grid at the next output valid time.
-
obs(DataFrame or None, default:None) –Observations matching
forcing_coords()[1], or no guidance.
Returns:
step ¶
step(
y: DataArray,
conditioning: DataArray,
obs: DataFrame | None,
state: tuple[int, dict[str, Tensor]],
) -> tuple[DataArray, tuple[int, dict[str, Tensor]]]
Advance the prior analysis with fresh output-time forcing and RNG state.
State is the seed and RNG snapshots returned by initialization or stepping. Replaying the same arguments reproduces the output without changing inputs, state, or the stream used to initialize other trajectories. No hooks run.
Parameters:
-
y(DataArray) –Previous analysis.
-
conditioning(DataArray) –Conditioning at the next output valid time on the model grid.
-
obs(DataFrame or None) –Fresh observations, or no guidance.
-
state(tuple[int, dict[str, Tensor]]) –Sampler seed and RNG snapshots from the preceding computation.
Returns:
create_iterator ¶
create_iterator(
x: DataArray,
conditioning: DataArray,
obs: DataFrame | None = None,
) -> Generator[
DataArray, tuple[DataArray, DataFrame | None], None
]
Yield the first computed analysis, then send (conditioning, obs).
Each forcing pair describes the next output time. The wrapped model's rear hook runs before every yield, and its front hook before subsequent steps. Hook results feed continuation; required conditioning is never reused.
Parameters:
-
x(DataArray) –Initial fields matching
input_coords(). -
conditioning(DataArray) –Conditioning for the first output valid time.
-
obs(DataFrame or None, default:None) –Observations for the first output, or no guidance.
Yields:
-
DataArray–Complete hourly analyses, starting at +1 hour.
input_coords ¶
Return the initial HRRR field signature on the configured CONUS grid.
forcing_coords ¶
forcing_coords() -> tuple[CoordinateSystem, FrameSchema]
Return output-time conditioning and optional observation declarations.
Observations require time, latitude, longitude, variable, and physical-unit observation columns. The wrapped model filters its configured time window.
output_coords ¶
Validate input coordinates and return the one-hour-ahead signature.
default_sources ¶
default_sources() -> (
tuple[DataSource, DataSource | ForecastSource, None]
)
Recommend HRRR and global conditioning; leave observations caller-chosen.
load_default_package
classmethod
¶
load_default_package() -> Package
Return the pinned StormCast-CONUS checkpoint package.