Skip to content

Commit

Permalink
deploy: bcf7d57
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer committed Aug 14, 2024
1 parent 7d82e66 commit db99569
Show file tree
Hide file tree
Showing 68 changed files with 326 additions and 334 deletions.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/examples-dev/sg_execution_times.doctree
Binary file not shown.
Binary file modified .doctrees/examples-dev/voronoi.doctree
Binary file not shown.
Binary file modified .doctrees/examples/connectivity.doctree
Binary file not shown.
Binary file modified .doctrees/examples/overlap_regridder.doctree
Binary file not shown.
Binary file modified .doctrees/examples/partitioning.doctree
Binary file not shown.
Binary file modified .doctrees/examples/plotting.doctree
Binary file not shown.
Binary file modified .doctrees/examples/quick_overview.doctree
Binary file not shown.
Binary file modified .doctrees/examples/regridder_overview.doctree
Binary file not shown.
Binary file modified .doctrees/examples/selection.doctree
Binary file not shown.
Binary file modified .doctrees/examples/sg_execution_times.doctree
Binary file not shown.
Binary file modified .doctrees/examples/vector_conversion.doctree
Binary file not shown.
Binary file modified .doctrees/sample_data/adh_san_diego.doctree
Binary file not shown.
Binary file modified .doctrees/sample_data/disk.doctree
Binary file not shown.
Binary file modified .doctrees/sample_data/elevation_nl.doctree
Binary file not shown.
Binary file modified .doctrees/sample_data/sg_execution_times.doctree
Binary file not shown.
Binary file modified .doctrees/sample_data/xoxo.doctree
Binary file not shown.
Binary file modified .doctrees/sg_execution_times.doctree
Binary file not shown.
Binary file modified _downloads/1da8bbc63e9e34158260eadd1533549c/quick_overview.zip
Binary file not shown.
Binary file modified _downloads/2dbba5ebb6d2057d196983a008981162/voronoi.zip
Binary file not shown.
Binary file not shown.
Binary file modified _downloads/3e8af3e56da80727f8440a5b5f94f5cb/disk.zip
Binary file not shown.
Binary file modified _downloads/3eb350a8b54f214b88c5181e546a155e/adh_san_diego.zip
Binary file not shown.
Binary file modified _downloads/422003fc9b51482872f8f3701ce47abe/provinces_nl.zip
Binary file not shown.
Binary file modified _downloads/43d7b47db560c8c70c383a84a444ed83/connectivity.zip
Binary file not shown.
Binary file not shown.
Binary file modified _downloads/97eabe2c66fc9328b1e51f27fdee52f6/partitioning.zip
Binary file not shown.
Binary file modified _downloads/9be12df0ec6c323839ed0cb99cc89228/elevation_nl.zip
Binary file not shown.
Binary file modified _downloads/a50ba9731493d1c74010dcadb8694b20/selection.zip
Binary file not shown.
Binary file modified _downloads/cc393383c363f7c590c6ef714836f52a/xoxo.zip
Binary file not shown.
Binary file modified _downloads/d2379110fee2f2fbaf724f0142daaa8d/plotting.zip
Binary file not shown.
Binary file not shown.
30 changes: 11 additions & 19 deletions _modules/xugrid/ugrid/partitioning.html
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,8 @@ <h1>Source code for xugrid.ugrid.partitioning</h1><div class="highlight"><pre>
<span class="sd"> -------</span>
<span class="sd"> merged : UgridDataset</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">partitions</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;Cannot merge partitions: zero partitions provided.&quot;</span><span class="p">)</span>
<span class="n">types</span> <span class="o">=</span> <span class="p">{</span><span class="nb">type</span><span class="p">(</span><span class="n">obj</span><span class="p">)</span> <span class="k">for</span> <span class="n">obj</span> <span class="ow">in</span> <span class="n">partitions</span><span class="p">}</span>
<span class="n">msg</span> <span class="o">=</span> <span class="s2">&quot;Expected UgridDataArray or UgridDataset, received: </span><span class="si">{}</span><span class="s2">&quot;</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">types</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">:</span>
Expand Down Expand Up @@ -775,27 +777,17 @@ <h1>Source code for xugrid.ugrid.partitioning</h1><div class="highlight"><pre>
<span class="p">)</span>
<span class="n">merged</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">merged_selection</span><span class="p">)</span>

