pyflwdir.FlwdirRaster.floodplains#
- FlwdirRaster.floodplains(elevtn: ndarray, uparea: ndarray | None = None, upa_min: float = 1000, b: float = 0.3) ndarray[source]#
Identify floodplain cells using an upstream-area-scaled HAND threshold.
Cells with upstream area at least upa_min define the drainage network. For each such cell, the HAND threshold is its upstream area raised to b. Upstream cells are included when their elevation above the downstream drainage cell does not exceed that threshold.
Nardi, F. et al (2019). GFPLAIN250m, a global high-resolution dataset of Earth’s floodplains. Scientific Data, 6(1), 180309. https://doi.org/10.1038/sdata.2018.309
- Parameters:
elevtn (2D array of float) – Elevation raster [m].
uparea (2D array of float, optional) – Upstream-area raster [km2]. Calculated on the fly if omitted.
b (float, optional) – Exponent in the area-scaling relationship, by default 0.3.
upa_min (float, optional) – Minimum upstream-area threshold for drainage cells [km2], by default 1000.
- Returns:
Floodplain mask: 1 for floodplain cells, 0 for valid non-floodplain cells, and -1 for no-data cells.
- Return type:
2D array of int8