Clips, pre-processes and calculates or determines all input data related to the digital elevation model (DEM) in the broader sense: acc_inf, cha, dem, dir_inf, rds, slp_inf, and wsh.
Requires the WhiteboxTools binary (whitebox::install_whitebox) to be installed on your computer.
cv_dir: A character vector specifying the desired project root directory (first position).
cs_dem: A character string specifying a path to a potentially large raster digital elevation model.
cs_cha: A character string specifying a path to a potentially large raster providing channels.
sp_msk: A terra::SpatVector providing a somewhat oversized catchment polygon mask used to clip the potentially large input rasters for further processing.
sp_olp: A terra::SpatVector providing the desired catchment outlet point(s).
sp_sds: A terra::SpatVector providing channel source points.
cs_rds: An optional character string specifying a path to a potentially large raster providing roads.
ns_cha: An optional numeric scalar specifying the minimum D8 flow accumulation in number of upslope grid cells determining a channel.
ns_brn: A numeric scalar specifying the stream burning step size in m.
is_adj: A numeric scalar specifying how many cells adjacent to channels shall be burnt.
is_ths: An integer scalar specifying the number of threads to use for processing, where applicable.
ls_mD8: A logical scalar specifying if D8 flow directions shall be mimicked, i.e. the D-infinity flow directions are rounded to the nearest multiple of 45 degrees. Please note that this treatment is always applied to channel cells independently of this argument.
ls_tmp: A logical scalar specifying if the temporary files created during computation shall be kept.
Returns
A two column numeric matrix specifying one or more catchment outlet coordinates and side effects in the form of raster files.
Details
This function applies the following (pre-processing) steps to ensure hydrologic consistency of the generated input data:
Stream burning and orientation of cells adjacent to channel cells approximately into the direction of channel cells (no effect with ns_brn = 0).
Depression breaching.
Tracing of downslope flowpaths from the provided channel sources.
When roads are provided, they are considered as flow obstacles breaking the continuity of the calculated flow accumulations.
ns_cha can be used to enhance the channel network obtained by the tracing of downslope flowpaths from the provided channel sources.
dem represents the breached DEM with reversed stream burning if applicable. The basis for the calculation of the D-infinity slopes provided by slp_inf, however, is the original DEM.
Lindsay, J.B., 2016. Efficient hybrid breaching-filling sink removalmethods for flow path enforcement in digital elevation models.Hydrological Processes 30, 846–857. https://doi.org/10.1002/hyp.10648
Tarboton, D.G., 1997. A new method for the determination of flowdirections and upslope areas in grid digital elevation models. WaterResour. Res. 33, 309–319. https://doi.org/10.1029/96WR03137