diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index 9fb315a3..763eb614 100644 Binary files a/.doctrees/environment.pickle and b/.doctrees/environment.pickle differ diff --git a/.doctrees/examples-dev/sg_execution_times.doctree b/.doctrees/examples-dev/sg_execution_times.doctree index 75d67403..3447e86b 100644 Binary files a/.doctrees/examples-dev/sg_execution_times.doctree and b/.doctrees/examples-dev/sg_execution_times.doctree differ diff --git a/.doctrees/examples-dev/voronoi.doctree b/.doctrees/examples-dev/voronoi.doctree index 0fc23313..9b405370 100644 Binary files a/.doctrees/examples-dev/voronoi.doctree and b/.doctrees/examples-dev/voronoi.doctree differ diff --git a/.doctrees/examples/connectivity.doctree b/.doctrees/examples/connectivity.doctree index 53b93687..4e87b9bf 100644 Binary files a/.doctrees/examples/connectivity.doctree and b/.doctrees/examples/connectivity.doctree differ diff --git a/.doctrees/examples/overlap_regridder.doctree b/.doctrees/examples/overlap_regridder.doctree index 7509a028..6d68dd47 100644 Binary files a/.doctrees/examples/overlap_regridder.doctree and b/.doctrees/examples/overlap_regridder.doctree differ diff --git a/.doctrees/examples/partitioning.doctree b/.doctrees/examples/partitioning.doctree index 1e1eeb92..c39d7a62 100644 Binary files a/.doctrees/examples/partitioning.doctree and b/.doctrees/examples/partitioning.doctree differ diff --git a/.doctrees/examples/plotting.doctree b/.doctrees/examples/plotting.doctree index cfd9cf48..c943e4a9 100644 Binary files a/.doctrees/examples/plotting.doctree and b/.doctrees/examples/plotting.doctree differ diff --git a/.doctrees/examples/quick_overview.doctree b/.doctrees/examples/quick_overview.doctree index 87a6f8f4..6fc1bd64 100644 Binary files a/.doctrees/examples/quick_overview.doctree and b/.doctrees/examples/quick_overview.doctree differ diff --git a/.doctrees/examples/regridder_overview.doctree b/.doctrees/examples/regridder_overview.doctree index cf39f1f0..626d84cd 100644 Binary files a/.doctrees/examples/regridder_overview.doctree and b/.doctrees/examples/regridder_overview.doctree differ diff --git a/.doctrees/examples/selection.doctree b/.doctrees/examples/selection.doctree index 5ad56e03..a033bf5c 100644 Binary files a/.doctrees/examples/selection.doctree and b/.doctrees/examples/selection.doctree differ diff --git a/.doctrees/examples/sg_execution_times.doctree b/.doctrees/examples/sg_execution_times.doctree index 9e829617..71215d5d 100644 Binary files a/.doctrees/examples/sg_execution_times.doctree and b/.doctrees/examples/sg_execution_times.doctree differ diff --git a/.doctrees/examples/vector_conversion.doctree b/.doctrees/examples/vector_conversion.doctree index 5e5fc69a..a68fa2b7 100644 Binary files a/.doctrees/examples/vector_conversion.doctree and b/.doctrees/examples/vector_conversion.doctree differ diff --git a/.doctrees/sample_data/adh_san_diego.doctree b/.doctrees/sample_data/adh_san_diego.doctree index 5c15fab2..f236ba81 100644 Binary files a/.doctrees/sample_data/adh_san_diego.doctree and b/.doctrees/sample_data/adh_san_diego.doctree differ diff --git a/.doctrees/sample_data/disk.doctree b/.doctrees/sample_data/disk.doctree index 18ebdd6f..e3661ca8 100644 Binary files a/.doctrees/sample_data/disk.doctree and b/.doctrees/sample_data/disk.doctree differ diff --git a/.doctrees/sample_data/elevation_nl.doctree b/.doctrees/sample_data/elevation_nl.doctree index 888babee..b88b2963 100644 Binary files a/.doctrees/sample_data/elevation_nl.doctree and b/.doctrees/sample_data/elevation_nl.doctree differ diff --git a/.doctrees/sample_data/provinces_nl.doctree b/.doctrees/sample_data/provinces_nl.doctree index 16615bef..4a8fb78b 100644 Binary files a/.doctrees/sample_data/provinces_nl.doctree and b/.doctrees/sample_data/provinces_nl.doctree differ diff --git a/.doctrees/sample_data/sg_execution_times.doctree b/.doctrees/sample_data/sg_execution_times.doctree index a235985e..ca199fba 100644 Binary files a/.doctrees/sample_data/sg_execution_times.doctree and b/.doctrees/sample_data/sg_execution_times.doctree differ diff --git a/.doctrees/sg_execution_times.doctree b/.doctrees/sg_execution_times.doctree index f57fa7f6..585cc769 100644 Binary files a/.doctrees/sg_execution_times.doctree and b/.doctrees/sg_execution_times.doctree differ diff --git a/_downloads/1da8bbc63e9e34158260eadd1533549c/quick_overview.zip b/_downloads/1da8bbc63e9e34158260eadd1533549c/quick_overview.zip index 8b7fc0bc..847296ff 100644 Binary files a/_downloads/1da8bbc63e9e34158260eadd1533549c/quick_overview.zip and b/_downloads/1da8bbc63e9e34158260eadd1533549c/quick_overview.zip differ diff --git a/_downloads/2dbba5ebb6d2057d196983a008981162/voronoi.zip b/_downloads/2dbba5ebb6d2057d196983a008981162/voronoi.zip index 9a481918..3c649dcc 100644 Binary files a/_downloads/2dbba5ebb6d2057d196983a008981162/voronoi.zip and b/_downloads/2dbba5ebb6d2057d196983a008981162/voronoi.zip differ diff --git a/_downloads/37998fdc2548b23faf513b314db93d21/regridder_overview.zip b/_downloads/37998fdc2548b23faf513b314db93d21/regridder_overview.zip index 5d491c57..c42f2423 100644 Binary files a/_downloads/37998fdc2548b23faf513b314db93d21/regridder_overview.zip and b/_downloads/37998fdc2548b23faf513b314db93d21/regridder_overview.zip differ diff --git a/_downloads/3e8af3e56da80727f8440a5b5f94f5cb/disk.zip b/_downloads/3e8af3e56da80727f8440a5b5f94f5cb/disk.zip index 5bd3544d..04d742ad 100644 Binary files a/_downloads/3e8af3e56da80727f8440a5b5f94f5cb/disk.zip and b/_downloads/3e8af3e56da80727f8440a5b5f94f5cb/disk.zip differ diff --git a/_downloads/3eb350a8b54f214b88c5181e546a155e/adh_san_diego.zip b/_downloads/3eb350a8b54f214b88c5181e546a155e/adh_san_diego.zip index 76676b33..4246b0f0 100644 Binary files a/_downloads/3eb350a8b54f214b88c5181e546a155e/adh_san_diego.zip and b/_downloads/3eb350a8b54f214b88c5181e546a155e/adh_san_diego.zip differ diff --git a/_downloads/422003fc9b51482872f8f3701ce47abe/provinces_nl.zip b/_downloads/422003fc9b51482872f8f3701ce47abe/provinces_nl.zip index 1c31ee93..817f9351 100644 Binary files a/_downloads/422003fc9b51482872f8f3701ce47abe/provinces_nl.zip and b/_downloads/422003fc9b51482872f8f3701ce47abe/provinces_nl.zip differ diff --git a/_downloads/43d7b47db560c8c70c383a84a444ed83/connectivity.zip b/_downloads/43d7b47db560c8c70c383a84a444ed83/connectivity.zip index 1e4f303b..7c99e42c 100644 Binary files a/_downloads/43d7b47db560c8c70c383a84a444ed83/connectivity.zip and b/_downloads/43d7b47db560c8c70c383a84a444ed83/connectivity.zip differ diff --git a/_downloads/90d50f8fc21b6ec5d818d26f7955df8a/overlap_regridder.zip b/_downloads/90d50f8fc21b6ec5d818d26f7955df8a/overlap_regridder.zip index 069002b8..0b5421e0 100644 Binary files a/_downloads/90d50f8fc21b6ec5d818d26f7955df8a/overlap_regridder.zip and b/_downloads/90d50f8fc21b6ec5d818d26f7955df8a/overlap_regridder.zip differ diff --git a/_downloads/97eabe2c66fc9328b1e51f27fdee52f6/partitioning.zip b/_downloads/97eabe2c66fc9328b1e51f27fdee52f6/partitioning.zip index 6f5e6106..e92797ce 100644 Binary files a/_downloads/97eabe2c66fc9328b1e51f27fdee52f6/partitioning.zip and b/_downloads/97eabe2c66fc9328b1e51f27fdee52f6/partitioning.zip differ diff --git a/_downloads/9be12df0ec6c323839ed0cb99cc89228/elevation_nl.zip b/_downloads/9be12df0ec6c323839ed0cb99cc89228/elevation_nl.zip index d90007aa..9d840b7f 100644 Binary files a/_downloads/9be12df0ec6c323839ed0cb99cc89228/elevation_nl.zip and b/_downloads/9be12df0ec6c323839ed0cb99cc89228/elevation_nl.zip differ diff --git a/_downloads/a50ba9731493d1c74010dcadb8694b20/selection.zip b/_downloads/a50ba9731493d1c74010dcadb8694b20/selection.zip index 574b8cf6..a948b26a 100644 Binary files a/_downloads/a50ba9731493d1c74010dcadb8694b20/selection.zip and b/_downloads/a50ba9731493d1c74010dcadb8694b20/selection.zip differ diff --git a/_downloads/cc393383c363f7c590c6ef714836f52a/xoxo.zip b/_downloads/cc393383c363f7c590c6ef714836f52a/xoxo.zip index 241128f7..90920787 100644 Binary files a/_downloads/cc393383c363f7c590c6ef714836f52a/xoxo.zip and b/_downloads/cc393383c363f7c590c6ef714836f52a/xoxo.zip differ diff --git a/_downloads/d2379110fee2f2fbaf724f0142daaa8d/plotting.zip b/_downloads/d2379110fee2f2fbaf724f0142daaa8d/plotting.zip index 796146f1..329da7f2 100644 Binary files a/_downloads/d2379110fee2f2fbaf724f0142daaa8d/plotting.zip and b/_downloads/d2379110fee2f2fbaf724f0142daaa8d/plotting.zip differ diff --git a/_downloads/f25be90ee220882246ef4778e276e863/vector_conversion.zip b/_downloads/f25be90ee220882246ef4778e276e863/vector_conversion.zip index 1c4aa028..0e834b38 100644 Binary files a/_downloads/f25be90ee220882246ef4778e276e863/vector_conversion.zip and b/_downloads/f25be90ee220882246ef4778e276e863/vector_conversion.zip differ diff --git a/_modules/xugrid/core/dataarray_accessor.html b/_modules/xugrid/core/dataarray_accessor.html index 546c7426..fb418548 100644 --- a/_modules/xugrid/core/dataarray_accessor.html +++ b/_modules/xugrid/core/dataarray_accessor.html @@ -871,7 +871,7 @@

