Skip to content

DLESyMAtmos

GlobalS2S202540 GBNVIDIAPyTorch

Import path: earth2studio.models.px.DLESyMAtmos

View source on GitHub View install commands

Documentation

Bases: _DLESyMComponent

Atmosphere component of DLESyM, as a standalone prognostic model.

Takes the atmosphere's history on the native HEALPix grid and the sea surface temperature at the history's final lead time as forcing, and returns the atmosphere at every output lead time of one coupled cycle. The fused DLESyM drives each cycle with the SST at the cycle's start, which is the ocean's previous output; under [CoupledRunner][earth2studio.coupling.CoupledRunner], connect DLESyMOcean's SST into forcing slot 0 with time="hold".

The model loads only the atmosphere core from the package shared with DLESyM.

Parameters:

  • core (Module) –

    Atmosphere network core

  • hpx_lat (ndarray) –

    HEALPix latitude coordinates, shape (12, nside, nside)

  • hpx_lon (ndarray) –

    HEALPix longitude coordinates, shape (12, nside, nside)

  • nside (int) –

    HEALPix nside

  • center (ndarray) –

    Means of the output variables (prognostics then diagnostics), shape (num_output_variables,)

  • scale (ndarray) –

    Standard deviations of the output variables, same shape as center

  • coupling_center (ndarray) –

    Means of the ocean variables received as forcing, shape (num_coupling_variables,)

  • coupling_scale (ndarray) –

    Standard deviations of the ocean variables received as forcing, same shape as coupling_center

  • constants (ndarray) –

    Constant fields, shape (12, num_constants, nside, nside)

  • input_times (ndarray) –

    Input lead times, shape (num_input_times,)

  • output_times (ndarray) –

    Output lead times, shape (num_output_times,)

  • variables (list[str]) –

    Prognostic variables

  • coupling_variables (list[str]) –

    Ocean variables received as forcing

  • diagnostic_variables (list[str], default: None ) –

    Diagnostic output variables, which are not fed back as input, by default []

  • use_cln (bool, default: False ) –

    Whether the core uses conditional layer norm, by default False

  • condition_shape (int, default: None ) –

    Dimension of the conditional layer norm noise vector. Required if use_cln is True, by default None

Note

See DLESyM for more information about the model.

Example
package = DLESyMAtmos.load_default_package()
atmos = DLESyMAtmos.load_model(package)
ocean = DLESyMOcean.load_model(package)
runner = CoupledRunner(
    {"atmos": atmos, "ocean": ocean},
    [Connector("ocean", "atmos", time="hold"), Connector("atmos", "ocean")],
)

__call__

__call__(x: DataArray, sst: DataArray) -> DataArray

Advance one coupled cycle without hooks.

Parameters:

  • x (DataArray) –

    Atmosphere history matching input_coords().

  • sst (DataArray) –

    Sea surface temperature matching forcing_coords().

Returns:

  • DataArray –

    Atmosphere at the cycle's output lead times.

create_iterator

create_iterator(
    x: DataArray, sst: DataArray
) -> Iterator[DataArray]

Yield cycles with hooks, taking each step's SST through send.

Parameters:

  • x (DataArray) –

    Atmosphere history matching input_coords().

  • sst (DataArray) –

    Sea surface temperature matching forcing_coords().

Yields:

  • DataArray –

    Cycles, starting with initialization's prediction.

load_default_package classmethod

load_default_package() -> Package

Default DLESyM model package, shared with the fused DLESyM.

load_model classmethod

load_model(
    package: Package,
    atmos_model_idx: int = 0,
    version: Literal["v1.0", "v1.1"] = "v1.1",
) -> PrognosticModel

Load the atmosphere component from package

Parameters:

  • package (Package) –

    Package to load model from, the one DLESyM loads

  • atmos_model_idx (int, default: 0 ) –

    Index of atmos model weights to load, see DLESyM.load_model, by default 0

  • version (('v1.0', 'v1.1'), default: "v1.0" ) –

    Checkpoint version to load, see DLESyM.load_model, by default "v1.1"

Returns:

  • PrognosticModel –

    Atmosphere prognostic model

Examples using earth2studio.models.px.DLESyMAtmos