DESCRIPTION

Copies the content of BUFR files printing values of some keys. If the name of the output_bufr_file contains a key enclosed in square brackets, its value will be used.

USAGE

bufr_copy [options] bufr_file bufr_file ... output_bufr_file

OPTIONS


-f

Force. Force the execution not to fail on error.


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

Declaration of keys to print. For each key a string (key:s), a double (key:d) or an integer (key:i) type can be requested. Default type is string.


-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.


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

As -p adding the declared keys to the default list.


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

Where clause. Only BUFR messages matching the key/value constraints are copied to the output_bufr_file. For each key a string (key:s), a double (key:d) or an integer (key:i) type can be defined. Default type is string. Note: only one -w clause is allowed.


-V

Version.


-W width

Minimum width of each column in output. Default is 10.


-g

Copy GTS header.


-7

Does not fail when the message has wrong length


-X offset

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


-v

Verbose.

bufr_copy examples

  1. To copy only the SYNOP messages from a file

    >  bufr_copy -w dataCategory=0 in.bufr out.bufr
    


  2. To copy only the non-SYNOP messages from a file

    >  bufr_copy -w dataCategory!=0 in.bufr out.bufr
    


  3. Use the square brackets to insert the value of a key in the name of the output file.

    > bufr_copy in.bufr 'out_[dataCategory].bufr'