Versions Compared

Key

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

Problem

You are trying to convert a GRIB edition 1 field to edition 2 via grib_set but it fails

Solution

Let's say you have a GRIB1 file with the paramId=201 which is "Maximum temperature at 2 metres since previous post-processing". You try to convert it to edition 2

Code Block
% grib_ls -p paramId,shortName mx2t.grib1
paramId     shortName
201         mx2t

% grib_set -s edition=2 mx2t.grib1 mx2t.grib2
ECCODES ERROR: grib_set_values[4] typeOfStatisticalProcessing (type=long) failed: Key/value not found
ECCODES ERROR: grib_set_values[0] edition (type=long) failed: Key/value not found

This is because the definition of the parameter 201 contains the key "typeOfStatisticalProcessing". Check the GRIB2 representation of this parameter in the Parameter database.


Panel
bgColor#fff

Content by Label
showLabelsfalse
max5
spacesUDOC
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("grib","grib_set") and type = "page" and space = "UDOC"
labelsgrib grib_set

...

Page properties
hiddentrue


Related issues