...
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
...
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 is 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
arethe ECMWF parameter 'Potential temperature gradient'
in GRIB edition 2:
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/units.def |
---|
|
#Potential temperature gradient
'K' = {
discipline = 192 ;
parameterCategory = 129 ;
parameterNumber = 3 ;
} |
Warning |
---|
Note: It is important that you override only the files necessary to add your own local parameters. Do not copy the entire contents of the definitions directory! |
Install and test your changes
...
Code Block |
---|
% grib_ls -jn parameter out.grib2 |
You should get something like this:
Code Block |
---|
{
"centre": "ecmf",
"paramId": 129003,
"shortName": "ptgrd",
"units": "K",
"name": "Potential temperature gradient"
} |
![(smile)](/s/biakzp/9012/ly29vq/_/images/icons/emoticons/smile.svg)
Also please study the slides here: Training course presentation.
And the How-To Article GRIB: Converting edition 1 to 2 (The "Local configuration" section)
...