...
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 (key:l) type can be specified. Default type is string.
...
Without options a default list of keys is printed. The default list is different depending on the type of grib message.
Code Block > grib_ls ../data/reduced*.grib1 ../data/regular*.grib1 ../data/reduced*.grib2
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 > 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.
Code Block > grib_ls -w levelType=pl ../tigge_pf_ecmwf.grib2
All the grib messages not on pressure levels are listed as follows:
Code Block > grib_ls -w levelType!=pl ../tigge_pf_ecmwf.grib2
To get the closest grid point to a latitude/longitude.
Code Block > grib_ls -l 51.46,-1.33,1 -p paramId,name ../data/reduced_gaussian_surface.grib2 ../data/reduced_gaussian_surface.grib2 paramId shortName value 167 2t 282.002 1 of 1 grib messages in ../data/reduced_gaussian_surface.grib2 1 of 1 total grib messages in 1 files Input Point: latitude=51.46 longitude=-1.33 Grid Point chosen #3 index=749 latitude=51.63 longitude=0.00 distance=93.81 (Km) Other grid Points <ul><li>1 - index=845 latitude=48.84 longitude=0.00 distance=306.86 (Km) </li><li>2 - index=944 latitude=48.84 longitude=356.40 distance=333.66 (Km) </li><li>3 - index=749 latitude=51.63 longitude=0.00 distance=93.81 (Km) </li><li>4 - index=844 latitude=51.63 longitude=356.25 distance=168.37 (Km)