This article relates to GRIB edition 2
Problem
Setting the fixed surface keys in the wrong order can lead to incorrect values.
Solution
The keys in Section 4 that relate to fixed surface properties should be set such that the two "type" keys: typeOfFirstFixedSurface
and typeOfSecondFixedSurface
are set before the scale keys. For example:
Example C code
codes_handle* h = ...; ... codes_set_long(h, "typeOfFirstFixedSurface", 106); // Depth below land surface (m) codes_set_long(h, "typeOfSecondFixedSurface", 106); codes_set_long(h, "scaledValueOfFirstFixedSurface", 3); codes_set_long(h, "scaleFactorOfFirstFixedSurface", 2); codes_set_long(h, "scaledValueOfSecondFixedSurface", 5); codes_set_long(h, "scaleFactorOfSecondFixedSurface", 2);