uxarray.UxDataArray.subset.bounding_box

uxarray.UxDataArray.subset.bounding_box#

UxDataArray.subset.bounding_box(lon_bounds, lat_bounds, inverse_indices=False)#

Subsets an unstructured grid between two latitude and longitude points which form a bounding box.

A bounding box may span the antimeridian, when the pair of longitude points is given in descending order ( i.e. the first longitude point is greater than the second).

Parameters:
  • lon_bounds (tuple, list, np.ndarray) – (lon_left, lon_right) where lon_left < lon_right when the bounding box does not span the antimeridian, otherwise lon_left > lon_right, both between [-180, 180]

  • lat_bounds (tuple, list, np.ndarray) – (lat_bottom, lat_top) where lat_top > lat_bottom and between [-90, 90]

  • method (str) – Bounding Box Method, currently supports ‘coords’, which ensures the coordinates of the corner nodes, face centers, or edge centers lie within the bounds.

  • element (str) – Element for use with coords comparison, one of nodes, face centers, or edge centers

  • 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)