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 Jul 11, 2024
1 parent 6de0521 commit a584f27
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ <h1>Source code for compass.ocean.tests.global_ocean.analysis_test</h1><div clas

<span class="n">step</span> <span class="o">=</span> <span class="n">ForwardStep</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>
<span class="n">time_integrator</span><span class="o">=</span><span class="n">time_integrator</span><span class="p">,</span> <span class="n">ntasks</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span>
<span class="n">openmp_threads</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="n">openmp_threads</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">add_metadata</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>

<span class="bp">self</span><span class="o">.</span><span class="n">variables</span> <span class="o">=</span> <span class="p">{</span>
<span class="s1">&#39;output.nc&#39;</span><span class="p">:</span>
Expand Down
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.daily_output_test</h1><div

<span class="n">step</span> <span class="o">=</span> <span class="n">ForwardStep</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>
<span class="n">time_integrator</span><span class="o">=</span><span class="n">time_integrator</span><span class="p">,</span> <span class="n">ntasks</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span>
<span class="n">openmp_threads</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="n">openmp_threads</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">add_metadata</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>

<span class="n">module</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__module__</span>
<span class="n">step</span><span class="o">.</span><span class="n">add_output_file</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="s1">&#39;output.nc&#39;</span><span class="p">)</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ <h1>Source code for compass.ocean.tests.global_ocean.decomp_test</h1><div class=
<span class="n">name</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">{}</span><span class="s1">proc&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">procs</span><span class="p">)</span>
<span class="n">step</span> <span class="o">=</span> <span class="n">ForwardStep</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>
<span class="n">time_integrator</span><span class="o">=</span><span class="n">time_integrator</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">name</span><span class="p">,</span> <span class="n">ntasks</span><span class="o">=</span><span class="n">procs</span><span class="p">,</span> <span class="n">openmp_threads</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="n">subdir</span><span class="o">=</span><span class="n">name</span><span class="p">,</span> <span class="n">ntasks</span><span class="o">=</span><span class="n">procs</span><span class="p">,</span> <span class="n">openmp_threads</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span>
<span class="n">add_metadata</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">step</span><span class="o">.</span><span class="n">add_output_file</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="s1">&#39;output.nc&#39;</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">step</span><span class="p">)</span></div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ <h1>Source code for compass.ocean.tests.global_ocean.dynamic_adjustment</h1><div
<span class="n">time_integrator</span><span class="o">=</span><span class="n">time_integrator</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="n">step_name</span><span class="p">,</span>
<span class="n">subdir</span><span class="o">=</span><span class="n">step_name</span><span class="p">,</span>
<span class="n">land_ice_flux_mode</span><span class="o">=</span><span class="n">land_ice_flux_mode</span><span class="p">,</span>
<span class="n">get_dt_from_min_res</span><span class="o">=</span><span class="n">get_dt_from_min_res</span><span class="p">)</span>
<span class="n">get_dt_from_min_res</span><span class="o">=</span><span class="n">get_dt_from_min_res</span><span class="p">,</span>
<span class="n">add_metadata</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>

<span class="n">namelist_options</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="n">shared_options</span><span class="p">)</span>
<span class="k">if</span> <span class="n">previous_restart_filename</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ <h1>Source code for compass.ocean.tests.global_ocean.files_for_e3sm.write_coeffs
<span class="sd"> &quot;&quot;&quot;</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">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>
<span class="n">time_integrator</span><span class="o">=</span><span class="s1">&#39;split_explicit_ab2&#39;</span><span class="p">,</span>
<span class="n">name</span><span class="o">=</span><span class="s1">&#39;write_coeffs_reconstruct&#39;</span><span class="p">)</span>
<span class="n">name</span><span class="o">=</span><span class="s1">&#39;write_coeffs_reconstruct&#39;</span><span class="p">,</span> <span class="n">add_metadata</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>

<span class="n">package</span> <span class="o">=</span> <span class="s1">&#39;compass.ocean.tests.global_ocean.files_for_e3sm.&#39;</span> \
<span class="s1">&#39;write_coeffs_reconstruct&#39;</span>
Expand Down
22 changes: 16 additions & 6 deletions latest/_modules/compass/ocean/tests/global_ocean/forward.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ <h1>Source code for compass.ocean.tests.global_ocean.forward</h1><div class="hig
<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="o">**</span><span class="n">kwargs</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">add_metadata</span><span class="o">=</span><span class="kc">True</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 @@ -193,18 +194,26 @@ <h1>Source code for compass.ocean.tests.global_ocean.forward</h1><div class="hig
<span class="sd"> openmp_threads : int, optional</span>
<span class="sd"> the number of OpenMP threads the step will use</span>

