diff --git a/.buildinfo b/.buildinfo index ae77f4377..150daa03a 100644 --- a/.buildinfo +++ b/.buildinfo @@ -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: d53c347c8495ca157a7d0cfe068e07cd +config: 6686e89348df4e24e8d60487e645228e tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/_modules/xugrid/plot/plot.html b/_modules/xugrid/plot/plot.html index 6bc70956a..89c23da39 100644 --- a/_modules/xugrid/plot/plot.html +++ b/_modules/xugrid/plot/plot.html @@ -395,17 +395,17 @@

Source code for xugrid.plot.plot

 import functools
 
 import numpy as np
-from xarray.plot.facetgrid import _easy_facetgrid
-from xarray.plot.utils import (
+
+from xugrid.constants import FloatDType
+from xugrid.plot.utils import (
     _add_colorbar,
+    _easy_facetgrid,
     _ensure_plottable,
     _process_cmap_cbar_kwargs,
     _update_axes,
     get_axis,
     label_from_attrs,
 )
-
-from xugrid.constants import FloatDType
 from xugrid.ugrid.connectivity import close_polygons
 
 NODE = 0
diff --git a/_sources/changelog.rst.txt b/_sources/changelog.rst.txt
index c38cdf6aa..b7e0a4e7c 100644
--- a/_sources/changelog.rst.txt
+++ b/_sources/changelog.rst.txt
@@ -26,7 +26,10 @@ Changed
 - Selection operations along a line, or at point locations, will now prefix the
   name of the grid in the x and y coordinates. This avoids name collisions when
   multiple topologies are present in a dataset.
-  
+- Xugrid now contains a partial copy of the xarray plot utils module, and its
+  tests. The latest xarray release broke xugrid (on import), since (private)
+  parts of xarray were used which no longer existed.
+ 
 Fixed
 ~~~~~
 
diff --git a/_sources/examples-dev/sg_execution_times.rst.txt b/_sources/examples-dev/sg_execution_times.rst.txt
index b60d40a24..f4c6b433f 100644
--- a/_sources/examples-dev/sg_execution_times.rst.txt
+++ b/_sources/examples-dev/sg_execution_times.rst.txt
@@ -6,8 +6,8 @@
 
 Computation times
 =================
-**00:01.575** total execution time for **examples-dev** files:
+**00:01.643** total execution time for **examples-dev** files:
 
 +----------------------------------------------------------+-----------+--------+
-| :ref:`sphx_glr_examples-dev_voronoi.py` (``voronoi.py``) | 00:01.575 | 0.0 MB |
+| :ref:`sphx_glr_examples-dev_voronoi.py` (``voronoi.py``) | 00:01.643 | 0.0 MB |
 +----------------------------------------------------------+-----------+--------+
diff --git a/_sources/examples-dev/voronoi.rst.txt b/_sources/examples-dev/voronoi.rst.txt
index 423830ddf..e6a11bb27 100644
--- a/_sources/examples-dev/voronoi.rst.txt
+++ b/_sources/examples-dev/voronoi.rst.txt
@@ -630,7 +630,7 @@ The figure shows:
 
 .. rst-class:: sphx-glr-timing
 
-   **Total running time of the script:** (0 minutes 1.575 seconds)
+   **Total running time of the script:** (0 minutes 1.643 seconds)
 
 
 .. _sphx_glr_download_examples-dev_voronoi.py:
diff --git a/_sources/examples/connectivity.rst.txt b/_sources/examples/connectivity.rst.txt
index e1f19206d..b0653886d 100644
--- a/_sources/examples/connectivity.rst.txt
+++ b/_sources/examples/connectivity.rst.txt
@@ -129,7 +129,7 @@ By default, the border value for binary erosion is set to ``False`` (equal to
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -165,7 +165,7 @@ start by setting a single value in the center of the grid to ``True``.
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -200,7 +200,7 @@ alternative border value:
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -238,7 +238,7 @@ analyse connected parts of the mesh.
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -272,7 +272,7 @@ Tesselation.
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -316,7 +316,7 @@ the original.
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -355,7 +355,7 @@ We can break down one of the Voronoi tesselations from above into triangles:
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -409,7 +409,7 @@ the upper and lower parts:
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -439,7 +439,7 @@ We can now use Laplace interpolation to fill the gaps in the grid.
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -480,7 +480,7 @@ To illustrate, let's take a look at the connectivity matrix of the Xoxo grid.
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -516,14 +516,14 @@ locality:
  .. code-block:: none
 
 
-    
+    
 
 
 
 
 .. rst-class:: sphx-glr-timing
 
-   **Total running time of the script:** (0 minutes 1.650 seconds)
+   **Total running time of the script:** (0 minutes 1.667 seconds)
 
 
 .. _sphx_glr_download_examples_connectivity.py:
diff --git a/_sources/examples/overlap_regridder.rst.txt b/_sources/examples/overlap_regridder.rst.txt
index bf823312a..b88eb0a40 100644
--- a/_sources/examples/overlap_regridder.rst.txt
+++ b/_sources/examples/overlap_regridder.rst.txt
@@ -114,7 +114,7 @@ some bathymetry) of the Netherlands, and a coarser target grid.
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -204,7 +204,7 @@ conservative methods, such as conductance:
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -282,7 +282,7 @@ To use our custom method, we provide at initialization of the OverlapRegridder:
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -322,7 +322,7 @@ function can deal with NaN values! -- hence ``nanpercentile`` rather than
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -333,7 +333,7 @@ function can deal with NaN values! -- hence ``nanpercentile`` rather than
 
 .. rst-class:: sphx-glr-timing
 
-   **Total running time of the script:** (0 minutes 5.099 seconds)
+   **Total running time of the script:** (0 minutes 5.277 seconds)
 
 
 .. _sphx_glr_download_examples_overlap_regridder.py:
diff --git a/_sources/examples/partitioning.rst.txt b/_sources/examples/partitioning.rst.txt
index 677d91ee4..99698bfe1 100644
--- a/_sources/examples/partitioning.rst.txt
+++ b/_sources/examples/partitioning.rst.txt
@@ -76,7 +76,7 @@ into several parts.
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -145,7 +145,7 @@ We can easily plot this data to visualize the partitions:
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -213,7 +213,7 @@ merge these partitions back into one whole for post-processing:
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -275,7 +275,7 @@ data:
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -667,7 +667,7 @@ Note that partioning and merging does not preserve order!
     
<xarray.DataArray 'elevation' (mesh2d_nFaces: 5248)>
     array([False, False, False, ..., False, False, False])
     Coordinates:
-      * mesh2d_nFaces  (mesh2d_nFaces) int64 0 1 2 3 4 ... 5243 5244 5245 5246 5247
+ * mesh2d_nFaces (mesh2d_nFaces) int64 0 1 2 3 4 ... 5243 5244 5245 5246 5247

@@ -1071,9 +1071,9 @@ reorder the data after merging. Coordinates: mesh2d_face_x (mesh2d_nFaces) float64 2.388e+04 1.86e+05 ... 3.03e+04 mesh2d_face_y (mesh2d_nFaces) float64 3.648e+05 4.171e+05 ... 3.964e+05 - * mesh2d_nFaces (mesh2d_nFaces) int64 0 1 2 3 4 ... 5243 5244 5245 5246 5247 + * mesh2d_nFaces (mesh2d_nFaces) int64 0 1 2 3 4 ... 5243 5244 5245 5246 5247

@@ -1090,7 +1090,7 @@ partitions. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 4.986 seconds) + **Total running time of the script:** (0 minutes 5.198 seconds) .. _sphx_glr_download_examples_partitioning.py: diff --git a/_sources/examples/plotting.rst.txt b/_sources/examples/plotting.rst.txt index 4952c2606..c1a91eddf 100644 --- a/_sources/examples/plotting.rst.txt +++ b/_sources/examples/plotting.rst.txt @@ -456,7 +456,7 @@ faces. Data variables: node_z (mesh2d_nNodes) float64 1.933 2.091 1.875 ... 5.688 7.491 face_z (mesh2d_nFaces) float64 1.737 1.918 2.269 ... 5.408 6.424 - edge_z (mesh2d_nEdges) float64 1.989 1.875 1.8 ... 3.929 4.909 6.544


  • @@ -611,7 +611,7 @@ Dataset and calling the :py:meth:`UgridDataArray.ugrid.plot()` method. .. code-block:: none - + @@ -646,7 +646,7 @@ the edges results in a different kind of plot: .. code-block:: none - + @@ -688,7 +688,7 @@ We can put them side by side to illustrate the differences: .. code-block:: none - + @@ -718,7 +718,7 @@ filled contours for data associated with the face dimension: .. code-block:: none - + @@ -749,7 +749,7 @@ We can also overlay this data with the edges: .. code-block:: none - + @@ -824,7 +824,7 @@ All these (2D) plots are illustrated here for completeness' sake: .. code-block:: none - + @@ -857,7 +857,7 @@ The ``surface`` methods generate 3D surface plots: .. code-block:: none - + @@ -891,7 +891,7 @@ used: .. code-block:: none - + @@ -927,7 +927,7 @@ take an xarray DataArray and a xugrid grid as arguments. .. code-block:: none - + @@ -963,14 +963,14 @@ somewhere in the unstructured topology, and plot the resulting timeseries: .. code-block:: none - [] + [] .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 14.467 seconds) + **Total running time of the script:** (0 minutes 15.058 seconds) .. _sphx_glr_download_examples_plotting.py: diff --git a/_sources/examples/quick_overview.rst.txt b/_sources/examples/quick_overview.rst.txt index 4a3f3b036..9c8a25351 100644 --- a/_sources/examples/quick_overview.rst.txt +++ b/_sources/examples/quick_overview.rst.txt @@ -464,7 +464,7 @@ We'll start by fetching a dataset: elevation (node) float64 ... depth (time, node) float64 ... mesh2d int32 ... - face_node_connectivity (face, nmax_face) float64 ...


  • @@ -919,7 +919,7 @@ separate the variables: * node (node) int64 0 1 2 3 4 5 6 ... 9133 9134 9135 9136 9137 9138 9139 Data variables: elevation (node) float64 ... - depth (time, node) float64 ...


  • @@ -1361,7 +1361,7 @@ We can then grab one of the data variables as usual for xarray: Coordinates: node_x (node) float64 ... node_y (node) float64 ... - * node (node) int64 0 1 2 3 4 5 6 7 ... 9133 9134 9135 9136 9137 9138 9139 + * node (node) int64 0 1 2 3 4 5 6 7 ... 9133 9134 9135 9136 9137 9138 9139

    @@ -1771,7 +1771,7 @@ some data by hand here:
    <xarray.DataArray (mesh2d_nFaces: 2)>
         array([1., 2.])
         Coordinates:
    -      * mesh2d_nFaces  (mesh2d_nFaces) int64 0 1
    + * mesh2d_nFaces (mesh2d_nFaces) int64 0 1

    @@ -1809,7 +1809,7 @@ Plotting .. code-block:: none - + @@ -1860,7 +1860,7 @@ To select based on the topology, use the ``.ugrid`` attribute: .. code-block:: none - + @@ -2258,7 +2258,7 @@ Computation on DataArrays is unchanged from xarray:
    <xarray.DataArray (mesh2d_nFaces: 2)>
         array([11., 12.])
         Coordinates:
    -      * mesh2d_nFaces  (mesh2d_nFaces) int64 0 1
    + * mesh2d_nFaces (mesh2d_nFaces) int64 0 1

    @@ -2720,7 +2720,7 @@ Conversion from Geopandas is easy too: Coordinates: * mesh2d_nFaces (mesh2d_nFaces) int64 0 1 Data variables: - test (mesh2d_nFaces) float64 1.0 2.0 + test (mesh2d_nFaces) float64 1.0 2.0

    @@ -3122,7 +3122,7 @@ grid (nodes, faces, edges). Data variables: node_z (mesh2d_nNodes) float64 1.933 2.091 1.875 ... 5.688 7.491 face_z (mesh2d_nFaces) float64 1.737 1.918 2.269 ... 5.408 6.424 - edge_z (mesh2d_nEdges) float64 1.989 1.875 1.8 ... 3.929 4.909 6.544
    • mesh2d_nEdges
      PandasIndex
      PandasIndex(RangeIndex(start=0, stop=600, step=1, name='mesh2d_nEdges'))
    • mesh2d_nNodes
      PandasIndex
      PandasIndex(RangeIndex(start=0, stop=217, step=1, name='mesh2d_nNodes'))
    • mesh2d_nFaces
      PandasIndex
      PandasIndex(RangeIndex(start=0, stop=384, step=1, name='mesh2d_nFaces'))


  • @@ -3634,7 +3634,7 @@ a grid object:
    <xarray.Dataset>
         Dimensions:  ()
         Data variables:
    -        *empty*
    + *empty*

    @@ -4029,7 +4029,7 @@ We can then add variables one-by-one, as we might with an xarray Dataset: node_y (node) float64 ... * node (node) int64 0 1 2 3 4 5 6 ... 9133 9134 9135 9136 9137 9138 9139 Data variables: - elevation (node) float64 ... + elevation (node) float64 ...

    @@ -4434,7 +4434,7 @@ before writing. elevation (node) float64 ... depth (time, node) float64 ... Attributes: - Conventions: CF-1.9 UGRID-1.0
  • Conventions :
    CF-1.9 UGRID-1.0


  • @@ -4495,7 +4495,7 @@ before writing. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 0.679 seconds) + **Total running time of the script:** (0 minutes 0.706 seconds) .. _sphx_glr_download_examples_quick_overview.py: diff --git a/_sources/examples/regridder_overview.rst.txt b/_sources/examples/regridder_overview.rst.txt index 954d177d3..9ff510eeb 100644 --- a/_sources/examples/regridder_overview.rst.txt +++ b/_sources/examples/regridder_overview.rst.txt @@ -79,7 +79,7 @@ elevation of the Netherlands. .. code-block:: none - + @@ -153,7 +153,7 @@ the centroids of the new grid fall. .. code-block:: none - + @@ -184,7 +184,7 @@ Rexgrid provides the CentroidLocatorRegridder for this: .. code-block:: none - + @@ -219,7 +219,7 @@ so large. Let's try the OverlapOverregridder instead. .. code-block:: none - + @@ -251,7 +251,7 @@ Let's try again, now with the minimum: .. code-block:: none - + @@ -282,7 +282,7 @@ Or the maximum: .. code-block:: none - + @@ -711,7 +711,7 @@ result. mesh2d_face_x (mesh2d_nFaces) float64 ... mesh2d_face_y (mesh2d_nFaces) float64 ... * layer (layer) int64 1 2 3 4 5 - * mesh2d_nFaces (mesh2d_nFaces) int64 0 1 2 3 4 ... 5243 5244 5245 5246 5247
    • mesh2d_face_x
      (mesh2d_nFaces)
      float64
      ...
      standard_name :
      projection_x_coordinate
      [5248 values with dtype=float64]
    • mesh2d_face_y
      (mesh2d_nFaces)
      float64
      ...
      standard_name :
      projection_y_coordinate
      [5248 values with dtype=float64]
    • layer
      (layer)
      int64
      1 2 3 4 5
      array([1, 2, 3, 4, 5])
    • mesh2d_nFaces
      (mesh2d_nFaces)
      int64
      0 1 2 3 4 ... 5244 5245 5246 5247
      array([   0,    1,    2, ..., 5245, 5246, 5247])
    • layer
      PandasIndex
      PandasIndex(Index([1, 2, 3, 4, 5], dtype='int64', name='layer'))
    • mesh2d_nFaces
      PandasIndex
      PandasIndex(RangeIndex(start=0, stop=5248, step=1, name='mesh2d_nFaces'))


  • @@ -1153,7 +1153,7 @@ all additional dimensions. -45.92794405, -39.50867478]]) Coordinates: * layer (layer) int64 1 2 3 4 5 - * mesh2d_nFaces (mesh2d_nFaces) int64 0 1 2 3 4 5 6 ... 91 92 93 94 95 96 97
    • layer
      PandasIndex
      PandasIndex(Index([1, 2, 3, 4, 5], dtype='int64', name='layer'))
    • mesh2d_nFaces
      PandasIndex
      PandasIndex(RangeIndex(start=0, stop=98, step=1, name='mesh2d_nFaces'))


  • @@ -1235,7 +1235,7 @@ and the aggregated mean. .. code-block:: none - [, , , , ] + [, , , , ] @@ -1272,7 +1272,7 @@ To illustrate, we will zoom in to a part of the Netherlands. .. code-block:: none - + @@ -1325,7 +1325,7 @@ the triangles. .. code-block:: none - + @@ -1366,7 +1366,7 @@ the regridders work for any collection of (convex) faces. .. code-block:: none - + @@ -1402,7 +1402,7 @@ is kept the same. .. code-block:: none - + @@ -1418,7 +1418,7 @@ is kept the same. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 10.137 seconds) + **Total running time of the script:** (0 minutes 10.509 seconds) .. _sphx_glr_download_examples_regridder_overview.py: diff --git a/_sources/examples/selection.rst.txt b/_sources/examples/selection.rst.txt index e400bf131..1b422d1b6 100644 --- a/_sources/examples/selection.rst.txt +++ b/_sources/examples/selection.rst.txt @@ -85,7 +85,7 @@ elevation of the Netherlands. .. code-block:: none - + @@ -130,7 +130,7 @@ A subset of the unstructured grid is returned by using slices without a step: .. code-block:: none - + @@ -161,7 +161,7 @@ In such a case the entire grid is returned. .. code-block:: none - + @@ -196,7 +196,7 @@ This means we can easily select along a single dimension: .. code-block:: none - + @@ -226,7 +226,7 @@ Or, using ``None`` if we only care about the start: .. code-block:: none - + @@ -660,7 +660,7 @@ Two values will select a point: mesh2d_x (mesh2d_nFaces) float64 1.5e+05 mesh2d_y (mesh2d_nFaces) float64 4.63e+05 Attributes: - unit: m NAP + unit: m NAP

    @@ -1066,7 +1066,7 @@ of six points: mesh2d_x (mesh2d_nFaces) float64 1.25e+05 1.5e+05 ... 1.5e+05 1.75e+05 mesh2d_y (mesh2d_nFaces) float64 4e+05 4e+05 ... 4.65e+05 4.65e+05 Attributes: - unit: m NAP + unit: m NAP

    @@ -1472,7 +1472,7 @@ To select points without broadcasting, use ``.ugrid.sel_points`` instead: mesh2d_x (mesh2d_nFaces) float64 1.25e+05 1.5e+05 1.75e+05 mesh2d_y (mesh2d_nFaces) float64 4e+05 4.3e+05 4.65e+05 Attributes: - unit: m NAP + unit: m NAP

    @@ -1876,9 +1876,9 @@ We can sample points along a line as well by providing slices **with** a step: mesh2d_x (mesh2d_nFaces) float64 1e+05 1.1e+05 ... 1.8e+05 1.9e+05 mesh2d_y (mesh2d_nFaces) float64 4.65e+05 4.65e+05 ... 4.65e+05 Attributes: - unit: m NAP + unit: m NAP

    @@ -2284,7 +2284,7 @@ Two slices with a step results in broadcasting: mesh2d_x (mesh2d_nFaces) float64 1e+05 1.1e+05 ... 1.8e+05 1.9e+05 mesh2d_y (mesh2d_nFaces) float64 4e+05 4e+05 4e+05 ... 4.9e+05 4.9e+05 Attributes: - unit: m NAP
  • unit :
    m NAP


  • @@ -2738,15 +2738,15 @@ As well as a slice with a step and multiple values: mesh2d_x (mesh2d_nFaces) float64 1e+05 1.1e+05 ... 1.8e+05 1.9e+05 mesh2d_y (mesh2d_nFaces) float64 4e+05 4e+05 4e+05 ... 4.3e+05 4.3e+05 Attributes: - unit: m NAP
  • unit :
    m NAP


  • @@ -2930,7 +2930,7 @@ thousands faces: .. code-block:: none - + @@ -2952,7 +2952,7 @@ face dimension for 2D topologies. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 4.757 seconds) + **Total running time of the script:** (0 minutes 4.927 seconds) .. _sphx_glr_download_examples_selection.py: diff --git a/_sources/examples/sg_execution_times.rst.txt b/_sources/examples/sg_execution_times.rst.txt index cfbe7247d..a3321426c 100644 --- a/_sources/examples/sg_execution_times.rst.txt +++ b/_sources/examples/sg_execution_times.rst.txt @@ -6,22 +6,22 @@ Computation times ================= -**01:02.316** total execution time for **examples** files: +**01:04.902** total execution time for **examples** files: +----------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_examples_vector_conversion.py` (``vector_conversion.py``) | 00:20.542 | 0.0 MB | +| :ref:`sphx_glr_examples_vector_conversion.py` (``vector_conversion.py``) | 00:21.561 | 0.0 MB | +----------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_examples_plotting.py` (``plotting.py``) | 00:14.467 | 0.0 MB | +| :ref:`sphx_glr_examples_plotting.py` (``plotting.py``) | 00:15.058 | 0.0 MB | +----------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_examples_regridder_overview.py` (``regridder_overview.py``) | 00:10.137 | 0.0 MB | +| :ref:`sphx_glr_examples_regridder_overview.py` (``regridder_overview.py``) | 00:10.509 | 0.0 MB | +----------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_examples_overlap_regridder.py` (``overlap_regridder.py``) | 00:05.099 | 0.0 MB | +| :ref:`sphx_glr_examples_overlap_regridder.py` (``overlap_regridder.py``) | 00:05.277 | 0.0 MB | +----------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_examples_partitioning.py` (``partitioning.py``) | 00:04.986 | 0.0 MB | +| :ref:`sphx_glr_examples_partitioning.py` (``partitioning.py``) | 00:05.198 | 0.0 MB | +----------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_examples_selection.py` (``selection.py``) | 00:04.757 | 0.0 MB | +| :ref:`sphx_glr_examples_selection.py` (``selection.py``) | 00:04.927 | 0.0 MB | +----------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_examples_connectivity.py` (``connectivity.py``) | 00:01.650 | 0.0 MB | +| :ref:`sphx_glr_examples_connectivity.py` (``connectivity.py``) | 00:01.667 | 0.0 MB | +----------------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_examples_quick_overview.py` (``quick_overview.py``) | 00:00.679 | 0.0 MB | +| :ref:`sphx_glr_examples_quick_overview.py` (``quick_overview.py``) | 00:00.706 | 0.0 MB | +----------------------------------------------------------------------------+-----------+--------+ diff --git a/_sources/examples/vector_conversion.rst.txt b/_sources/examples/vector_conversion.rst.txt index 4c932dbfc..f73423484 100644 --- a/_sources/examples/vector_conversion.rst.txt +++ b/_sources/examples/vector_conversion.rst.txt @@ -73,7 +73,7 @@ We'll once again use the surface elevation data example. .. code-block:: none - + @@ -518,9 +518,9 @@ GeoDataFrame. Data variables: elevation (mesh2d_nFaces) float32 1.17 9.81 54.04 ... 0.28 -15.83 -0.45 mesh2d_face_x (mesh2d_nFaces) float64 2.388e+04 1.86e+05 ... 3.03e+04 - mesh2d_face_y (mesh2d_nFaces) float64 3.648e+05 4.171e+05 ... 3.964e+05 + mesh2d_face_y (mesh2d_nFaces) float64 3.648e+05 4.171e+05 ... 3.964e+05

    @@ -582,7 +582,7 @@ burn into the grid. .. code-block:: none - + @@ -978,9 +978,9 @@ we want to compute the average surface elevation per province: Coordinates: * id (id) float64 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 Attributes: - unit: m NAP
    • id
      (id)
      float64
      0.0 1.0 2.0 3.0 ... 9.0 10.0 11.0
      array([ 0.,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10., 11.])
    • id
      PandasIndex
      PandasIndex(Index([0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0], dtype='float64', name='id'))
  • unit :
    m NAP


  • @@ -1087,7 +1087,7 @@ We can also use such "masks" to e.g. modify specific parts of the grid data: .. code-block:: none - + @@ -1233,7 +1233,7 @@ burn operation. .. code-block:: none - + @@ -1342,7 +1342,7 @@ compare to the grid faces. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 20.542 seconds) + **Total running time of the script:** (0 minutes 21.561 seconds) .. _sphx_glr_download_examples_vector_conversion.py: diff --git a/_sources/sample_data/adh_san_diego.rst.txt b/_sources/sample_data/adh_san_diego.rst.txt index b884d9339..db3a3debd 100644 --- a/_sources/sample_data/adh_san_diego.rst.txt +++ b/_sources/sample_data/adh_san_diego.rst.txt @@ -41,7 +41,7 @@ It contains a static dataset (bed elevation) and a time varying dataset .. code-block:: none - + @@ -71,7 +71,7 @@ It contains a static dataset (bed elevation) and a time varying dataset .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 0.426 seconds) + **Total running time of the script:** (0 minutes 0.447 seconds) .. _sphx_glr_download_sample_data_adh_san_diego.py: diff --git a/_sources/sample_data/disk.rst.txt b/_sources/sample_data/disk.rst.txt index 161360eed..87e0cac07 100644 --- a/_sources/sample_data/disk.rst.txt +++ b/_sources/sample_data/disk.rst.txt @@ -39,7 +39,7 @@ of a disk. It contains data on the nodes, faces, and edges. .. code-block:: none - + @@ -68,7 +68,7 @@ of a disk. It contains data on the nodes, faces, and edges. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 0.195 seconds) + **Total running time of the script:** (0 minutes 0.199 seconds) .. _sphx_glr_download_sample_data_disk.py: diff --git a/_sources/sample_data/elevation_nl.rst.txt b/_sources/sample_data/elevation_nl.rst.txt index 4e68416d9..589259728 100644 --- a/_sources/sample_data/elevation_nl.rst.txt +++ b/_sources/sample_data/elevation_nl.rst.txt @@ -39,7 +39,7 @@ of the Netherlands. .. code-block:: none - [] + [] @@ -67,7 +67,7 @@ of the Netherlands. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 0.963 seconds) + **Total running time of the script:** (0 minutes 1.022 seconds) .. _sphx_glr_download_sample_data_elevation_nl.py: diff --git a/_sources/sample_data/provinces_nl.rst.txt b/_sources/sample_data/provinces_nl.rst.txt index 6c1dcc52c..ed4c3c5ae 100644 --- a/_sources/sample_data/provinces_nl.rst.txt +++ b/_sources/sample_data/provinces_nl.rst.txt @@ -58,7 +58,7 @@ Netherlands, including water, presented as geopandas GeoDataFrame. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 0.100 seconds) + **Total running time of the script:** (0 minutes 0.104 seconds) .. _sphx_glr_download_sample_data_provinces_nl.py: diff --git a/_sources/sample_data/sg_execution_times.rst.txt b/_sources/sample_data/sg_execution_times.rst.txt index dd79efe7e..bf5e70f52 100644 --- a/_sources/sample_data/sg_execution_times.rst.txt +++ b/_sources/sample_data/sg_execution_times.rst.txt @@ -6,16 +6,16 @@ Computation times ================= -**00:01.760** total execution time for **sample_data** files: +**00:01.851** total execution time for **sample_data** files: +---------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_sample_data_elevation_nl.py` (``elevation_nl.py``) | 00:00.963 | 0.0 MB | +| :ref:`sphx_glr_sample_data_elevation_nl.py` (``elevation_nl.py``) | 00:01.022 | 0.0 MB | +---------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_sample_data_adh_san_diego.py` (``adh_san_diego.py``) | 00:00.426 | 0.0 MB | +| :ref:`sphx_glr_sample_data_adh_san_diego.py` (``adh_san_diego.py``) | 00:00.447 | 0.0 MB | +---------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_sample_data_disk.py` (``disk.py``) | 00:00.195 | 0.0 MB | +| :ref:`sphx_glr_sample_data_disk.py` (``disk.py``) | 00:00.199 | 0.0 MB | +---------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_sample_data_provinces_nl.py` (``provinces_nl.py``) | 00:00.100 | 0.0 MB | +| :ref:`sphx_glr_sample_data_provinces_nl.py` (``provinces_nl.py``) | 00:00.104 | 0.0 MB | +---------------------------------------------------------------------+-----------+--------+ -| :ref:`sphx_glr_sample_data_xoxo.py` (``xoxo.py``) | 00:00.076 | 0.0 MB | +| :ref:`sphx_glr_sample_data_xoxo.py` (``xoxo.py``) | 00:00.078 | 0.0 MB | +---------------------------------------------------------------------+-----------+--------+ diff --git a/_sources/sample_data/xoxo.rst.txt b/_sources/sample_data/xoxo.rst.txt index 020bedc7d..23ab4ffca 100644 --- a/_sources/sample_data/xoxo.rst.txt +++ b/_sources/sample_data/xoxo.rst.txt @@ -55,7 +55,7 @@ directory if it's not there already. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 0.076 seconds) + **Total running time of the script:** (0 minutes 0.078 seconds) .. _sphx_glr_download_sample_data_xoxo.py: diff --git a/changelog.html b/changelog.html index 54efc63a8..3d8bbe106 100644 --- a/changelog.html +++ b/changelog.html @@ -654,6 +654,9 @@

    Changed#<
  • Selection operations along a line, or at point locations, will now prefix the name of the grid in the x and y coordinates. This avoids name collisions when multiple topologies are present in a dataset.

  • +
  • Xugrid now contains a partial copy of the xarray plot utils module, and its +tests. The latest xarray release broke xugrid (on import), since (private) +parts of xarray were used which no longer existed.

  • diff --git a/examples-dev/sg_execution_times.html b/examples-dev/sg_execution_times.html index 258a8caed..9962784d1 100644 --- a/examples-dev/sg_execution_times.html +++ b/examples-dev/sg_execution_times.html @@ -392,11 +392,11 @@

    Computation times#

    -

    00:01.575 total execution time for examples-dev files:

    +

    00:01.643 total execution time for examples-dev files:

    - + diff --git a/examples-dev/voronoi.html b/examples-dev/voronoi.html index ae1e16f72..0187cbbc5 100644 --- a/examples-dev/voronoi.html +++ b/examples-dev/voronoi.html @@ -797,7 +797,7 @@

    Infinite rays
    (-1.5, 1.5)
     
    -

    Total running time of the script: (0 minutes 1.575 seconds)

    +

    Total running time of the script: (0 minutes 1.643 seconds)

    -connectivity -connectivity -connectivity -connectivity -connectivity -connectivity -connectivity -connectivity -connectivity -connectivity -connectivity
    <matplotlib.image.AxesImage object at 0x7f1026148610>
    +connectivity
    <matplotlib.image.AxesImage object at 0x7fbeb5617520>
     
    -

    Total running time of the script: (0 minutes 1.650 seconds)

    +

    Total running time of the script: (0 minutes 1.667 seconds)

    -overlap regridder
    <matplotlib.collections.LineCollection object at 0x7f102521aa30>
    +overlap regridder
    <matplotlib.collections.LineCollection object at 0x7fbeb4a7bd60>
     
    @@ -524,7 +524,7 @@

    Relative overlapresult.ugrid.plot()

    -overlap regridder -overlap regridder -overlap regridder -partitioning -partitioning -partitioning -partitioning
    <matplotlib.collections.LineCollection object at 0x7f102ed7bfd0>
    +partitioning
    <matplotlib.collections.LineCollection object at 0x7fbeb57c99a0>
     
    @@ -898,7 +898,7 @@

    Preserving orderTotal running time of the script: (0 minutes 4.986 seconds)

    +

    Total running time of the script: (0 minutes 5.198 seconds)

    • mesh2d_nEdges
      PandasIndex
      PandasIndex(RangeIndex(start=0, stop=600, step=1, name='mesh2d_nEdges'))
    • mesh2d_nNodes
      PandasIndex
      PandasIndex(RangeIndex(start=0, stop=217, step=1, name='mesh2d_nNodes'))
    • mesh2d_nFaces
      PandasIndex
      PandasIndex(RangeIndex(start=0, stop=384, step=1, name='mesh2d_nFaces'))


  • @@ -967,7 +967,7 @@

    UgridDataArrayuda.ugrid.plot() -plotting
    -plotting -plotting
    -plotting -plotting -plotting -plotting
    -plotting -plotting -node_x = 4.84e+05, node_y = 3.614e+06, node = 1000
    [<matplotlib.lines.Line2D object at 0x7f102517d430>]
    +node_x = 4.84e+05, node_y = 3.614e+06, node = 1000
    [<matplotlib.lines.Line2D object at 0x7fbeb4b4ad60>]
     
    -

    Total running time of the script: (0 minutes 14.467 seconds)

    +

    Total running time of the script: (0 minutes 15.058 seconds)

    Centroid Voronoi Tesselation (CVT) (voronoi.py)

    00:01.575

    00:01.643

    0.0 MB

    - + - + - + - + - + - + - + - + diff --git a/examples/vector_conversion.html b/examples/vector_conversion.html index 088ad4bb6..23e065f69 100644 --- a/examples/vector_conversion.html +++ b/examples/vector_conversion.html @@ -447,7 +447,7 @@ uda.ugrid.plot(vmin=-20,vmax=90,cmap="terrain") -vector conversion
    <matplotlib.collections.PolyCollection object at 0x7f1025e5ea90>
    +vector conversion
    <matplotlib.collections.PolyCollection object at 0x7fbeb541d370>
     
    @@ -858,9 +858,9 @@

    Conversion from GeoDataFrame @@ -896,7 +896,7 @@

    “Rasterizing”, or “burning” vector geometriesburned.ugrid.plot()

    -vector conversion
    • id
      (id)
      float64
      0.0 1.0 2.0 3.0 ... 9.0 10.0 11.0
      array([ 0.,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10., 11.])
    • id
      PandasIndex
      PandasIndex(Index([0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0], dtype='float64', name='id'))
  • unit :
    m NAP


  • This is a convenient way to create masks for specific regions:

    @@ -1318,7 +1318,7 @@

    “Rasterizing”, or “burning” vector geometriesmodified.ugrid.plot(vmin=-20, vmax=90, cmap="terrain") -vector conversion -vector conversion
    <matplotlib.collections.PolyCollection object at 0x7f101feca8b0>
    +vector conversion
    <matplotlib.collections.PolyCollection object at 0x7fbeaf509040>
     
    @@ -1435,7 +1435,7 @@

    Snap to gridTotal running time of the script: (0 minutes 20.542 seconds)

    +

    Total running time of the script: (0 minutes 21.561 seconds)

    -

    Total running time of the script: (0 minutes 0.100 seconds)

    +

    Total running time of the script: (0 minutes 0.104 seconds)

    Vector geometry conversion (vector_conversion.py)

    00:20.542

    00:21.561

    0.0 MB

    Plot unstructured mesh data (plotting.py)

    00:14.467

    00:15.058

    0.0 MB

    Regridding overview (regridder_overview.py)

    00:10.137

    00:10.509

    0.0 MB

    OverlapRegridder (overlap_regridder.py)

    00:05.099

    00:05.277

    0.0 MB

    Partitioning (partitioning.py)

    00:04.986

    00:05.198

    0.0 MB

    Select unstructured data (selection.py)

    00:04.757

    00:04.927

    0.0 MB

    Connectivity (connectivity.py)

    00:01.650

    00:01.667

    0.0 MB

    Quick overview (quick_overview.py)

    00:00.679

    00:00.706

    0.0 MB

    - + - + - + - + - + diff --git a/sample_data/xoxo.html b/sample_data/xoxo.html index 69aea0732..0784a3e15 100644 --- a/sample_data/xoxo.html +++ b/sample_data/xoxo.html @@ -448,7 +448,7 @@ ax.set_aspect(1) -

    Total running time of the script: (0 minutes 0.076 seconds)

    +

    Total running time of the script: (0 minutes 0.078 seconds)

    Elevation NL (elevation_nl.py)

    00:00.963

    00:01.022

    0.0 MB

    ADH San Diego (adh_san_diego.py)

    00:00.426

    00:00.447

    0.0 MB

    Disk (disk.py)

    00:00.195

    00:00.199

    0.0 MB

    Pronvinces NL (provinces_nl.py)

    00:00.100

    00:00.104

    0.0 MB

    Xoxo (xoxo.py)

    00:00.076

    00:00.078

    0.0 MB