1GRIB_GET(1) User Commands GRIB_GET(1)
2
3
4
6 grib_get - manual page for grib_get
7
9 NAME grib_get
10
11 DESCRIPTION
12
13 Get values of some keys from a GRIB file. It is similar to
14 grib_ls, but fails returning an error code when an error occurs
15 (e.g. key not found).
16
17 USAGE
18
19 grib_get [options] grib_file grib_file ...
20
21 OPTIONS
22
23 -f Force. Force the execution not to fail on error.
24
25 -p key[:{s|d|i}],key[:{s|d|i}],...
26
27 Declaration of keys to print. For each key a string (key:s), a
28 double (key:d) or an integer (key:i) type can be requested. De‐
29 fault type is string.
30
31 -F format
32
33 C style format for floating-point values.
34
35 -B 'order by' directive
36
37 Order by. The output will be ordered according to the 'order by'
38 directive. Example: "step:i asc, centre desc" (step numeric as‐
39 cending and centre descending) Default sort mode is 'asc'
40
41 -l Latitude,Longitude[,MODE,file]
42
43 Value close to the point of a Latitude,Longitude. Allowed val‐
44 ues for MODE are:
45
46 4 (4 values in the nearest points are printed) Default 1 (the
47 value at the nearest point is printed)
48
49 file (file is used as mask. The closer point with mask
50 value>=0.5 is printed)
51
52 -P key[:{s|d|i}],key[:{s|d|i}],...
53
54 As -p adding the declared keys to the default list.
55
56 -w key[:{s|d|i}]{=|!=}value,key[:{s|d|i}]{=|!=}value,...
57
58 Where clause. Messages are processed only if they match all the
59 key/value constraints. A valid constraint is of type key=value
60 or key!=value. For each key a string (key:s), a double (key:d)
61 or an integer (key:i) type can be specified. Default type is
62 string. In the value you can also use the forward-slash charac‐
63 ter '/' to specify an OR condition (i.e. a logical disjunction)
64 Note: only one -w clause is allowed.
65
66 -n namespace
67
68 All the keys belonging to namespace are printed.
69
70 -s key[:{s|d|i}]=value,key[:{s|d|i}]=value,...
71
72 Key/values to set. For each key a string (key:s), a double
73 (key:d) or an integer (key:i) type can be defined. By default
74 the native type is set.
75
76 -V Version.
77
78 -W width
79
80 Minimum width of each column in output. Default is 10.
81
82 -m Mars keys are printed.
83
84 -M Multi-field support off. Turn off support for multiple fields in
85 single GRIB message.
86
87 -g Copy GTS header.
88
89 -G GRIBEX compatibility mode.
90
91 -T T | B | M | A
92 Message type. T->GTS, B->BUFR, M->METAR (Experimental), A->Any
93 (Experimental). The input file is interpreted according to the
94 message type.
95
96 -7 Does not fail when the message has wrong length
97
98 -X offset
99
100 Input file offset in bytes. Processing of the input file will
101 start from the given offset.
102
103 -i index
104
105 Data value corresponding to the given index is printed.
106
107 NAME grib_get
108
109 DESCRIPTION
110
111 Get values of some keys from a GRIB file. It is similar to
112 grib_ls, but fails returning an error code when an error occurs
113 (e.g. key not found).
114
115 USAGE
116
117 grib_get [options] grib_file grib_file ...
118
119 OPTIONS
120
121 -f Force. Force the execution not to fail on error.
122
123 -p key[:{s|d|i}],key[:{s|d|i}],...
124
125 Declaration of keys to print. For each key a string (key:s), a
126 double (key:d) or an integer (key:i) type can be requested. De‐
127 fault type is string.
128
129 -F format
130
131 C style format for floating-point values.
132
133 -B 'order by' directive
134
135 Order by. The output will be ordered according to the 'order by'
136 directive. Example: "step:i asc, centre desc" (step numeric as‐
137 cending and centre descending) Default sort mode is 'asc'
138
139 -l Latitude,Longitude[,MODE,file]
140
141 Value close to the point of a Latitude,Longitude. Allowed val‐
142 ues for MODE are:
143
144 4 (4 values in the nearest points are printed) Default 1 (the
145 value at the nearest point is printed)
146
147 file (file is used as mask. The closer point with mask
148 value>=0.5 is printed)
149
150 -P key[:{s|d|i}],key[:{s|d|i}],...
151
152 As -p adding the declared keys to the default list.
153
154 -w key[:{s|d|i}]{=|!=}value,key[:{s|d|i}]{=|!=}value,...
155
156 Where clause. Messages are processed only if they match all the
157 key/value constraints. A valid constraint is of type key=value
158 or key!=value. For each key a string (key:s), a double (key:d)
159 or an integer (key:i) type can be specified. Default type is
160 string. In the value you can also use the forward-slash charac‐
161 ter '/' to specify an OR condition (i.e. a logical disjunction)
162 Note: only one -w clause is allowed.
163
164 -n namespace
165
166 All the keys belonging to namespace are printed.
167
168 -s key[:{s|d|i}]=value,key[:{s|d|i}]=value,...
169
170 Key/values to set. For each key a string (key:s), a double
171 (key:d) or an integer (key:i) type can be defined. By default
172 the native type is set.
173
174 -V Version.
175
176 -W width
177
178 Minimum width of each column in output. Default is 10.
179
180 -m Mars keys are printed.
181
182 -M Multi-field support off. Turn off support for multiple fields in
183 single GRIB message.
184
185 -g Copy GTS header.
186
187 -G GRIBEX compatibility mode.
188
189 -T T | B | M | A
190 Message type. T->GTS, B->BUFR, M->METAR (Experimental), A->Any
191 (Experimental). The input file is interpreted according to the
192 message type.
193
194 -7 Does not fail when the message has wrong length
195
196 -X offset
197
198 Input file offset in bytes. Processing of the input file will
199 start from the given offset.
200
201 -i index
202
203 Data value corresponding to the given index is printed.
204
205
206
207grib_get December 2022 GRIB_GET(1)