uxarray.UxDataArray.subset.constant_latitude#
- UxDataArray.subset.constant_latitude(lat, inverse_indices=False)#
Extracts a subset of the data array across a line of constant-latitude.
- Parameters:
lat (float) – The latitude at which to extract the subset, in degrees. 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 new UxDataArray containing elements that intersect the line of constant latitude.
- Return type:
- Raises:
ValueError – If no intersections are found at the specified longitude or the data variable is not face-centered.
Examples
>>> # Extract data at 15.5°S latitude >>> cross_section = uxda.cross_section.constant_latitude(lat=-15.5)