Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt
hiddentrue

GRIB messages are at the moment exchanged in edition 1 or 2. Although the information content of two messages in different editions is almost the same, their binary format is very different and organised in a different way

Step-by-step guide

GRIB messages are at the moment exchanged in edition 1 or 2. Although the information content of two messages in different editions is almost the same, their binary format is very different and organised in a different way.

...

The aim of the conversion facilities provided in ecCodes is to be flexible enough to define conversion rules also for local tables and local extensions and to allow the user to configure locally the library to interpret fields coded in a local flavour of the GRIB specifications.

Conversion technique

To convert a GRIB message from edition 1 to edition 2 it is enough to set the key edition=2 (see grib_set). The conversion is performed automatically provided that the library is configured properly to translate the parameter information. The information regarding time and space is always translated automatically, while the parameter information, which is sometime dependent on local tables, has to be configured by the user if it is not included in the main set of parameter conversion rules contained in ecCodes distribution.

Parameters conversion

A list of all the parameters recognised by ecCodes is reported for consultation. The list contains their representation in edition 1 and 2 and for some of them the NetCDF CF compliant name.

...

The same syntax can be used to describe the same parameter in grib2 to be able to convert the information from grib1 to grib2 and to be able to have the same paramId, name, shortName, units for both editions.

Local configuration

A site or user configuration is possible to allow interpretation and conversion of grib 1 messages encoded in non standard local ways. To separate the definition files contained in the installation directory from the definition files described in the previous section, in which the user can put some extra and local parameter definitions, the environment variable ECCODES_DEFINITION_PATH can be used.

...

so that our definition of the parameters will be read by ecCodes during run time. The content of the definition files in the directory /home/u/definitions has to be properly written following the instructions of the previous section.


Content by Label
showLabelsfalse
max5
spaces~usa
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("kb-how-to-article","eccbufr-faqs","grib","grib1","grib2","conversion","keys") and type = "page" and space = "UDOC"
labelskb-how-to-article

...