uxarray.UxDataArray.subset.constant_longitude

uxarray.UxDataArray.subset.constant_longitude#

UxDataArray.subset.constant_longitude(lon, inverse_indices=False)#

Extracts a subset of the data array across a line of constant-longitude.

Parameters:
  • lon (float) – The longitude at which to extract the subset, in degrees. Must be between -180.0 and 180.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 longitude.

Return type:

uxarray.UxDataArray

Raises:

ValueError – If no intersections are found at the specified longitude or the data variable is not face-centered.

Examples

>>> # Extract data at 0° longitude
>>> cross_section = uxda.cross_section.constant_longitude(lon=0.0)