-------------------
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
give the same answer irrespective of the order in which the values are
encountered.
- :meth:`xugrid.merge_partitions` will now raise a ValueError if zero
partitions are provided.
- :meth:`xugrid.merge_partitions` will no longer error when chunks are
inconsistent across variables in a dataset, but now returns a merged dataset
while keeping the chunking per variable. (Note that if chunks are inconstent
for a variable **across partitions** that they are still and always unified
for the variable.)
Added
~~~~~
- Percentiles (5, 10, 25, 50, 75, 90, 95) have been added to the
:class:`xugrid.OverlapRegridder` as standard available reduction methods
(available as ``"p5", "p10"``, etc.). Custom percentile values (e.g. 2.5, 42) can be
setup using :meth:`xugrid.OverlapRegridder.create_percentile_method`.
Changed
~~~~~~~
- Custom reduction functions provide to the overlap regridders no longer require
an ``indices`` argument.
- :meth:`xugrid.Ugrid2d.sel_points`,
:meth:`xugrid.UgridDataArrayAccessor.sel_points` and
:meth:`xugrid.UgridDatasetAccessor.sel_points` now take an ``out_of_bounds``
and ``fill_value`` argument to determine what to with points that do not fall
inside of any grid feature. Previously, the method silently dropped these
points. The method now takes a ``fill_value`` argument to assign to
out-of-bounds points. It gives a warning return uses ``fill_value=np.nan`` by
default. To enable the old behavior, set ``out_of_bounds="drop"``.