Versions Compared

Key

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

You may wonder why you can do this:

% grib_set -s scaleFactorOfFirstFixedSurface=missing,scaledValueOfFirstFixedSurface=missing $IN $OUT

But not:

% grib_set -s typeOfFirstFixedSurface=missing $IN $OUT
ECCODES ERROR   :  unable to set typeOfFirstFixedSurface=missing (Value cannot be missing)

The answer lies in the difference between those keys. scaleFactorOfFirstFixedSurface and scaledValueOfFirstFixedSurface are integer keys with 1 and 4 bytes respectively. Their values can be any integer that will fit in that many bytes, for example scaledValueOfFirstFixedSurface can go from 0 to 4,294,967,295 (=2**32 - 1). Setting it to the maximum value will set all the bits to 1 which is the MISSING value (WMO Regulation 92.1.4). So when you use the keyword "missing" in the first command, ecCodes actually sets this value.

...

So the correct command would be:

% grib_set -s typeOfFirstFixedSurface=255  $IN $OUT


Content by Label
showLabelsfalse
max5
spacesUDOC
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "grib" and label = "grib" and type = "page" and space = "UDOC"
labelsgrib

...

Page properties
hiddentrue


Related issues