Skip to content

DiagnosticWrapper

Import path: earth2studio.models.px.DiagnosticWrapper

View source on GitHub

Documentation

Bases: Module, PrognosticMixin

Compose a native DataArray prognostic with one or more diagnostics.

Preparation callables customize signature planning, interpolation and output concatenation. Tensor-named preparation slots now consume labelled fields. The explicit state retains the nested prognostic continuation and any fields that are absent from the published diagnostic grid.

__call__

__call__(x: DataArray) -> DataArray

Advance the nested model once and diagnose its output, without hooks.

Parameters:

  • x (DataArray) –

    Initial fields matching the nested model's input signature.

Returns:

  • DataArray –

    Forecast transformed by the configured diagnostic pipeline and output preparation function.

create_iterator

create_iterator(
    x: DataArray,
) -> Generator[DataArray, None, None]

Yield diagnosed forecasts, beginning with initialization's prediction.

Parameters:

  • x (DataArray) –

    Initial history matching input_coords().

Yields:

  • DataArray –

    Diagnosed forecasts after the rear hook. The front hook runs before subsequent steps; overlapping prognostic edits feed the nested model.