uxarray.UxDataArray.subset.constant_latitude_interval#
- UxDataArray.subset.constant_latitude_interval(lats, inverse_indices=False)#
Extracts a subset of data by selecting all faces that are within a specified latitude interval.
- Parameters:
lats (Tuple[float, float]) – The latitude interval (min_lat, max_lat) at which to extract the subset, in degrees. Values must be between -90.0 and 90.0
inverse_indices (Union[List[str], Set[str], bool], optional) – Controls storage of original grid indices. Options: - True: Stores original face indices - List/Set of strings: Stores specified index types (valid values: “face”, “edge”, “node”) - False: No index storage (default)
- Returns:
A subset of the original data array containing only the faces that intersect with the line of constant latitude.
- Return type:
- Raises:
ValueError – If no faces are found within the specified latitude interval.
Examples
>>> # Extract data between 30°S and 30°N latitude >>> cross_section = uxda.cross_section.constant_latitude_interval( ... lats=(-30.0, 30.0) ... )