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 Oct 18, 2023
1 parent 7c54115 commit 04767ae
Show file tree
Hide file tree
Showing 18 changed files with 720 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ <h1>Source code for compass.ocean.tests.global_ocean.files_for_e3sm</h1><div cla
<span class="kn">from</span> <span class="nn">compass.ocean.tests.global_ocean.files_for_e3sm.seaice_mesh</span> <span class="kn">import</span> <span class="p">(</span> <span class="c1"># noqa: E501</span>
<span class="n">SeaiceMesh</span><span class="p">,</span>
<span class="p">)</span>
<span class="kn">from</span> <span class="nn">compass.ocean.tests.global_ocean.files_for_e3sm.write_coeffs_reconstruct</span> <span class="kn">import</span> <span class="p">(</span> <span class="c1"># noqa: E501</span>
<span class="n">WriteCoeffsReconstruct</span><span class="p">,</span>
<span class="p">)</span>
<span class="kn">from</span> <span class="nn">compass.ocean.tests.global_ocean.forward</span> <span class="kn">import</span> <span class="n">get_forward_subdir</span>
<span class="kn">from</span> <span class="nn">compass.testcase</span> <span class="kn">import</span> <span class="n">TestCase</span>

Expand Down Expand Up @@ -228,7 +231,11 @@ <h1>Source code for compass.ocean.tests.global_ocean.files_for_e3sm</h1><div cla
<span class="n">test_case</span><span class="o">=</span><span class="bp">self</span><span class="p">))</span>

<span class="bp">self</span><span class="o">.</span><span class="n">add_step</span><span class="p">(</span><span class="n">RemapIcebergClimatology</span><span class="p">(</span>
<span class="n">test_case</span><span class="o">=</span><span class="bp">self</span><span class="p">))</span></div>
<span class="n">test_case</span><span class="o">=</span><span class="bp">self</span><span class="p">))</span>

<span class="k">if</span> <span class="n">mesh</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="n">init</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">add_step</span><span class="p">(</span><span class="n">WriteCoeffsReconstruct</span><span class="p">(</span>
<span class="n">test_case</span><span class="o">=</span><span class="bp">self</span><span class="p">,</span> <span class="n">mesh</span><span class="o">=</span><span class="n">mesh</span><span class="p">,</span> <span class="n">init</span><span class="o">=</span><span class="n">init</span><span class="p">))</span></div>

<div class="viewcode-block" id="FilesForE3SM.configure"><a class="viewcode-back" href="../../../../../developers_guide/ocean/generated/compass.ocean.tests.global_ocean.files_for_e3sm.FilesForE3SM.configure.html#compass.ocean.tests.global_ocean.files_for_e3sm.FilesForE3SM.configure">[docs]</a> <span class="k">def</span> <span class="nf">configure</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
Expand Down

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions latest/_modules/compass/ocean/tests/global_ocean/forward.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ <h1>Source code for compass.ocean.tests.global_ocean.forward</h1><div class="hig
<div class="viewcode-block" id="ForwardStep.__init__"><a class="viewcode-back" href="../../../../../developers_guide/ocean/generated/compass.ocean.tests.global_ocean.forward.ForwardStep.html#compass.ocean.tests.global_ocean.forward.ForwardStep.__init__">[docs]</a> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">test_case</span><span class="p">,</span> <span class="n">mesh</span><span class="p">,</span> <span class="n">time_integrator</span><span class="p">,</span> <span class="n">init</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">name</span><span class="o">=</span><span class="s1">&#39;forward&#39;</span><span class="p">,</span> <span class="n">subdir</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">ntasks</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">min_tasks</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">openmp_threads</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">get_dt_from_min_res</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">land_ice_flux_mode</span><span class="o">=</span><span class="s1">&#39;pressure_only&#39;</span><span class="p">):</span>
<span class="n">land_ice_flux_mode</span><span class="o">=</span><span class="s1">&#39;pressure_only&#39;</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Create a new step</span>

Expand Down Expand Up @@ -206,7 +206,7 @@ <h1>Source code for compass.ocean.tests.global_ocean.forward</h1><div class="hig
<span class="n">min_tasks</span> <span class="o">=</span> <span class="n">ntasks</span>
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">test_case</span><span class="o">=</span><span class="n">test_case</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="n">name</span><span class="p">,</span> <span class="n">subdir</span><span class="o">=</span><span class="n">subdir</span><span class="p">,</span>
<span class="n">ntasks</span><span class="o">=</span><span class="n">ntasks</span><span class="p">,</span> <span class="n">min_tasks</span><span class="o">=</span><span class="n">min_tasks</span><span class="p">,</span>
<span class="n">openmp_threads</span><span class="o">=</span><span class="n">openmp_threads</span><span class="p">)</span>
<span class="n">openmp_threads</span><span class="o">=</span><span class="n">openmp_threads</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>

<span class="k">if</span> <span class="p">(</span><span class="n">ntasks</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">)</span> <span class="o">!=</span> <span class="p">(</span><span class="n">openmp_threads</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">&#39;You must specify both ntasks and openmp_threads &#39;</span>
Expand Down Expand Up @@ -293,7 +293,8 @@ <h1>Source code for compass.ocean.tests.global_ocean.forward</h1><div class="hig
<span class="s1">&#39;config_btr_dt&#39;</span><span class="p">:</span> <span class="n">btr_dt</span><span class="p">})</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># RK4, so use the smaller time step</span>
<span class="bp">self</span><span class="o">.</span><span class="n">add_namelist_options</span><span class="p">({</span><span class="s1">&#39;config_dt&#39;</span><span class="p">:</span> <span class="n">btr_dt</span><span class="p">})</span></div>
<span class="bp">self</span><span class="o">.</span><span class="n">add_namelist_options</span><span class="p">({</span><span class="s1">&#39;config_dt&#39;</span><span class="p">:</span> <span class="n">btr_dt</span><span class="p">})</span>
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">setup</span><span class="p">()</span></div>

<span class="k">def</span> <span class="nf">constrain_resources</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">available_resources</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
Expand Down Expand Up @@ -321,11 +322,13 @@ <h1>Source code for compass.ocean.tests.global_ocean.forward</h1><div class="hig
<span class="k">else</span><span class="p">:</span>
<span class="c1"># RK4, so use the smaller time step</span>
<span class="bp">self</span><span class="o">.</span><span class="n">update_namelist_at_runtime</span><span class="p">({</span><span class="s1">&#39;config_dt&#39;</span><span class="p">:</span> <span class="n">btr_dt</span><span class="p">})</span>
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">runtime_setup</span><span class="p">()</span>

<div class="viewcode-block" id="ForwardStep.run"><a class="viewcode-back" href="../../../../../developers_guide/ocean/generated/compass.ocean.tests.global_ocean.forward.ForwardStep.run.html#compass.ocean.tests.global_ocean.forward.ForwardStep.run">[docs]</a> <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Run this step of the testcase</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">run</span><span class="p">()</span>
<span class="n">update_pio</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">getboolean</span><span class="p">(</span><span class="s1">&#39;global_ocean&#39;</span><span class="p">,</span>
<span class="s1">&#39;forward_update_pio&#39;</span><span class="p">)</span>
<span class="n">run_model</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">update_pio</span><span class="o">=</span><span class="n">update_pio</span><span class="p">)</span>
Expand Down
1 change: 1 addition & 0 deletions latest/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ <h1>All modules for which code is available</h1>
<li><a href="compass/ocean/tests/global_ocean/files_for_e3sm/seaice_graph_partition.html">compass.ocean.tests.global_ocean.files_for_e3sm.seaice_graph_partition</a></li>
<li><a href="compass/ocean/tests/global_ocean/files_for_e3sm/seaice_initial_condition.html">compass.ocean.tests.global_ocean.files_for_e3sm.seaice_initial_condition</a></li>
<li><a href="compass/ocean/tests/global_ocean/files_for_e3sm/seaice_mesh.html">compass.ocean.tests.global_ocean.files_for_e3sm.seaice_mesh</a></li>
<li><a href="compass/ocean/tests/global_ocean/files_for_e3sm/write_coeffs_reconstruct.html">compass.ocean.tests.global_ocean.files_for_e3sm.write_coeffs_reconstruct</a></li>
</ul><li><a href="compass/ocean/tests/global_ocean/forward.html">compass.ocean.tests.global_ocean.forward</a></li>
<li><a href="compass/ocean/tests/global_ocean/init.html">compass.ocean.tests.global_ocean.init</a></li>
<ul><li><a href="compass/ocean/tests/global_ocean/init/initial_state.html">compass.ocean.tests.global_ocean.init.initial_state</a></li>
Expand Down
2 changes: 2 additions & 0 deletions latest/_sources/developers_guide/ocean/api.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ test cases and steps
files_for_e3sm.remap_sea_surface_salinity_restoring.RemapSeaSurfaceSalinityRestoring.run
files_for_e3sm.remap_iceberg_climatology.RemapIcebergClimatology
files_for_e3sm.remap_iceberg_climatology.RemapIcebergClimatology.run
files_for_e3sm.write_coeffs_reconstruct.WriteCoeffsReconstruct
files_for_e3sm.write_coeffs_reconstruct.WriteCoeffsReconstruct.run

init.Init
init.Init.configure
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
compass.ocean.tests.global\_ocean.files\_for\_e3sm.write\_coeffs\_reconstruct.WriteCoeffsReconstruct
====================================================================================================

.. currentmodule:: compass.ocean.tests.global_ocean.files_for_e3sm.write_coeffs_reconstruct

.. autoclass:: WriteCoeffsReconstruct


.. automethod:: __init__


.. rubric:: Methods

.. autosummary::

~WriteCoeffsReconstruct.__init__
~WriteCoeffsReconstruct.add_input_file
~WriteCoeffsReconstruct.add_model_as_input
~WriteCoeffsReconstruct.add_namelist_file
~WriteCoeffsReconstruct.add_namelist_options
~WriteCoeffsReconstruct.add_output_file
~WriteCoeffsReconstruct.add_streams_file
~WriteCoeffsReconstruct.constrain_resources
~WriteCoeffsReconstruct.process_inputs_and_outputs
~WriteCoeffsReconstruct.run
~WriteCoeffsReconstruct.runtime_setup
~WriteCoeffsReconstruct.set_resources
~WriteCoeffsReconstruct.setup
~WriteCoeffsReconstruct.update_namelist_at_runtime
~WriteCoeffsReconstruct.update_namelist_pio
~WriteCoeffsReconstruct.update_streams_at_runtime






Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
compass.ocean.tests.global\_ocean.files\_for\_e3sm.write\_coeffs\_reconstruct.WriteCoeffsReconstruct.run
========================================================================================================

.. currentmodule:: compass.ocean.tests.global_ocean.files_for_e3sm.write_coeffs_reconstruct

.. automethod:: WriteCoeffsReconstruct.run
Original file line number Diff line number Diff line change
Expand Up @@ -1380,6 +1380,12 @@ The test case is made up of 10 steps:
the MPAS mesh. This dataset is used in E3SM for compsets with data iceberg
freshwater fluxes (``DIB``).

:py:class:`compass.ocean.tests.global_ocean.files_for_e3sm.write_coeffs_reconstruct.WriteCoeffsReconstruct`
is used to do a one-time-step forward run to write out coefficients
``coeff_reconstruct`` for reconstructing vector fields at cell centers from
normal values at edges. These can be used in combination with the


files_for_e3sm for an existing mesh
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
6 changes: 6 additions & 0 deletions latest/developers_guide/ocean/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,12 @@ <h4>test cases and steps<a class="headerlink" href="#test-cases-and-steps" title
<tr class="row-odd"><td><p><a class="reference internal" href="generated/compass.ocean.tests.global_ocean.files_for_e3sm.remap_iceberg_climatology.RemapIcebergClimatology.run.html#compass.ocean.tests.global_ocean.files_for_e3sm.remap_iceberg_climatology.RemapIcebergClimatology.run" title="compass.ocean.tests.global_ocean.files_for_e3sm.remap_iceberg_climatology.RemapIcebergClimatology.run"><code class="xref py py-obj docutils literal notranslate"><span class="pre">files_for_e3sm.remap_iceberg_climatology.RemapIcebergClimatology.run</span></code></a>()</p></td>
<td><p>Run this step of the test case</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/compass.ocean.tests.global_ocean.files_for_e3sm.write_coeffs_reconstruct.WriteCoeffsReconstruct.html#compass.ocean.tests.global_ocean.files_for_e3sm.write_coeffs_reconstruct.WriteCoeffsReconstruct" title="compass.ocean.tests.global_ocean.files_for_e3sm.write_coeffs_reconstruct.WriteCoeffsReconstruct"><code class="xref py py-obj docutils literal notranslate"><span class="pre">files_for_e3sm.write_coeffs_reconstruct.WriteCoeffsReconstruct</span></code></a>(...)</p></td>
<td><p>A step for writing out <code class="docutils literal notranslate"><span class="pre">coeffs_reconstruct</span></code> for a given MPAS mesh</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="generated/compass.ocean.tests.global_ocean.files_for_e3sm.write_coeffs_reconstruct.WriteCoeffsReconstruct.run.html#compass.ocean.tests.global_ocean.files_for_e3sm.write_coeffs_reconstruct.WriteCoeffsReconstruct.run" title="compass.ocean.tests.global_ocean.files_for_e3sm.write_coeffs_reconstruct.WriteCoeffsReconstruct.run"><code class="xref py py-obj docutils literal notranslate"><span class="pre">files_for_e3sm.write_coeffs_reconstruct.WriteCoeffsReconstruct.run</span></code></a>()</p></td>
<td><p>Run this step of the testcase</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="generated/compass.ocean.tests.global_ocean.init.Init.html#compass.ocean.tests.global_ocean.init.Init" title="compass.ocean.tests.global_ocean.init.Init"><code class="xref py py-obj docutils literal notranslate"><span class="pre">init.Init</span></code></a>(test_group, mesh, initial_condition)</p></td>
<td><p>A test case for creating initial conditions on a global MPAS-Ocean mesh</p></td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="compass.ocean.tests.global_ocean.init.Init" href="compass.ocean.tests.global_ocean.init.Init.html" />
<link rel="next" title="compass.ocean.tests.global_ocean.files_for_e3sm.write_coeffs_reconstruct.WriteCoeffsReconstruct" href="compass.ocean.tests.global_ocean.files_for_e3sm.write_coeffs_reconstruct.WriteCoeffsReconstruct.html" />
<link rel="prev" title="compass.ocean.tests.global_ocean.files_for_e3sm.remap_iceberg_climatology.RemapIcebergClimatology" href="compass.ocean.tests.global_ocean.files_for_e3sm.remap_iceberg_climatology.RemapIcebergClimatology.html" />
</head>

Expand Down Expand Up @@ -143,7 +143,7 @@ <h1>compass.ocean.tests.global_ocean.files_for_e3sm.remap_iceberg_climatology.Re
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="compass.ocean.tests.global_ocean.files_for_e3sm.remap_iceberg_climatology.RemapIcebergClimatology.html" class="btn btn-neutral float-left" title="compass.ocean.tests.global_ocean.files_for_e3sm.remap_iceberg_climatology.RemapIcebergClimatology" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="compass.ocean.tests.global_ocean.init.Init.html" class="btn btn-neutral float-right" title="compass.ocean.tests.global_ocean.init.Init" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="compass.ocean.tests.global_ocean.files_for_e3sm.write_coeffs_reconstruct.WriteCoeffsReconstruct.html" class="btn btn-neutral float-right" title="compass.ocean.tests.global_ocean.files_for_e3sm.write_coeffs_reconstruct.WriteCoeffsReconstruct" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

<hr/>
Expand Down
Loading

0 comments on commit 04767ae

Please sign in to comment.