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

  • flwdir (pyflwdir.FlwdirRaster) – Flow direction raster object

  • xy (tuple of array_like of float, optional) – x, y coordinates of (sub)basin outlet locations

  • flwdir_name (str, optional) – name of flow direction DataArray, by default ‘flwdir’

  • kwargs (key-word arguments) – Keyword arguments based to the basin_map() method.

Returns:

clipped dataset

Return type:

xarray.Dataset

See also

basin_map, hydromt.RasterDataArray.clip_mask