river | R Documentation |
This function identifies river headwater cells based on threshold
values in a topographic index and accumulated area river (generated
using topidx
. Rivers are then traced downslope using a single flow algorithm.
river(DEM,atb,area,res,thatb,tharea)
DEM |
A matrix representing a digital elevation model [m] with equally sized pixels and equal NS and EW resolution |
atb |
Matrix with topographic index values generated by |
area |
Matrix with drainage area values generated by |
res |
Resolution of the digital elevation model (m) |
thatb |
A topographic index threshold for headwater cells |
tharea |
A drainage threshold for headwater cells |
Cells that exceed thatb or tharea in the respective maps are identified as headwater cells. The routine then traces down rivers from these cells based on a D8 algorithm and calculates the distance towards the outlet. Outlets are recognized by sinks, map borders or excluded areas (NA). The subcatch
function can be used to set areas outside the target catchment to NA.
A matrix of the same size as DEM.
Wouter Buytaert, Imperial College London, based on an implementation from the Hydrology Group of Lancaster University
See https://github.com/ICHydro/topmodel for examples.
subcatch
, topidx
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.