post_processors
accumulate
- class anemoi.inference.post_processors.accumulate.Accumulate(context: Context, metadata: Metadata, *, accumulations: list[str] | None = None, allow_negative: bool = False)
Bases:
ProcessorAccumulate fields from zero and return the accumulated fields.
- Parameters:
context (Any) – The context in which the processor is running.
metadata (Metadata) – Metadata corresponding to the dataset this processor is handling.
accumulations (Optional[List[str]], optional) – List of fields to accumulate, by default None. If None, the fields are taken from the context’s checkpoint.
allow_negative (bool, optional) – Whether to allow negative values in the accumulation, by default False.
assign
backward_transform_filter
earthkit_state
Code to wrap and unwrap state dictionaries into earthkit.data field lists. So that we can pass them through anemoi-transorm filters.
- class anemoi.inference.post_processors.earthkit_state.StateFieldGeography(field: Any)
Bases:
objectGeographical information of a state field.
- Parameters:
field (Any) – The field containing geographical data.
- class anemoi.inference.post_processors.earthkit_state.StateFieldMetadata(field: Any)
Bases:
RawMetadataMetadata for a state field.
- Parameters:
field (Any) – The field containing metadata.
- property geography: StateFieldGeography
Geographical information of the field.
- Type:
- class anemoi.inference.post_processors.earthkit_state.StateField(*args, **kwargs)
Bases:
FieldState field containing name, values, and state information.
- Parameters:
name (str) – The name of the field.
values (FloatArray) – The values of the field.
state (Dict[str, Any]) – The state information associated with the field.
- anemoi.inference.post_processors.earthkit_state.wrap_state(state: dict[str, Any]) FieldList
Transform a state dictionary into an earthkit.data field list.
- Parameters:
state (Dict[str, Any]) – The state dictionary to be transformed.
- Returns:
The transformed field list.
- Return type:
ekd.FieldList
extract
- class anemoi.inference.post_processors.extract.ExtractBase(context: Context, metadata: Metadata)
Bases:
ProcessorBase class for processors that extract data from the state.
- class anemoi.inference.post_processors.extract.ExtractSlice(context: Context, metadata: Metadata, *slice_args: int)
Bases:
ExtractBaseExtract a subset of points from the state based on a slice.
- Parameters:
context (Context) – The context in which the processor is running.
metadata (Metadata) – Metadata corresponding to the dataset this processor is handling.
slice_args (int) – Arguments to create a slice object. This can be a single integer or a tuple of integers representing the start, stop, and step of the slice.