<span class="sd"> get_dt_from_min_res : bool</span>
<span class="sd"> Whether to automatically compute `config_dt` and `config_btr_dt`</span>
<span class="sd"> namelist options from the minimum resolution of the mesh</span>
<span class="sd"> get_dt_from_min_res : bool, optional</span>
<span class="sd"> Whether to automatically compute ``config_dt`` and</span>
<span class="sd"> ``config_btr_dt`` namelist options from the minimum resolution of</span>
<span class="sd"> the mesh</span>

<span class="sd"> land_ice_flux_mode : {&#39;pressure_only&#39;, &#39;standalone&#39;, &#39;data&#39;}, optional</span>
<span class="sd"> Whether to have no ice-shelf melt fluxes (&quot;pressure_only&quot;),</span>
<span class="sd"> prognostic melt (&quot;standalone&quot;) or data melt from a</span>
<span class="sd"> satellite-derived climatology (&quot;data&quot;).</span>

<span class="sd"> add_metadata : bool, optional</span>
<span class="sd"> Whether to add mesh and initial-condition metadata to output files</span>
<span class="sd"> (assuming the ``add_metadata`` config option is also set to True).</span>
<span class="sd"> This should be set to ``False`` for regression tests where the</span>
<span class="sd"> metadata is unlikely to be used.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mesh</span> <span class="o">=</span> <span class="n">mesh</span>
<span class="bp">self</span><span class="o">.</span><span class="n">init</span> <span class="o">=</span> <span class="n">init</span>
<span class="bp">self</span><span class="o">.</span><span class="n">time_integrator</span> <span class="o">=</span> <span class="n">time_integrator</span>
<span class="bp">self</span><span class="o">.</span><span class="n">add_metadata</span> <span class="o">=</span> <span class="n">add_metadata</span>
<span class="k">if</span> <span class="n">min_tasks</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<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>
Expand Down Expand Up @@ -337,8 +346,9 @@ <h1>Source code for compass.ocean.tests.global_ocean.forward</h1><div class="hig
<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>
<span class="n">add_mesh_and_init_metadata</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">outputs</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">config</span><span class="p">,</span>
<span class="n">init_filename</span><span class="o">=</span><span class="s1">&#39;init.nc&#39;</span><span class="p">)</span></div>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">add_metadata</span><span class="p">:</span>
<span class="n">add_mesh_and_init_metadata</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">outputs</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">config</span><span class="p">,</span>
<span class="n">init_filename</span><span class="o">=</span><span class="s1">&#39;init.nc&#39;</span><span class="p">)</span></div>


<span class="k">def</span> <span class="nf">_get_dts</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,16 @@ <h1>Source code for compass.ocean.tests.global_ocean.performance_test</h1><div c
<span class="n">step</span> <span class="o">=</span> <span class="n">ForwardStep</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>
<span class="n">time_integrator</span><span class="o">=</span><span class="n">time_integrator</span><span class="p">,</span>
<span class="n">name</span><span class="o">=</span><span class="n">step_name</span><span class="p">,</span>
<span class="n">land_ice_flux_mode</span><span class="o">=</span><span class="n">flux_mode</span><span class="p">)</span>
<span class="n">land_ice_flux_mode</span><span class="o">=</span><span class="n">flux_mode</span><span class="p">,</span>
<span class="n">add_metadata</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">step</span><span class="o">.</span><span class="n">add_streams_file</span><span class="p">(</span><span class="n">this_module</span><span class="p">,</span> <span class="s1">&#39;streams.wisc&#39;</span><span class="p">)</span>
<span class="n">step</span><span class="o">.</span><span class="n">add_output_file</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="s1">&#39;land_ice_fluxes.nc&#39;</span><span class="p">)</span>
<span class="n">step</span><span class="o">.</span><span class="n">add_output_file</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="s1">&#39;output.nc&#39;</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">step</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">step</span> <span class="o">=</span> <span class="n">ForwardStep</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>
<span class="n">time_integrator</span><span class="o">=</span><span class="n">time_integrator</span><span class="p">)</span>
<span class="n">time_integrator</span><span class="o">=</span><span class="n">time_integrator</span><span class="p">,</span>
<span class="n">add_metadata</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>

<span class="n">step</span><span class="o">.</span><span class="n">add_output_file</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="s1">&#39;output.nc&#39;</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">step</span><span class="p">)</span></div>
Expand Down
Loading

0 comments on commit a584f27

Please sign in to comment.