Source code for xugrid.core.dataarray_accessor

else: ds = self.obj.to_dataset() - variables = [varname for varname, var in ds.variables.items() if dim in var.dims] + variables = [var for var in ds.data_vars if dim in ds[var].dims] # TODO deal with time-dependent data, etc. # Basically requires checking which variables are static, which aren't. # For non-static, requires repeating all geometries. diff --git a/_modules/xugrid/core/dataset_accessor.html b/_modules/xugrid/core/dataset_accessor.html index 7ae3b806..094f1e35 100644 --- a/_modules/xugrid/core/dataset_accessor.html +++ b/_modules/xugrid/core/dataset_accessor.html @@ -998,7 +998,7 @@

Source code for xugrid.core.dataset_accessor

else:
                 raise ValueError("invalid topology dimension on grid")
 
-            variables = [varname for varname, var in ds.variables.items() if dim in var.dims]
+            variables = [var for var in ds.data_vars if dim in ds[var].dims]
             if variables:
                 data = ds[variables].to_dataframe(dim_order=dim_order)
             else:
diff --git a/_modules/xugrid/ugrid/conventions.html b/_modules/xugrid/ugrid/conventions.html
index 0e028b7f..84d75698 100644
--- a/_modules/xugrid/ugrid/conventions.html
+++ b/_modules/xugrid/ugrid/conventions.html
@@ -578,6 +578,9 @@ 

