uxarray.grid.integrate._get_zonal_face_interval(face_edges_cart, latitude_cart, face_latlon_bound, is_directed=False, is_latlonface=False, is_GCA_list=None)#

Processes a face polygon represented by edges in Cartesian coordinates to find intervals where the face intersects with a given latitude. This function handles directed and undirected Great Circle Arcs (GCAs) and edges at constant latitude.

Requires the face edges to be sorted in counter-clockwise order, and the span of the face in longitude should be less than pi. Also, all arcs/edges length should be within pi.

Users can specify which edges are GCAs and which are constant latitude using is_GCA_list. However, edges on the equator are always treated as constant latitude edges regardless of is_GCA_list.

  • face_edges_cart (np.ndarray) – A face polygon represented by edges in Cartesian coordinates. Shape: (n_edges, 2, 3)

  • latitude_cart (float) – The latitude in cartesian, the normalized Z coordinates.

  • face_latlon_bound (np.ndarray) – The latitude and longitude bounds of the face. Shape: (2, 2), [[lat_min, lat_max], [lon_min, lon_max]]

  • is_directed (bool, optional) – If True, the GCA is considered to be directed (from v0 to v1). If False, the GCA is undirected, and the smaller circle (less than 180 degrees) side of the GCA is used. Default is False.

  • is_latlonface (bool, optional, default=False) –

    A global flag to indicate if faces are latlon face. If True, then treat all faces as latlon faces. Latlon face means That all edge is either a longitude or constant latitude line. If False, then all edges are GCA.

    Default is False. This attribute will overwrite the is_latlonface attribute.

  • is_GCA_list (np.ndarray, optional, default=False) – An array indicating if each edge is a GCA (True) or a constant latitude (False). Shape: (n_edges,). If None, all edges are considered as GCAs. Default is None.


Intervals_df – A DataFrame containing the intervals stored as pandas Intervals for the face. The columns of the DataFrame are: [‘start’, ‘end’]

Return type: