Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Aug 30, 2024
1 parent 8645a90 commit fb017af
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions _modules/kerchunk/grib2.html
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,10 @@ <h1>Source code for kerchunk.grib2</h1><div class="highlight"><pre>
<span class="c1"># grib idx is fortran indexed (from one not zero)</span>
<span class="nb">list</span><span class="p">(</span>
<span class="nb">filter</span><span class="p">(</span>
<span class="c1"># filtering out the cfgrib metadata dataframe in case it is None</span>
<span class="k">lambda</span> <span class="n">item</span><span class="p">:</span> <span class="n">item</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">,</span>
<span class="p">[</span>
<span class="c1"># extracting the metadata from a single message</span>
<span class="n">_extract_single_group</span><span class="p">(</span><span class="n">mapper</span><span class="p">(</span><span class="n">group</span><span class="p">),</span> <span class="n">i</span><span class="p">)</span>
<span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">group</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span>
<span class="n">scan_grib</span><span class="p">(</span><span class="n">fname</span><span class="p">,</span> <span class="n">storage_options</span><span class="o">=</span><span class="n">storage_options</span><span class="p">),</span> <span class="n">start</span><span class="o">=</span><span class="mi">1</span>
Expand All @@ -941,6 +943,7 @@ <h1>Source code for kerchunk.grib2</h1><div class="highlight"><pre>


<span class="k">def</span> <span class="nf">_extract_single_group</span><span class="p">(</span><span class="n">grib_group</span><span class="p">:</span> <span class="nb">dict</span><span class="p">,</span> <span class="n">idx</span><span class="p">:</span> <span class="nb">int</span><span class="p">):</span>
<span class="c1"># This function, returns the grib metadata as a dataframe, on a per message basis.</span>
<span class="kn">import</span> <span class="nn">datatree</span>

<span class="n">grib_tree_store</span> <span class="o">=</span> <span class="n">grib_tree</span><span class="p">(</span>
Expand Down

0 comments on commit fb017af

Please sign in to comment.