hydromt.flw.clip_basins#
- hydromt.flw.clip_basins(ds: Dataset, flwdir: FlwdirRaster, xy: Tuple | None, flwdir_name: str = 'flwdir', **kwargs) Dataset [source]#
Clip a dataset to a subbasin.
- Parameters:
ds (
xarray.Dataset
) – Dataset to be clipped, containing flow direction (flwdir_name) dataflwdir (
pyflwdir.FlwdirRaster
) – Flow direction raster objectxy (
tuple
ofarray_like
offloat
, optional) – x, y coordinates of (sub)basin outlet locationsflwdir_name (
str
, optional) – name of flow direction DataArray, by default ‘flwdir’kwargs (
key-word arguments
) – Keyword arguments based to thebasin_map()
method.
- Returns:
clipped dataset
- Return type:
See also
basin_map
,hydromt.RasterDataArray.clip_mask