Source code for xugrid.ugrid.conventions

 
 
 def _get_topology(ds: xr.Dataset) -> List[str]:
+    # looping over ds.variables.items() is way faster for datasets with many 
+    # variables than accessing each var with ds[var]
+    # https://github.com/Deltares/xugrid/issues/285
     return [varname for varname, var in ds.variables.items() if var.attrs.get("cf_role") == "mesh_topology"]
 
 
diff --git a/_sources/examples-dev/sg_execution_times.rst.txt b/_sources/examples-dev/sg_execution_times.rst.txt
index 741e456c..cf1fb50c 100644
--- a/_sources/examples-dev/sg_execution_times.rst.txt
+++ b/_sources/examples-dev/sg_execution_times.rst.txt
@@ -6,7 +6,7 @@
 
 Computation times
 =================
-**00:01.167** total execution time for 1 file **from examples-dev**:
+**00:01.147** total execution time for 1 file **from examples-dev**:
 
 .. container::
 
@@ -33,5 +33,5 @@ Computation times
      - Time
      - Mem (MB)
    * - :ref:`sphx_glr_examples-dev_voronoi.py` (``voronoi.py``)
-     - 00:01.167
+     - 00:01.147
      - 0.0
diff --git a/_sources/examples-dev/voronoi.rst.txt b/_sources/examples-dev/voronoi.rst.txt
index 1f1ac611..ab2a21f3 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.167 seconds)
+   **Total running time of the script:** (0 minutes 1.147 seconds)
 
 
 .. _sphx_glr_download_examples-dev_voronoi.py:
