...
Excerpt |
---|
|
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 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 conveniencemight be local parameters or local definitions. |
Warning |
---|
Please note: According to the WMO, the use of local tables in messages intended for non-local or international exchange is strongly discouraged. First of all ask the data provider for any local tables/definitions which they used in their GRIB messages. |
Step-by-step guide
Local tables for parameters
A common 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:
Code Block |
---|
|
/usr/local/share/eccodes/definitions/grib[edition] |
The parameter descriptions for a given centre
are contained in the directories:
Code Block |
---|
|
/usr/local/share/eccodes/definitions/grib[edition]/localConcepts/[centre:s]
|
So for example the GRIB edition 2 local parameters for DWD (centre=edzw) are defined in definitions/grib2/localConcepts/edzw
and GRIB edition 1 local parameters for SMHI (centre=eswi) are in definitions/grib1/localConcepts/eswi
.
The following in an example of the contents for the above files in order to handle ECMWF parameter Geopotential
in GRIB edition 1:
Code Block |
---|
language | bash |
---|
title | /usr/local/share/eccodes/definitions/grib1/localConcepts/ecmf/name.def |
---|
|
#Geopotential
'Geopotential' = {
table2Version = 128 ;
indicatorOfParameter = 129 ;
} |
Code Block |
---|
language | bash |
---|
title | /usr/local/share/eccodes/definitions/grib1/localConcepts/ecmf/paramId.def |
---|
|
#Geopotential
'129' = {
table2Version = 128 ;
indicatorOfParameter = 129 ;
} |
Code Block |
---|
language | bash |
---|
title | /usr/local/share/eccodes/definitions/grib1/localConcepts/ecmf/shortName.def |
---|
|
#Geopotential
'z' = {
table2Version = 128 ;
indicatorOfParameter = 129 ;
} |
Code Block |
---|
language | bash |
---|
title | /usr/local/share/eccodes/definitions/grib1/localConcepts/ecmf/units.def |
---|
|
#Geopotential
'm**2 s**-2' = {
table2Version = 128 ;
indicatorOfParameter = 129 ;
} |
And for GRIB edition 2, the contents of the same files for parameter Potential temperature gradient
are:
Code Block |
---|
language | bash |
---|
title | /usr/local/share/eccodes/definitions/grib2/localConcepts/ecmf/name.def |
---|
|
#Potential temperature gradient
'Potential temperature gradient' = {
discipline = 192 ;
parameterCategory = 129 ;
parameterNumber = 3 ;
} |
Code Block |
---|
language | bash |
---|
title | /usr/local/share/eccodes/definitions/grib2/localConcepts/ecmf/paramId.def |
---|
|
#Potential temperature gradient
'129003' = {
discipline = 192 ;
parameterCategory = 129 ;
parameterNumber = 3 ;
} |
Code Block |
---|
language | bash |
---|
title | /usr/local/share/eccodes/definitions/grib2/localConcepts/ecmf/shortName.def |
---|
|
#Potential temperature gradient
'ptgrd' = {
discipline = 192 ;
parameterCategory = 129 ;
parameterNumber = 3 ;
} |
Code Block |
---|
language | bash |
---|
title | /usr/local/share/eccodes/definitions/grib2/localConcepts/ecmf/units.def |
---|
|
#Potential temperature gradient
'K' = {
discipline = 192 ;
parameterCategory = 129 ;
parameterNumber = 3 ;
} |
Local Definitions (Local Use section)
Local definitions are also required when one needs to store information which is not part of the standard GRIB header. This would typically be a 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 |
---|
language | bash |
---|
title | /usr/site/eccodes/definitions/mars/stream.table |
---|
|
# 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:
Code Block |
---|
|
/usr/local/share/eccodes/definitions/grib[edition] |
The parameter descriptions for a given centre
are contained in the files directories:
Code Block |
---|
|
/usr/local/share/eccodes/definitions/grib[edition]/localConcepts/[centre:s]
|
The following are examples of the contents for the above files in order to handle ECMWF parameter Geopotential
in GRIB edition 1:
Code Block |
---|
language | bash |
---|
title | /usr/local/share/eccodes/definitions/grib1/localConcepts/ecmf/name.def |
---|
|
#Geopotential
'Geopotential' = {
table2Version = 128 ;
indicatorOfParameter = 129 ;
} |
Code Block |
---|
language | bash |
---|
title | /usr/local/share/eccodes/definitions/grib1/localConcepts/ecmf/paramId.def |
---|
|
#Geopotential
'129' = {
table2Version = 128 ;
indicatorOfParameter = 129 ;
} |
Code Block |
---|
language | bash |
---|
title | /usr/local/share/eccodes/definitions/grib1/localConcepts/ecmf/shortName.def |
---|
|
#Geopotential
'z' = {
table2Version = 128 ;
indicatorOfParameter = 129 ;
} |
Code Block |
---|
language | bash |
---|
title | /usr/local/share/eccodes/definitions/grib1/localConcepts/ecmf/units.def |
---|
|
#Geopotential
'm**2 s**-2' = {
table2Version = 128 ;
indicatorOfParameter = 129 ;
} |
In GRIB edition 2, the contents of the same files for parameter Geopotential
are:
Code Block |
---|
language | bash |
---|
title | /usr/local/share/eccodes/definitions/grib2/localConcepts/ecmf/name.def |
---|
|
#Geopotential
'Geopotential' = {
discipline = 0 ;
parameterCategory = 3 ;
parameterNumber = 4 ;
} |
Code Block |
---|
language | bash |
---|
title | /usr/local/share/eccodes/definitions/grib2/localConcepts/ecmf/paramId.def |
---|
|
#Geopotential
'129' = {
discipline = 0 ;
parameterCategory = 3 ;
parameterNumber = 4 ;
} |
Code Block |
---|
language | bash |
---|
title | /usr/local/share/eccodes/definitions/grib2/localConcepts/ecmf/shortName.def |
---|
|
#Geopotential
'z' = {
discipline = 0 ;
parameterCategory = 3 ;
parameterNumber = 4 ;
} |
Code Block |
---|
language | bash |
---|
title | /usr/local/share/eccodes/definitions/grib2/localConcepts/ecmf/units.def |
---|
|
#Geopotential
'm**2 s**-2' = {
discipline = 0 ;
parameterCategory = 3 ;
parameterNumber = 4 ;
} |
Install and test your changes
...
Also please study the slides here: Training course presentation.
And the How-To Article GRIB: Converting edition 1 to 2 (The "Local configuration" section)
...