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,
)[source]#
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 of DLESyMLatLon. Inputs are accepted on the equiangular lat/lon grid (so any ERA5-compatible DataSource works directly), regridded to HEALPix nside=64 internally, 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, when use_ttr=True (default) the wrapper advertises ERA5 ttr as 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 (ws10m from u10m/v10m and tau300-700 from z300/z700) and SST NaN-interpolation are handled identically to DLESyMLatLon.

Parameters:
  • *args (Any) – Positional arguments forwarded to DLESyMv0_ISCCP_ERA5.

  • **kwargs (Any) – Keyword arguments forwarded to DLESyMv0_ISCCP_ERA5 (including use_ttr and 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_ERA5 and DLESyMLatLon for details. Model hooks applied during iteration operate on the HEALPix grid, as with DLESyMLatLon.

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 ttr in variable when use_ttr=True.

  • coords (CoordSystem) – Input coordinate system (lat/lon).

Returns:

Output tensor and coordinates on the lat/lon grid (in model variable space: rlut rather than ttr).

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:

Package

classmethod load_model(
package,
use_ttr=True,
atmos_model_idx=0,
ocean_model_idx=0,
)[source]#

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 (when use_ttr=True) era5_ttr_doy_stats_hpx64.nc and isccp_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_ERA5 instance.

Return type:

PrognosticModel

Examples using earth2studio.models.px.DLESyMv0_ISCCP_ERA5LatLon#

Running the DLESyM ISCCP-ERA5 Model

Running the DLESyM ISCCP-ERA5 Model