Deltares / xugrid

Xarray and unstructured grids
https://deltares.github.io/xugrid/
MIT License
64 stars 8 forks source link

Issue #236 fix indexing in mode method regridding #237

Closed JoerivanEngelen closed 5 months ago

JoerivanEngelen commented 5 months ago

Fixes #236

There was some erroneous indexing going on in regrid.reduce.mode method: the provided indexes were being ignored in some places and instead indexes starting from 0 were generated. This resulted in the method having a tendency to repeat the first value across the target grid. I also added some tests which show the bug being fixed.

Working on updating the changelog.