Skip to content

Commit

Permalink
deploy: ccc9e63
Browse files Browse the repository at this point in the history
  • Loading branch information
Huite committed Feb 8, 2024
1 parent f315fdc commit cdad143
Show file tree
Hide file tree
Showing 58 changed files with 313 additions and 311 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 1a903bed1c48a6d3f3de55389dd4f0b8
config: def5dc073e414ff25fb82096ae5193f2
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified .doctrees/api/xugrid.burn_vector_geometry.doctree
Binary file not shown.
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/provinces_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.
22 changes: 12 additions & 10 deletions _modules/xugrid/ugrid/burn.html
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,9 @@
<article class="bd-article" role="main">

<h1>Source code for xugrid.ugrid.burn</h1><div class="highlight"><pre>
<span></span><span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">List</span><span class="p">,</span> <span class="n">Union</span>
<span></span><span class="kn">from</span> <span class="nn">__future__</span> <span class="kn">import</span> <span class="n">annotations</span>

<span class="kn">from</span> <span class="nn">typing</span> <span class="kn">import</span> <span class="n">List</span><span class="p">,</span> <span class="n">Union</span>

<span class="kn">import</span> <span class="nn">numba</span> <span class="k">as</span> <span class="nn">nb</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
Expand All @@ -408,17 +410,11 @@ <h1>Source code for xugrid.ugrid.burn</h1><div class="highlight"><pre>

<span class="k">try</span><span class="p">:</span>
<span class="kn">import</span> <span class="nn">shapely</span>

<span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span>
<span class="n">shapely</span> <span class="o">=</span> <span class="n">MissingOptionalModule</span><span class="p">(</span><span class="s2">&quot;shapely&quot;</span><span class="p">)</span>


<span class="n">POINT</span> <span class="o">=</span> <span class="n">shapely</span><span class="o">.</span><span class="n">GeometryType</span><span class="o">.</span><span class="n">POINT</span>
<span class="n">LINESTRING</span> <span class="o">=</span> <span class="n">shapely</span><span class="o">.</span><span class="n">GeometryType</span><span class="o">.</span><span class="n">LINESTRING</span>
<span class="n">LINEARRING</span> <span class="o">=</span> <span class="n">shapely</span><span class="o">.</span><span class="n">GeometryType</span><span class="o">.</span><span class="n">LINEARRING</span>
<span class="n">POLYGON</span> <span class="o">=</span> <span class="n">shapely</span><span class="o">.</span><span class="n">GeometryType</span><span class="o">.</span><span class="n">POLYGON</span>
<span class="n">GEOM_NAMES</span> <span class="o">=</span> <span class="p">{</span><span class="n">v</span><span class="p">:</span> <span class="n">k</span> <span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">shapely</span><span class="o">.</span><span class="n">GeometryType</span><span class="o">.</span><span class="n">__members__</span><span class="o">.</span><span class="n">items</span><span class="p">()}</span>


<span class="nd">@nb</span><span class="o">.</span><span class="n">njit</span><span class="p">(</span><span class="n">inline</span><span class="o">=</span><span class="s2">&quot;always&quot;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">in_bounds</span><span class="p">(</span><span class="n">p</span><span class="p">:</span> <span class="n">Point</span><span class="p">,</span> <span class="n">a</span><span class="p">:</span> <span class="n">Point</span><span class="p">,</span> <span class="n">b</span><span class="p">:</span> <span class="n">Point</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
Expand Down Expand Up @@ -622,7 +618,7 @@ <h1>Source code for xugrid.ugrid.burn</h1><div class="highlight"><pre>
<span class="k">def</span> <span class="nf">burn_vector_geometry</span><span class="p">(</span>
<span class="n">gdf</span><span class="p">:</span> <span class="s2">&quot;geopandas.GeoDataframe&quot;</span><span class="p">,</span> <span class="c1"># type: ignore # noqa</span>
<span class="n">like</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="s2">&quot;xugrid.Ugrid2d&quot;</span><span class="p">,</span> <span class="s2">&quot;xugrid.UgridDataArray&quot;</span><span class="p">,</span> <span class="s2">&quot;xugrid.UgridDataset&quot;</span><span class="p">],</span>
<span class="n">column</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="n">column</span><span class="p">:</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="n">fill</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">float</span><span class="p">]</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">nan</span><span class="p">,</span>
<span class="n">all_touched</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">,</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
Expand All @@ -638,7 +634,7 @@ <h1>Source code for xugrid.ugrid.burn</h1><div class="highlight"><pre>
<span class="sd"> Polygons, points, and/or lines to be burned into the grid.</span>
<span class="sd"> like: UgridDataArray, UgridDataset, or Ugrid2d</span>
<span class="sd"> Grid to burn the vector data into.</span>
<span class="sd"> column: str</span>
<span class="sd"> column: str, optional</span>
<span class="sd"> Name of the geodataframe column of which to the values to burn into</span>
<span class="sd"> grid.</span>
<span class="sd"> fill: int, float, optional, default value ``np.nan``.</span>
Expand All @@ -653,6 +649,12 @@ <h1>Source code for xugrid.ugrid.burn</h1><div class="highlight"><pre>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">geopandas</span> <span class="k">as</span> <span class="nn">gpd</span>

<span class="n">POINT</span> <span class="o">=</span> <span class="n">shapely</span><span class="o">.</span><span class="n">GeometryType</span><span class="o">.</span><span class="n">POINT</span>
<span class="n">LINESTRING</span> <span class="o">=</span> <span class="n">shapely</span><span class="o">.</span><span class="n">GeometryType</span><span class="o">.</span><span class="n">LINESTRING</span>
<span class="n">LINEARRING</span> <span class="o">=</span> <span class="n">shapely</span><span class="o">.</span><span class="n">GeometryType</span><span class="o">.</span><span class="n">LINEARRING</span>
<span class="n">POLYGON</span> <span class="o">=</span> <span class="n">shapely</span><span class="o">.</span><span class="n">GeometryType</span><span class="o">.</span><span class="n">POLYGON</span>
<span class="n">GEOM_NAMES</span> <span class="o">=</span> <span class="p">{</span><span class="n">v</span><span class="p">:</span> <span class="n">k</span> <span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">shapely</span><span class="o">.</span><span class="n">GeometryType</span><span class="o">.</span><span class="n">__members__</span><span class="o">.</span><span class="n">items</span><span class="p">()}</span>

<span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">gdf</span><span class="p">,</span> <span class="n">gpd</span><span class="o">.</span><span class="n">GeoDataFrame</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;gdf must be GeoDataFrame, received: </span><span class="si">{</span><span class="nb">type</span><span class="p">(</span><span class="n">like</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">like</span><span class="p">,</span> <span class="p">(</span><span class="n">xugrid</span><span class="o">.</span><span class="n">UgridDataArray</span><span class="p">,</span> <span class="n">xugrid</span><span class="o">.</span><span class="n">UgridDataset</span><span class="p">)):</span>
Expand Down
2 changes: 1 addition & 1 deletion _modules/xugrid/ugrid/conventions.html
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ <h1>Source code for xugrid.ugrid.conventions</h1><div class="highlight"><pre>
<span class="sa">f</span><span class="s2">&quot; with dimensions: </span><span class="si">{</span><span class="n">var_dims</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="p">)</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="nb">int</span><span class="p">):</span>
<span class="n">dim_size</span> <span class="o">=</span> <span class="n">ds</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">dim_size</span> <span class="o">=</span> <span class="n">ds</span><span class="o">.</span><span class="n">dims</span><span class="p">[</span><span class="n">dim</span><span class="p">]</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">dim_size</span> <span class="o">==</span> <span class="n">key</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">UgridDimensionError</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;Expected size </span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s2"> for dimension </span><span class="si">{</span><span class="n">dim</span><span class="si">}</span><span class="s2"> in variable &quot;</span>
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,8 +6,8 @@

Computation times
=================
**00:01.247** total execution time for **examples-dev** files:
**00:01.366** total execution time for **examples-dev** files:

+----------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_examples-dev_voronoi.py` (``voronoi.py``) | 00:01.247 | 0.0 MB |
| :ref:`sphx_glr_examples-dev_voronoi.py` (``voronoi.py``) | 00:01.366 | 0.0 MB |
+----------------------------------------------------------+-----------+--------+
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.247 seconds)
**Total running time of the script:** (0 minutes 1.366 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 0x7f0a7d9e8b10>
<matplotlib.collections.PolyCollection object at 0x7fae2173fe50>
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 0x7f0a8838b750>
<matplotlib.collections.PolyCollection object at 0x7fae2170a7d0>
Expand Down Expand Up @@ -200,7 +200,7 @@ alternative border value:
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f0a7d104150>
<matplotlib.collections.PolyCollection object at 0x7fae22712e10>
Expand Down Expand Up @@ -238,7 +238,7 @@ analyse connected parts of the mesh.
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f0a7d9a3010>
<matplotlib.collections.PolyCollection object at 0x7fae21548610>
Expand Down Expand Up @@ -272,7 +272,7 @@ Tesselation.
.. code-block:: none
<matplotlib.collections.LineCollection object at 0x7f0a7d126850>
<matplotlib.collections.LineCollection object at 0x7fae221bd390>
Expand Down Expand Up @@ -316,7 +316,7 @@ the original.
.. code-block:: none
<matplotlib.collections.LineCollection object at 0x7f0a7d102210>
<matplotlib.collections.LineCollection object at 0x7fae21318350>
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 0x7f0a7c4cca90>
<matplotlib.collections.LineCollection object at 0x7fae223e9c10>
Expand Down Expand Up @@ -409,7 +409,7 @@ the upper and lower parts:
.. code-block:: none
<matplotlib.collections.LineCollection object at 0x7f0a7c4ca350>
<matplotlib.collections.LineCollection object at 0x7fae22147e10>
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 0x7f0a7d375750>
<matplotlib.collections.PolyCollection object at 0x7fae2155ab90>
Expand Down Expand Up @@ -477,7 +477,7 @@ interpolation.
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f0a7d18ee10>
<matplotlib.collections.PolyCollection object at 0x7fae211a3550>
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 0x7f0a7d77fcd0>
<matplotlib.image.AxesImage object at 0x7fae213ff690>
Expand Down Expand Up @@ -554,14 +554,14 @@ locality:
.. code-block:: none
<matplotlib.image.AxesImage object at 0x7f0a7d486250>
<matplotlib.image.AxesImage object at 0x7fae222caad0>
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 1.499 seconds)
**Total running time of the script:** (0 minutes 1.726 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 0x7f0a7cfc6b10>
<matplotlib.collections.LineCollection object at 0x7fae213e3210>
Expand Down Expand Up @@ -202,7 +202,7 @@ conservative methods, such as conductance:
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f0a8993d750>
<matplotlib.collections.PolyCollection object at 0x7fae2b1f9390>
Expand Down Expand Up @@ -280,7 +280,7 @@ To use our custom method, we provide at initialization of the OverlapRegridder:
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f0a7e33f050>
<matplotlib.collections.PolyCollection object at 0x7fae2d5c8790>
Expand Down Expand Up @@ -320,7 +320,7 @@ function can deal with NaN values! -- hence ``nanpercentile`` rather than
.. code-block:: none
<matplotlib.collections.PolyCollection object at 0x7f0a7d833750>
<matplotlib.collections.PolyCollection object at 0x7fae212e8a50>
Expand All @@ -331,7 +331,7 @@ function can deal with NaN values! -- hence ``nanpercentile`` rather than

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

**Total running time of the script:** (0 minutes 3.790 seconds)
**Total running time of the script:** (0 minutes 4.029 seconds)


.. _sphx_glr_download_examples_overlap_regridder.py:
Expand Down
Loading

0 comments on commit cdad143

Please sign in to comment.