Versions Compared

Key

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

...

The conversion from GRIB edition 1 (GRIB1) to edition 2 (GRIB2) is a format translation without any loss of information. Conversely the conversion from GRIB2 to GRIB1 is not always lossless because the edition 2 format has been extended to allow a wider set of scientific fields to be coded. Note: Converting to edition 1 is not supported.

Since the new GRIB2 format is going to replace GRIB1 we will focus more on the GRIB1 to GRIB2 conversion rather than the opposite, which sometimes is not possible.

The conversion algorithm should be easy to implement, but there are some factors making it challenging. First of all the new designed GRIB2 is in some points semantically different from GRIB1. Therefore it doesn't allow an easy mapping of the meaning across the two versions. Moreover some of the numeric code tables semantically identical are numerically different, which again doesn't allow an easy mapping between them, because the numeric codes for the same information element are different. We refer in particular to the type of level which is numerically different in the two editions.

...

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.

...