pycontrails.core.met_var

Module containing core met variables.

Classes

MetVariable(short_name, standard_name[, ...])

Met variable defined using CF, ECMWF, and WMO conventions.

class pycontrails.core.met_var.MetVariable(short_name, standard_name, long_name=None, level_type=None, ecmwf_id=None, grib1_id=None, grib2_id=None, units=None, amip=None, description=None)

Bases: object

Met variable defined using CF, ECMWF, and WMO conventions.

When there is a conflict between CF, ECMWF, and WMO conventions, CF takes precedence, then WMO, then ECMWF.

References

Used for defining support parameters in a grib-like fashion.

amip = None

AMIP identifier, if defined.

property attrs

Return a dictionary of met variable attributes.

Compatible with xr.Dataset or xr.DataArray attrs.

Returns:

dict[str, str] – Dictionary with MetVariable attributes.

description = None

Description

ecmwf_id = None

ECMWF Grib variable id, if defined. See ECMWF Parameter Database

Database link in the ECMWF Parameter Database if ecmwf_id is defined.

Returns:

str – Database link in the ECMWF Parameter Database

grib1_id = None

WMO Grib v1 variable id, if defined. See WMO Codes Registry, Grib Edition 1 and CF Standard Names, version 77 # noqa: E501

grib2_id = None

WMO Grib 2 variable id, if defined. See WMO Codes Registry, Grib Edition 2 Tuple represents (disciple, category, number)

level_type = None

Level type One of “surface”, “isobaricInhPa”, “nominalTop”

long_name = None

Long variable name.

short_name

Short variable name. Chosen for greatest consistency between data sources.

standard_name

CF standard name, if defined. Otherwise a standard name is chosen for consistency.

units = None

Canonical CF units, if defined.