uxarray.grid.integrate._get_faces_constLat_intersection_info

uxarray.grid.integrate._get_faces_constLat_intersection_info#

uxarray.grid.integrate._get_faces_constLat_intersection_info(face_edges_cart, latitude_cart, is_GCA_list, is_latlonface, is_directed)#

Processes each edge of a face polygon in a vectorized manner to determine overlaps and calculate the intersections for a given latitude and the faces.

Parameters:#

face_edges_cartnp.ndarray

A face polygon represented by edges in Cartesian coordinates. Shape: (n_edges, 2, 3).

latitude_cartfloat

The latitude in Cartesian coordinates to which intersections or overlaps are calculated.

is_GCA_listnp.ndarray or None

An array indicating whether each edge is a GCA (True) or a constant latitude line (False). Shape: (n_edges). If None, the function will determine edge types based on is_latlonface.

is_latlonfacebool

Flag indicating if all faces are considered as lat-lon faces, meaning all edges are either constant latitude or longitude lines. This parameter overwrites the is_GCA_list if set to True.

is_directedbool

Flag indicating if the GCA should be considered as directed (from v0 to v1). If False, the smaller circle (less than 180 degrees) side of the GCA is used.

Returns:#

tuple

A tuple containing: - intersections_pts_list_cart (list): A list of intersection points where each point is where an edge intersects with the latitude. - overlap_flag (bool): A boolean indicating if any overlap with the latitude was detected. - overlap_edge (np.ndarray or None): The edge that overlaps with the latitude, if any; otherwise, None.