diff --git a/_sources/examples/connectivity.rst.txt b/_sources/examples/connectivity.rst.txt
index ee4576d0..3516ae47 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
 
 
-    
+    
 
 
 
@@ -477,7 +477,7 @@ interpolation.
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -518,7 +518,7 @@ To illustrate, let's take a look at the connectivity matrix of the Xoxo grid.
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -554,14 +554,14 @@ locality:
  .. code-block:: none
 
 
-    
+    
 
 
 
 
 .. rst-class:: sphx-glr-timing
 
-   **Total running time of the script:** (0 minutes 1.390 seconds)
+   **Total running time of the script:** (0 minutes 1.413 seconds)
 
 
 .. _sphx_glr_download_examples_connectivity.py:
diff --git a/_sources/examples/overlap_regridder.rst.txt b/_sources/examples/overlap_regridder.rst.txt
index 9c7397d9..a49446ed 100644
--- a/_sources/examples/overlap_regridder.rst.txt
+++ b/_sources/examples/overlap_regridder.rst.txt
@@ -112,7 +112,7 @@ some bathymetry) of the Netherlands, and a coarser target grid.
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -202,7 +202,7 @@ conservative methods, such as conductance:
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -298,7 +298,7 @@ OverlapRegridder:
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -373,7 +373,7 @@ Then, provide it as the regridder method as above:
  .. code-block:: none
 
 
-    
+    
 
 
 
@@ -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 4.118 seconds)
+   **Total running time of the script:** (0 minutes 4.005 seconds)
 
 
 .. _sphx_glr_download_examples_overlap_regridder.py:
diff --git a/_sources/examples/partitioning.rst.txt b/_sources/examples/partitioning.rst.txt
index c693546b..b8205da3 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
 
 
-    
+    
 
 
 
@@ -668,7 +668,7 @@ Note that partioning and merging does not preserve order!
     
<xarray.DataArray 'elevation' (mesh2d_nFaces: 5248)> Size: 5kB
     array([False, False, False, ..., False, False, False])
     Coordinates:
-      * mesh2d_nFaces  (mesh2d_nFaces) int64 42kB 0 1 2 3 4 ... 5244 5245 5246 5247
+ * mesh2d_nFaces (mesh2d_nFaces) int64 42kB 0 1 2 3 4 ... 5244 5245 5246 5247


@@ -1068,9 +1068,9 @@ original topology. ``reindex_like`` looks at the coordinates of both Coordinates: mesh2d_face_x (mesh2d_nFaces) float64 42kB 2.388e+04 1.86e+05 ... 3.03e+04 mesh2d_face_y (mesh2d_nFaces) float64 42kB 3.648e+05 ... 3.964e+05 - * mesh2d_nFaces (mesh2d_nFaces) int64 42kB 0 1 2 3 4 ... 5244 5245 5246 5247 + * mesh2d_nFaces (mesh2d_nFaces) int64 42kB 0 1 2 3 4 ... 5244 5245 5246 5247

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

@@ -1492,7 +1492,7 @@ partitions. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 3.897 seconds) + **Total running time of the script:** (0 minutes 3.870 seconds) .. _sphx_glr_download_examples_partitioning.py: diff --git a/_sources/examples/plotting.rst.txt b/_sources/examples/plotting.rst.txt index 3e73af0b..aeebebfe 100644 --- a/_sources/examples/plotting.rst.txt +++ b/_sources/examples/plotting.rst.txt @@ -451,13 +451,13 @@ faces.
<xarray.Dataset> Size: 19kB
     Dimensions:        (mesh2d_nNodes: 217, mesh2d_nFaces: 384, mesh2d_nEdges: 600)
     Coordinates:
+      * mesh2d_nEdges  (mesh2d_nEdges) int64 5kB 0 1 2 3 4 5 ... 595 596 597 598 599
       * mesh2d_nFaces  (mesh2d_nFaces) int64 3kB 0 1 2 3 4 5 ... 379 380 381 382 383
       * mesh2d_nNodes  (mesh2d_nNodes) int64 2kB 0 1 2 3 4 5 ... 212 213 214 215 216
-      * mesh2d_nEdges  (mesh2d_nEdges) int64 5kB 0 1 2 3 4 5 ... 595 596 597 598 599
     Data variables:
         node_z         (mesh2d_nNodes) float64 2kB 1.933 2.091 1.875 ... 5.688 7.491
         face_z         (mesh2d_nFaces) float64 3kB 1.737 1.918 2.269 ... 5.408 6.424
-        edge_z         (mesh2d_nEdges) float64 5kB 1.989 1.875 1.8 ... 4.909 6.544


  • @@ -612,7 +612,7 @@ Dataset and calling the :py:meth:`UgridDataArray.ugrid.plot()` method. .. code-block:: none - + @@ -647,7 +647,7 @@ the edges results in a different kind of plot: .. code-block:: none - + @@ -689,7 +689,7 @@ We can put them side by side to illustrate the differences: .. code-block:: none - + @@ -719,7 +719,7 @@ filled contours for data associated with the face dimension: .. code-block:: none - + @@ -750,7 +750,7 @@ We can also overlay this data with the edges: .. code-block:: none - + @@ -825,7 +825,7 @@ All these (2D) plots are illustrated here for completeness' sake: .. code-block:: none - + @@ -858,7 +858,7 @@ The ``surface`` methods generate 3D surface plots: .. code-block:: none - + @@ -892,7 +892,7 @@ used: .. code-block:: none - + @@ -928,7 +928,7 @@ take an xarray DataArray and a xugrid grid as arguments. .. code-block:: none - + @@ -964,14 +964,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 12.696 seconds) + **Total running time of the script:** (0 minutes 12.170 seconds) .. _sphx_glr_download_examples_plotting.py: diff --git a/_sources/examples/quick_overview.rst.txt b/_sources/examples/quick_overview.rst.txt index 5f93210e..d97b36c2 100644 --- a/_sources/examples/quick_overview.rst.txt +++ b/_sources/examples/quick_overview.rst.txt @@ -465,7 +465,7 @@ We'll start by fetching a dataset: elevation (node) float64 73kB ... depth (time, node) float64 4MB ... mesh2d int32 4B ... - face_node_connectivity (face, nmax_face) float64 405kB ...


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


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

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

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

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

    @@ -3123,13 +3123,13 @@ grid (nodes, faces, edges).
    <xarray.Dataset> Size: 19kB
         Dimensions:        (mesh2d_nNodes: 217, mesh2d_nFaces: 384, mesh2d_nEdges: 600)
         Coordinates:
    +      * mesh2d_nEdges  (mesh2d_nEdges) int64 5kB 0 1 2 3 4 5 ... 595 596 597 598 599
           * mesh2d_nFaces  (mesh2d_nFaces) int64 3kB 0 1 2 3 4 5 ... 379 380 381 382 383
           * mesh2d_nNodes  (mesh2d_nNodes) int64 2kB 0 1 2 3 4 5 ... 212 213 214 215 216
    -      * mesh2d_nEdges  (mesh2d_nEdges) int64 5kB 0 1 2 3 4 5 ... 595 596 597 598 599
         Data variables:
             node_z         (mesh2d_nNodes) float64 2kB 1.933 2.091 1.875 ... 5.688 7.491
             face_z         (mesh2d_nFaces) float64 3kB 1.737 1.918 2.269 ... 5.408 6.424
    -        edge_z         (mesh2d_nEdges) float64 5kB 1.989 1.875 1.8 ... 4.909 6.544
    • mesh2d_nEdges
      PandasIndex
      PandasIndex(RangeIndex(start=0, stop=600, step=1, name='mesh2d_nEdges'))
    • mesh2d_nFaces
      PandasIndex
      PandasIndex(RangeIndex(start=0, stop=384, step=1, name='mesh2d_nFaces'))
    • mesh2d_nNodes
      PandasIndex
      PandasIndex(RangeIndex(start=0, stop=217, step=1, name='mesh2d_nNodes'))


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

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

    @@ -4444,7 +4444,7 @@ before writing. elevation (node) float64 73kB ... depth (time, node) float64 4MB ... Attributes: - Conventions: CF-1.9 UGRID-1.0
  • Conventions :
    CF-1.9 UGRID-1.0


  • @@ -4505,7 +4505,7 @@ before writing. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 0.506 seconds) + **Total running time of the script:** (0 minutes 0.502 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 1a77761c..19c2b778 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 - + @@ -151,7 +151,7 @@ the centroids of the new grid fall. .. code-block:: none - + @@ -182,7 +182,7 @@ Xugrid provides the CentroidLocatorRegridder for this: .. code-block:: none - + @@ -217,7 +217,7 @@ so large. Let's try the OverlapOverregridder instead. .. code-block:: none - + @@ -249,7 +249,7 @@ Let's try again, now with the minimum: .. code-block:: none - + @@ -280,7 +280,7 @@ Or the maximum: .. code-block:: none - + @@ -710,7 +710,7 @@ result. mesh2d_face_x (mesh2d_nFaces) float64 42kB ... mesh2d_face_y (mesh2d_nFaces) float64 42kB ... * layer (layer) int64 40B 1 2 3 4 5 - * mesh2d_nFaces (mesh2d_nFaces) int64 42kB 0 1 2 3 4 ... 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 40B 1 2 3 4 5 - * mesh2d_nFaces (mesh2d_nFaces) int64 784B 0 1 2 3 4 5 ... 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 8.285 seconds) + **Total running time of the script:** (0 minutes 8.137 seconds) .. _sphx_glr_download_examples_regridder_overview.py: diff --git a/_sources/examples/selection.rst.txt b/_sources/examples/selection.rst.txt index 189a1e9d..f9b1e9c1 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 - + @@ -661,7 +661,7 @@ Two values will select a point: mesh2d_x (mesh2d_nFaces) float64 8B 1.5e+05 mesh2d_y (mesh2d_nFaces) float64 8B 4.63e+05 Attributes: - unit: m NAP + unit: m NAP

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

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

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

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


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


  • @@ -2936,7 +2936,7 @@ thousands faces: .. code-block:: none - + @@ -2958,7 +2958,7 @@ face dimension for 2D topologies. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 3.581 seconds) + **Total running time of the script:** (0 minutes 3.567 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 39280e10..94adb1e1 100644 --- a/_sources/examples/sg_execution_times.rst.txt +++ b/_sources/examples/sg_execution_times.rst.txt @@ -6,7 +6,7 @@ Computation times ================= -**00:51.420** total execution time for 8 files **from examples**: +**00:50.050** total execution time for 8 files **from examples**: .. container:: @@ -33,26 +33,26 @@ Computation times - Time - Mem (MB) * - :ref:`sphx_glr_examples_vector_conversion.py` (``vector_conversion.py``) - - 00:16.945 + - 00:16.387 - 0.0 * - :ref:`sphx_glr_examples_plotting.py` (``plotting.py``) - - 00:12.696 + - 00:12.170 - 0.0 * - :ref:`sphx_glr_examples_regridder_overview.py` (``regridder_overview.py``) - - 00:08.285 + - 00:08.137 - 0.0 * - :ref:`sphx_glr_examples_overlap_regridder.py` (``overlap_regridder.py``) - - 00:04.118 + - 00:04.005 - 0.0 * - :ref:`sphx_glr_examples_partitioning.py` (``partitioning.py``) - - 00:03.897 + - 00:03.870 - 0.0 * - :ref:`sphx_glr_examples_selection.py` (``selection.py``) - - 00:03.581 + - 00:03.567 - 0.0 * - :ref:`sphx_glr_examples_connectivity.py` (``connectivity.py``) - - 00:01.390 + - 00:01.413 - 0.0 * - :ref:`sphx_glr_examples_quick_overview.py` (``quick_overview.py``) - - 00:00.506 + - 00:00.502 - 0.0 diff --git a/_sources/examples/vector_conversion.rst.txt b/_sources/examples/vector_conversion.rst.txt index f494e3cb..2cd4ec05 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 - + @@ -103,19 +103,19 @@ time). When calling .. code-block:: none - mesh2d_face_x ... geometry - mesh2d_nFaces ... - 0 23882.793761 ... POLYGON ((21303.903 363737.469, 25340.195 3630... - 1 186048.986092 ... POLYGON ((185417.879 419222.681, 184927.836 41... - 2 183280.613247 ... POLYGON ((181811.627 338063.592, 182510.446 33... - 3 19564.092939 ... POLYGON ((20177.702 368500.703, 17210.674 3644... - 4 48896.196519 ... POLYGON ((51139.349 357499.291, 48079.937 3617... - ... ... ... ... - 5243 37449.975049 ... POLYGON ((38115.173 400096.935, 34838.247 3952... - 5244 255629.305092 ... POLYGON ((252916.585 467082.681, 255888.448 45... - 5245 33842.568471 ... POLYGON ((34838.247 395258.331, 34522.298 3998... - 5246 33139.630562 ... POLYGON ((32729.434 403338.332, 32167.16 39737... - 5247 30303.516425 ... POLYGON ((29985.831 394355.22, 32167.16 397379... + elevation ... geometry + mesh2d_nFaces ... + 0 1.170000 ... POLYGON ((21303.903 363737.469, 25340.195 3630... + 1 9.810000 ... POLYGON ((185417.879 419222.681, 184927.836 41... + 2 54.040001 ... POLYGON ((181811.627 338063.592, 182510.446 33... + 3 0.990000 ... POLYGON ((20177.702 368500.703, 17210.674 3644... + 4 2.600000 ... POLYGON ((51139.349 357499.291, 48079.937 3617... + ... ... ... ... + 5243 0.930000 ... POLYGON ((38115.173 400096.935, 34838.247 3952... + 5244 36.189999 ... POLYGON ((252916.585 467082.681, 255888.448 45... + 5245 0.280000 ... POLYGON ((34838.247 395258.331, 34522.298 3998... + 5246 -15.830000 ... POLYGON ((32729.434 403338.332, 32167.16 39737... + 5247 -0.450000 ... POLYGON ((29985.831 394355.22, 32167.16 397379... [5248 rows x 4 columns] @@ -517,11 +517,11 @@ GeoDataFrame. Coordinates: * mesh2d_nFaces (mesh2d_nFaces) int64 42kB 0 1 2 3 4 ... 5244 5245 5246 5247 Data variables: + elevation (mesh2d_nFaces) float32 21kB 1.17 9.81 54.04 ... -15.83 -0.45 mesh2d_face_x (mesh2d_nFaces) float64 42kB 2.388e+04 1.86e+05 ... 3.03e+04 - mesh2d_face_y (mesh2d_nFaces) float64 42kB 3.648e+05 ... 3.964e+05 - elevation (mesh2d_nFaces) float32 21kB 1.17 9.81 54.04 ... -15.83 -0.45 + mesh2d_face_y (mesh2d_nFaces) float64 42kB 3.648e+05 ... 3.964e+05

    @@ -583,7 +583,7 @@ burn into the grid. .. code-block:: none - + @@ -980,9 +980,9 @@ we want to compute the average surface elevation per province: Coordinates: * id (id) float64 96B 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


  • @@ -1089,7 +1089,7 @@ We can also use such "masks" to e.g. modify specific parts of the grid data: .. code-block:: none - + @@ -1235,7 +1235,7 @@ burn operation. .. code-block:: none - + @@ -1344,7 +1344,7 @@ compare to the grid faces. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 16.945 seconds) + **Total running time of the script:** (0 minutes 16.387 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 c21aa004..b501eed1 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.292 seconds) + **Total running time of the script:** (0 minutes 0.294 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 6fb01725..523e7c14 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.137 seconds) + **Total running time of the script:** (0 minutes 0.138 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 56be1d0e..cba6d422 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.757 seconds) + **Total running time of the script:** (0 minutes 0.754 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 54fe2c93..f1409172 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.066 seconds) + **Total running time of the script:** (0 minutes 0.065 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 1921bd54..651c04ca 100644 --- a/_sources/sample_data/sg_execution_times.rst.txt +++ b/_sources/sample_data/sg_execution_times.rst.txt @@ -33,16 +33,16 @@ Computation times - Time - Mem (MB) * - :ref:`sphx_glr_sample_data_elevation_nl.py` (``elevation_nl.py``) - - 00:00.757 + - 00:00.754 - 0.0 * - :ref:`sphx_glr_sample_data_adh_san_diego.py` (``adh_san_diego.py``) - - 00:00.292 + - 00:00.294 - 0.0 * - :ref:`sphx_glr_sample_data_disk.py` (``disk.py``) - - 00:00.137 + - 00:00.138 - 0.0 * - :ref:`sphx_glr_sample_data_provinces_nl.py` (``provinces_nl.py``) - - 00:00.066 + - 00:00.065 - 0.0 * - :ref:`sphx_glr_sample_data_xoxo.py` (``xoxo.py``) - 00:00.054 diff --git a/_sources/sg_execution_times.rst.txt b/_sources/sg_execution_times.rst.txt index 721bd67d..e4eeedcb 100644 --- a/_sources/sg_execution_times.rst.txt +++ b/_sources/sg_execution_times.rst.txt @@ -6,7 +6,7 @@ Computation times ================= -**00:53.893** total execution time for 14 files **from all galleries**: +**00:52.503** total execution time for 14 files **from all galleries**: .. container:: @@ -33,43 +33,43 @@ Computation times - Time - Mem (MB) * - :ref:`sphx_glr_examples_vector_conversion.py` (``../examples/vector_conversion.py``) - - 00:16.945 + - 00:16.387 - 0.0 * - :ref:`sphx_glr_examples_plotting.py` (``../examples/plotting.py``) - - 00:12.696 + - 00:12.170 - 0.0 * - :ref:`sphx_glr_examples_regridder_overview.py` (``../examples/regridder_overview.py``) - - 00:08.285 + - 00:08.137 - 0.0 * - :ref:`sphx_glr_examples_overlap_regridder.py` (``../examples/overlap_regridder.py``) - - 00:04.118 + - 00:04.005 - 0.0 * - :ref:`sphx_glr_examples_partitioning.py` (``../examples/partitioning.py``) - - 00:03.897 + - 00:03.870 - 0.0 * - :ref:`sphx_glr_examples_selection.py` (``../examples/selection.py``) - - 00:03.581 + - 00:03.567 - 0.0 * - :ref:`sphx_glr_examples_connectivity.py` (``../examples/connectivity.py``) - - 00:01.390 + - 00:01.413 - 0.0 * - :ref:`sphx_glr_examples-dev_voronoi.py` (``../examples-dev/voronoi.py``) - - 00:01.167 + - 00:01.147 - 0.0 * - :ref:`sphx_glr_sample_data_elevation_nl.py` (``../data/examples/elevation_nl.py``) - - 00:00.757 + - 00:00.754 - 0.0 * - :ref:`sphx_glr_examples_quick_overview.py` (``../examples/quick_overview.py``) - - 00:00.506 + - 00:00.502 - 0.0 * - :ref:`sphx_glr_sample_data_adh_san_diego.py` (``../data/examples/adh_san_diego.py``) - - 00:00.292 + - 00:00.294 - 0.0 * - :ref:`sphx_glr_sample_data_disk.py` (``../data/examples/disk.py``) - - 00:00.137 + - 00:00.138 - 0.0 * - :ref:`sphx_glr_sample_data_provinces_nl.py` (``../data/examples/provinces_nl.py``) - - 00:00.066 + - 00:00.065 - 0.0 * - :ref:`sphx_glr_sample_data_xoxo.py` (``../data/examples/xoxo.py``) - 00:00.054 diff --git a/examples-dev/sg_execution_times.html b/examples-dev/sg_execution_times.html index 72351eda..8aa23078 100644 --- a/examples-dev/sg_execution_times.html +++ b/examples-dev/sg_execution_times.html @@ -398,7 +398,7 @@

    Computation times#

    -

    00:01.167 total execution time for 1 file from examples-dev:

    +

    00:01.147 total execution time for 1 file from examples-dev:

    <xarray.DataArray 'elevation' (mesh2d_nFaces: 5248)> Size: 5kB
     array([False, False, False, ..., False, False, False])
     Coordinates:
    -  * mesh2d_nFaces  (mesh2d_nFaces) int64 42kB 0 1 2 3 4 ... 5244 5245 5246 5247
    + * mesh2d_nFaces (mesh2d_nFaces) int64 42kB 0 1 2 3 4 ... 5244 5245 5246 5247

    The topology is equivalent, but the nodes, edges, and faces are in a @@ -1287,9 +1287,9 @@

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

    +

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



    @@ -973,7 +973,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 0x7f484f6d8a40>]
    +node_x = 4.84e+05, node_y = 3.614e+06, node = 1000
    [<matplotlib.lines.Line2D object at 0x7f25331ee150>]
     
    -

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

    +

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