InterpModAFNO¶
GlobalMRF202440 GBNVIDIAPyTorch
Import path: earth2studio.models.px.InterpModAFNO
View source on GitHub View install commands
Documentation¶
Bases: Module, AutoModelMixin, PrognosticMixin
ModAFNO interpolation for global prognostic models. Interpolates a forecast model to a shorter time-step size (by default from 6 to 1 hour). Operates on 0.25 degree lat-lon equirectangular grid with 73 variables.
Note
For more information on the model, please refer to:
Warning
The model requires a base forecast model to be set before execution. This can be
done by setting the px_model attribute or using the load_model method.
Parameters:
-
interp_model(Module) –The interpolation model that performs the time interpolation
-
center(Tensor) –Model center normalization tensor
-
scale(Tensor) –Model scale normalization tensors
-
geop(Tensor) –Geopotential height data used as a static feature
-
lsm(Tensor) –Land-sea mask data used as a static feature
-
px_model(PrognosticModel, default:None) –The base forecast model that produces the coarse time resolution forecasts. If not provide, should be set by the user before executing the model, by default None.
-
num_interp_steps(int, default:6) –Number of interpolation steps to perform between forecast steps, by default 6
-
prepare_endpoint(Callable[[DataArray], DataArray], default:None) –Prepare the left interpolation endpoint without advancing time, for example by computing diagnostics absent from the base input. Applied after front hooks, including restored history. The public initial yield is unchanged.
__call__ ¶
create_iterator ¶
Yield interpolated chunks, beginning with initialization's prediction.
Parameters:
-
x(DataArray) –Initial history matching
input_coords().
Yields:
-
DataArray–Interpolated chunks after the rear hook. The front hook runs before subsequent steps; edits at coarse forecast times feed the nested model.
load_model
classmethod
¶
load_model(
package: Package,
px_model: PrognosticModel | None = None,
) -> PrognosticModel
Load prognostic from package
Parameters:
-
package(Package) –Package to load model from
-
px_model(PrognosticModel | None, default:None) –The base forecast model that produces the coarse time resolution forecasts. If None, should be set manually, by default None
Returns:
-
PrognosticModel–Prognostic model