pyflwdir.FlwdirRaster.subbasins_pfafstetter#

FlwdirRaster.subbasins_pfafstetter(depth=1, uparea=None, upa_min=0.0)[source]#

Returns the pfafstetter subbasins.

Parameters:
  • depth (int, optional) – Number of pfafstetter layers, by default 1.

  • uparea (2D array of float, optional) – 2D raster with upstream area, by default None; calculated on the fly.

  • upa_min (float, optional) – Minimum upstream area threshold for subbasins, by default 0.0.

Returns:

  • subbas (2D array of int32) – subbasin map with pfafstetter coding

  • idxs_out (1D array of int) – linear indices of subbasin outlet cells