eccodes/html/grib_get.html

81 lines
3.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>grib_api: grib_get</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<h1><a class="anchor" name="grib_get">grib_get</a></h1><h2><a class="anchor" name="DESCRIPTION">
DESCRIPTION</a></h2>
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).<h2><a class="anchor" name="USAGE">
USAGE</a></h2>
grib_get [options] grib_file grib_file ...<h2><a class="anchor" name="OPTIONS">
OPTIONS</a></h2>
-f <br>
Force. Force the execution not to fail on error. <br>
<br>
-p key[:{s/d/l}],key[:{s/d/l}],... <br>
Declaration of keys to print. For each key a string (key:s) or a double (key:d) or a long (key:l) type can be requested. Default type is string. <br>
<br>
-F format <br>
C style format for floating point values. <br>
<br>
-l Latitude,Longitude[,MODE,file] <br>
Value close to the point of a Latitude/Longitude. 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&gt;=0.5 is printed) <br>
<br>
-P key[:{s/d/l}],key[:{s/d/l}],... <br>
As -p adding the declared keys to the default list. <br>
<br>
-w key[:{s/d/l}]{=/!=}value,key[:{s/d/l}]{=/!=}value,... <br>
Where clause. Grib 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. <br>
<br>
-n namespace <br>
All the keys belonging to namespace are printed. <br>
<br>
-V <br>
Version. <br>
<br>
-W width <br>
Minimum width of each column in output. Default is 10. <br>
<br>
-m <br>
Mars keys are printed. <br>
<br>
-M <br>
Multi-grib support off. Turn off support for multiple fields in single grib message <br>
<br>
-g <br>
Copy GTS header. <br>
<br>
-G <br>
GRIBEX compatibility mode. <br>
<br>
-7 <br>
Does not fail when the message has wrong length <br>
<br>
<h2><a class="anchor" name="grib_get_examples">
grib_get examples</a></h2>
<ol type=1>
<li>grib_get fails if a key is not found.<br>
<div class="fragment"><pre class="fragment">
&gt;grib_get -p gribname ../data/tigge_pf_ecmwf.grib2
</pre></div></li><li>To get the step of the first GRIB message in a file: <br>
<div class="fragment"><pre class="fragment">
&gt;grib_get -w count=1 -p step ../data/tigge_pf_ecmwf.grib2
</pre></div> </li></ol>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Sep 22 15:18:22 2009 for grib_api by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
</body>
</html>