DLESyMv0_ISCCP_ERA5LatLon#
- class earth2studio.models.px.DLESyMv0_ISCCP_ERA5LatLon(
- *args,
- use_ttr=True,
- ttr_clim_mean=None,
- ttr_clim_std=None,
- olr_clim_mean=None,
- olr_clim_std=None,
- olr_floor=0.0,
- **kwargs,
- GlobalCM202440 GB
Lat/lon convenience wrapper for
DLESyMv0_ISCCP_ERA5.Combines the DLESyMv0_ISCCP_ERA5 climate checkpoints (see
DLESyMv0_ISCCP_ERA5) with the lat/lon regridding interface ofDLESyMLatLon. Inputs are accepted on the equiangular lat/lon grid (so any ERA5-compatibleDataSourceworks directly), regridded to HEALPixnside=64internally, and the outputs are regridded back to lat/lon before being returned. This is the recommended entry point for most users of the upstream checkpoints, including climate-timescale rollouts.Like
DLESyMv0_ISCCP_ERA5, whenuse_ttr=True(default) the wrapper advertises ERA5ttras the radiative input variable and applies the per-day-of-year moment-matching TTR -> OLR transform internally. The transform is applied after the initial condition is regridded to HEALPix; subsequent rollout steps reuse the model’s own OLR output, so it is only applied once. Derived variables (ws10mfromu10m/v10mandtau300-700fromz300/z700) and SST NaN-interpolation are handled identically toDLESyMLatLon.- Parameters:
*args (Any) – Positional arguments forwarded to
DLESyMv0_ISCCP_ERA5.**kwargs (Any) – Keyword arguments forwarded to
DLESyMv0_ISCCP_ERA5(includinguse_ttrand the climatology arrays).use_ttr (bool)
ttr_clim_mean (ndarray | None)
ttr_clim_std (ndarray | None)
olr_clim_mean (ndarray | None)
olr_clim_std (ndarray | None)
olr_floor (float)
**kwargs
Note
See
DLESyMv0_ISCCP_ERA5andDLESyMLatLonfor details. Model hooks applied during iteration operate on the HEALPix grid, as withDLESyMLatLon.Example
pkg = DLESyMv0_ISCCP_ERA5LatLon.load_default_package() model = DLESyMv0_ISCCP_ERA5LatLon.load_model(pkg, use_ttr=True) # x, coords come straight from an ERA5 data source on the lat/lon grid x, coords = fetch_data(...) y, y_coords = model(x, coords) atmos, atmos_coords = model.retrieve_valid_atmos_outputs(y, y_coords) ocean, ocean_coords = model.retrieve_valid_ocean_outputs(y, y_coords)
- __call__(x, coords)[source]#
Runs upstream DLESyM forward 1 coupled step, regridding to/from HEALPix.
- Parameters:
x (torch.Tensor) – Input tensor on the lat/lon grid, with
ttrinvariablewhenuse_ttr=True.coords (CoordSystem) – Input coordinate system (lat/lon).
- Returns:
Output tensor and coordinates on the lat/lon grid (in model variable space:
rlutrather thanttr).- Return type:
tuple[torch.Tensor, CoordSystem]
- create_iterator(x, coords)[source]#
Create a time-integration iterator (yields initial condition first).
- Parameters:
x (torch.Tensor) – Input tensor.
coords (CoordSystem) – Input coordinate system.
- Yields:
Iterator[tuple[torch.Tensor, CoordSystem]] –
(x, coords)at each step. The first yield is the initial condition in model variable space (rlut, post-transform).- Return type:
Iterator[tuple[Tensor, OrderedDict[str, ndarray]]]
- classmethod load_default_package()[source]#
Default DLESyMv0_ISCCP_ERA5 model package on HuggingFace.
- Return type:
- classmethod load_model(
- package,
- use_ttr=True,
- atmos_model_idx=0,
- ocean_model_idx=0,
Load the DLESyMv0_ISCCP_ERA5 prognostic from a package.
- Parameters:
package (Package) – Model package containing
config.yaml,atmos_model_*.mdlus,ocean_model_*.mdlus, the HEALPix lat/lon and constant fields, and (whenuse_ttr=True)era5_ttr_doy_stats_hpx64.ncandisccp_olr_doy_stats_hpx64.nc.use_ttr (bool, optional) – See
DLESyMv0_ISCCP_ERA5. Defaults to True.atmos_model_idx (int, optional) – Index into
cfg.models.atmos_model_checkpoints. Defaults to 0.ocean_model_idx (int, optional) – Index into
cfg.models.ocean_model_checkpoints. Defaults to 0.
- Returns:
Loaded
DLESyMv0_ISCCP_ERA5instance.- Return type:
PrognosticModel