# NOT RUN {
require(dynatopmodel)
data(brompton)
# Examine the November 2012 event that flooded the village (see Metcalfe et al., 2017)
sel <- "2012-11-23 12:00::2012-12-01"
# Precalculated discretisation
disc <- brompton$disc
groups <- disc$groups
rain <- brompton$rain[sel]
# to 15 minute intervals
rain <- disaggregate_xts(rain, dt = 15/60)
# Reduce PE, seems a bit on high side and resulted in a weighting factor for the rainfall
pe <- brompton$pe[sel]/2
qobs <- brompton$qobs[sel]
# Here we apply the same parameter values to all groups.
# we could also consider a discontinuity at the depth of subsurface drains (~1m)
# or in areas more remote from the channel that do not contribute fast subsurface
# flow via field drainage
groups <- disc$groups
groups$m <- 0.0044
# Simulate impermeable clay soils
groups$td <- 33
groups$ln_t0 <- 1.15
groups$srz_max <- 0.1
qobs <- brompton$qobs[sel]
qt0 <- as.numeric(qobs[1,])
# initial root zone storage - almost full due to previous event
groups$srz0 <- 0.98
# Quite slow channel flow, which might be expected with the shallow and reedy
# low bedslope reaches with very rough banks comprising the major channel
groups$vchan <- 400
groups$vof <- 50
# Rain is supplied at hourly intervals: convert to 15 minutes
rain <- disaggregate_xts(rain, dt = 15/60)
weights <- disc$weights
# Output goes to a new window
graphics.off()
x11()
# Initial discharge from the observations
qt0 <- as.numeric(qobs[1,])
# Run the model across the November 2012 storm event
# using a 15 minute interval
run <- run.dtm(groups=groups,
weights=weights,
rain=rain,
pe=pe,
qobs=qobs,
qt0=qt0,
routing=brompton$routing,
graphics.show=TRUE, max.q=2.4)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab