DESCRIPTION
List content of grib 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. Grib messages 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.
...
json output
...
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)
...
Value close to the point of a Latitude/Longitude. Allowed values for MODE are: 4 (4 values in the nearest points are printed) Default 1 (the value at the nearest point is printed) file (file is used as mask. The closer point with mask value>=0.5 is printed) 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.
...
Data value corresponding to the given index is printed.
...
All the keys belonging to namespace are printed.
...
Minimum width of each column in output. Default is 10.
...
Multi-field support off. Turn off support for multiple fields in single grib message.
...
Copy GTS header.
...
Does not fail when the message has wrong length
...
Fast parsing option, only headers are loaded.
...
bufr_ls examples
Without options a default list of keys is printed. The default list can be different depending on the type of BUFR message.
The result is:Code Block > bufr_ls ../data/bufr/syno_multi.bufr
Code Block ../data/bufr/syno_multi.bufr centre masterTablesVersionNumber localTablesVersionNumber typicalDate typicalTime rdbType rdbSubtype rdbtimeDate rdbtimeTime numberOfSubsets localLatitude localLongitude ecmf 13 1 20090124 120000 1 1 20090124 121435 1 70.93 -8.67 ecmf 13 1 20090124 120000 1 1 20090124 121435 1 77 15.5 ecmf 13 1 20090124 120000 1 1 20090124 121435 1 78.92 11.93 3 of 3 messages in ../data/bufr/syno_multi.bufr 3 of 3 total messages in 1 files
It is allowed to use wildcards in filenames.
Code Block > bufr_ls ../data/bufr/syno_*.bufr
To list only a specific set of keys use the -p option.
Code Block > bufr_ls -p totalLength,bufrHeaderCentre,bufrHeaderSubCentre ../data/bufr/syno_multi.bufr
To list only a subset of messages use the -w (where option). Only the 12 UTC messages are listed with the following line.
Code Block > bufr_ls -w typicalTime="120000" ../data/bufr/syno_*.bufr
All the non-12 UTC messages are listed as follows:
Code Block > bufr_ls -w typicalTime!="120000" ../data/bufr/syno_*.bufr
To list only the second message from a BUFR file:
Code Block > bufr_ls -w count=2 ../data/bufr/syno_multi.bufr