StormCast¶
NANWC202440 GBNVIDIAPyTorch
Import path: earth2studio.models.px.StormCast
View source on GitHub View install commands
Documentation¶
Bases: Module, AutoModelMixin, PrognosticMixin
StormCast generative convection-allowing model for regional forecasts consists of two core models: a regression and diffusion model. Model time step size is 1 hour, taking as input:
- High-resolution (3km) HRRR state over the central United States (99 vars)
- High-resolution land-sea mask and orography invariants
- Coarse resolution (25km) global state (26 vars)
The high-resolution grid is the HRRR Lambert conformal projection.
Coarse-resolution conditioning must arrive on that grid; the source recommended
by default_sources() regrids it there.
Note
For more information see the following references:
Parameters:
-
regression_model(Module) –Deterministic model used to make an initial prediction
-
diffusion_model(Module) –Generative model correcting the deterministic prediciton
-
means(Tensor) –Mean value of each input high-resolution variable
-
stds(Tensor) –Standard deviation of each input high-resolution variable
-
invariants(Tensor) –Static invariant quantities
-
hrrr_lat_lim(tuple[int, int], default:(273, 785)) –HRRR grid latitude limits, defaults to be the StormCastV1 region in central United States, by default (273, 785)
-
hrrr_lon_lim(tuple[int, int], default:(579, 1219)) –HRRR grid longitude limits, defaults to be the StormCastV1 region in central United States,, by default (579, 1219)
-
variables(array, default:array(VARIABLES)) –High-resolution variables, by default np.array(VARIABLES)
-
conditioning_means(Tensor | None, default:None) –Means to normalize conditioning data, by default None
-
conditioning_stds(Tensor | None, default:None) –Standard deviations to normalize conditioning data, by default None
-
conditioning_variables(array, default:array(CONDITIONING_VARIABLES)) –Global variables for conditioning, by default np.array(CONDITIONING_VARIABLES)
-
sampler_steps(int, default:18) –Number of diffusion sampler steps, by default 36
-
sampler_args(dict[str, float | int], default:None) –Arguments to pass to the diffusion sampler, by default None
__call__ ¶
create_iterator ¶
create_iterator(
x: DataArray, conditioning: DataArray
) -> Generator[
DataArray,
DataArray | tuple[DataArray, ...] | None,
None,
]
Yield hourly forecasts, receiving new conditioning through send.
Parameters:
-
x(DataArray) –Initial fields matching
input_coords(). -
conditioning(DataArray) –Initial conditioning at the input valid time on the model grid.
Yields:
-
DataArray–Forecasts beginning with
initialize. The rear hook runs before every yield and the front hook before each subsequent step.