Xugrid

Latest version: v0.12.1

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

Scan your dependencies

Page 2 of 5

0.10.0

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

Fixed
~~~~~

- Fixed indexing bug in the ``"mode"`` method in
:class:`xugrid.CentroidLocatorRegridder`, :class:`xugrid.OverlapRegridder`,
:class:`xugrid.RelativeOverlapRegridder`, which gave the method the tendency
to repeat the first value in the source grid across the target grid.

Added
~~~~~

- :func:`xugrid.earcut_triangulate_polygons` and
:meth:`xugrid.Ugrid2d.earcut_triangulate_polygons` have been added to break
down polygon geodataframes into a triangular mesh for further processing.
- :meth:`xugrid.OverlapRegridder.weights_as_dataframe` has been added to
extract regridding weights (overlaps) from the regridders. This method is
also available for :class:`BarycentricInterpolator`,
:class:`CentroidLocatorRegridder`, and :class:`RelativeOverlapRegridder`.

0.9.0

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

Fixed
~~~~~

- :meth:`xugrid.Ugrid2d.equals` and :meth:`xugrid.Ugrid1d.equals` test if
dataset is equal instead of testing type.
- Fixed bug in :func:`xugrid.concat` and :func:`xugrid.merge` where multiple
grids were returned if grids did not point to the same object id (i.e.
copies).
- Fixed bug in :meth:`xugrid.Ugrid1d.merge_partitions`, which caused
``ValueError: indexes must be provided for attrs``.
- Fixed ``from_structured`` methods: the generated faces are now always in
counterclockwise direction, also for increasing y-coordinates or decreasing
x-coordinates.

Added
~~~~~

- :meth:`xugrid.Ugrid2d.from_structured_multicoord` has been added
to generate UGRID topologies from rotated or approximated curvilinear grids.
- :meth:`xugrid.Ugrid2d.from_structured_intervals1d` has been added to generate
UGRID topologies from "intervals": the N + 1 vertex coordinates for N faces.
- :meth:`xugrid.Ugrid2d.from_structured_intervals2d` has been added to generate
UGRID topologies from "intervals": the (M + 1, N + 1) vertex coordinates for N faces.
- :meth:`xugrid.UgridDataArrayAccessor.from_structured` now takes ``x`` and ``y``
arguments to specify which coordinates to use as the UGRID x and y coordinates.
- :attr:`xugrid.UgridDataset.sizes` as an alternative to :attr:`xugrid.UgridDataset.dimensions`
- :attr:`xugrid.Ugrid2d.max_face_node_dimension` which returns the dimension
name designating nodes per face.
- :attr:`xugrid.AbstractUgrid.max_connectivity_sizes` which returns all
maximum connectivity dimensions and their corresponding size.
- :attr:`xugrid.AbstractUgrid.max_connectivity_dimensions` which returns all
maximum connectivity dimensions.

Changed
~~~~~~~

- :meth:`xugrid.Ugrid2d.from_structured` now takes ``x`` and ``y`` arguments instead
of ``x_bounds`` and ``y_bounds`` arguments.
- :func:`xugrid.merge_partitions` now also merges datasets with grids that are
only contained in some of the partition datasets.

0.8.1

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

Fixed
~~~~~

- :meth:`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
~~~~~

- :meth:`xugrid.UgridDataArrayAccessor.laplace_interpolate` now also supports
interpolation of node associated data, and Ugrid1d topologies.
- :meth:`xugrid.Ugrid1d.from_shapely` and :meth:`xugrid.Ugrid2d.from_shapely` have
been added to directly instantiate UGRID topologies from arrays of shapely geometries.

Changed
~~~~~~~

- :meth:`xugrid.UgridDataArrayAccessor.laplace_interpolate` no longer uses scipy's
ILU decomposition as a preconditioner. A simpler and more effective preconditioner
is automatically used instead. The arguments have changed accordingly.
``direct_solve`` is now by default ``False``.
- :meth:`xugrid.Ugrid1d.from_geodataframe` and :meth:`xugrid.Ugrid2d.from_geodataframe`
now check whether the geodataframe argument is a geopandas GeoDataFrame, and whether
the geometry types are appropriate (LineStrings for Ugrid1d, Polygons for Ugrid2d).

0.8.0

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

Changed
~~~~~~~

- Initialize Meshkernel with a spherical projection if the coordinate reference
system (crs) is geographic.
- Minimum Python version increased to 3.9.

0.7.1

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

Fixed
~~~~~
- Support for Meshkernel 3 (171). Initialize Meshkernel
with defaults, setting it to cartesian projection.

0.7.0

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

Added
~~~~~

- :meth:`xugrid.Ugrid2d.to_nonperiodic`,
:meth:`xugrid.UgridDataArrayAccessor.to_nonperiodic` and
:meth:`xugrid.UgridDatasetAccessor.to_nonperiodic` have been added to convert
a "periodid grid" (where the leftmost nodes are the same as the rightmost
nodes, e.g. a mesh for the globe) to an "ordinary" grid.
- Conversely, :meth:`xugrid.Ugrid2d.to_periodic`,
:meth:`xugrid.UgridDataArrayAccessor.to_periodic` and
:meth:`xugrid.UgridDatasetAccessor.to_periodic` have been added to convert an
ordinary grid to a periodic grid.
- :attr:`xugrid.Ugrid2d.perimeter` has been added the compute the length of the
face perimeters.
- :meth:`xugrid.Ugrid1d.reindex_like`,
:meth:`xugrid.Ugrid2d.reindex_like`,
:meth:`xugrid.UgridDataArrayAccessor.reindex_like` and
:meth:`xugrid.UgridDatasetAccessor.reindex_like` have been added to deal with
equivalent but differently ordered topologies and data.

Changed
~~~~~~~

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

Fixed
~~~~~

- Using an index which only reorders but does not change the size in
:meth:`xugrid.Ugrid1d.topology_subset` or
:meth:`xugrid.Ugrid2d.topology_subset` would erroneously result in the
original grid being returned, rather than a new grid with the faces or edges
shuffled. This breaks the link the between topology and data when using
``.isel`` on a UgridDataset or UgridDataArray. This has been fixed: both data
and the topology are now shuffled accordingly.

Page 2 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.