easy_vic_build.tools.hydroanalysis_func.hydroanalysis_wbw.flow_direction

Flow-direction utilities for conditioned DEM rasters.

Functions

d8_flowdirection(wbe, filled_dem[, output_file])

Calculate D8 flow direction from a hydrologically conditioned DEM.

easy_vic_build.tools.hydroanalysis_func.hydroanalysis_wbw.flow_direction.d8_flowdirection(wbe, filled_dem, output_file='flow_direction.tif', **kwargs)[source]

Calculate D8 flow direction from a hydrologically conditioned DEM.

Parameters:
  • wbe (WbEnvironment) – WhiteboxTools workflow environment instance

  • filled_dem (WbRaster) – Path to filled DEM raster file or WbRaster object. Must be hydrologically conditioned (depressions filled and flats resolved)

  • output_file (str, optional) – Output file path for flow direction raster (default=”flow_direction.tif”)

  • **kwargs (dict, optional) –

    Additional parameters for d8_pointer:

    • esri_pointerbool, optional

      Whether to use ESRI-style flow direction encoding (default=True)

    • num_procsint, optional

      Number of processors to use for calculation

Returns:

Flow-direction raster written to output_file and returned.

Return type:

WbRaster

Notes

The input DEM should be depression-filled before calling this function.