...
Warning |
---|
Please note: |
Step-by-step guide
Local Definitions (Local Use section)
Local definitions are required when one needs to store information which is not part of the standard GRIB header. This would typically be a mars MARS key (like class
, stream
, type
and version number or experiment identifier, expver
) or information that the data producer wants to have in each GRIB for convenience.
...
Code Block | ||
---|---|---|
| ||
codetable[1] marsClass "mars/class.table" = "od" : dump,lowercase; codetable[1] marsType "mars/type.table" = "an" : dump,string_type,lowercase; codetable[2] marsStream "mars/stream.table" = "oper" : dump,lowercase ; ksec1expver[4] experimentVersionNumber = "0001" : dump; alias mars.class = marsClass; alias mars.type = marsType; alias mars.stream = marsStream; alias mars.expver = experimentVersionNumber; |
Example of a GRIB2 local definition
Suppose we want to add a GRIB2 local definition for a given centre (let's say code 87). The local definition will have some integer keys and a string key.
So first we create the file "grib2LocalSectionNumber.87.table" and place it in the definitions/grib2 directory. This is a codetable with codes for the local definition numbers and a brief description.
...
Here we assign 2 bytes to the myVersion field (a positive integer), 10 bytes to the ASCII character string myName and 1 byte to the final myNumber integer.
Creating your own tables
Sites can create their own tables in order to adapt ecCodes to their needs. The clear candidates for site specific tables are:
...
Code Block | ||||
---|---|---|---|---|
| ||||
# GRIBcode Acronym Long name 1001 eebc Ensemble using ECMWF data as Boundary Conditions 1002 eeic Ensemble using ECMWF data as Initial Conditions |
Local tables for parameters
Another candidate for local adaptation is the handling of local parameters. The standard parameter descriptions are contained in the files name.def
, paramId.def
, shortName.def
and units.def
in directories:
...