Skip to content

Test get_faces_containing_point for unstructured grid search #2103

@fluidnumerics-joe

Description

@fluidnumerics-joe

The uxarray team has added the get_faces_containing_point function that has been suggested for us to try it out in Parcels.

Currently, the UXArray spatial hashing API does not support crossing the antimeridian and fails for elements that are colinear in lat/lon space. Using get_faces_containing_point is expected to enable global grid searching (crossing the anti-meridian). It was suggested in a UXArray PR where spatial hashing is being updated

Leveraging the get_faces_containing_point function would remove the need for spatial hash initialization (saving some memory) and would replace the uxgrid.spatial_hash.query call. We would need to implement locally our own barycentric coordinate calculation.

In the spirit of robustness, I would opt for using 3-d cartesian coordinates (on the unit sphere) to compute barycentric coordinates. This would help us cope with global grids and deal with elements that may be colinear in lat-lon (e.g. near polar caps).

For performance, I want to offer barycentric coordinates calculated using lat/lon. This cuts down on the number of computations, but is only suitable when users are running regional grids that do not cross the antimeridian or are away from poles.

Metadata

Metadata

Labels

Type

No type

Projects

Status

Backlog

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions