iris_grib.grib_phenom_translation

In this module:

  • grib1_phenom_to_cf_info

  • grib2_phenom_to_cf_info

  • cf_phenom_to_grib2_info

  • GRIBCode

Provide grib 1 and 2 phenomenon translations to + from CF terms.

This is done by wrapping ‘_grib_cf_map.py’, which is in a format provided by the metadata translation project.

Currently supports only these ones:

  • grib1 –> cf

  • grib2 –> cf

  • cf –> grib2

iris_grib.grib_phenom_translation.grib1_phenom_to_cf_info(table2_version, centre_number, param_number)

Lookup grib-1 parameter –> cf_data or None.

Returned cf_data has attributes:

  • standard_name

  • long_name

  • units : a cf_units.Unit

  • set_height : a scalar ‘height’ value , or None

iris_grib.grib_phenom_translation.grib2_phenom_to_cf_info(param_discipline, param_category, param_number)

Lookup grib-2 parameter –> cf_data or None.

Returned cf_data has attributes:

  • standard_name

  • long_name

  • units : a cf_units.Unit

iris_grib.grib_phenom_translation.cf_phenom_to_grib2_info(standard_name, long_name=None)

Lookup CF names –> grib2_data or None.

Returned grib2_data has attributes:

  • discipline

  • category

  • number

  • unitsa cf_units.Unit

    The unit represents the defined reference units for the message data.

class iris_grib.grib_phenom_translation.GRIBCode(edition, *args, **kwargs)

Make an object representing a specific Grib phenomenon identity.

The class of the result, and the list of its properties, depend on whether ‘edition’ is 1 or 2.

One of :

  • GRIBCode(edition=1, table_version, centre_number, number)

  • GRIBCode(edition=2, discipline, category, number)

Either provides a string representation, and supports creation from: keywords, another similar object; a tuple of numbers; or any string with 4 separate decimal numbers in it.