diff --git a/.doctrees/api/xugrid.BarycentricInterpolator.doctree b/.doctrees/api/xugrid.BarycentricInterpolator.doctree index dd3f05aa..46bcb11b 100644 Binary files a/.doctrees/api/xugrid.BarycentricInterpolator.doctree and b/.doctrees/api/xugrid.BarycentricInterpolator.doctree differ diff --git a/.doctrees/api/xugrid.CentroidLocatorRegridder.doctree b/.doctrees/api/xugrid.CentroidLocatorRegridder.doctree index e5a0eb73..405f28fb 100644 Binary files a/.doctrees/api/xugrid.CentroidLocatorRegridder.doctree and b/.doctrees/api/xugrid.CentroidLocatorRegridder.doctree differ diff --git a/.doctrees/api/xugrid.OverlapRegridder.doctree b/.doctrees/api/xugrid.OverlapRegridder.doctree index f603952c..bca6139c 100644 Binary files a/.doctrees/api/xugrid.OverlapRegridder.doctree and b/.doctrees/api/xugrid.OverlapRegridder.doctree differ diff --git a/.doctrees/api/xugrid.RelativeOverlapRegridder.doctree b/.doctrees/api/xugrid.RelativeOverlapRegridder.doctree index 0553da67..2ead8312 100644 Binary files a/.doctrees/api/xugrid.RelativeOverlapRegridder.doctree and b/.doctrees/api/xugrid.RelativeOverlapRegridder.doctree differ diff --git a/.doctrees/changelog.doctree b/.doctrees/changelog.doctree index 7f44a841..0594f2b1 100644 Binary files a/.doctrees/changelog.doctree and b/.doctrees/changelog.doctree differ diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index 1bd53a2a..a3099a18 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 aad79f42..3b9308da 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 05ab6ae4..d0f54976 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 8feb0642..91c82620 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 2542000f..a3e853ca 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 3bef7f69..7506428c 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 554ac38f..f8905b41 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 641a777e..7a5f5f13 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 8cef032b..35b2c6f0 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 5e78bacc..22573777 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 bfe9e6c3..6c745ff5 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 d699cfb4..c0b3c41a 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 79b8ba8f..33e1773e 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 f2d473f3..f2bceca4 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 7c983979..a7a8c3f1 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 57674f2f..a5eb1b33 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 d1ef77a7..8e3c4044 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 81882c9e..b8a1b115 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 779efef0..e79c4677 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 135a5dfb..fc65e2a2 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 a73521ad..466ffc07 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 9d80a172..c1e105d5 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 27eec741..160e448f 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 7a733824..d99631dd 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 41065694..ba857aad 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 1814532e..ffc59e75 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 13baa0fc..3f6d8bfc 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 b6dcea9c..4fa9072b 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 badf5618..0a552b01 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 9f5e08fd..b1625c41 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 f9247e79..bf83d0b7 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 de310af5..232dc1ad 100644 Binary files a/_downloads/f25be90ee220882246ef4778e276e863/vector_conversion.zip and b/_downloads/f25be90ee220882246ef4778e276e863/vector_conversion.zip differ diff --git a/_modules/xugrid/regrid/regridder.html b/_modules/xugrid/regrid/regridder.html index f0953bcb..1affcf0b 100644 --- a/_modules/xugrid/regrid/regridder.html +++ b/_modules/xugrid/regrid/regridder.html @@ -600,7 +600,7 @@

Source code for xugrid.regrid.regridder

         )
         return out
 
-    def regrid(self, object) -> UgridDataArray:
+    def regrid(self, data: Union[xr.DataArray, UgridDataArray]) -> UgridDataArray:
         """
         Regrid the data from a DataArray from its old grid topology to the new
         target topology.
@@ -611,7 +611,7 @@ 

Source code for xugrid.regrid.regridder

 
         Parameters
         ----------
-        object: UgridDataArray or xarray.DataArray
+        data: UgridDataArray or xarray.DataArray
 
         Returns
         -------
@@ -624,17 +624,21 @@ 

Source code for xugrid.regrid.regridder

         # But it causes problems with initializing a regridder
         # from_dataset, because the name has been changed to
         # __source_nFace.
-        if isinstance(object, UgridDataArray):
-            obj = object.ugrid.obj
-            source_dims = (object.ugrid.grid.face_dimension,)
-        else:
-            obj = object
+        if isinstance(data, xr.DataArray):
+            obj = data
             source_dims = ("y", "x")
+        elif isinstance(data, UgridDataArray):
+            obj = data.ugrid.obj
+            source_dims = (data.ugrid.grid.face_dimension,)
+        else:
+            raise TypeError(
+                f"Expected DataArray or UgridDataAray, received: {type(data).__name__}"
+            )
 
-        missing_dims = set(source_dims).difference(object.dims)
+        missing_dims = set(source_dims).difference(data.dims)
         if missing_dims:
             raise ValueError(
-                f"object does not contain regridder source dimensions: {missing_dims}"
+                f"data does not contain regridder source dimensions: {missing_dims}"
             )
 
         regridded = self.regrid_dataarray(obj, source_dims)
diff --git a/_sources/changelog.rst.txt b/_sources/changelog.rst.txt
index a56f084e..e61e3ce7 100644
--- a/_sources/changelog.rst.txt
+++ b/_sources/changelog.rst.txt
@@ -19,6 +19,11 @@ Changed
   coordinates; it now detects whether coordinates are 1D or 2D automatically.
   Accordingly, :meth:`xugrid.Ugrid2d.from_structured_multicoord` should no
   longer be used, and calling it will give a FutureWarning.
+- The first argument of the ``.regrid`` methods of
+  :class:`xugrid.CentroidLocatorRegridder`, :class:`xugrid.OverlapRegridder`,
+  :class:`xugrid.RelativeOverlapRegridder`, and
+  :class:`xugrid.BarycentricInterpolator` has been renamed. The method now
+  takes a ``data`` argument instead of ``object``.
 
 Added
 ~~~~~
@@ -26,6 +31,14 @@ Added
 - :meth:`xugrid.UgridDataset.from_structured` has been added to create
   UgriDatasets from xarray Datasets.
 
+Fixed
+~~~~~
+
+- The ``.regrid`` methods of :class:`xugrid.CentroidLocatorRegridder`,
+  :class:`xugrid.OverlapRegridder`, :class:`xugrid.RelativeOverlapRegridder`,
+  and :class:`xugrid.BarycentricInterpolator` now raise a TypeError if an
+  inappropriate type is provided.
+
 [0.12.1] 2024-09-09
 -------------------
 
diff --git a/_sources/examples-dev/sg_execution_times.rst.txt b/_sources/examples-dev/sg_execution_times.rst.txt
index cebe0868..ea4f526e 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.313** total execution time for 1 file **from examples-dev**:
+**00:01.333** 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.313
+     - 00:01.333
      - 0.0
diff --git a/_sources/examples-dev/voronoi.rst.txt b/_sources/examples-dev/voronoi.rst.txt
index b8dd5eb3..339c1020 100644
--- a/_sources/examples-dev/voronoi.rst.txt
+++ b/_sources/examples-dev/voronoi.rst.txt
@@ -666,7 +666,7 @@ The figure shows:
 
 .. rst-class:: sphx-glr-timing
 
-   **Total running time of the script:** (0 minutes 1.313 seconds)
+   **Total running time of the script:** (0 minutes 1.333 seconds)
 
 
 .. _sphx_glr_download_examples-dev_voronoi.py:
diff --git a/_sources/examples/connectivity.rst.txt b/_sources/examples/connectivity.rst.txt
index 40d5ff70..b3242487 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.366 seconds)
+   **Total running time of the script:** (0 minutes 1.375 seconds)
 
 
 .. _sphx_glr_download_examples_connectivity.py:
diff --git a/_sources/examples/overlap_regridder.rst.txt b/_sources/examples/overlap_regridder.rst.txt
index 07078bd1..c54f1c2a 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 3.920 seconds)
+   **Total running time of the script:** (0 minutes 3.969 seconds)
 
 
 .. _sphx_glr_download_examples_overlap_regridder.py:
diff --git a/_sources/examples/partitioning.rst.txt b/_sources/examples/partitioning.rst.txt
index da02f7ab..92453721 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
 
 
-    
+    
 
 
 
@@ -673,7 +673,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


@@ -1078,9 +1078,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

@@ -1488,9 +1488,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

@@ -1507,7 +1507,7 @@ partitions. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 3.757 seconds) + **Total running time of the script:** (0 minutes 3.810 seconds) .. _sphx_glr_download_examples_partitioning.py: diff --git a/_sources/examples/plotting.rst.txt b/_sources/examples/plotting.rst.txt index 4cacd3c9..bb5cd6b7 100644 --- a/_sources/examples/plotting.rst.txt +++ b/_sources/examples/plotting.rst.txt @@ -462,7 +462,7 @@ faces. 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


  • @@ -617,7 +617,7 @@ Dataset and calling the :py:meth:`UgridDataArray.ugrid.plot()` method. .. code-block:: none - + @@ -652,7 +652,7 @@ the edges results in a different kind of plot: .. code-block:: none - + @@ -694,7 +694,7 @@ We can put them side by side to illustrate the differences: .. code-block:: none - + @@ -724,7 +724,7 @@ filled contours for data associated with the face dimension: .. code-block:: none - + @@ -755,7 +755,7 @@ We can also overlay this data with the edges: .. code-block:: none - + @@ -830,7 +830,7 @@ All these (2D) plots are illustrated here for completeness' sake: .. code-block:: none - + @@ -863,7 +863,7 @@ The ``surface`` methods generate 3D surface plots: .. code-block:: none - + @@ -897,7 +897,7 @@ used: .. code-block:: none - + @@ -933,7 +933,7 @@ take an xarray DataArray and a xugrid grid as arguments. .. code-block:: none - + @@ -969,14 +969,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 13.833 seconds) + **Total running time of the script:** (0 minutes 13.971 seconds) .. _sphx_glr_download_examples_plotting.py: diff --git a/_sources/examples/quick_overview.rst.txt b/_sources/examples/quick_overview.rst.txt index 615d1625..b81e172a 100644 --- a/_sources/examples/quick_overview.rst.txt +++ b/_sources/examples/quick_overview.rst.txt @@ -470,7 +470,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 ...


  • @@ -931,7 +931,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 ...


  • @@ -1379,7 +1379,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

    @@ -1795,7 +1795,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

    @@ -1833,7 +1833,7 @@ Plotting .. code-block:: none - + @@ -1884,7 +1884,7 @@ To select based on the topology, use the ``.ugrid`` attribute: .. code-block:: none - + @@ -2288,7 +2288,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

    @@ -2756,7 +2756,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

    @@ -3164,7 +3164,7 @@ grid (nodes, faces, edges). 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_nFaces
      PandasIndex
      PandasIndex(RangeIndex(start=0, stop=384, step=1, name='mesh2d_nFaces'))
    • 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'))


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

    @@ -4083,7 +4083,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 ...

    @@ -4494,7 +4494,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


  • @@ -4555,7 +4555,7 @@ before writing. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 0.474 seconds) + **Total running time of the script:** (0 minutes 0.482 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 080e4db3..5a8670b5 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 - + @@ -715,7 +715,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'))


  • @@ -1163,7 +1163,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'))


  • @@ -1245,7 +1245,7 @@ and the aggregated mean. .. code-block:: none - [, , , , ] + [, , , , ] @@ -1282,7 +1282,7 @@ To illustrate, we will zoom in to a part of the Netherlands. .. code-block:: none - + @@ -1335,7 +1335,7 @@ the triangles. .. code-block:: none - + @@ -1376,7 +1376,7 @@ the regridders work for any collection of (convex) faces. .. code-block:: none - + @@ -1412,7 +1412,7 @@ is kept the same. .. code-block:: none - + @@ -1428,7 +1428,7 @@ is kept the same. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 9.405 seconds) + **Total running time of the script:** (0 minutes 9.478 seconds) .. _sphx_glr_download_examples_regridder_overview.py: diff --git a/_sources/examples/selection.rst.txt b/_sources/examples/selection.rst.txt index 89201757..397ba189 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 - + @@ -666,7 +666,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

    @@ -1078,7 +1078,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

    @@ -1490,7 +1490,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

    @@ -1900,9 +1900,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

    @@ -2314,7 +2314,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


  • @@ -2774,15 +2774,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


  • @@ -2966,7 +2966,7 @@ thousands faces: .. code-block:: none - + @@ -2988,7 +2988,7 @@ face dimension for 2D topologies. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 3.528 seconds) + **Total running time of the script:** (0 minutes 3.565 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 af1cbbec..65835fc8 100644 --- a/_sources/examples/sg_execution_times.rst.txt +++ b/_sources/examples/sg_execution_times.rst.txt @@ -6,7 +6,7 @@ Computation times ================= -**00:52.501** total execution time for 8 files **from examples**: +**00:53.062** 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.217 + - 00:16.411 - 0.0 * - :ref:`sphx_glr_examples_plotting.py` (``plotting.py``) - - 00:13.833 + - 00:13.971 - 0.0 * - :ref:`sphx_glr_examples_regridder_overview.py` (``regridder_overview.py``) - - 00:09.405 + - 00:09.478 - 0.0 * - :ref:`sphx_glr_examples_overlap_regridder.py` (``overlap_regridder.py``) - - 00:03.920 + - 00:03.969 - 0.0 * - :ref:`sphx_glr_examples_partitioning.py` (``partitioning.py``) - - 00:03.757 + - 00:03.810 - 0.0 * - :ref:`sphx_glr_examples_selection.py` (``selection.py``) - - 00:03.528 + - 00:03.565 - 0.0 * - :ref:`sphx_glr_examples_connectivity.py` (``connectivity.py``) - - 00:01.366 + - 00:01.375 - 0.0 * - :ref:`sphx_glr_examples_quick_overview.py` (``quick_overview.py``) - - 00:00.474 + - 00:00.482 - 0.0 diff --git a/_sources/examples/vector_conversion.rst.txt b/_sources/examples/vector_conversion.rst.txt index b1f01db1..3508b9f4 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 - + @@ -524,9 +524,9 @@ GeoDataFrame. 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 + mesh2d_face_y (mesh2d_nFaces) float64 42kB 3.648e+05 ... 3.964e+05

    @@ -588,7 +588,7 @@ burn into the grid. .. code-block:: none - + @@ -990,9 +990,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


  • @@ -1099,7 +1099,7 @@ We can also use such "masks" to e.g. modify specific parts of the grid data: .. code-block:: none - + @@ -1245,7 +1245,7 @@ burn operation. .. code-block:: none - + @@ -1354,7 +1354,7 @@ compare to the grid faces. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 16.217 seconds) + **Total running time of the script:** (0 minutes 16.411 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 107676c0..e4bdea5d 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.294 seconds) + **Total running time of the script:** (0 minutes 0.295 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 6183feea..ac0a2e83 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.138 seconds) + **Total running time of the script:** (0 minutes 0.137 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 a5a4b96c..64b19581 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.748 seconds) + **Total running time of the script:** (0 minutes 0.777 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 d2c23d6d..1d3cfe4d 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.064 seconds) + **Total running time of the script:** (0 minutes 0.063 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 2918e7cd..e661f5bc 100644 --- a/_sources/sample_data/sg_execution_times.rst.txt +++ b/_sources/sample_data/sg_execution_times.rst.txt @@ -6,7 +6,7 @@ Computation times ================= -**00:01.297** total execution time for 5 files **from sample_data**: +**00:01.325** total execution time for 5 files **from sample_data**: .. container:: @@ -33,16 +33,16 @@ Computation times - Time - Mem (MB) * - :ref:`sphx_glr_sample_data_elevation_nl.py` (``elevation_nl.py``) - - 00:00.748 + - 00:00.777 - 0.0 * - :ref:`sphx_glr_sample_data_adh_san_diego.py` (``adh_san_diego.py``) - - 00:00.294 + - 00:00.295 - 0.0 * - :ref:`sphx_glr_sample_data_disk.py` (``disk.py``) - - 00:00.138 + - 00:00.137 - 0.0 * - :ref:`sphx_glr_sample_data_provinces_nl.py` (``provinces_nl.py``) - - 00:00.064 + - 00:00.063 - 0.0 * - :ref:`sphx_glr_sample_data_xoxo.py` (``xoxo.py``) - 00:00.053 diff --git a/_sources/sg_execution_times.rst.txt b/_sources/sg_execution_times.rst.txt index 13e05886..13b33204 100644 --- a/_sources/sg_execution_times.rst.txt +++ b/_sources/sg_execution_times.rst.txt @@ -6,7 +6,7 @@ Computation times ================= -**00:55.111** total execution time for 14 files **from all galleries**: +**00:55.720** 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.217 + - 00:16.411 - 0.0 * - :ref:`sphx_glr_examples_plotting.py` (``../examples/plotting.py``) - - 00:13.833 + - 00:13.971 - 0.0 * - :ref:`sphx_glr_examples_regridder_overview.py` (``../examples/regridder_overview.py``) - - 00:09.405 + - 00:09.478 - 0.0 * - :ref:`sphx_glr_examples_overlap_regridder.py` (``../examples/overlap_regridder.py``) - - 00:03.920 + - 00:03.969 - 0.0 * - :ref:`sphx_glr_examples_partitioning.py` (``../examples/partitioning.py``) - - 00:03.757 + - 00:03.810 - 0.0 * - :ref:`sphx_glr_examples_selection.py` (``../examples/selection.py``) - - 00:03.528 + - 00:03.565 - 0.0 * - :ref:`sphx_glr_examples_connectivity.py` (``../examples/connectivity.py``) - - 00:01.366 + - 00:01.375 - 0.0 * - :ref:`sphx_glr_examples-dev_voronoi.py` (``../examples-dev/voronoi.py``) - - 00:01.313 + - 00:01.333 - 0.0 * - :ref:`sphx_glr_sample_data_elevation_nl.py` (``../data/examples/elevation_nl.py``) - - 00:00.748 + - 00:00.777 - 0.0 * - :ref:`sphx_glr_examples_quick_overview.py` (``../examples/quick_overview.py``) - - 00:00.474 + - 00:00.482 - 0.0 * - :ref:`sphx_glr_sample_data_adh_san_diego.py` (``../data/examples/adh_san_diego.py``) - - 00:00.294 + - 00:00.295 - 0.0 * - :ref:`sphx_glr_sample_data_disk.py` (``../data/examples/disk.py``) - - 00:00.138 + - 00:00.137 - 0.0 * - :ref:`sphx_glr_sample_data_provinces_nl.py` (``../data/examples/provinces_nl.py``) - - 00:00.064 + - 00:00.063 - 0.0 * - :ref:`sphx_glr_sample_data_xoxo.py` (``../data/examples/xoxo.py``) - 00:00.053 diff --git a/api/xugrid.BarycentricInterpolator.html b/api/xugrid.BarycentricInterpolator.html index d6bf934f..3a6c327b 100644 --- a/api/xugrid.BarycentricInterpolator.html +++ b/api/xugrid.BarycentricInterpolator.html @@ -708,7 +708,7 @@

    xugrid.BarycentricInterpolator

    from_weights(weights, target)

    -

    regrid(object)

    +

    regrid(data)

    Regrid the data from a DataArray from its old grid topology to the new target topology.

    regrid_dataarray(source, source_dims)

    diff --git a/api/xugrid.CentroidLocatorRegridder.html b/api/xugrid.CentroidLocatorRegridder.html index a59ff284..eced46a4 100644 --- a/api/xugrid.CentroidLocatorRegridder.html +++ b/api/xugrid.CentroidLocatorRegridder.html @@ -708,7 +708,7 @@

    xugrid.CentroidLocatorRegridder

    from_weights(weights, target)

    -

    regrid(object)

    +

    regrid(data)

    Regrid the data from a DataArray from its old grid topology to the new target topology.

    regrid_dataarray(source, source_dims)

    diff --git a/api/xugrid.OverlapRegridder.html b/api/xugrid.OverlapRegridder.html index 32ae4cf3..b926f9ee 100644 --- a/api/xugrid.OverlapRegridder.html +++ b/api/xugrid.OverlapRegridder.html @@ -740,7 +740,7 @@

    xugrid.OverlapRegridder

    from_weights(weights, target[, method])

    -

    regrid(object)

    +

    regrid(data)

    Regrid the data from a DataArray from its old grid topology to the new target topology.

    regrid_dataarray(source, source_dims)

    diff --git a/api/xugrid.RelativeOverlapRegridder.html b/api/xugrid.RelativeOverlapRegridder.html index a32714d0..c35c5d19 100644 --- a/api/xugrid.RelativeOverlapRegridder.html +++ b/api/xugrid.RelativeOverlapRegridder.html @@ -716,7 +716,7 @@

    xugrid.RelativeOverlapRegridder

    from_weights(weights, target[, method])

    -

    regrid(object)

    +

    regrid(data)

    Regrid the data from a DataArray from its old grid topology to the new target topology.

    regrid_dataarray(source, source_dims)

    diff --git a/changelog.html b/changelog.html index 0b4fab75..e4c07563 100644 --- a/changelog.html +++ b/changelog.html @@ -690,6 +690,11 @@

    Changed#< coordinates; it now detects whether coordinates are 1D or 2D automatically. Accordingly, xugrid.Ugrid2d.from_structured_multicoord() should no longer be used, and calling it will give a FutureWarning.

    +
  • The first argument of the .regrid methods of +xugrid.CentroidLocatorRegridder, xugrid.OverlapRegridder, +xugrid.RelativeOverlapRegridder, and +xugrid.BarycentricInterpolator has been renamed. The method now +takes a data argument instead of object.

  • @@ -699,11 +704,20 @@

    Added#< UgriDatasets from xarray Datasets.

    +
    +

    Fixed#

    + +

    [0.12.1] 2024-09-09#

    -
    -

    Fixed#

    +
    +

    Fixed#

    -
    -

    Added#

    +
    +

    Added#

    • xugrid.Ugrid1d and xugrid.Ugrid2d now take an optional start_index which controls the start index for the UGRID connectivity @@ -734,8 +748,8 @@

      Added#

    -
    -

    Changed#

    +
    +

    Changed#

    • xugrid.Ugrid1d and xugrid.Ugrid2d will generally preserve the fill value and start index of grids when roundtripping from and to xarray @@ -747,10 +761,10 @@

      Changed#<

    -
    -

    [0.12.0] 2024-09-03#

    -

    Fixed#

    +

    [0.12.0] 2024-09-03#

    +
    +

    Fixed#

    • The xugrid.BarycentricInterpolator now interpolates according to linear weights within the full bounds of the source grid, rather than only @@ -759,8 +773,8 @@

      Fixed#xugrid.CentroidLocatorRegridder) otherwise.

    -
    -

    Added#

    +
    +

    Added#

    -
    -

    Changed#

    +
    +

    Changed#

    • Selection operations such as UgridDataArrayAccessor.sel_points() will now also return points that are located on the edges of 2D topologies.

    • @@ -783,10 +797,10 @@

      Changed#<

    -
    -

    [0.11.2] 2024-08-16#

    -

    Fixed#

    +

    [0.11.2] 2024-08-16#

    +
    +

    Fixed#

    • The regridders will no longer flip around data along an axis when regridding from data from structured to unstructured form when the coordinates along the @@ -798,8 +812,8 @@

      Fixed#dy along y midpoints, and dx along x.)

    -
    -

    Added#

    +
    +

    Added#

    • xugrid.snap_nodes() to snap neighboring vertices together that are located within a maximum snapping distance from each other. If vertices are @@ -811,10 +825,10 @@

      Added#

    -
    -

    [0.11.1] 2024-08-13#

    -

    Fixed#

    +

    [0.11.1] 2024-08-13#

    +
    +

    Fixed#

    • The reduction methods for the overlap regridders now behave consistently when all values are NaN or when all weights (overlaps) are zero, and all methods @@ -829,8 +843,8 @@

      Fixed#

    -
    -

    Added#

    +
    +

    Added#

    • Percentiles (5, 10, 25, 50, 75, 90, 95) have been added to the xugrid.OverlapRegridder as standard available reduction methods @@ -838,8 +852,8 @@

      Added#xugrid.OverlapRegridder.create_percentile_method().

    -
    -

    Changed#

    +
    +

    Changed#

    • Custom reduction functions provide to the overlap regridders no longer require an indices argument.

    • @@ -854,10 +868,10 @@

      Changed#

    -
    -

    [0.11.0] 2024-08-05#

    -

    Fixed#

    +

    [0.11.0] 2024-08-05#

    +
    +

    Fixed#

    • xugrid.merge_partitions() now automatically merges chunks (if defined in the partition datasets). This removes the commonly seen @@ -873,8 +887,8 @@

      Fixed#

    -
    -

    Added#

    +
    +

    Added#

    -
    -

    Changed#

    +
    +

    Changed#

    -
    -

    [0.10.0] 2024-05-01#

    -

    Fixed#

    +

    [0.10.0] 2024-05-01#

    +
    +

    Fixed#

    -
    -

    Added#

    +
    +

    Added#

    -
    -

    [0.9.0] 2024-02-15#

    -

    Fixed#

    +

    [0.9.0] 2024-02-15#

    +
    +

    Fixed#

    • xugrid.Ugrid2d.equals() and xugrid.Ugrid1d.equals() test if dataset is equal instead of testing type.

    • @@ -937,8 +951,8 @@

      Fixed#

    -
    -

    Added#

    +
    +

    Added#

    • xugrid.Ugrid2d.from_structured_multicoord() has been added to generate UGRID topologies from rotated or approximated curvilinear grids.

    • @@ -957,8 +971,8 @@

      Added#

    -
    -

    Changed#

    +
    +

    Changed#

    -
    -

    [0.8.1] 2024-01-19#

    -

    Fixed#

    +

    [0.8.1] 2024-01-19#

    +
    +

    Fixed#

    • xugrid.UgridDataArrayAccessor.reindex_like() will now take the tolerance argument into account before sorting. In the past, near ties could be resolved differently between otherwise similar grid topologies due to roundoff.

    -
    -

    Added#

    +
    +

    Added#

    -
    -

    Changed#

    +
    +

    Changed#

    -
    -

    [0.8.0] 2023-12-11#

    -

    Changed#

    +

    [0.8.0] 2023-12-11#

    +
    +

    Changed#

    • Initialize Meshkernel with a spherical projection if the coordinate reference system (crs) is geographic.

    • @@ -1010,20 +1024,20 @@

      Changed#

    -
    -

    [0.7.1] 2023-11-17#

    -

    Fixed#

    +

    [0.7.1] 2023-11-17#

    +
    +

    Fixed#

    • Support for Meshkernel 3 (#171). Initialize Meshkernel with defaults, setting it to cartesian projection.

    -
    -

    [0.7.0] 2023-10-19#

    -

    Added#

    +

    [0.7.0] 2023-10-19#

    +
    +

    Added#

    -
    -

    Changed#

    +
    +

    Changed#

    • UGRID 2D topologies are no longer automatically forced in counterclockwise orientation during initialization.

    -
    -

    Fixed#

    +
    +

    Fixed#

    -
    -

    [0.6.5] 2023-09-30#

    -

    Added#

    +

    [0.6.5] 2023-09-30#

    +
    +

    Added#

    -
    -

    Changed#

    +
    +

    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 @@ -1088,8 +1102,8 @@

      Changed# parts of xarray were used which no longer existed.

    -
    -

    Fixed#

    +
    +

    Fixed#

    • xugrid.UgridDatasetAccessor.sel() would return only a single grid topology even when the selection subject contains more than one grid. It now @@ -1097,20 +1111,20 @@

      Fixed#

    -
    -

    [0.6.4] 2023-08-22#

    -

    Fixed#

    +

    [0.6.4] 2023-08-22#

    +
    +

    Fixed#

    -
    -

    [0.6.3] 2023-08-12#

    -

    Added#

    +

    [0.6.3] 2023-08-12#

    +
    +

    Added#

    • Added xugrid.burn_vector_geometries() to burn vector geometries in the form of geopandas GeoDataFrames into a Ugrid2d topology.

    • @@ -1136,8 +1150,8 @@

      Added#

    -
    -

    Fixed#

    +
    +

    Fixed#

    -
    -

    Changed#

    +
    +

    Changed#

    • Initializing a Ugrid2d topology with an invalid edge_node_connectivity will no longer raise an error.

    • @@ -1167,10 +1181,10 @@

      Changed#

    -
    -

    [0.6.2] 2023-07-26#

    -

    Fixed#

    +

    [0.6.2] 2023-07-26#

    +
    +

    Fixed#

    • Computing indexer to avoid dask array of unknown shape upon plotting. See #117.

    • @@ -1181,20 +1195,20 @@

      Fixed#

    -
    -

    [0.6.1] 2023-07-07#

    -

    Fixed#

    +

    [0.6.1] 2023-07-07#

    +
    +

    Fixed#

    • Fillvalue was not properly replaced in cast. See #113.

    -
    -

    [0.6.0] 2023-07-05#

    -

    Added#

    +

    [0.6.0] 2023-07-05#

    +
    +

    Added#

    -
    -

    Fixed#

    +
    +

    Fixed#

    • Regridding is possible again with regridders initiated from_weights. See #90. @@ -1226,18 +1240,18 @@

      Fixed#

      Fixed numba typing error for regridders.

    -
    -

    Changed#

    +
    +

    Changed#

    • Regridding structured grids now throws error if computed weights < 0.0 or > 1.0, before these weights were clipped to 0.0 and 1.0 respectively.

    -
    -

    [0.5.0] 2023-05-25#

    -

    Added#

    +

    [0.5.0] 2023-05-25#

    +
    +

    Added#

    -
    -

    [0.4.0] 2023-05-05#

    -

    Fixed#

    +

    [0.4.0] 2023-05-05#

    +
    +

    Fixed#

    -
    -

    Changed#

    +
    +

    Changed#

    -
    -

    Added#

    +
    +

    Added#

    -
    -

    [0.3.0] 2023-03-14#

    -

    Fixed#

    -
    +

    [0.3.0] 2023-03-14#

    -

    Changed#

    +

    Fixed#

    +
    +
    +

    Changed#

    • pygeos has been replaced by shapely >= 2.0.

    • xugrid.snap_to_grid() will now return a UgridDataset and a geopandas @@ -1316,18 +1330,18 @@

      Changed# negative data.

    -
    -

    Added#

    +
    +

    Added#

    -
    -

    [0.2.1] 2023-02-06#

    -

    Fixed#

    +

    [0.2.1] 2023-02-06#

    +
    +

    Fixed#

    -
    -

    Changed#

    -
    -

    Added#

    +

    Changed#

    +
    +
    +

    Added#

    • Several regridding methods have been added for face associated data: xugrid.BarycentricInterpolator have been added to interpolate @@ -1354,10 +1368,10 @@

      Added#

    -
    -

    [0.2.0] 2023-01-19#

    -

    Fixed#

    +

    [0.2.0] 2023-01-19#

    +
    +

    Fixed#

    -
    -

    Changed#

    +
    +

    Changed#

    • Forwarding to the internal xarray object is now setup at class definition of UgridDataArray and UgridDataset rather than at runtime. @@ -1406,8 +1420,8 @@

      Changed# only a left or right neighbor).

    -
    -

    Added#

    +
    +

    Added#

    • xugrid.Ugrid1d and xugrid.Ugrid2d can now be initialized with an attrs argument to setup non-default UGRID attributes such as @@ -1427,28 +1441,28 @@

      Added#

    -
    -

    [0.1.10] 2022-12-13#

    -

    Fixed#

    +

    [0.1.10] 2022-12-13#

    +
    +

    Fixed#

    • Move matplotlib import into a function body so matplotlib remains an optional dependency.

    -
    -

    [0.1.9] 2022-12-13#

    -

    Changed#

    +

    [0.1.9] 2022-12-13#

    +
    +

    Changed#

    • Warn instead of error when the UGRID attributes indicate a set of coordinate that are not present in the dataset.

    • Use pyproject.toml for setuptools instead of setup.cfg.

    -
    -

    Added#

    +
    +

    Added#

    -
    -

    Fixed#

    +
    +

    Fixed#

    -
    -

    [0.1.7] 2022-09-06#

    -

    Fixed#

    +

    [0.1.7] 2022-09-06#

    +
    +

    Fixed#

    • The setitem method of xugrid.UgridDataset has been updated to check the dimensions of grids rather than the dimensions of objects to decide @@ -1491,25 +1505,25 @@

      Fixed#

    -
    -

    [0.1.5] 2022-08-22#

    -

    Fixed#

    +

    [0.1.5] 2022-08-22#

    +
    +

    Fixed#

    • list and dict type annotations have been replaced with List and Dict from the typing module to support older versions of Python (<3.9).

    -
    -

    Changed#

    +
    +

    Changed#

    -
    -

    Added#

    +
    +

    Added#

    -
    -

    [0.1.4] 2022-08-16#

    -

    Fixed#

    +

    [0.1.4] 2022-08-16#

    +
    +

    Fixed#

    • A start_index of 1 in connectivity arrays is handled and will no longer result in indexing errors.

    • levels argument is now respected in line and pcolormesh plotting methods.

    -
    -

    Changed#

    +
    +

    Changed#

    • UGRID variables are now extracted via xugrid.UgridRolesAccessor to allow for multiple UGRID topologies in a single dataset.

    • @@ -1561,8 +1575,8 @@

      Changed# instead, which can check for consistency with the xarray object.

    -
    -

    Added#

    +
    +

    Added#

    -
    -

    [0.1.3] 2021-12-23#

    +
    +

    [0.1.3] 2021-12-23#

    @@ -1632,153 +1646,154 @@

    [0.1.3] 2021-12-23Unreleased
  • [0.12.1] 2024-09-09
  • -
  • [0.12.0] 2024-09-03
  • @@ -978,7 +978,7 @@

    UgridDataArrayuda.ugrid.plot() -plotting
    -plotting -plotting

    @@ -1111,7 +1111,7 @@

    Additional Arguments
    ds["face_z"].ugrid.plot(cmap="RdBu", levels=8, yincrease=False)
     
    -plotting
    <matplotlib.collections.PolyCollection object at 0x7f72ae1e2660>
    +plotting
    <matplotlib.collections.PolyCollection object at 0x7f8f4f11d130>
     

    @@ -1125,7 +1125,7 @@

    As a functionxugrid.plot.pcolormesh(grid, da) -plotting
    <matplotlib.collections.PolyCollection object at 0x7f72a548ad80>
    +plotting
    <matplotlib.collections.PolyCollection object at 0x7f8f4f207c80>
     

    @@ -1139,10 +1139,10 @@

    Xarray DataArray plotsdepth.isel(node=1000).plot() -node_x = 4.84e+05, node_y = 3.614e+06, node = 1000

    @@ -2158,7 +2158,7 @@

    Data selectionsubset.ugrid.plot() -quick overview
    <matplotlib.collections.PolyCollection object at 0x7f72ae0a4d40>
    +quick overview
    <matplotlib.collections.PolyCollection object at 0x7f8f57e5fc20>
     
    @@ -2547,7 +2547,7 @@

    ComputationTotal running time of the script: (0 minutes 0.474 seconds)

    +

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

    -regridder overview
    <matplotlib.collections.PolyCollection object at 0x7f72a4996d50>
    +regridder overview
    <matplotlib.collections.PolyCollection object at 0x7f8f4e527680>
     

    Xugrid provides several “regridder” classes which can convert gridded data @@ -490,7 +490,7 @@

    CentroidLocatorRegridderax.scatter(*grid.centroids.T, color="red")

    -regridder overview -regridder overview
    <matplotlib.collections.PolyCollection object at 0x7f72aee1bd10>
    +regridder overview
    <matplotlib.collections.PolyCollection object at 0x7f8f4ef39610>
     

    @@ -512,7 +512,7 @@

    OverlapRegriddermean.ugrid.plot(vmin=-20, vmax=90, cmap="terrain", edgecolor="red") -regridder overview -regridder overview -regridder overview -regridder overview
    [<matplotlib.lines.Line2D object at 0x7f72ae0d9bb0>, <matplotlib.lines.Line2D object at 0x7f72ae0d9be0>, <matplotlib.lines.Line2D object at 0x7f72ae0d8e90>, <matplotlib.lines.Line2D object at 0x7f72ae0dbef0>, <matplotlib.lines.Line2D object at 0x7f72ae0d9c10>]
    +regridder overview
    [<matplotlib.lines.Line2D object at 0x7f8f4e53e810>, <matplotlib.lines.Line2D object at 0x7f8f4e53c470>, <matplotlib.lines.Line2D object at 0x7f8f4e53f590>, <matplotlib.lines.Line2D object at 0x7f8f4e53f710>, <matplotlib.lines.Line2D object at 0x7f8f58fe3680>]
     

    @@ -1441,7 +1441,7 @@

    BarycentricInterpolatorpart.ugrid.plot(vmin=-20, vmax=90, cmap="terrain") -regridder overview -regridder overview
    <matplotlib.collections.PolyCollection object at 0x7f72a5812660>
    +regridder overview
    <matplotlib.collections.PolyCollection object at 0x7f8f4f43b860>
     

    @@ -1476,7 +1476,7 @@

    Arbitrary gridsvoronoi_grid.plot(ax=ax, color="red") -regridder overview
    <matplotlib.collections.LineCollection object at 0x7f72af3243b0>
    +regridder overview
    <matplotlib.collections.LineCollection object at 0x7f8f57eb66f0>
     

    @@ -1490,10 +1490,10 @@

    Re-use#result.ugrid.plot(vmin=-20, vmax=90, cmap="terrain") -regridder overview
    <matplotlib.collections.PolyCollection object at 0x7f72a48528a0>
    +regridder overview
    <matplotlib.collections.PolyCollection object at 0x7f8f4e3bac90>
     
    -

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

    +

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

    -selection -selection -selection -selection -selection
    <matplotlib.collections.PolyCollection object at 0x7f72af1d0590>
    +selection
    <matplotlib.collections.PolyCollection object at 0x7f8f4f40ddf0>
     

    @@ -928,7 +928,7 @@

    Point selection.ugrid.sel_points instead:

    @@ -1710,7 +1710,7 @@

    Point selectionsubset.ugrid.plot(vmin=-20, vmax=90, cmap="terrain", aspect=1, size=5) -selection
    <matplotlib.collections.PolyCollection object at 0x7f72a53abd40>
    +selection
    <matplotlib.collections.PolyCollection object at 0x7f8f4f69ba70>
     

    For a 2D topology, selecting faces by an index always results in a valid @@ -3019,7 +3019,7 @@

    Index selectionTotal running time of the script: (0 minutes 3.528 seconds)

    +

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