eccodes/html/group__get__set.html

939 lines
51 KiB
HTML
Raw Normal View History

2013-04-02 14:02:10 +00:00
<!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: Accessing header and data values</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>Accessing header and data values</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#g3b40c8174568a6e2b7563a0e89d20ddf">grib_get_offset</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *h, const char *key, size_t *offset)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number offset of a key, in a message if several keys of the same name are present, the offset of the last one is returned. <a href="#g3b40c8174568a6e2b7563a0e89d20ddf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#g18b622ed86b24d5e5fcab70c309fc245">grib_get_size</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *h, const char *key, size_t *size)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the number of coded value from a key, if several keys of the same name are present, the total sum is returned. <a href="#g18b622ed86b24d5e5fcab70c309fc245"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#g03cfa6762312face1a3cc3ef23e16526">grib_get_long</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *h, const char *key, long *value)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a long value from a key, if several keys of the same name are present, the last one is returned. <a href="#g03cfa6762312face1a3cc3ef23e16526"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#g5d9eeda38bf59ee3fa9ce3f92e65009e">grib_get_double</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *h, const char *key, double *value)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a double value from a key, if several keys of the same name are present, the last one is returned. <a href="#g5d9eeda38bf59ee3fa9ce3f92e65009e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#gec894541bbc8c4e9093803ce21146fa5">grib_get_double_element</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *h, const char *key, int i, double *value)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get as double the i-th element of the "key" array. <a href="#gec894541bbc8c4e9093803ce21146fa5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#gdff349943fef1036fcd1dd7a69738a7a">grib_get_double_elements</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *h, const char *key, int *i, long size, double *value)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get as double array the elements of the "key" array whose indexes are listed in the input array i. <a href="#gdff349943fef1036fcd1dd7a69738a7a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#g8aeaf9f930eea1cc0f15e92f18a25053">grib_get_string</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *h, const char *key, char *mesg, size_t *length)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a string value from a key, if several keys of the same name are present, the last one is returned. <a href="#g8aeaf9f930eea1cc0f15e92f18a25053"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#g1b1ac2da661c638dad7d223419d541c6">grib_get_bytes</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *h, const char *key, unsigned char *bytes, size_t *length)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get raw bytes values from a key. <a href="#g1b1ac2da661c638dad7d223419d541c6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#g61f1029d7f37d51f33835e218d58378a">grib_get_double_array</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *h, const char *key, double *vals, size_t *length)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get double array values from a key. <a href="#g61f1029d7f37d51f33835e218d58378a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#ga05493cedfee55f0b83d27e356123223">grib_get_long_array</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *h, const char *key, long *vals, size_t *length)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get long array values from a key. <a href="#ga05493cedfee55f0b83d27e356123223"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#g6315ad72aaaf7577bc7b9f546c506e74">grib_copy_namespace</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *dest, const char *name, <a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *src)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy the keys belonging to a given namespace from a source handle to a destination handle. <a href="#g6315ad72aaaf7577bc7b9f546c506e74"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#g94c33cfe90c3aa887fb8e14f0bd87fe2">grib_set_long</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *h, const char *key, long val)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set a long value from a key. <a href="#g94c33cfe90c3aa887fb8e14f0bd87fe2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#g3f8802a5d3f2e7557e35e6e83acfc9e9">grib_set_double</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *h, const char *key, double val)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set a double value from a key. <a href="#g3f8802a5d3f2e7557e35e6e83acfc9e9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#g78143cc64571b454b0aba14246e9a53a">grib_set_string</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *h, const char *key, const char *mesg, size_t *length)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set a string value from a key. <a href="#g78143cc64571b454b0aba14246e9a53a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#g4437bd0aa70cc2c2f942ace67023f4a1">grib_set_bytes</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *h, const char *key, const unsigned char *bytes, size_t *length)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set a bytes array from a key. <a href="#g4437bd0aa70cc2c2f942ace67023f4a1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#ga24d87e236a2469309d1176ee5925d77">grib_set_double_array</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *h, const char *key, const double *vals, size_t length)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set a double array from a key. <a href="#ga24d87e236a2469309d1176ee5925d77"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__get__set.html#g6c4697dc7c6f450ad30d0a24a3f87016">grib_set_long_array</a> (<a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *h, const char *key, const long *vals, size_t length)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set a long array from a key. <a href="#g6c4697dc7c6f450ad30d0a24a3f87016"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g6315ad72aaaf7577bc7b9f546c506e74"></a><!-- doxytag: member="grib_api.h::grib_copy_namespace" ref="g6315ad72aaaf7577bc7b9f546c506e74" args="(grib_handle *dest, const char *name, grib_handle *src)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_copy_namespace </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>dest</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>src</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Copy the keys belonging to a given namespace from a source handle to a destination handle.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td>: destination handle </td></tr>
<tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>: namespace </td></tr>
<tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>: source handle </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
</div>
</div><p>
<a class="anchor" name="g1b1ac2da661c638dad7d223419d541c6"></a><!-- doxytag: member="grib_api.h::grib_get_bytes" ref="g1b1ac2da661c638dad7d223419d541c6" args="(grib_handle *h, const char *key, unsigned char *bytes, size_t *length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_get_bytes </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned char *&nbsp;</td>
<td class="paramname"> <em>bytes</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t *&nbsp;</td>
<td class="paramname"> <em>length</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get raw bytes values from a key.
<p>
If several keys of the same name are present, the last one is returned <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__get__set.html#g4437bd0aa70cc2c2f942ace67023f4a1" title="Set a bytes array from a key.">grib_set_bytes</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>: the handle to get the data from </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>: the key to be searched </td></tr>
<tr><td valign="top"></td><td valign="top"><em>bytes</em>&nbsp;</td><td>: the address of a byte array where the data will be retreived </td></tr>
<tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>: the address of a size_t that contains allocated length of the byte array on input, and that contains the actual length of the byte array on output </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
</div>
</div><p>
<a class="anchor" name="g5d9eeda38bf59ee3fa9ce3f92e65009e"></a><!-- doxytag: member="grib_api.h::grib_get_double" ref="g5d9eeda38bf59ee3fa9ce3f92e65009e" args="(grib_handle *h, const char *key, double *value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_get_double </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double *&nbsp;</td>
<td class="paramname"> <em>value</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get a double value from a key, if several keys of the same name are present, the last one is returned.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__get__set.html#g3f8802a5d3f2e7557e35e6e83acfc9e9" title="Set a double value from a key.">grib_set_double</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>: the handle to get the data from </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>: the key to be searched </td></tr>
<tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>: the address of a double where the data will be retreived </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="get_8c-example.html#a3">get.c</a>, <a class="el" href="iterator_8c-example.html#a4">iterator.c</a>, and <a class="el" href="print__data_8c-example.html#a4">print_data.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="g61f1029d7f37d51f33835e218d58378a"></a><!-- doxytag: member="grib_api.h::grib_get_double_array" ref="g61f1029d7f37d51f33835e218d58378a" args="(grib_handle *h, const char *key, double *vals, size_t *length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_get_double_array </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double *&nbsp;</td>
<td class="paramname"> <em>vals</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t *&nbsp;</td>
<td class="paramname"> <em>length</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get double array values from a key.
<p>
If several keys of the same name are present, the last one is returned <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__get__set.html#ga24d87e236a2469309d1176ee5925d77" title="Set a double array from a key.">grib_set_double_array</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>: the handle to get the data from </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>: the key to be searched </td></tr>
<tr><td valign="top"></td><td valign="top"><em>vals</em>&nbsp;</td><td>: the address of a double array where the data will be retreived </td></tr>
<tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>: the address of a size_t that contains allocated length of the double array on input, and that contains the actual length of the double array on output </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="get_8c-example.html#a5">get.c</a>, <a class="el" href="precision_8c-example.html#a4">precision.c</a>, and <a class="el" href="print__data_8c-example.html#a3">print_data.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="gec894541bbc8c4e9093803ce21146fa5"></a><!-- doxytag: member="grib_api.h::grib_get_double_element" ref="gec894541bbc8c4e9093803ce21146fa5" args="(grib_handle *h, const char *key, int i, double *value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_get_double_element </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>i</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double *&nbsp;</td>
<td class="paramname"> <em>value</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get as double the i-th element of the "key" array.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>: the handle to get the data from </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>: the key to be searched </td></tr>
<tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>: zero based index </td></tr>
<tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>: the address of a double where the data will be retreived </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
</div>
</div><p>
<a class="anchor" name="gdff349943fef1036fcd1dd7a69738a7a"></a><!-- doxytag: member="grib_api.h::grib_get_double_elements" ref="gdff349943fef1036fcd1dd7a69738a7a" args="(grib_handle *h, const char *key, int *i, long size, double *value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_get_double_elements </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&nbsp;</td>
<td class="paramname"> <em>i</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">long&nbsp;</td>
<td class="paramname"> <em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double *&nbsp;</td>
<td class="paramname"> <em>value</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get as double array the elements of the "key" array whose indexes are listed in the input array i.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>: the handle to get the data from </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>: the key to be searched </td></tr>
<tr><td valign="top"></td><td valign="top"><em>i</em>&nbsp;</td><td>: zero based array of indexes </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>: size of the i and value arrays </td></tr>
<tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>: the address of a double where the data will be retreived </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
</div>
</div><p>
<a class="anchor" name="g03cfa6762312face1a3cc3ef23e16526"></a><!-- doxytag: member="grib_api.h::grib_get_long" ref="g03cfa6762312face1a3cc3ef23e16526" args="(grib_handle *h, const char *key, long *value)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_get_long </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">long *&nbsp;</td>
<td class="paramname"> <em>value</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get a long value from a key, if several keys of the same name are present, the last one is returned.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__get__set.html#g94c33cfe90c3aa887fb8e14f0bd87fe2" title="Set a long value from a key.">grib_set_long</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>: the handle to get the data from </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>: the key to be searched </td></tr>
<tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>: the address of a long where the data will be retreived </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="get_8c-example.html#a2">get.c</a>, <a class="el" href="multi_8c-example.html#a3">multi.c</a>, <a class="el" href="nearest_8c-example.html#a2">nearest.c</a>, <a class="el" href="precision_8c-example.html#a2">precision.c</a>, and <a class="el" href="set_8c-example.html#a3">set.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="ga05493cedfee55f0b83d27e356123223"></a><!-- doxytag: member="grib_api.h::grib_get_long_array" ref="ga05493cedfee55f0b83d27e356123223" args="(grib_handle *h, const char *key, long *vals, size_t *length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_get_long_array </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">long *&nbsp;</td>
<td class="paramname"> <em>vals</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t *&nbsp;</td>
<td class="paramname"> <em>length</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get long array values from a key.
<p>
If several keys of the same name are present, the last one is returned <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__get__set.html#g6c4697dc7c6f450ad30d0a24a3f87016" title="Set a long array from a key.">grib_set_long_array</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>: the handle to get the data from </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>: the key to be searched </td></tr>
<tr><td valign="top"></td><td valign="top"><em>vals</em>&nbsp;</td><td>: the address of a long array where the data will be retreived </td></tr>
<tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>: the address of a size_t that contains allocated length of the long array on input, and that contains the actual length of the long array on output </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
</div>
</div><p>
<a class="anchor" name="g3b40c8174568a6e2b7563a0e89d20ddf"></a><!-- doxytag: member="grib_api.h::grib_get_offset" ref="g3b40c8174568a6e2b7563a0e89d20ddf" args="(grib_handle *h, const char *key, size_t *offset)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_get_offset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t *&nbsp;</td>
<td class="paramname"> <em>offset</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get the number offset of a key, in a message if several keys of the same name are present, the offset of the last one is returned.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>: the handle to get the offset from </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>: the key to be searched </td></tr>
<tr><td valign="top"></td><td valign="top"><em>offset</em>&nbsp;</td><td>: the address of a size_t where the offset will be set </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
</div>
</div><p>
<a class="anchor" name="g18b622ed86b24d5e5fcab70c309fc245"></a><!-- doxytag: member="grib_api.h::grib_get_size" ref="g18b622ed86b24d5e5fcab70c309fc245" args="(grib_handle *h, const char *key, size_t *size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_get_size </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t *&nbsp;</td>
<td class="paramname"> <em>size</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get the number of coded value from a key, if several keys of the same name are present, the total sum is returned.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>: the handle to get the offset from </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>: the key to be searched </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>: the address of a size_t where the size will be set </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="count__messages_8f90-example.html#a1">count_messages.f90</a>, <a class="el" href="get_8c-example.html#a4">get.c</a>, <a class="el" href="get_8f90-example.html#a1">get.f90</a>, <a class="el" href="get__fortran_8_f-example.html#a0">get_fortran.F</a>, <a class="el" href="get__pl_8f90-example.html#a0">get_pl.f90</a>, <a class="el" href="get__pv_8f90-example.html#a0">get_pv.f90</a>, <a class="el" href="precision_8c-example.html#a3">precision.c</a>, <a class="el" href="precision_8f90-example.html#a0">precision.f90</a>, <a class="el" href="precision__fortran_8_f-example.html#a0">precision_fortran.F</a>, <a class="el" href="print__data_8c-example.html#a2">print_data.c</a>, <a class="el" href="print__data_8f90-example.html#a0">print_data.f90</a>, <a class="el" href="print__data__fortran_8_f-example.html#a0">print_data_fortran.F</a>, <a class="el" href="samples_8f90-example.html#a0">samples.f90</a>, and <a class="el" href="set__bitmap_8f90-example.html#a0">set_bitmap.f90</a>.</dl>
</div>
</div><p>
<a class="anchor" name="g8aeaf9f930eea1cc0f15e92f18a25053"></a><!-- doxytag: member="grib_api.h::grib_get_string" ref="g8aeaf9f930eea1cc0f15e92f18a25053" args="(grib_handle *h, const char *key, char *mesg, size_t *length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_get_string </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char *&nbsp;</td>
<td class="paramname"> <em>mesg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t *&nbsp;</td>
<td class="paramname"> <em>length</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Get a string value from a key, if several keys of the same name are present, the last one is returned.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__get__set.html#g78143cc64571b454b0aba14246e9a53a" title="Set a string value from a key.">grib_set_string</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>: the handle to get the data from </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>: the key to be searched </td></tr>
<tr><td valign="top"></td><td valign="top"><em>mesg</em>&nbsp;</td><td>: the address of a string where the data will be retreived </td></tr>
<tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>: the address of a size_t that contains allocated length of the string on input, and that contains the actual length of the string on output </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="keys__iterator_8c-example.html#a7">keys_iterator.c</a>, <a class="el" href="keys__iterator__fortran_8_f-example.html#a3">keys_iterator_fortran.F</a>, <a class="el" href="nearest_8c-example.html#a3">nearest.c</a>, <a class="el" href="set_8c-example.html#a4">set.c</a>, and <a class="el" href="set__fortran_8_f-example.html#a0">set_fortran.F</a>.</dl>
</div>
</div><p>
<a class="anchor" name="g4437bd0aa70cc2c2f942ace67023f4a1"></a><!-- doxytag: member="grib_api.h::grib_set_bytes" ref="g4437bd0aa70cc2c2f942ace67023f4a1" args="(grib_handle *h, const char *key, const unsigned char *bytes, size_t *length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_set_bytes </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const unsigned char *&nbsp;</td>
<td class="paramname"> <em>bytes</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t *&nbsp;</td>
<td class="paramname"> <em>length</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set a bytes array from a key.
<p>
If several keys of the same name are present, the last one is set <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__get__set.html#g1b1ac2da661c638dad7d223419d541c6" title="Get raw bytes values from a key.">grib_get_bytes</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>: the handle to set the data to </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>: the key to be searched </td></tr>
<tr><td valign="top"></td><td valign="top"><em>bytes</em>&nbsp;</td><td>: the address of a byte array where the data will be read </td></tr>
<tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>: the address of a size_t that contains the length of the byte array on input, and that contains the actual packed length of the byte array on output </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
</div>
</div><p>
<a class="anchor" name="g3f8802a5d3f2e7557e35e6e83acfc9e9"></a><!-- doxytag: member="grib_api.h::grib_set_double" ref="g3f8802a5d3f2e7557e35e6e83acfc9e9" args="(grib_handle *h, const char *key, double val)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_set_double </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double&nbsp;</td>
<td class="paramname"> <em>val</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set a double value from a key.
<p>
If several keys of the same name are present, the last one is set <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__get__set.html#g5d9eeda38bf59ee3fa9ce3f92e65009e" title="Get a double value from a key, if several keys of the same name are present, the...">grib_get_double</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>: the handle to set the data to </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>: the key to be searched </td></tr>
<tr><td valign="top"></td><td valign="top"><em>val</em>&nbsp;</td><td>: a double where the data will be read </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
</div>
</div><p>
<a class="anchor" name="ga24d87e236a2469309d1176ee5925d77"></a><!-- doxytag: member="grib_api.h::grib_set_double_array" ref="ga24d87e236a2469309d1176ee5925d77" args="(grib_handle *h, const char *key, const double *vals, size_t length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_set_double_array </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double *&nbsp;</td>
<td class="paramname"> <em>vals</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&nbsp;</td>
<td class="paramname"> <em>length</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set a double array from a key.
<p>
If several keys of the same name are present, the last one is set <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__get__set.html#g61f1029d7f37d51f33835e218d58378a" title="Get double array values from a key.">grib_get_double_array</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>: the handle to set the data to </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>: the key to be searched </td></tr>
<tr><td valign="top"></td><td valign="top"><em>vals</em>&nbsp;</td><td>: the address of a double array where the data will be read </td></tr>
<tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>: a size_t that contains the length of the byte array on input </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
</div>
</div><p>
<a class="anchor" name="g94c33cfe90c3aa887fb8e14f0bd87fe2"></a><!-- doxytag: member="grib_api.h::grib_set_long" ref="g94c33cfe90c3aa887fb8e14f0bd87fe2" args="(grib_handle *h, const char *key, long val)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_set_long </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">long&nbsp;</td>
<td class="paramname"> <em>val</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set a long value from a key.
<p>
If several keys of the same name are present, the last one is set <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__get__set.html#g03cfa6762312face1a3cc3ef23e16526" title="Get a long value from a key, if several keys of the same name are present, the last...">grib_get_long</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>: the handle to set the data to </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>: the key to be searched </td></tr>
<tr><td valign="top"></td><td valign="top"><em>val</em>&nbsp;</td><td>: a long where the data will be read </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="multi__write_8c-example.html#a4">multi_write.c</a>, <a class="el" href="precision_8c-example.html#a5">precision.c</a>, and <a class="el" href="set_8c-example.html#a2">set.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="g6c4697dc7c6f450ad30d0a24a3f87016"></a><!-- doxytag: member="grib_api.h::grib_set_long_array" ref="g6c4697dc7c6f450ad30d0a24a3f87016" args="(grib_handle *h, const char *key, const long *vals, size_t length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_set_long_array </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const long *&nbsp;</td>
<td class="paramname"> <em>vals</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&nbsp;</td>
<td class="paramname"> <em>length</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set a long array from a key.
<p>
If several keys of the same name are present, the last one is set <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__get__set.html#ga05493cedfee55f0b83d27e356123223" title="Get long array values from a key.">grib_get_long_array</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>: the handle to set the data to </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>: the key to be searched </td></tr>
<tr><td valign="top"></td><td valign="top"><em>vals</em>&nbsp;</td><td>: the address of a long array where the data will be read </td></tr>
<tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>: a size_t that contains the length of the long array on input </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
</div>
</div><p>
<a class="anchor" name="g78143cc64571b454b0aba14246e9a53a"></a><!-- doxytag: member="grib_api.h::grib_set_string" ref="g78143cc64571b454b0aba14246e9a53a" args="(grib_handle *h, const char *key, const char *mesg, size_t *length)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int grib_set_string </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__grib__handle.html#g309a5ee24f4c730646d3f80ad0ef5f1b">grib_handle</a> *&nbsp;</td>
<td class="paramname"> <em>h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>mesg</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t *&nbsp;</td>
<td class="paramname"> <em>length</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Set a string value from a key.
<p>
If several keys of the same name are present, the last one is set <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__get__set.html#g8aeaf9f930eea1cc0f15e92f18a25053" title="Get a string value from a key, if several keys of the same name are present, the...">grib_get_string</a></dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>: the handle to set the data to </td></tr>
<tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>: the key to be searched </td></tr>
<tr><td valign="top"></td><td valign="top"><em>mesg</em>&nbsp;</td><td>: the address of a string where the data will be read </td></tr>
<tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>: the address of a size_t that contains the length of the string on input, and that contains the actual packed length of the string on output </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 if OK, integer value on error </dd></dl>
</div>
</div><p>
<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>