Xugrid

Latest version: v0.12.1

Safety actively analyzes 701583 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 5

0.6.5

------------------

Added
~~~~~

- :meth:`xugrid.Ugrid2d.intersect_line`,
:meth:`xugrid.Ugrid2d.intersect_linestring`
:meth:`xugrid.UgridDataArrayAccessor.intersect_line`,
:meth:`xugrid.UgridDataArrayAccessor.intersect_linestring`,
:meth:`xugrid.UgridDatasetAccessor.intersect_line`, and
:meth:`xugrid.UgridDatasetAccessor.intersect_linestring` have been added to
intersect line and linestrings and extract the associated face data.

Changed
~~~~~~~

- Selection operations along a line, or at point locations, will now prefix the
name of the grid in the x and y coordinates. This avoids name collisions when
multiple topologies are present in a dataset.
- Xugrid now contains a partial copy of the xarray plot utils module, and its
tests. The latest xarray release broke xugrid (on import), since (private)
parts of xarray were used which no longer existed.

Fixed
~~~~~

- :meth:`xugrid.UgridDatasetAccessor.sel` would return only a single grid
topology even when the selection subject contains more than one grid. It now
correctly returns subsets of all topologies.

0.6.4

------------------

Fixed
~~~~~

- Bug in :func:`xugrid.snap_to_grid`, which caused an ``IndexError``.
See `122 <https://github.com/Deltares/xugrid/issues/122>`_.

0.6.3

------------------

Added
~~~~~

- Added :func:`xugrid.burn_vector_geometries` to burn vector geometries in the
form of geopandas GeoDataFrames into a Ugrid2d topology.
- Added :func:`xugrid.polygonize` to create vector polygons for all connected
regions of a Ugrid2d topology sharing a common value. The result is a
geopandas GeoDataFrame.
- :meth:`xugrid.Ugrid2d.validate_edge_node_connectivity` has been added to
validate edge_node_connectivity by comparing with the face_node_connectivity.
The result can be used to define a valid subselection.
- :meth:`xugrid.Ugrid2d.from_structured_bounds` can be used to generate
a Ugrid2d topology from x and y bounds arrays.
- :attr:`xugrid.UgridDatasetAccessor.name`,
:attr:`xugrid.UgridDatasetAccessor.names`,
:attr:`xugrid.UgridDatasetAccessor.topology`; and
:attr:`xugrid.UgridDataArrayAccessor.name`,
:attr:`xugrid.UgridDataArrayAccessor.names`,
:attr:`xugrid.UgridDataArrayAccessor.topology` have been added to provide
easier access to the names of the UGRID topologies.
- :meth:`xugrid.UgridDatasetAccessor.rename` and
:meth:`xugrid.UgridDataArrayAccessor.rename` to rename both topology and the
associated dimensions.
- :meth:`xugrid.Ugrid2d.bounding_polygon` has been added to get a polygon
describing the bounds of the grid.

Fixed
~~~~~

- :class:`xugrid.CentroidLocatorRegridder`, :class:`xugrid.OverlapRegridder`,
and :class:`xugrid.BarycentricInterpolator` will now also regrid structured
to unstructured grid topologies.
- :meth:`xugrid.Ugrid1d.to_dataset` and :meth:`xugrid.Ugrid2d.to_dataset` no
longer write unused connectivity variables into the attributes of the UGRID
dummy variable.
- Conversion from and to GeoDataFrame will now conserve the CRS (coordinate
reference system).
- :meth:`xugrid.UgridDatasetAccessor.to_geodataframe` will no longer error when
converting a UgridDataset that does not contain any variables.
- :meth:`xugrid.OverlapRegridder.regrid` will no longer give incorrect results
on repeated calls with the "mode" method.

Changed
~~~~~~~

- Initializing a Ugrid2d topology with an invalid edge_node_connectivity will
no longer raise an error.
- :attr:`xugrid.Ugrid1d.node_node_connectivity`,
:attr:`xugrid.Ugrid1d.directed_node_node_connectivity`,
:attr:`xugrid.Ugrid2d.node_node_connectivity`,
:attr:`xugrid.Ugrid2d.directed_node_node_connectivity`, and
:attr:`xugrid.Ugrid2d.face_face_connectivity` now contain the associated edge
index in the ``.data`` attribute of the resulting CSR matrix.

0.6.2

------------------

Fixed
~~~~~

- Computing indexer to avoid dask array of unknown shape upon plotting.
See `117 <https://github.com/Deltares/xugrid/issues/117>`_.
- Bug where chunked dask arrays could not be regridded.
See `119 <https://github.com/Deltares/xugrid/issues/99>`_.
- Bug where error was thrown in the RelativeOverlapRegridder upon
flipping the y coordinate.

0.6.1

------------------

Fixed
~~~~~

- Fillvalue was not properly replaced in cast.
See `113 <https://github.com/Deltares/xugrid/issues/113>`_.

0.6.0

------------------

Added
~~~~~

- :meth:`xugrid.Ugrid2d.label_partitions`, :meth:`xugrid.Ugrid2d.partition`,
:meth:`xugrid.Ugrid2d.merge_partitions` have been added to partition and merge
a grid.
- :meth:`xugrid.UgridDataArrayAccessor.partition`,
:meth:`xugrid.UgridDataArrayAccessor.partition_by_label`,
:meth:`xugrid.UgridDatasetAccessor.partition`, and
:meth:`xugrid.UgridDatasetAccessor.partition_by_label` have been added to
part a grid and its associated data.
- :meth:`xugrid.Ugrid1d.rename` and :meth:`xugrid.Ugrid2d.rename` have been
added to rename a grid, including the attributes that are created when the
grid is converted into an xarray dataset.
- :meth:`xugrid.Ugrid1d.node_node_connectivity` and
:meth:`xugrid.Ugrid2.node_node_connectivity` properties have been added.
- :meth:`xugrid.Ugrid1d.topological_sort_by_dfs` has been added.
- :meth:`xugrid.Ugrid1d.contract_vertices` has been added.

Fixed
~~~~~

- Regridding is possible again with regridders initiated ``from_weights``.
See `90 <https://github.com/Deltares/xugrid/issues/90>`_.
This was a broken feature in the 0.5.0 release.
- Computed weights for structured grids regridders now decrease with distance
instead of increase.
- Fixed edge case for regridding structured grids, where midpoints of the
source and target grid are equal.
- Fixed numba typing error for regridders.

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.

Page 3 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.