uxarray.grid.intersections.gca_const_lat_intersection#
- uxarray.grid.intersections.gca_const_lat_intersection(gca_cart, const_z)#
Return the intersection points of a great-circle arc and a latitude.
Dispatcher / convenience API. Runs the numerical kernel, validity masks, endpoint snapping, and packaging into UXarray’s NaN-filled (2, 3) format entirely on scalars, so the only heap allocation is the returned array. All UXarray-specific branching lives here so the numerical core stays uniform. See
_try_gca_const_lat_intersectionfor the array-returning form used by the layer benchmarks.- Parameters:
gca_cart (numpy.ndarray) – Great-circle arc as two Cartesian endpoints, shape
(2, 3).const_z (float) – Constant-latitude plane, given as the Cartesian z value
sin(lat).
- Returns:
Intersection points, shape
(2, 3), with unused rows filled with NaN (0, 1, or 2 valid rows).- Return type:
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