Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed May 23, 2024
1 parent c6e30b9 commit 548811d
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
10 changes: 5 additions & 5 deletions latest/_modules/compass/landice/mesh.html
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,8 @@ <h1>Source code for compass.landice.mesh</h1><div class="highlight"><pre>

<div class="viewcode-block" id="make_region_masks">
<a class="viewcode-back" href="../../../developers_guide/landice/generated/compass.landice.mesh.make_region_masks.html#compass.landice.mesh.make_region_masks">[docs]</a>
<span class="k">def</span> <span class="nf">make_region_masks</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">mesh_filename</span><span class="p">,</span> <span class="n">mask_filename</span><span class="p">,</span> <span class="n">cores</span><span class="p">,</span> <span class="n">tags</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">make_region_masks</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">mesh_filename</span><span class="p">,</span> <span class="n">mask_filename</span><span class="p">,</span>
<span class="n">cores</span><span class="p">,</span> <span class="n">tags</span><span class="p">,</span> <span class="n">component</span><span class="o">=</span><span class="s1">&#39;landice&#39;</span><span class="p">,</span> <span class="n">all_tags</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Create masks for ice-sheet subregions based on data</span>
<span class="sd"> in ``MPAS-Dev/geometric_fatures``.</span>
Expand All @@ -933,10 +934,9 @@ <h1>Source code for compass.landice.mesh</h1><div class="highlight"><pre>
<span class="n">gf</span> <span class="o">=</span> <span class="n">GeometricFeatures</span><span class="p">()</span>
<span class="n">fcMask</span> <span class="o">=</span> <span class="n">FeatureCollection</span><span class="p">()</span>

<span class="k">for</span> <span class="n">tag</span> <span class="ow">in</span> <span class="n">tags</span><span class="p">:</span>
<span class="n">fc</span> <span class="o">=</span> <span class="n">gf</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="n">componentName</span><span class="o">=</span><span class="s1">&#39;landice&#39;</span><span class="p">,</span> <span class="n">objectType</span><span class="o">=</span><span class="s1">&#39;region&#39;</span><span class="p">,</span>
<span class="n">tags</span><span class="o">=</span><span class="p">[</span><span class="n">tag</span><span class="p">])</span>
<span class="n">fcMask</span><span class="o">.</span><span class="n">merge</span><span class="p">(</span><span class="n">fc</span><span class="p">)</span>
<span class="n">fc</span> <span class="o">=</span> <span class="n">gf</span><span class="o">.</span><span class="n">read</span><span class="p">(</span><span class="n">componentName</span><span class="o">=</span><span class="n">component</span><span class="p">,</span> <span class="n">objectType</span><span class="o">=</span><span class="s1">&#39;region&#39;</span><span class="p">,</span>
<span class="n">tags</span><span class="o">=</span><span class="n">tags</span><span class="p">,</span> <span class="n">allTags</span><span class="o">=</span><span class="n">all_tags</span><span class="p">)</span>
<span class="n">fcMask</span><span class="o">.</span><span class="n">merge</span><span class="p">(</span><span class="n">fc</span><span class="p">)</span>

<span class="n">geojson_filename</span> <span class="o">=</span> <span class="s1">&#39;regionMask.geojson&#39;</span>
<span class="n">fcMask</span><span class="o">.</span><span class="n">to_geojson</span><span class="p">(</span><span class="n">geojson_filename</span><span class="p">)</span>
Expand Down
3 changes: 2 additions & 1 deletion latest/_modules/compass/landice/tests/antarctica/mesh.html
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ <h1>Source code for compass.landice.tests.antarctica.mesh</h1><div class="highli
<span class="bp">self</span><span class="o">.</span><span class="n">cpus_per_task</span><span class="p">,</span>
<span class="n">tags</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;EastAntarcticaIMBIE&#39;</span><span class="p">,</span>
<span class="s1">&#39;WestAntarcticaIMBIE&#39;</span><span class="p">,</span>
<span class="s1">&#39;AntarcticPeninsulaIMBIE&#39;</span><span class="p">])</span>
<span class="s1">&#39;AntarcticPeninsulaIMBIE&#39;</span><span class="p">],</span>
<span class="n">all_tags</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>

<span class="n">mask_filename</span> <span class="o">=</span> <span class="sa">f</span><span class="s1">&#39;</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">mesh_filename</span><span class="p">[:</span><span class="o">-</span><span class="mi">3</span><span class="p">]</span><span class="si">}</span><span class="s1">_ismip6_regionMasks.nc&#39;</span>
<span class="n">make_region_masks</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">mesh_filename</span><span class="p">,</span> <span class="n">mask_filename</span><span class="p">,</span>
Expand Down
11 changes: 9 additions & 2 deletions latest/_modules/compass/landice/tests/greenland/mesh.html
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,13 @@ <h1>Source code for compass.landice.tests.greenland.mesh</h1><div class="highlig
<span class="n">data</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s1">&#39;observedSurfaceVelocityUncertainty&#39;</span><span class="p">][</span><span class="mi">0</span><span class="p">,</span> <span class="n">mask</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="p">:]]</span> <span class="o">=</span> <span class="mf">1.0</span> <span class="c1"># noqa</span>

<span class="c1"># create region masks</span>
<span class="n">mask_filename</span> <span class="o">=</span> <span class="sa">f</span><span class="s1">&#39;</span><span class="si">{</span><span class="n">mesh_name</span><span class="p">[:</span><span class="o">-</span><span class="mi">3</span><span class="p">]</span><span class="si">}</span><span class="s1">_regionMasks.nc&#39;</span>
<span class="n">mask_filename</span> <span class="o">=</span> <span class="sa">f</span><span class="s1">&#39;</span><span class="si">{</span><span class="n">mesh_name</span><span class="p">[:</span><span class="o">-</span><span class="mi">3</span><span class="p">]</span><span class="si">}</span><span class="s1">_ismip6_regionMasks.nc&#39;</span>
<span class="n">make_region_masks</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">mesh_name</span><span class="p">,</span> <span class="n">mask_filename</span><span class="p">,</span>
<span class="bp">self</span><span class="o">.</span><span class="n">cpus_per_task</span><span class="p">,</span>
<span class="n">tags</span><span class="o">=</span><span class="p">[</span><span class="s2">&quot;Greenland&quot;</span><span class="p">,</span> <span class="s2">&quot;ISMIP6&quot;</span><span class="p">,</span> <span class="s2">&quot;Shelf&quot;</span><span class="p">],</span>
<span class="n">component</span><span class="o">=</span><span class="s1">&#39;ocean&#39;</span><span class="p">)</span>

<span class="n">mask_filename</span> <span class="o">=</span> <span class="sa">f</span><span class="s1">&#39;</span><span class="si">{</span><span class="n">mesh_name</span><span class="p">[:</span><span class="o">-</span><span class="mi">3</span><span class="p">]</span><span class="si">}</span><span class="s1">_zwally_regionMasks.nc&#39;</span>
<span class="n">make_region_masks</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">mesh_name</span><span class="p">,</span> <span class="n">mask_filename</span><span class="p">,</span>
<span class="bp">self</span><span class="o">.</span><span class="n">cpus_per_task</span><span class="p">,</span>
<span class="n">tags</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;eastCentralGreenland&#39;</span><span class="p">,</span>
Expand All @@ -315,7 +321,8 @@ <h1>Source code for compass.landice.tests.greenland.mesh</h1><div class="highlig
<span class="s1">&#39;southEastGreenland&#39;</span><span class="p">,</span>
<span class="s1">&#39;southGreenland&#39;</span><span class="p">,</span>
<span class="s1">&#39;southWestGreenland&#39;</span><span class="p">,</span>
<span class="s1">&#39;westCentralGreenland&#39;</span><span class="p">])</span>
<span class="s1">&#39;westCentralGreenland&#39;</span><span class="p">],</span>
<span class="n">all_tags</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>

<span class="c1"># Ensure basalHeatFlux is positive</span>
<span class="n">data</span><span class="o">.</span><span class="n">variables</span><span class="p">[</span><span class="s1">&#39;basalHeatFlux&#39;</span><span class="p">][:]</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">abs</span><span class="p">(</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ <h1>Source code for compass.ocean.tests.global_ocean.files_for_e3sm.diagnostic_m

<span class="n">gf</span> <span class="o">=</span> <span class="n">GeometricFeatures</span><span class="p">()</span>
<span class="n">region_groups</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;Antarctic Regions&#39;</span><span class="p">,</span> <span class="s1">&#39;Arctic Ocean Regions&#39;</span><span class="p">,</span>
<span class="s1">&#39;Arctic Sea Ice Regions&#39;</span><span class="p">,</span> <span class="s1">&#39;Ocean Basins&#39;</span><span class="p">,</span>
<span class="s1">&#39;Ocean Subbasins&#39;</span><span class="p">,</span> <span class="s1">&#39;ISMIP6 Regions&#39;</span><span class="p">]</span>
<span class="s1">&#39;Arctic Sea Ice Regions&#39;</span><span class="p">,</span> <span class="s1">&#39;Greenland Regions&#39;</span><span class="p">,</span>
<span class="s1">&#39;Ocean Basins&#39;</span><span class="p">,</span> <span class="s1">&#39;Ocean Subbasins&#39;</span><span class="p">,</span> <span class="s1">&#39;ISMIP6 Regions&#39;</span><span class="p">]</span>

<span class="k">if</span> <span class="n">with_ice_shelf_cavities</span><span class="p">:</span>
<span class="n">region_groups</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;Ice Shelves&#39;</span><span class="p">)</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
<h1>compass.landice.mesh.make_region_masks<a class="headerlink" href="#compass-landice-mesh-make-region-masks" title="Link to this heading"></a></h1>
<dl class="py function">
<dt class="sig sig-object py" id="compass.landice.mesh.make_region_masks">
<span class="sig-prename descclassname"><span class="pre">compass.landice.mesh.</span></span><span class="sig-name descname"><span class="pre">make_region_masks</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mesh_filename</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mask_filename</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cores</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tags</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/compass/landice/mesh.html#make_region_masks"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#compass.landice.mesh.make_region_masks" title="Link to this definition"></a></dt>
<span class="sig-prename descclassname"><span class="pre">compass.landice.mesh.</span></span><span class="sig-name descname"><span class="pre">make_region_masks</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mesh_filename</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mask_filename</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cores</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">tags</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">component</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'landice'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">all_tags</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/compass/landice/mesh.html#make_region_masks"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#compass.landice.mesh.make_region_masks" title="Link to this definition"></a></dt>
<dd><p>Create masks for ice-sheet subregions based on data
in <code class="docutils literal notranslate"><span class="pre">MPAS-Dev/geometric_fatures</span></code>.</p>
<dl class="field-list simple">
Expand Down
2 changes: 1 addition & 1 deletion latest/searchindex.js

Large diffs are not rendered by default.

0 comments on commit 548811d

Please sign in to comment.