Versions Compared

Key

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

DESCRIPTION

Dump the content of a BUFR file in different formats.

USAGE

bufr_dump [options] bufr_file bufr_file ...

OPTIONS


-j s|f|a

JSON mode (JavaScript Object Notation). Options: s->structure, f->flat (only data), a->all attributes Default mode is structure.


-D filter|fortran|python|C

Decoding dump. Provides instructions to decode the input message. Options: filter -> filter instructions file to decode input BUFR fortran -> fortran program to decode the input BUFR python -> python script to decode the input BUFR C -> C program to decode the input BUFR Default mode is filter.


-E filter|fortran|python|C

Encoding dump. Provides instructions to create the input message. Options: filter -> filter instructions file to encode input BUFR fortran -> fortran program to encode the input BUFR python -> python script to encode the input BUFR C -> C program to encode the input BUFR Default mode is filter.


-O

Octet mode. WMO documentation style dump.


-p

Plain dump.


-d

Print all data values.


-u

Print only some values.


-t

Print type information.


-f

Force. Force the execution not to fail on error.


-H

Print octet content in hexadecimal format.


-a

Dump aliases.


-w key[:{s|d|i}]{=|!=}value,key[:{s|d|i}]{=|!=}value,...

Where clause. Messages are processed only if they match all the key/value constraints. A valid constraint is of type key=value or key!=value. For each key a string (key:s), a double (key:d) or an integer (key:i) type can be specified. Default type is string. In the value you can also use the forward-slash character '/' to specify an OR condition (i.e. a logical disjunction) Note: only one -w clause is allowed.


-s key[:{s|d|i}]=value,key[:{s|d|i}]=value,...

Key/values to set. For each key a string (key:s), a double (key:d) or an integer (key:i) type can be defined. By default the native type is set.


-7

Does not fail when the message has wrong length


-V

Version.


-X offset

Input file offset in bytes. Processing of the input file will start from "offset".

bufr_dump examples

  1. To dump BUFR messages into a flat JSON format.

    Code Block
    > bufr_dump -jf ../data/bufr/aaen_55.bufr
    


  2. To dump BUFR messages into a structured JSON format. Note: This is the default if you omit the -j option

    Code Block
    > bufr_dump -js ../data/bufr/aaen_55.bufr
    


  3. To dump a Fortran program with instructions to create (encode) the input message.

    Code Block
    > bufr_dump -Efortran ../data/bufr/aaen_55.bufr > encode.aaen_55.f90
    
    Now compile and run 'encode.aaen_55.f90'. This will create a new BUFR file called 'outfile.bufr'. Check this is the the same as the input.
    Code Block
    > bufr_compare ../data/bufr/aaen_55.bufr outfile.bufr
    


  4. To dump a Python program with instructions to decode the input message.

    Code Block
    > bufr_dump -Dpython ../data/bufr/aaen_55.bufr > decode.aaen_55.py
    
    Examine the generated Python script 'decode.aaen_55.py'. You will see how to access each of the BUFR keys


  5. To dump in a WMO documentation style with hexadecimal octet values (-H).

    Code Block
    > bufr_dump -OH ../data/bufr/syno_1.bufr
    


  6. To add key type information (-t).

    Code Block
    > bufr_dump -OtH ../data/bufr/syno_1.bufr