hydromt.gis.flw.dem_adjust#
- hydromt.gis.flw.dem_adjust(da_elevtn: DataArray, da_flwdir: DataArray, *, da_rivmsk: DataArray | None = None, flwdir: FlwdirRaster | None = None, connectivity: int = 4, river_d8: bool = False) DataArray [source]#
Return hydrologically conditioned elevation.
The elevation is conditioned to D4 (connectivity=4) or D8 (connectivity=8) flow directions based on the algorithm described in Yamazaki et al. [1]
The method assumes the original flow directions are in D8. Therefore, if connectivity=4, an intermediate D4 conditioned elevation raster is derived first, based on which new D4 flow directions are obtained used to condition the original elevation.
- Parameters:
da_elevtn (
xr.DataArray
) – elevation [m+REF] D8 flow directions [-] binary river mask [-], optionalda_flwdir (
xr.DataArray
) – elevation [m+REF] D8 flow directions [-] binary river mask [-], optionalda_rivmsk (
xr.DataArray
) – elevation [m+REF] D8 flow directions [-] binary river mask [-], optionalflwdir (
pyflwdir.FlwdirRaster
, optional) – D8 flow direction raster object. If None it is derived on the fly from da_flwdir.connectivity (
{4, 8}
) – D4 or D8 flow connectivity.river_d8 (
bool
) – If True and connectivity==4, additionally condition river cells to D8. Requires da_rivmsk.logger (
logger object
, optional) – The logger object used for logging messages. If not provided, the default logger will be used.
- Returns:
Dataset with hydrologically adjusted elevation (‘elevtn’) [m+REF]
- Return type:
xr.Dataset
References
See also
pyflwdir.FlwdirRaster.dem_adjust
,pyflwdir.FlwdirRaster.dem_dig_d4