<span class="c1"># Merge chunks along the UGRID dimensions</span>
<span class="k">for</span> <span class="n">varname</span><span class="p">,</span> <span class="n">da</span> <span class="ow">in</span> <span class="n">merged</span><span class="o">.</span><span class="n">_variables</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="k">if</span> <span class="n">da</span><span class="o">.</span><span class="n">chunks</span> <span class="ow">and</span> <span class="n">merge_ugrid_chunks</span><span class="p">:</span>
<span class="c1"># access _variables to avoid automatic (time consuming) alignment</span>
<span class="n">merged</span><span class="o">.</span><span class="n">_variables</span><span class="p">[</span><span class="n">varname</span><span class="p">]</span> <span class="o">=</span> <span class="n">_single_ugrid_chunk</span><span class="p">(</span><span class="n">da</span><span class="p">,</span> <span class="n">ugrid_dims</span><span class="p">)</span>
<span class="k">return</span> <span class="n">UgridDataset</span><span class="p">(</span><span class="n">merged</span><span class="p">,</span> <span class="n">merged_grids</span><span class="p">)</span></div>

<span class="c1"># Merge chunks along the UGRID dimensions.</span>
<span class="k">if</span> <span class="n">merged</span><span class="o">.</span><span class="n">chunks</span> <span class="ow">and</span> <span class="n">merge_ugrid_chunks</span><span class="p">:</span>
<span class="n">chunks</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="n">merged</span><span class="o">.</span><span class="n">chunks</span><span class="p">)</span>
<span class="k">for</span> <span class="n">dim</span> <span class="ow">in</span> <span class="n">chunks</span><span class="p">:</span>
<span class="c1"># Define a single chunk for each UGRID dimension.</span>
<span class="k">if</span> <span class="n">dim</span> <span class="ow">in</span> <span class="n">ugrid_dims</span><span class="p">:</span>
<span class="n">chunks</span><span class="p">[</span><span class="n">dim</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span><span class="n">merged</span><span class="o">.</span><span class="n">sizes</span><span class="p">[</span><span class="n">dim</span><span class="p">],)</span>
<span class="n">merged</span> <span class="o">=</span> <span class="n">merged</span><span class="o">.</span><span class="n">chunk</span><span class="p">(</span><span class="n">chunks</span><span class="p">)</span>

<span class="k">return</span> <span class="n">UgridDataset</span><span class="p">(</span><span class="n">merged</span><span class="p">,</span> <span class="n">merged_grids</span><span class="p">)</span></div>

<span class="k">def</span> <span class="nf">_single_ugrid_chunk</span><span class="p">(</span><span class="n">da</span><span class="p">,</span> <span class="n">ugrid_dims</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> docstring</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">chunks</span> <span class="o">=</span> <span class="p">{}</span>
<span class="k">for</span> <span class="n">dim</span><span class="p">,</span> <span class="n">sizes</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">da</span><span class="o">.</span><span class="n">dims</span><span class="p">,</span> <span class="n">da</span><span class="o">.</span><span class="n">chunks</span><span class="p">):</span>
<span class="c1"># Define a single chunk for each UGRID dimension.</span>
<span class="k">if</span> <span class="n">dim</span> <span class="ow">in</span> <span class="n">ugrid_dims</span><span class="p">:</span>
<span class="n">chunks</span><span class="p">[</span><span class="n">dim</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span><span class="n">da</span><span class="o">.</span><span class="n">sizes</span><span class="p">[</span><span class="n">dim</span><span class="p">],)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">chunks</span><span class="p">[</span><span class="n">dim</span><span class="p">]</span> <span class="o">=</span> <span class="n">sizes</span>
<span class="k">return</span> <span class="n">da</span><span class="o">.</span><span class="n">chunk</span><span class="p">(</span><span class="n">chunks</span><span class="p">)</span>
</pre></div>

</article>
Expand Down
4 changes: 2 additions & 2 deletions _sources/examples-dev/sg_execution_times.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Computation times
=================
**00:01.141** total execution time for 1 file **from examples-dev**:
**00:01.122** total execution time for 1 file **from examples-dev**:

.. container::

Expand All @@ -33,5 +33,5 @@ Computation times
- Time
- Mem (MB)
* - :ref:`sphx_glr_examples-dev_voronoi.py` (``voronoi.py``)
- 00:01.141
- 00:01.122
- 0.0
2 changes: 1 addition & 1 deletion _sources/examples-dev/voronoi.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ The figure shows:
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 1.141 seconds)
**Total running time of the script:** (0 minutes 1.122 seconds)


