# NOT RUN {
# Landcover and soils are fairly homogenous throughout the Brompton catchment.
# Due to the extensive artifical sybsurface drainage discharging directly into
# the channel it is hypothesied that the storm response is largely mostly controlled
# by proximity to the network. A simple discretisation according to flow distance
# from the nearest channel thus appears to capture the dynamics without introducing
# unnecessary complexity.
# }
# NOT RUN {
require(dynatopmodel)
data(brompton)
chans <- build_chans(brompton$dem, drn=brompton$drn, chan.width=2)
sort by distance from the channel network, but want areas closest the channel to come first
layers <- addLayer(brompton$dem, 2000-brompton$flowdists)
disc <- discretise(layers, cuts=c(flowdists=10), chans=chans, area.thresh=0.5/100)
rm(chans)
rm(layers)
write.table(disc$groups, sep="\t", row.names=FALSE)
# }
Run the code above in your browser using DataLab