Some older GRIB decoders used to work on a number-based table to retrieve all the information from the message. This approach forced the user either to learn a code table or to use the documentation intensively. With ecCodes a key name based access is provided so that all the information contained in the GRIB message is retrieved through alphanumeric names. |
Keys
Some older GRIB decoders used to work on a number-based table to retrieve all the information from the message. This approach forced the user either to learn a code table or to use the documentation intensively. With ecCodes a key name based access is provided so that all the information contained in the GRIB message is retrieved through alphanumeric names.
Some key names are built from the official WMO documentation on the GRIB edition 1 and 2 coding standard removing the spaces in the key description and capitalizing the initials so that the caption:
identification of originating generating centre
is transformed into the key name:
identificationOfOriginatingGeneratingCentre
There are two different types of keys: coded and computed.
The coded keys are directly linked to octets of the GRIB message and their value is obtained by only decoding the octets. A list of all the coded keys in a message can be obtained using grib_dump without any option (use the -a option to obtain also their aliases).
The computed keys are obtained by combining other keys (coded or computed) and when their value is set all the related keys are set in a cascade process.
These keys provide a synthesis of the information contained in the GRIB message and are a safe way to set complex attributes such as the type of grid or the type of packing. They are also helpful in the interpretation of some octets such as the scanning mode whose bits are related to the way of scanning the grid. In this case the computed keys:
iScansNegatively jScansPositively jPointsAreConsecutive alternativeRowScanning (available only for edition 2)
will provide access to single bits of the scanning mode octet hiding its structure from the user.
For the computed keys we provide the following preliminary documentation that will be extended soon.
longitudeOfFirstGridPoint -> longitudeOfFirstGridPointInDegrees latitudeOfFirstGridPoint -> latitudeOfFirstGridPointInDegrees longitudeOfLastGridPoint -> longitudeOfLastGridPointInDegrees latitudeOfFirstGridPoint -> latitudeOfLastGridPointInDegrees latitudeOfFirstGridPoint -> latitudeOfFirstGridPointInDegrees iDirectionIncrement -> iDirectionIncrementInDegrees jDirectionIncrement -> jDirectionIncrementInDegrees
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.