.. _sphx_glr_download_examples-dev_voronoi.py:
Expand Down
26 changes: 13 additions & 13 deletions _sources/examples/connectivity.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ By default, the border value for binary erosion is set to ``False`` (equal to
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f87461ee090>
<matplotlib.collections.PolyCollection object at 0x7fd6a71b0920>
Expand Down Expand Up @@ -165,7 +165,7 @@ start by setting a single value in the center of the grid to ``True``.
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f8746ae9670>
<matplotlib.collections.PolyCollection object at 0x7fd6b1076870>
Expand Down Expand Up @@ -200,7 +200,7 @@ alternative border value:
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f874fc4a300>
<matplotlib.collections.PolyCollection object at 0x7fd6b1094830>
Expand Down Expand Up @@ -238,7 +238,7 @@ analyse connected parts of the mesh.
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f87461bd340>
<matplotlib.collections.PolyCollection object at 0x7fd6a876dc70>
Expand Down Expand Up @@ -272,7 +272,7 @@ Tesselation.
.. code-block:: none
<matplotlib.collections.LineCollection object at 0x7f874fcbcef0>
<matplotlib.collections.LineCollection object at 0x7fd6b1d8d970>
Expand Down Expand Up @@ -316,7 +316,7 @@ the original.
.. code-block:: none
<matplotlib.collections.LineCollection object at 0x7f8745e02690>
<matplotlib.collections.LineCollection object at 0x7fd6b1d8c830>
Expand Down Expand Up @@ -355,7 +355,7 @@ We can break down one of the Voronoi tesselations from above into triangles:
.. code-block:: none
<matplotlib.collections.LineCollection object at 0x7f87461f6180>
<matplotlib.collections.LineCollection object at 0x7fd6b1d1f3b0>
Expand Down Expand Up @@ -409,7 +409,7 @@ the upper and lower parts:
.. code-block:: none
<matplotlib.collections.LineCollection object at 0x7f8745fb4e60>
<matplotlib.collections.LineCollection object at 0x7fd6a7377d40>
Expand Down Expand Up @@ -439,7 +439,7 @@ We can now use Laplace interpolation to fill the gaps in the grid.
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f8746e7df70>
<matplotlib.collections.PolyCollection object at 0x7fd6a7e30f80>
Expand Down Expand Up @@ -477,7 +477,7 @@ interpolation.
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f8746e73290>
<matplotlib.collections.PolyCollection object at 0x7fd6a7e491c0>
Expand Down Expand Up @@ -518,7 +518,7 @@ To illustrate, let's take a look at the connectivity matrix of the Xoxo grid.
.. code-block:: none
<matplotlib.image.AxesImage object at 0x7f8745c7b980>
<matplotlib.image.AxesImage object at 0x7fd6a705d010>
Expand Down Expand Up @@ -554,14 +554,14 @@ locality:
.. code-block:: none
<matplotlib.image.AxesImage object at 0x7f8746f54ef0>
<matplotlib.image.AxesImage object at 0x7fd6a843f590>
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 1.347 seconds)
**Total running time of the script:** (0 minutes 1.381 seconds)


.. _sphx_glr_download_examples_connectivity.py:
Expand Down
10 changes: 5 additions & 5 deletions _sources/examples/overlap_regridder.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ some bathymetry) of the Netherlands, and a coarser target grid.
.. code-block:: none
<matplotlib.collections.LineCollection object at 0x7f8745ed39e0>
<matplotlib.collections.LineCollection object at 0x7fd6a84a46b0>
Expand Down Expand Up @@ -202,7 +202,7 @@ conservative methods, such as conductance:
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f874fc5fda0>
<matplotlib.collections.PolyCollection object at 0x7fd6a81816d0>
Expand Down Expand Up @@ -298,7 +298,7 @@ OverlapRegridder:
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f8747b6b020>
<matplotlib.collections.PolyCollection object at 0x7fd6b1e0b950>
Expand Down Expand Up @@ -373,7 +373,7 @@ Then, provide it as the regridder method as above:
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f87471c7da0>
<matplotlib.collections.PolyCollection object at 0x7fd6a7fb9d90>
Expand All @@ -384,7 +384,7 @@ Then, provide it as the regridder method as above:

.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 3.979 seconds)
**Total running time of the script:** (0 minutes 4.024 seconds)


.. _sphx_glr_download_examples_overlap_regridder.py:
Expand Down
Loading

0 comments on commit db99569

Please sign in to comment.