hydromt.flw.dem_adjust#

hydromt.flw.dem_adjust(da_elevtn: ~xarray.core.dataarray.DataArray, da_flwdir: ~xarray.core.dataarray.DataArray, da_rivmsk: ~xarray.core.dataarray.DataArray | None = None, flwdir: ~pyflwdir.pyflwdir.FlwdirRaster | None = None, connectivity: int = 4, river_d8: bool = False, logger=<Logger hydromt.flw (WARNING)>) 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 [-], optional

  • da_flwdir (xr.DataArray) – elevation [m+REF] D8 flow directions [-] binary river mask [-], optional

  • da_rivmsk (xr.DataArray) – elevation [m+REF] D8 flow directions [-] binary river mask [-], optional

  • flwdir (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