eccodes/html/grib_convert.html

60 lines
2.5 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_convert</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_convert">grib_convert</a></h1><h2><a class="anchor" name="DESCRIPTION">
DESCRIPTION</a></h2>
It converts grib messages applying the rules from a conversion_rules file. The rules are of the type "keyname = value;" and if blocks are allowed as if ( keyname1 == value1 || keyname2 != value2 &amp;&amp; keyname3 == value3 ) { keyname4 = value4; }<h2><a class="anchor" name="USAGE">
USAGE</a></h2>
grib_convert [options] conversion_rules grib_file grib_file ... output_grib_file<h2><a class="anchor" name="OPTIONS">
OPTIONS</a></h2>
-f <br>
Force. Force the execution not to fail on error. <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>
-V <br>
Version. <br>
<br>
-7 <br>
Does not fail when the message has wrong length <br>
<br>
-v <br>
Verbose. <br>
<br>
<h2><a class="anchor" name="grib_convert_examples">
grib_convert examples</a></h2>
The following grib_convert rules convert all the grib messages contained in the input files in grib edition 2 and if a 2 metre temperature is found also the keys contained in the culy bracket are changed.<br>
<div class="fragment"><pre class="fragment">editionNumber = 2;
<span class="keywordflow">if</span>( indicatorOfParameter == 11 &amp;&amp; indicatorOfTypeOfLevel == 105)
{
productDefinitionTemplateNumber = 1;
typeOfFirstFixedSurface = 103;
scaleFactorOfFirstFixedSurface = 0;
scaledValueOfFirstFixedSurface = 2;
}
</pre></div> <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>