eccodes/tools/grib_ls.dox

94 lines
4.1 KiB
Plaintext
Raw Normal View History

2013-03-25 12:04:10 +00:00
/*! \page grib_ls grib_ls
\section DESCRIPTION
List content of grib files printing values of some keys.
It does not fail when a key is not found.
\section USAGE
grib_ls
[options] grib_file grib_file ...
\section OPTIONS
2016-06-16 17:52:29 +00:00
-p key[:{s/d/i}],key[:{s/d/i}],... \n
2013-03-25 12:04:10 +00:00
Declaration of keys to print.
2016-06-16 17:52:29 +00:00
For each key a string (key:s), a double (key:d) or an integer (key:i)
2013-03-25 12:04:10 +00:00
type can be requested. Default type is string.
\n \n -F format \n
2018-08-17 16:18:38 +00:00
C style format for floating-point values.
2016-06-16 17:52:29 +00:00
\n \n -P key[:{s/d/i}],key[:{s/d/i}],... \n
2013-03-25 12:04:10 +00:00
As -p adding the declared keys to the default list.
2016-06-16 17:52:29 +00:00
\n \n -w key[:{s/d/i}]{=/!=}value,key[:{s/d/i}]{=/!=}value,... \n
2013-03-25 12:04:10 +00:00
Where clause.
2016-06-16 17:52:29 +00:00
Messages are processed only if they match all the key/value constraints.
2013-03-25 12:04:10 +00:00
A valid constraint is of type key=value or key!=value.
2016-06-16 17:52:29 +00:00
For each key a string (key:s), a double (key:d) or an integer (key:i)
2013-03-25 12:04:10 +00:00
type can be specified. Default type is string.
2016-06-16 17:52:29 +00:00
\n \n -j \n json output
\n \n -B order by directive \n
Order by. The output will be ordered according to the order by directive.
2017-01-23 10:55:33 +00:00
Order by example: "step:i asc, centre desc" (step numeric ascending and centre descending)
2013-03-25 12:04:10 +00:00
\n \n -l Latitude,Longitude[,MODE,file] \n
2019-02-04 11:45:46 +00:00
Value close to the point of a Latitude,Longitude.
2013-03-25 12:04:10 +00:00
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)
2016-06-16 17:52:29 +00:00
\n \n -s key[:{s/d/i}]=value,key[:{s/d/i}]=value,... \n
2013-03-25 12:04:10 +00:00
Key/values to set.
2016-06-16 17:52:29 +00:00
For each key a string (key:s), a double (key:d) or an integer (key:i)
2013-03-25 12:04:10 +00:00
type can be defined. By default the native type is set.
\n \n -i index \n
Data value corresponding to the given index is printed.
\n \n -n namespace \n
All the keys belonging to namespace are printed.
\n \n -m \n Mars keys are printed.
\n \n -V \n Version.
\n \n -W width \n
Minimum width of each column in output. Default is 10.
2016-06-16 17:52:29 +00:00
\n \n -M \n Multi-field support off. Turn off support for multiple fields in single grib message.
2013-03-25 12:04:10 +00:00
\n \n -g \n Copy GTS header.
2016-06-16 17:52:29 +00:00
\n \n -T T | B | M | A \n Message type. T->GTS, B->BUFR, M->METAR (Experimental),A->Any (Experimental).
The input file is interpreted according to the message type.
2013-03-25 12:04:10 +00:00
\n \n -7 \n Does not fail when the message has wrong length
2016-06-16 17:52:29 +00:00
\n \n -X offset \n
Input file offset in bytes. Processing of the input file will start from "offset".
2013-03-25 12:04:10 +00:00
\n \n -x \n Fast parsing option, only headers are loaded.
\n \n
\section grib_ls_examples grib_ls examples
-# Without options a default list of keys is printed. \n
The default list is different depending on the type of grib message. \n
\verbatim
> grib_ls ../data/reduced*.grib1 ../data/regular*.grib1 ../data/reduced*.grib2 \n
\endverbatim\n
-# To print offset and count number in file use the keys offset and count\n
Also the total count in a set of files is available as countTotal\n
\verbatim
> grib_ls -p offset,count,countTotal ../data/reduced*.grib1
\endverbatim\n
-# To list only a subset of messages use the -w (where option).\n
Only the pressure levels are listed with the following line.\n
\verbatim
> grib_ls -w levelType=pl ../tigge_pf_ecmwf.grib2
\endverbatim\n
-# All the grib messages not on pressure levels are listed as follows:\n
\verbatim
> grib_ls -w levelType!=pl ../tigge_pf_ecmwf.grib2
\endverbatim\n
-# To get the closest grid point to a latitude/longitude.\n
\code
>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
2016-06-16 17:52:29 +00:00
1 of 1 messages in ../data/reduced_gaussian_surface.grib2
2013-03-25 12:04:10 +00:00
2016-06-16 17:52:29 +00:00
1 of 1 total messages in 1 files
2013-03-25 12:04:10 +00:00
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
- 1 - index=845 latitude=48.84 longitude=0.00 distance=306.86 (Km)
- 2 - index=944 latitude=48.84 longitude=356.40 distance=333.66 (Km)
- 3 - index=749 latitude=51.63 longitude=0.00 distance=93.81 (Km)
- 4 - index=844 latitude=51.63 longitude=356.25 distance=168.37 (Km)
\endcode\n
*/