DataReplay¶
GlobalNVIDIAPyTorch
Import path: earth2studio.models.px.DataReplay
Documentation¶
Bases: Module, PrognosticMixin
Replay a data source through the prognostic model interface.
The caller supplies successive source frames as forcing. The source is a recommendation for the driver; executing the model never fetches data.
Parameters:
-
source(DataSource | ForecastSource) –Source to replay.
-
variable(str | list[str]) –Variables to fetch.
-
domain_coords(CoordSystem | GridDefinition | str) –Spatial coordinates, grid definition, or registered grid expected from the source.
-
step(timedelta64, default:timedelta64(6, 'h')) –Time between frames, by default np.timedelta64(6, "h")
__call__ ¶
Publish the supplied next source frame without iterator hooks.
Parameters:
-
x(DataArray) –Current fields matching
input_coords(). -
forcing(DataArray) –Caller-supplied next frame matching
output_coords(x).
Returns:
-
DataArray–Owned copy of the supplied frame with the input dtype and metadata.
create_iterator ¶
create_iterator(
x: DataArray, forcing: DataArray
) -> Generator[
DataArray,
DataArray | tuple[DataArray, ...] | None,
None,
]
Yield supplied forecasts, receiving each new source frame via send.
Parameters:
-
x(DataArray) –Initial fields matching
input_coords(). -
forcing(DataArray) –First forecast frame, supplied by the caller.
Yields:
-
DataArray–Forecasts beginning with the supplied frame. The rear hook runs before every yield and the front hook before each subsequent step.