Types¶
ArrayCHW = Float[NDArray[float32], 'channels height width']
module-attribute
¶
ArrayHW = Float[NDArray[float32], 'height width']
module-attribute
¶
ArrayHWV = Float[NDArray[float32], 'height width variable']
module-attribute
¶
ArrayIndices2D = Int[NDArray[int64], 'height width']
module-attribute
¶
ArrayTCHW = Float[NDArray[float32], 'time channels height width']
module-attribute
¶
ArrayTHW = Float[NDArray[float32], 'time height width']
module-attribute
¶
TensorNCHW = Float[Tensor, 'batch channels height width']
module-attribute
¶
TensorNTCHW = Float[Tensor, 'batch time channels height width']
module-attribute
¶
CF_VARIABLE_ATTRIBUTES = {'ice_conc': {'long_name': 'sea ice concentration', 'standard_name': 'sea_ice_area_fraction', 'units': '1', 'valid_min': 0.0, 'valid_max': 1.0}}
module-attribute
¶
NDIM_HW = 2
module-attribute
¶
NDIM_NHW = 3
module-attribute
¶
NDIM_NTCHW = 5
module-attribute
¶
NDIM_THW = 3
module-attribute
¶
SEA_ICE_THRESHOLD = 0.15
module-attribute
¶
ColourScale
dataclass
¶
Specify how to colour a rendered panel, for a variable or a difference.
Attributes:
| Name | Type | Description |
|---|---|---|
cmap |
str
|
Matplotlib colourmap name (e.g., "viridis", "RdBu_r"). |
vmin |
float | None
|
Lower bound for the colour scale. |
vmax |
float | None
|
Upper bound for the colour scale. |
units |
str | None
|
Display units for the variable (e.g., "K", "m/s"). |
DataSpace
¶
Immutable description of a CHW data space, compared and hashed by value.
area
property
¶
Return the area of the data space.
channels
property
¶
Return the number of channels.
chw
property
¶
Return a tuple of [channels, height, width].
name
property
¶
Return the name.
shape
property
¶
Return the (height, width) shape.
from_dict(config)
classmethod
¶
to_dict()
¶
Return the DataSpace as a DictConfig.
Metadata
dataclass
¶
Structured metadata extracted from training configuration.
Attributes:
| Name | Type | Description |
|---|---|---|
model |
str | None
|
Model name (if available). |
n_history_steps |
int | None
|
Number of history steps used as model input window (days). |
n_samples |
int | None
|
Number of training points per epoch (if available). |
trained_epochs |
int | None
|
Number of epochs the model has been trained for. |
training_start |
str | None
|
Training start date string (if available). |
training_end |
str | None
|
Training end date string (if available). |
vars_by_source |
dict[str, list[str]] | None
|
Dictionary mapping dataset source names to lists of variable names. |
model = None
class-attribute
instance-attribute
¶
n_history_steps = None
class-attribute
instance-attribute
¶
n_samples = None
class-attribute
instance-attribute
¶
trained_epochs = None
class-attribute
instance-attribute
¶
training_end = None
class-attribute
instance-attribute
¶
training_start = None
class-attribute
instance-attribute
¶
vars_by_source = None
class-attribute
instance-attribute
¶
from_dataset(dataset, *, model_name=None, trained_epochs=None)
classmethod
¶
Build structured metadata from a dataset-like source.
ModelStepOutput
dataclass
¶
PlotSpec
dataclass
¶
Configure how sea-ice plots are rendered.
Attributes:
| Name | Type | Description |
|---|---|---|
title_groundtruth |
str
|
Title above the ground-truth panel. |
title_prediction |
str
|
Title above the prediction panel. |
title_difference |
str
|
Title above the difference panel. |
colourmap |
str
|
colourmap used for GT/prediction panels. |
dpi |
int
|
Dots per inch for figure rendering (default 300). |
include_difference |
bool
|
Whether to draw a difference panel. |
diff_mode |
DiffMode
|
Difference definition (e.g. "signed", "absolute", "smape"). |
selected_timestep |
int
|
Slice index when a single timestep is needed. |
vmin |
float | None
|
Lower bound for GT/prediction colour scale (None = infer). |
vmax |
float | None
|
Upper bound for GT/prediction colour scale (None = infer). |
include_ice_edge |
bool
|
Whether to overlay the sea ice edge contour in red. |
ice_edge_threshold |
float
|
Concentration value defining the sea ice edge contour. |
uncertainty_variables |
dict[str, str]
|
Maps each target variable to the variable in the same dataset group holding its reported standard uncertainty (used for the z-score panel). This does not need to be selected as an input variable. |
title_groundtruth = 'Ground Truth'
class-attribute
instance-attribute
¶
title_prediction = 'Prediction'
class-attribute
instance-attribute
¶
title_difference = 'Difference'
class-attribute
instance-attribute
¶
colourmap = 'viridis'
class-attribute
instance-attribute
¶
dpi = 300
class-attribute
instance-attribute
¶
include_difference = True
class-attribute
instance-attribute
¶
diff_mode = DiffMode.SIGNED
class-attribute
instance-attribute
¶
selected_timestep = 0
class-attribute
instance-attribute
¶
vmin = 0.0
class-attribute
instance-attribute
¶
vmax = 1.0
class-attribute
instance-attribute
¶
include_ice_edge = True
class-attribute
instance-attribute
¶
ice_edge_threshold = SEA_ICE_THRESHOLD
class-attribute
instance-attribute
¶
hemisphere = None
class-attribute
instance-attribute
¶
video_fps = 2
class-attribute
instance-attribute
¶
video_format = 'mp4'
class-attribute
instance-attribute
¶
per_variable_styles = field(default_factory=lambda: {'sic-osisaf:ice_conc': {'cmap': 'Blues_r'}, 'sic-ssmis:ice_conc': {'cmap': 'Blues_r'}})
class-attribute
instance-attribute
¶
uncertainty_variables = field(default_factory=lambda: {'ice_conc': 'total_standard_uncertainty'})
class-attribute
instance-attribute
¶
Timespan
¶
A span of time.
MIN_DATES_FOR_FREQUENCY = 2
class-attribute
instance-attribute
¶
end
cached
property
¶
Return the end date of the timespan.
frequency
cached
property
¶
Return the spacing between consecutive steps, or None if unknown.
Assumes uniform spacing derived from the first and last dates.
start
cached
property
¶
Return the start date of the timespan.
steps
cached
property
¶
Return the number of steps (dates) in the timespan.
BetaSchedule
¶
DiffMode
¶
Bases: StrEnum
Enum for difference-panel computation modes.
- SIGNED: target - prediction (can be ±, so symmetric colour scale around 0)
- ABSOLUTE: |target - prediction| (>= 0, sequential scale)
- SMAPE: |pred - target| / ((|pred|+|target|)/2) (>= 0, sequential scale)
Hemisphere
¶
MaskType
¶
RangeRestriction
¶
RolloutSpace
¶
SkipConnectionType
¶
SupportsMetadataFromDataset
¶
SupportsPerLeadTimeLoss
¶
AnemoiCleanupArgs
dataclass
¶
AnemoiDatasetStatus
¶
Bases: NamedTuple
Status of an Anemoi dataset.