You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 54 Next »

DESCRIPTION

List content of BUFR files printing values of some keys. It does not fail when a key is not found.

USAGE

bufr_ls [options] file file ...

OPTIONS


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


-F format

C style format for floating point values.


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


-B order by directive

Order by. The output will be ordered according to the order by directive. Order by example: "step asc, centre desc" (step ascending and centre descending)


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


-n namespace

All the keys belonging to namespace are printed.


-m

Mars keys are printed.


-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

bufr_ls examples

  1. Without options a default list of keys is printed. The default list can be different depending on the type of BUFR message.

     
    >  bufr_ls ../data/bufr/syno_multi.bufr 
    
    The result is:
     
    ../data/bufr/syno_multi.bufr
    centre                     masterTablesVersionNumber  localTablesVersionNumber   rdbType                    rdbSubtype                 rdbtimeYear                rdbtimeMonth               typicalDate                typicalTime                numberOfSubsets            localLatitude              localLongitude             
    98                         13                         1                          1                          1                          2009                       1                          20090124                   120000                     1                          70.93                      -8.67                     
    98                         13                         1                          1                          1                          2009                       1                          20090124                   120000                     1                          77                         15.5                      
    98                         13                         1                          1                          1                          2009                       1                          20090124                   120000                     1                          78.92                      11.93                     
    3 of 3 messages in ../data/bufr/syno_multi.bufr
    
    3 of 3 total messages in 1 files
    


  2. It is allowed to use wildcards in filenames.

     
    >  bufr_ls ../data/bufr/syno_*.bufr 
    


  3. To list only a specific set of keys use the -p option.

     
    >  bufr_ls -p totalLength,bufrHeaderCentre,bufrHeaderSubCentre ../data/bufr/syno_multi.bufr 
    


  4. To list only a subset of messages use the -w (where option). Only the 12 UTC messages are listed with the following line.

     
    >  bufr_ls -w typicalTime="120000" ../data/bufr/syno_*.bufr
    


  5. All the non-12 UTC messages are listed as follows:

     
    >   bufr_ls -w typicalTime!="120000" ../data/bufr/syno_*.bufr
    


  6. To list only the scond message from a BUFR file:

     
    >  bufr_ls -w count=2 ../data/bufr/syno_multi.bufr
    


  • No labels