-
Notifications
You must be signed in to change notification settings - Fork 169
Open
Labels
Description
To enable indexing and interpolation, we need to (with respect to the tracer cells) provide:
XGrid.search: finds the tracer cell that the particle lives in, and its position in barycentric coordinatesXGrid.ravelandXGrid.unravelconvert to and fromeiand the tracer cells index
Details:
- Update init to require longitude and latitude arrays are provided as coordinates
- lon and lat arrays need to have dimensions that are axis directions on the F-points (i.e., not "center" in xgcm world)
- create index searching methods that work for 1D and 2D lon, lat arrays
- 1D: Simple argmin() calls (as done in the v3 codebase)
- 2D: Can check every cell to see if the point is inside (similar to what is done in the unstructured case). I was initially thinking we could do some performance optimisation by constructing larger quads and then binary searching down, but I concluded that this wouldn't work in the general case. This can be left for further improvement if the need arrises.
- I'll also look at the v3 code to see if there's any inspiration I should take from there
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog
Status
Backlog