hydromt_wflow.workflows.subbasins.subbasin_map#

subbasin_map(ds: Dataset, flwdir: FlwdirRaster, method: str, threshold: int, add_outlets_map: bool = False) tuple[DataArray, DataArray | None, GeoDataFrame | None][source]#

Create a subbasin map based on the specified method and threshold.

Parameters:
  • ds (xr.Dataset) – Dataset of the hydrological model.

  • flwdir (pyflwdir.FlwdirRaster) – Flow direction raster used for delineation.

  • method (str) – Method for subbasin delineation. One of [‘streamorder’, ‘pfafstetter’, ‘area’]

  • threshold (int) – Threshold value for the selected method. For ‘streamorder’, minimum Strahler order of the streams to delineate subbasins. For ‘pfafstetter’, the Pfafstetter level to delineate subbasins. For ‘area’, the minimum upstream area [km2] to delineate subbasins.

  • add_outlets_map (bool, optional) – If True, also derive an outlets map for the subbasins, by default False.

Returns:

  • da_subbas (xr.DataArray) – DataArray containing the subbasin map.

  • da_outlets (xr.DataArray | None) – DataArray containing the outlets map if add_outlets_map is True, else None.

  • gdf_outlets (gpd.GeoDataFrame | None) – GeoDataFrame containing the outlets points if add_outlets_map is True, else None.

  • ——–

  • pyflwdir.FlwdirRaster.subbasins_streamorder

  • pyflwdir.FlwdirRaster.subbasins_pfafstetter

  • pyflwdir.FlwdirRaster.subbasins_area