Skip to content

Improve unit handling #511

Description

@VeraChristina

Is your feature request related to a problem? Please describe.

Variables from different sources/datasets may have different units. In inferene we need to ensure that the variables we provide as inputs to the model have the expected units, i.e. the units used during training.

Describe the solution you'd like

PR ecmwf/anemoi-transform#258 adds 'units' to the variable class and functionality to check for compatibility of units. This information is part of the "dataset" metadata of the checkpoint, and we want to use it to better handle units in inference.

Steps:

  • Add a unit check. Use the functionality from transforms to check for compatibility of the units specified in the metadata of the checkpoint (stored as part of the dataset metadata) and the units of variables in the dataset provided. Throw an error for incompatible units.
  • Consider implementing on-the-fly conversion of units.

Describe alternatives you've considered

No response

Additional context

Related issue in anemoi-core: ecmwf/anemoi-core#1134

Organisation

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestroadmapThis is on the roadmap and will be worked on

    Projects

    Status
    To be triaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions