Skip to content

Commit 63cc99e

Browse files
Update documentation
1 parent 83a2f99 commit 63cc99e

13 files changed

+58
-48
lines changed
10 KB
Binary file not shown.

develop/_modules/mpas_analysis/ocean/index_nino34.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,8 @@ <h1>Source code for mpas_analysis.ocean.index_nino34</h1><div class="highlight">
882882

883883
<span class="c1"># find maximum value of three curves plotted</span>
884884
<span class="n">maxY</span> <span class="o">=</span> <span class="o">-</span><span class="mf">1E20</span>
885+
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">mask</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
886+
<span class="k">return</span> <span class="n">maxY</span>
885887
<span class="k">for</span> <span class="n">y</span> <span class="ow">in</span> <span class="n">ys</span><span class="p">:</span>
886888
<span class="n">maxY</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="n">y</span><span class="p">[</span><span class="n">mask</span><span class="p">]</span><span class="o">.</span><span class="n">max</span><span class="p">(),</span> <span class="n">maxY</span><span class="p">)</span>
887889
<span class="c1"># check the function interpolated to the max/min as well</span>

develop/_modules/mpas_analysis/ocean/streamfunction_moc.html

Lines changed: 26 additions & 23 deletions
Large diffs are not rendered by default.

develop/_modules/mpas_analysis/shared/analysis_task.html

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,8 @@ <h1>Source code for mpas_analysis.shared.analysis_task</h1><div class="highlight
730730
<span class="k">pass</span>
731731

732732

733-
<span class="k">def</span><span class="w"> </span><span class="nf">update_time_bounds_from_file_names</span><span class="p">(</span><span class="n">config</span><span class="p">,</span> <span class="n">section</span><span class="p">,</span> <span class="n">componentName</span><span class="p">):</span>
733+
<span class="k">def</span><span class="w"> </span><span class="nf">update_time_bounds_from_file_names</span><span class="p">(</span><span class="n">config</span><span class="p">,</span> <span class="n">section</span><span class="p">,</span> <span class="n">componentName</span><span class="p">,</span>
734+
<span class="n">allow_cache</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
734735
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
735736
<span class="sd"> Update the start and end years and dates for time series, climatologies or</span>
736737
<span class="sd"> climate indices based on the years actually available in the list of files.</span>
@@ -786,7 +787,7 @@ <h1>Source code for mpas_analysis.shared.analysis_task</h1><div class="highlight
786787
<span class="k">return</span>
787788

788789
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">inputFiles</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
789-
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">&#39;No input files found for stream </span><span class="si">{}</span><span class="s1"> in </span><span class="si">{}</span><span class="s1"> between &#39;</span>
790+
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;Warning: No input files found for stream </span><span class="si">{}</span><span class="s1"> in </span><span class="si">{}</span><span class="s1"> between &#39;</span>
790791
<span class="s1">&#39;</span><span class="si">{}</span><span class="s1"> and </span><span class="si">{}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">streamName</span><span class="p">,</span> <span class="n">componentName</span><span class="p">,</span>
791792
<span class="n">requestedStartYear</span><span class="p">,</span>
792793
<span class="n">requestedEndYear</span><span class="p">))</span>
@@ -808,12 +809,16 @@ <h1>Source code for mpas_analysis.shared.analysis_task</h1><div class="highlight
808809
<span class="n">endYear</span> <span class="o">=</span> <span class="n">years</span><span class="p">[</span><span class="n">lastIndex</span><span class="p">]</span>
809810

810811
<span class="k">if</span> <span class="n">startYear</span> <span class="o">!=</span> <span class="n">requestedStartYear</span> <span class="ow">or</span> <span class="n">endYear</span> <span class="o">!=</span> <span class="n">requestedEndYear</span><span class="p">:</span>
811-
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span>
812-
<span class="s2">&quot;</span><span class="si">{}</span><span class="s2"> start and/or end year different from requested</span><span class="se">\n</span><span class="s2">&quot;</span>
813-
<span class="s2">&quot;requested: </span><span class="si">{:04d}</span><span class="s2">-</span><span class="si">{:04d}</span><span class="se">\n</span><span class="s2">&quot;</span>
814-
<span class="s2">&quot;actual: </span><span class="si">{:04d}</span><span class="s2">-</span><span class="si">{:04d}</span><span class="se">\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
815-
<span class="n">section</span><span class="p">,</span> <span class="n">requestedStartYear</span><span class="p">,</span> <span class="n">requestedEndYear</span><span class="p">,</span> <span class="n">startYear</span><span class="p">,</span>
816-
<span class="n">endYear</span><span class="p">))</span>
812+
<span class="n">message</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;</span><span class="si">{}</span><span class="s2"> start and/or end year different from requested</span><span class="se">\n</span><span class="s2">&quot;</span>
813+
<span class="s2">&quot;requested: </span><span class="si">{:04d}</span><span class="s2">-</span><span class="si">{:04d}</span><span class="se">\n</span><span class="s2">&quot;</span>
814+
<span class="s2">&quot;actual: </span><span class="si">{:04d}</span><span class="s2">-</span><span class="si">{:04d}</span><span class="se">\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
815+
<span class="n">section</span><span class="p">,</span> <span class="n">requestedStartYear</span><span class="p">,</span> <span class="n">requestedEndYear</span><span class="p">,</span> <span class="n">startYear</span><span class="p">,</span>
816+
<span class="n">endYear</span><span class="p">)</span>
817+
<span class="p">)</span>
818+
<span class="k">if</span> <span class="n">allow_cache</span><span class="p">:</span>
819+
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Warning: </span><span class="si">{</span><span class="n">message</span><span class="si">}</span><span class="s1">&#39;</span><span class="p">)</span>
820+
<span class="k">else</span><span class="p">:</span>
821+
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="n">message</span><span class="p">)</span>
817822

818823
<span class="n">startDate</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">{:04d}</span><span class="s1">-01-01_00:00:00&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">startYear</span><span class="p">)</span>
819824
<span class="n">config</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">section</span><span class="p">,</span> <span class="s1">&#39;startDate&#39;</span><span class="p">,</span> <span class="n">startDate</span><span class="p">)</span>

develop/developers_guide/generated/mpas_analysis.ocean.utility.add_standard_regions_and_subset.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ <h1>mpas_analysis.ocean.utility.add_standard_regions_and_subset<a class="headerl
130130
<dl class="field-list simple">
131131
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
132132
<dd class="field-odd"><ul class="simple">
133-
<li><p><strong>ds</strong> (<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html#xarray.Dataset" title="(in xarray v2025.10.1)"><em>xarray.Dataset</em></a>) – the dataset to which region names should be added</p></li>
133+
<li><p><strong>ds</strong> (<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html#xarray.Dataset" title="(in xarray v2025.11.1)"><em>xarray.Dataset</em></a>) – the dataset to which region names should be added</p></li>
134134
<li><p><strong>config</strong> (<em>tranche.Tranche</em>) – Configuration options</p></li>
135135
<li><p><strong>regionShortNames</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.14)"><em>list</em></a><em> of </em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><em>str</em></a><em>, </em><em>optional</em>) – A list of a subset of the short region names to use to subset the
136136
dataset</p></li>

develop/developers_guide/generated/mpas_analysis.ocean.utility.vector_cell_to_edge_isotropic.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ <h1>mpas_analysis.ocean.utility.vector_cell_to_edge_isotropic<a class="headerlin
129129
<dl class="field-list simple">
130130
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
131131
<dd class="field-odd"><ul class="simple">
132-
<li><p><strong>ds_mesh</strong> (<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html#xarray.Dataset" title="(in xarray v2025.10.1)"><em>xarray.Dataset</em></a>) – MPAS mesh variables, must include:
132+
<li><p><strong>ds_mesh</strong> (<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html#xarray.Dataset" title="(in xarray v2025.11.1)"><em>xarray.Dataset</em></a>) – MPAS mesh variables, must include:
133133
- verticesOnEdge
134134
- cellsOnVertex
135135
- kiteAreasOnVertex</p></li>
136-
<li><p><strong>zonal_cell</strong> (<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html#xarray.DataArray" title="(in xarray v2025.10.1)"><em>xarray.DataArray</em></a>) – Zonal component at cell centers (nCells,)</p></li>
137-
<li><p><strong>meridional_cell</strong> (<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html#xarray.DataArray" title="(in xarray v2025.10.1)"><em>xarray.DataArray</em></a>) – Meridional component at cell centers (nCells,)</p></li>
136+
<li><p><strong>zonal_cell</strong> (<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html#xarray.DataArray" title="(in xarray v2025.11.1)"><em>xarray.DataArray</em></a>) – Zonal component at cell centers (nCells,)</p></li>
137+
<li><p><strong>meridional_cell</strong> (<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html#xarray.DataArray" title="(in xarray v2025.11.1)"><em>xarray.DataArray</em></a>) – Meridional component at cell centers (nCells,)</p></li>
138138
</ul>
139139
</dd>
140140
<dt class="field-even">Returns<span class="colon">:</span></dt>

develop/developers_guide/generated/mpas_analysis.shared.climatology.RemapMpasClimatologySubtask.customize_masked_climatology.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ <h1>mpas_analysis.shared.climatology.RemapMpasClimatologySubtask.customize_maske
153153
<dl class="field-list simple">
154154
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
155155
<dd class="field-odd"><ul class="simple">
156-
<li><p><strong>climatology</strong> (<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html#xarray.Dataset" title="(in xarray v2025.10.1)"><em>xarray.Dataset</em></a>) – The MPAS climatology data set that has had a mask added but has
156+
<li><p><strong>climatology</strong> (<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html#xarray.Dataset" title="(in xarray v2025.11.1)"><em>xarray.Dataset</em></a>) – The MPAS climatology data set that has had a mask added but has
157157
not yet been remapped</p></li>
158158
<li><p><strong>season</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><em>str</em></a>) – The name of the season to be masked</p></li>
159159
</ul>

develop/developers_guide/generated/mpas_analysis.shared.climatology.RemapMpasClimatologySubtask.customize_remapped_climatology.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ <h1>mpas_analysis.shared.climatology.RemapMpasClimatologySubtask.customize_remap
152152
<dl class="field-list simple">
153153
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
154154
<dd class="field-odd"><ul class="simple">
155-
<li><p><strong>climatology</strong> (<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html#xarray.Dataset" title="(in xarray v2025.10.1)"><em>xarray.Dataset</em></a>) – The MPAS climatology data set that has been remapped</p></li>
155+
<li><p><strong>climatology</strong> (<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html#xarray.Dataset" title="(in xarray v2025.11.1)"><em>xarray.Dataset</em></a>) – The MPAS climatology data set that has been remapped</p></li>
156156
<li><p><strong>comparisonGridNames</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><em>str</em></a>) – The name of the comparison grid to use for remapping.</p></li>
157157
<li><p><strong>season</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.14)"><em>str</em></a>) – The name of the season to be remapped</p></li>
158158
</ul>

develop/developers_guide/generated/mpas_analysis.shared.climatology.compute_climatology.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ <h1>mpas_analysis.shared.climatology.compute_climatology<a class="headerlink" hr
156156
<dl class="field-list simple">
157157
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
158158
<dd class="field-odd"><ul class="simple">
159-
<li><p><strong>ds</strong> (<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html#xarray.Dataset" title="(in xarray v2025.10.1)"><em>xarray.Dataset</em></a><em> or </em><a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html#xarray.DataArray" title="(in xarray v2025.10.1)"><em>xarray.DataArray</em></a>) – A data set with a <code class="docutils literal notranslate"><span class="pre">Time</span></code> coordinate expressed as days since
159+
<li><p><strong>ds</strong> (<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html#xarray.Dataset" title="(in xarray v2025.11.1)"><em>xarray.Dataset</em></a><em> or </em><a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html#xarray.DataArray" title="(in xarray v2025.11.1)"><em>xarray.DataArray</em></a>) – A data set with a <code class="docutils literal notranslate"><span class="pre">Time</span></code> coordinate expressed as days since
160160
0001-01-01 or <code class="docutils literal notranslate"><span class="pre">month</span></code> coordinate</p></li>
161161
<li><p><strong>monthValues</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><em>int</em></a><em> or </em><em>array-like</em><em> of </em><em>ints</em>) – A single month or an array of months to be averaged together</p></li>
162162
<li><p><strong>calendar</strong> (<em>{'gregorian'</em><em>, </em><em>'noleap'}</em><em>, </em><em>optional</em>) – The name of one of the calendars supported by MPAS cores, used to

develop/developers_guide/generated/mpas_analysis.shared.climatology.compute_monthly_climatology.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ <h1>mpas_analysis.shared.climatology.compute_monthly_climatology<a class="header
155155
<dl class="field-list simple">
156156
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
157157
<dd class="field-odd"><ul class="simple">
158-
<li><p><strong>ds</strong> (<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html#xarray.Dataset" title="(in xarray v2025.10.1)"><em>xarray.Dataset</em></a><em> or </em><a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html#xarray.DataArray" title="(in xarray v2025.10.1)"><em>xarray.DataArray</em></a>) – A data set with a <code class="docutils literal notranslate"><span class="pre">Time</span></code> coordinate expressed as days since
158+
<li><p><strong>ds</strong> (<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.Dataset.html#xarray.Dataset" title="(in xarray v2025.11.1)"><em>xarray.Dataset</em></a><em> or </em><a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html#xarray.DataArray" title="(in xarray v2025.11.1)"><em>xarray.DataArray</em></a>) – A data set with a <code class="docutils literal notranslate"><span class="pre">Time</span></code> coordinate expressed as days since
159159
0001-01-01 or <code class="docutils literal notranslate"><span class="pre">month</span></code> coordinate</p></li>
160160
<li><p><strong>calendar</strong> (<em>{'gregorian'</em><em>, </em><em>'noleap'}</em><em>, </em><em>optional</em>) – The name of one of the calendars supported by MPAS cores, used to
161161
determine <code class="docutils literal notranslate"><span class="pre">month</span></code> from <code class="docutils literal notranslate"><span class="pre">Time</span></code> coordinate, so must be supplied if

0 commit comments

Comments
 (0)