uxarray.UxDataArray.subset.bounding_box#
- UxDataArray.subset.bounding_box(lon_bounds, lat_bounds, element='nodes', method='coords', **kwargs)#
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