DESCRIPTION
List content of grib GRIB files printing values of some keys. It does not fail when a key is not found.
...
C style format for floating-point values.
...
As -p adding the declared keys to the default list.
...
Multi-field support off. Turn off support for multiple fields in single grib GRIB message.
...
Copy GTS header.
...
Message type. T->GTS, B->BUFR, M->METAR (Experimental),A->Any (Experimental). The input file is interpreted according to the message type.
...
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.
1Code 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 messages in ../data/reduced_gaussian_surface.grib2 1 of 1 total 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
2<ul><li>1 - index=845 latitude=48.84 longitude=0.00 distance=306.86 (Km)
3</li><li>2 - index=944 latitude=48.84 longitude=356.40 distance=333.66 (Km)
4</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)
To get a list ordered by the 'level' key (ascending order).
Note: we need to specify the ':i' to get a numerical sort. By default values are sorted as strings so a level of 100 would come before 20!Code Block > grib_ls -B 'level:i asc' tigge_af_ecmwf.grib2