Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Excerpt
hiddentrue

A BUFR message is made of some headers and a data section. The structure of the data section is defined in the headers by a sequence of BUFR descriptors, which are sequences of six digit numbers having a particular meaning (see  BUFR tables). To modify this sequence of descriptors ecCodes provides the key unexpandedDescriptors. As an example to change the structure of a message to obtain an upper air report (TEMP) the unexpanded descriptors have to be set as

Step-by-step guide

A BUFR message is made of some headers and a data section. The structure of the data section is defined in the headers by a sequence of BUFR descriptors, which are sequences of six digit numbers having a particular meaning (see  BUFR tables). To modify this sequence of descriptors ecCodes provides the key unexpandedDescriptors. As an example to change the structure of a message to obtain an upper air report (TEMP) the unexpanded descriptors have to be set as:

...

This can be done using any of the language interfaces (Fortran 90, python Python or C), and also using the command line tools.

...

Code Block
languagepowershell
% bufr_filter -o temp.bufr change_structure.filter seed.bufr

...

The output file temp.bufr will be significantly different from the input message seed.bufr because it will have a data structure defined by the sequence 309052. The values in the new data structure will be all missing and the structure will be ready to accept values from the user.

The key unexpandeDescriptors unexpandedDescriptors can be set to an array of integers representing a sequence of BUFR descriptors. If we need to set a sequence which is a variation from a standard sequence or is not included in the table of official WMO sequences, we can explicitly set unexpandedDescriptors with the full sequence. As an example a sequence for aircraft reports including the seconds and pressure as non-coordinate parameter can be obtained by slightly modifying the sequence 311001–> 301051, 007002, 012001, 011001, 011002, 011031, 011032, 011033, 020041 and introducing the elements 004006 (second) and 10004 (pressure non-coordinate) in the sequence of descriptors.

...