uxarray.grid.integrate._get_zonal_faces_weight_at_constLat#
- uxarray.grid.integrate._get_zonal_faces_weight_at_constLat(faces_edges_cart, latitude_cart, face_latlon_bound, is_directed=False, is_latlonface=False, is_face_GCA_list=None)#
Utilize the sweep line algorithm to calculate the weight of each face at a constant latitude.
Parameters
- latitude_cartfloat
The latitude in Cartesian coordinates (The normalized z coordinate)
- face_latlon_boundnp.ndarray
The list of latitude and longitude bounds of faces. Shape: (n_faces,2, 2), […,[lat_min, lat_max], [lon_min, lon_max],…]
- is_directedbool, optional (default=False)
If True, the GCA is considered to be directed, which means it can only from v0–>v1. If False, the GCA is undirected, and we will always assume the small circle (The one less than 180 degree) side is the GCA.
- is_latlonfacebool, 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.
- is_face_GCA_listnp.ndarray, optional (default=None)
A list of boolean values that indicates if the edge in that face is a GCA. Shape: (n_faces,n_edges). True means edge face is a GCA. False mean this edge is a constant latitude. If None, all edges are considered as GCA. This attribute will overwrite the is_latlonface attribute.
- Returns:
weights_df – A DataFrame with the calculated weights of each face. The DataFrame has two columns: - ‘face_index’: The index of the face (integer). - ‘weight’: The calculated weight of the face in radian (float). The DataFrame is indexed by the face indices, providing a mapping from each face to its corresponding weight.
- Return type: