Deltares / xugrid

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

Add a reindex_like (or reorder_like) #153

Closed Huite closed 1 year ago

Huite commented 1 year ago

Topologies may be equivalent, but with a different ordering. A method to reorder data to another equivalent topology would be useful in this regard.

Also in support of #152.

Huite commented 1 year ago

Ideally this can be done with just a number, in that case it's essentially just an isel operation -- and this would already work.

However, given two (2D) topologies, it is also possible to derive the original ordering and derive an index for the second topology.