eccodes/tools/grib_get.dox

64 lines
2.6 KiB
Plaintext
Raw Normal View History

2013-03-25 12:04:10 +00:00
/*! \page grib_get grib_get
\section DESCRIPTION
Get values of some keys from a grib file.
It is similar to grib_ls, but fails returning an error code
when an error occurs (e.g. key not found).
\section USAGE
grib_get
[options] grib_file grib_file ...
\section OPTIONS
-f \n Force. Force the execution not to fail on error.
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
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.
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 -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.
\n \n -n namespace \n
2022-10-18 11:29:27 +00:00
All the keys belonging to the given namespace are 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 -V \n Version.
\n \n -W width \n
Minimum width of each column in output. Default is 10.
\n \n -m \n Mars keys are printed.
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.
\n \n -G \n GRIBEX compatibility mode.
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 -i index \n
Data value corresponding to the given index is printed.
\n \n
\section grib_get_examples grib_get examples
-# grib_get fails if a key is not found.\n
\verbatim
>grib_get -p gribname ../data/tigge_pf_ecmwf.grib2
\endverbatim
-# To get the step of the first GRIB message in a file: \n
\verbatim
>grib_get -w count=1 -p step ../data/tigge_pf_ecmwf.grib2
\endverbatim
*/