processing.select.select_region#
- select_region(ds: Dataset, region: str)[source]#
Selects a specific geographical region from an xarray Dataset based on given region bounds.
- Parameters:
ds (xr.Dataset) – The input xarray Dataset from which to select the region.
region (str) – The name of the region to select. This should correspond to a key in the region_bounds dictionary, which defines the latitude and longitude bounds
- Returns:
A new xarray Dataset containing only the data within the specified region.
- Return type:
xr.Dataset
Examples
>>> ds_region = select_region(ds, 'europe')