-
-
Save willirath/992aed88cd24800d83a0097f6f0e9ded to your computer and use it in GitHub Desktop.
Nice! We should add more concrete examples like that in the docs.
I think this example can also serve as a tool for thinking about possible additions to the Xoak API:
-
The nearest-neighbor-lookup I've used here is not very realistic as we'd usually like to go for different ways of interpolating the data. While offering different interpolation schemes is beyond the scope of Xoak (I think), looking up the indices of nearest neighbours (possibly with multiple neighbours and their distances?) would fit into Xoak.
-
The Lagrangian simulations usually chose small time steps that ensure only very little movement. Hence, there's two possible routes for optimization: (A) Many of the queries would be unnecessary as the nearest neighbours of many of the particles would not have changed. (B) If the underlying index provides a way of doing this, starting from the formerly known nearest neighbour could greatly speed up the query.
For more context, point 3. from @rabernat's comment on how Parcels could benefit from Xarray integration is also relevant.
@benbovy Fun with Xoak.