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 30, 2024
1 parent 737782a commit b13dd6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ <h1>Source code for compass.ocean.tests.global_ocean.init.initial_state</h1><div
<span class="k">if</span> <span class="n">initial_condition</span> <span class="o">==</span> <span class="s1">&#39;WOA23&#39;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">add_input_file</span><span class="p">(</span>
<span class="n">filename</span><span class="o">=</span><span class="s1">&#39;woa23.nc&#39;</span><span class="p">,</span>
<span class="n">target</span><span class="o">=</span><span class="s1">&#39;woa23_decav_0.25_extrap.20230416.nc&#39;</span><span class="p">,</span>
<span class="n">target</span><span class="o">=</span><span class="s1">&#39;woa23_decav_0.25_jan_extrap.20230416.nc&#39;</span><span class="p">,</span>
<span class="n">database</span><span class="o">=</span><span class="s1">&#39;initial_condition_database&#39;</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">initial_condition</span> <span class="o">==</span> <span class="s1">&#39;PHC&#39;</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">add_input_file</span><span class="p">(</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@

<h1>Source code for compass.ocean.tests.utility.extrap_woa.extrap_step</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">datetime</span>
<span class="kn">from</span> <span class="nn">functools</span> <span class="kn">import</span> <span class="n">partial</span>
<span class="kn">from</span> <span class="nn">multiprocessing</span> <span class="kn">import</span> <span class="n">Pool</span>

Expand Down Expand Up @@ -165,7 +166,9 @@ <h1>Source code for compass.ocean.tests.utility.extrap_woa.extrap_step</h1><div
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Determine the output filename</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">woa_filename</span> <span class="o">=</span> <span class="s1">&#39;woa23_decav_0.25_extrap.nc&#39;</span>
<span class="n">now</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span>
<span class="n">datestring</span> <span class="o">=</span> <span class="n">now</span><span class="o">.</span><span class="n">strftime</span><span class="p">(</span><span class="s2">&quot;%Y%m</span><span class="si">%d</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">woa_filename</span> <span class="o">=</span> <span class="sa">f</span><span class="s1">&#39;woa23_decav_0.25_jan_extrap.</span><span class="si">{</span><span class="n">datestring</span><span class="si">}</span><span class="s1">.nc&#39;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">add_output_file</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">woa_filename</span><span class="p">)</span></div>


Expand Down Expand Up @@ -283,7 +286,7 @@ <h1>Source code for compass.ocean.tests.utility.extrap_woa.extrap_step</h1><div
<span class="n">out_filename</span> <span class="o">=</span> <span class="s1">&#39;extrap_ocean/woa_extrap.nc&#39;</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">in_filename</span> <span class="o">=</span> <span class="s1">&#39;extrap_land/woa_extrap_horiz.nc&#39;</span>
<span class="n">out_filename</span> <span class="o">=</span> <span class="s1">&#39;woa23_decav_0.25_extrap.nc&#39;</span>
<span class="n">out_filename</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">woa_filename</span>

<span class="n">ds</span> <span class="o">=</span> <span class="n">xr</span><span class="o">.</span><span class="n">open_dataset</span><span class="p">(</span><span class="n">in_filename</span><span class="p">)</span>

Expand Down

0 comments on commit b13dd6f

Please sign in to comment.