List content of BUFR files printing values of some keys. It does not fail when a key is not found.
bufr_ls [options] file file ...
Declaration of keys to print. For each key a string (key:s) or a double (key:d) or a long (key:l) 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 (key:l) 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)
Key/values to set. For each key a string (key:s) or a double (key:d) or a long (key:l) type can be defined. By default the native type is set.
All the keys belonging to namespace are printed.
Mars keys are printed.
Version.
Minimum width of each column in output. Default is 10.
Copy GTS header.
Does not fail when the message has wrong length
Without options a default list of keys is printed. The default list is different depending on the type of bufr message.
> bufr_ls ../data/bufr/syno_multi.bufr ../data/bufr/temp_101.bufr ../data/bufr/syno_multi.bufr masterTablesVersionNumber localTablesVersionNumber rdbType rdbSubtype rdbtimeYear rdbtimeMonth typicalDate typicalTime numberOfSubsets localLatitude localLongitude 13 1 1 1 2009 1 20090124 120000 1 70.93 -8.67 13 1 1 1 2009 1 20090124 120000 1 77 15.5 13 1 1 1 2009 1 20090124 120000 1 78.92 11.93 3 of 3 messages in ../data/bufr/syno_multi.bufr ../data/bufr/temp_101.bufr 13 1 5 101 2012 10 20121030 000000 1 60.77 -161.83 1 of 1 messages in ../data/bufr/temp_101.bufr 4 of 4 total messages in 2 files |
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
> grib_ls -p offset,count,countTotal ../data/reduced*.grib1 |
To list only a subset of messages use the -w (where option). Only the pressure levels are listed with the following line.
> grib_ls -w levelType=pl ../tigge_pf_ecmwf.grib2 |
All the grib messages not on pressure levels are listed as follows:
> grib_ls -w levelType!=pl ../tigge_pf_ecmwf.grib2 |
To get the closest grid point to a latitude/longitude.
> grib_ls -l 51.46,-1.33,1 -p paramId,name ../data/reduced_gaussian_surface.grib2 |