grib
Utilities for working with GRIB parameters.
See https://codes.ecmwf.int/grib/param-db/ for more information.
- anemoi.utils.grib.shortname_to_paramid(shortname: str, **filters) int
Return the GRIB parameter id given its shortname.
- Parameters:
shortname (str) – Parameter shortname.
filters (Any) – Additional filters to disambiguate parameters with the same shortname (e.g. origin, encoding, table, discipline, category).
- Returns:
int – Parameter id.
>>> shortname_to_paramid(“2t”)
167
- anemoi.utils.grib.paramid_to_shortname(paramid: int, **filters) str
Return the shortname of a GRIB parameter given its id.
- Parameters:
paramid (int) – Parameter id.
filters (Any) – Additional filters to disambiguate parameters with the same shortname (e.g. origin, encoding, table, discipline, category).
- Returns:
str – Parameter shortname.
>>> paramid_to_shortname(167)
’2t’