Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Mar 20, 2024
1 parent 88f2e56 commit 6c2e7be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion g2getgb2_8F90.html
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a006171a690c4b65e873ce0f3
</table>
</dd>
</dl>
<dl class="section author"><dt>Author</dt><dd>Ed Hartnett </dd></dl>
<dl class="section author"><dt>Author</dt><dd>Ed Hartnett, Mark Iredell </dd></dl>
<dl class="section date"><dt>Date</dt><dd>2024-03-19 </dd></dl>

<p class="definition">Definition at line <a class="el" href="g2getgb2_8F90_source.html#l00191">191</a> of file <a class="el" href="g2getgb2_8F90_source.html">g2getgb2.F90</a>.</p>
Expand Down
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ <h1><a class="anchor" id="autotoc_md2"></a>
<p>Note that derived type gribfield contains pointers to dynamically allocated memory; callers must free this memory by calling subroutine <a class="el" href="g2gf_8F90.html#a027efd02c99c9464153fc76d9bb9627e" title="Free memory that was used to store array values in derived type grib_mod::gribfield.">gf_free()</a>.</p>
<h1><a class="anchor" id="autotoc_md3"></a>
Extracting GRIB2 Fields from a GRIB2 file</h1>
<p>Subroutine <a class="el" href="g2getgb2_8F90.html#a4e7aa8984989d124fd1db391de218d5f" title="This is a legacy version of getgb2i2().">getgb2()</a> can be used to extract a specified field from a file containing many GRIB2 messages. <a class="el" href="g2getgb2_8F90.html#a4e7aa8984989d124fd1db391de218d5f" title="This is a legacy version of getgb2i2().">getgb2()</a> searches an index to find the location of the user specified field. The index can be supplied from a seperate GRIB2 index file, or it can be generated internally.</p>
<p>If <a class="el" href="g2getgb2_8F90.html#a4e7aa8984989d124fd1db391de218d5f" title="This is a legacy version of getgb2i2().">getgb2()</a> is used, call <a class="el" href="g2index_8F90.html#ac02dafd6109baa69a66dc278d6b0c083" title="Free all memory associated with the library.">gf_finalize()</a> to free all memory. <a class="el" href="g2index_8F90.html#ac02dafd6109baa69a66dc278d6b0c083" title="Free all memory associated with the library.">gf_finalize()</a> only needs to be called once, no matter how many times <a class="el" href="g2getgb2_8F90.html#a4e7aa8984989d124fd1db391de218d5f" title="This is a legacy version of getgb2i2().">getgb2()</a> is called.</p>
<p>The GRIB2 file (and the index file, if supplied) must be opened with a call to subroutine baopen() prior to the call to <a class="el" href="g2getgb2_8F90.html#a4e7aa8984989d124fd1db391de218d5f" title="This is a legacy version of getgb2i2().">getgb2()</a>.</p>
<p>Subroutine <a class="el" href="g2getgb2_8F90.html#a006171a690c4b65e873ce0f3842bac55" title="Find and unpack a GRIB2 message in a file, using an version 1 or 2 index record which is either found...">getgb2i2()</a> can be used to extract a specified field from a file containing many GRIB2 messages. <a class="el" href="g2getgb2_8F90.html#a006171a690c4b65e873ce0f3842bac55" title="Find and unpack a GRIB2 message in a file, using an version 1 or 2 index record which is either found...">getgb2i2()</a> searches an index to find the location of the user specified field. The index can be supplied from a seperate GRIB2 index file, or it can be generated internally.</p>
<p>If <a class="el" href="g2getgb2_8F90.html#a006171a690c4b65e873ce0f3842bac55" title="Find and unpack a GRIB2 message in a file, using an version 1 or 2 index record which is either found...">getgb2i2()</a> is used, call <a class="el" href="g2index_8F90.html#ac02dafd6109baa69a66dc278d6b0c083" title="Free all memory associated with the library.">gf_finalize()</a> to free all memory. <a class="el" href="g2index_8F90.html#ac02dafd6109baa69a66dc278d6b0c083" title="Free all memory associated with the library.">gf_finalize()</a> only needs to be called once, no matter how many times <a class="el" href="g2getgb2_8F90.html#a006171a690c4b65e873ce0f3842bac55" title="Find and unpack a GRIB2 message in a file, using an version 1 or 2 index record which is either found...">getgb2i2()</a> is called.</p>
<p>The GRIB2 file (and the index file, if supplied) must be opened with a call to subroutine baopen() prior to the call to <a class="el" href="g2getgb2_8F90.html#a006171a690c4b65e873ce0f3842bac55" title="Find and unpack a GRIB2 message in a file, using an version 1 or 2 index record which is either found...">getgb2i2()</a>.</p>
<p>The decoded information for the selected GRIB field is returned in a derived type variable, gfld. Gfld is of type <a class="el" href="namespacegrib__mod.html#structgrib__mod_1_1gribfield">grib_mod::gribfield</a>; callers will need to include the line "use grib_mod".</p>
<p>Note that derived type gribfield contains pointers to many arrays of data. The memory for these arrays is allocated when the values in the arrays are set, to help minimize problems with array overloading. Because of this, users must free this memory by calling subroutine <a class="el" href="g2gf_8F90.html#a027efd02c99c9464153fc76d9bb9627e" title="Free memory that was used to store array values in derived type grib_mod::gribfield.">gf_free()</a>.</p>
<p>Example usage:</p>
Expand Down Expand Up @@ -162,6 +162,7 @@ <h1><a class="anchor" id="autotoc_md3"></a>
<h2><a class="anchor" id="autotoc_md5"></a>
Documentation for Previous Versions of NCEPLIBS-g2</h2>
<ul>
<li><a href="ver-3.4.8/index.html">NCEPLIBS-g2 Version 3.4.8</a></li>
<li><a href="ver-3.4.7/index.html">NCEPLIBS-g2 Version 3.4.7</a></li>
<li><a href="ver-3.4.6/index.html">NCEPLIBS-g2 Version 3.4.6</a></li>
<li><a href="ver-3.4.5/index.html">NCEPLIBS-g2 Version 3.4.5</a> </li>
Expand Down

0 comments on commit 6c2e7be

Please sign in to comment.