...
Excerpt | ||
---|---|---|
| ||
Users can define their own local BUFR tables to adapt ecCodes to their own needs e.g. to use a local descriptor. |
...
Warning |
---|
Please note: |
Step-by-step guide
Users can define their own local BUFR tables to adapt ecCodes to their own needs e.g. to use a local descriptor.
...
...
The local BUFR tables are stored in the following definitions directories:
...
The environment variable ECCODES_DEFINITION_PATH
can be set to locate local BUFR tables. This is similar to how the PATH environment variable works in Unix, it is a list of directories separated by colons (":") on Unix and semi-colons (";") on Windows:
export ECCODES_DEFINITION_PATH=/path/to/local/defs:/path/to/default/defs
The library searches for each required definition file first in /path/to/local/defs
and then in /path/to/default/defs
. If the file is found in /path/to/local/defs
then it is used by the decoding engine.
...
Code Block |
---|
% codes_info ecCodes Version 2.230.0 Default definition files path is used: /usr/local/apps/eccodes/2.230.0/share/eccodes/definitions Definition files path can be changed by setting ECCODES_DEFINITION_PATH environment variable Default SAMPLES path is used: /usr/local/apps/eccodes/2.230.0/share/eccodes/samples SAMPLES path can be changed by setting ECCODES_SAMPLES_PATH environment variable |
On this platform, ecCodes is installed in /usr/local/apps/eccodes/2.230.0
and the definitions are in /usr/local/apps/eccodes/2.230.0/share/eccodes/definitions
.
...
Code Block |
---|
% def=`codes_info -d` % echo $def /usr/local/apps/eccodes/2.230.0/share/eccodes/definitions |
...
- Try decoding the BUFR file "
ikco_217.local.bufr
" using bufr_dump. This file uses a local table version (localTablesVersionNumber=66).
Decoding should fail as ecCodes does not know about these descriptors. - Run the
codes_info
tool to find the location of the default definitions. - Now set
ECCODES_DEFINITION_PATH
to include the provided "mydefs
" directory.
E.g.export ECCODES_DEFINITION_PATH=`pwd`/mydefs:`codes_info -d`
- Now see if ecCodes can decode the BUFR file.
- Search the output of bufr_dump for the overridden unit "
MyOwnUnits
".
This was added as an example of a centre defining its own parameter attributes
Related articles
Content by Label | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...