Versions Compared

Key

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

...

List content of BUFR files printing values of some header keys. Only scalar keys can be printed. It does not fail when a key is not found.

USAGE

bufr_ls [options] bufr_file bufr_file ...

OPTIONS

...

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

...

C style format for floating-point values.

...

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

...

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) or , a double (key:d) or a long an integer (key:li) type can be specified. Default type is string.

...

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

...

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

...

bufr_ls examples

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

    Code Block
     
    >  bufr_ls ../data/bufr/syno_multi.bufr 
    
    The result is:
    Code Block
    ../data/bufr/temp_101.bufr 
    ../data/bufr/syno_multi.bufr
    masterTablesVersionNumber centre localTablesVersionNumber   rdbType                 masterTablesVersionNumber   rdbSubtype                 rdbtimeYear                rdbtimeMonth               localTablesVersionNumber   typicalDate                typicalTime                numberOfSubsetsrdbType            localLatitude        rdbSubtype      localLongitude           rdbtimeDate  
    13              rdbtimeTime           1     numberOfSubsets            localLatitude         1     localLongitude             
    ecmf        1                      13    2009                       1                          20090124                   120000                     1                          70.93 1                     -8.67     20090124                
    13    121435                     1                          170.93                      -8.67    1                 
    ecmf         2009                       113                          20090124                   120000                     1                          7720090124                         15.5                      
    13   120000                      1                          1                          120090124                        121435  2009                       1                          2009012477                   120000                     1                          78.9215.5                      11.93
    ecmf                     
    3 of 3 messages in ../data/bufr/syno_multi.bufr
    
    ../data/bufr/temp_101.bufr
    13                         1                          520090124                   120000       101              1          2012                1       10                   20090124      20121030                   000000121435                     1                          6078.7792                      -161.8311.93                     
    13 of 13 messages in ../data/bufr/tempsyno_101multi.bufr
    
    43 of 43 total messages in 21 files
    


  2. It is allowed to use wildcards in filenames.

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


  3. To list only a specific set of keys use the -p option. To print offset and count number in file use the keys offset and count Also the total count in a set of files is available as countTotal

    Code Block
     
    >  gribbufr_ls -p offsettotalLength,countbufrHeaderCentre,countTotalbufrHeaderSubCentre ../data/reduced*.grib1bufr/syno_multi.bufr 
    


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

    Code Block
     
    >  gribbufr_ls -w levelTypetypicalTime=pl"120000" ../tigge_pf_ecmwf.grib2 data/bufr/syno_*.bufr
    


  5. All the grib messages not on pressure levels non-12 UTC messages are listed as follows:

    Code Block
     
    >  grib bufr_ls -w levelTypetypicalTime!=pl"120000" ../data/bufr/tiggesyno_pf_ecmwf.grib2 *.bufr
    


  6. To get the closest grid point to a latitude/longitude. list only the second message from a BUFR file:

    Code Block
     
    > grib bufr_ls -l 51.46,-1.33,1 -p paramId,namew count=2 ../data/bufr/reducedsyno_gaussian_surfacemulti.grib2bufr