uxarray.grid.intersections.get_number_of_intersections

uxarray.grid.intersections.get_number_of_intersections#

uxarray.grid.intersections.get_number_of_intersections(arr)#

Return the number of intersection points in a gca intersections result.

Parameters:

arr (iterable of 2 length-3 iterables) – Intersection points from a gca intersections function, e.g. one of: gca_gca_intersection() or gca_const_lat_intersection(). (If numpy array, has shape (2,3). If tuple, contains two length-3 tuples.) NaN values indicate no intersection at that point.

Returns:

Number of non-NaN intersection points (0, 1, or 2).

Return type:

int

References

Chen, H., Ullrich, P. A., Panetta, J., Marsico, D., Hanke, M., Jain, R., Zhang, C., and Jacob, R. L. (2026). Accurate and robust geometric algorithms for regridding on the sphere. Geoscientific Model Development, 19(14), 6545-6570. https://doi.org/10.5194/gmd-19-6545-2026

Chen, H., Ullrich, P. A., and Panetta, J. (2026). Fast and accurate intersections on a sphere. SIAM Journal on Scientific Computing, 48(2), B208-B232. https://doi.org/10.1137/25M1737614