Runoff as rainfall to a power. This allows an increasing fraction of runoff
to be generated by increasingly intense/large rainfall events (for
power > 0
). The fraction increases up to a full runoff level at
maxP
.
intensity.sim(DATA, power, maxP = 500, scale = 1, return_state = FALSE)
time-series-like object with columns P
(precipitation)
and Q
(streamflow).
power on rainfall used to estimate effective rainfall.
level of rainfall at which full runoff occurs (effective rainfall == rainfall).
constant multiplier of the result, for mass balance. If this
parameter is set to NA
(as it is by default) in
hydromad
it will be set by mass balance calculation.
ignored.
the simulated effective rainfall, a time series of the same length as the input series.
hydromad(sma = "intensity")
to work with models as
objects (recommended).
## view default parameter ranges:
str(hydromad.options("intensity"))
#> List of 1
#> $ NA: NULL
data(HydroTestData)
mod0 <- hydromad(HydroTestData, sma = "intensity", routing = "expuh")
mod0
#>
#> Hydromad model with "intensity" SMA and "expuh" routing:
#> Start = 2000-01-01, End = 2000-03-31
#>
#> SMA Parameters:
#> lower upper
#> power 0 2
#> maxP 100 1000
#> scale NA NA
#> Routing Parameters:
#> NULL
## simulate with some arbitrary parameter values
mod1 <- update(mod0, power = 1, maxP = 200, tau_s = 10)
## plot results with state variables
testQ <- predict(mod1, return_state = TRUE)
xyplot(cbind(HydroTestData[, 1:2], intensity = testQ))
## show effect of increase/decrease in each parameter
parRanges <- list(power = c(0, 2), maxP = c(100, 500), scale = NA)
parsims <- mapply(
val = parRanges, nm = names(parRanges),
FUN = function(val, nm) {
lopar <- min(val)
hipar <- max(val)
names(lopar) <- names(hipar) <- nm
fitted(runlist(
decrease = update(mod1, newpars = lopar),
increase = update(mod1, newpars = hipar)
))
}, SIMPLIFY = FALSE
)
xyplot.list(parsims,
superpose = TRUE, layout = c(1, NA),
main = "Simple parameter perturbation example"
) +
latticeExtra::layer(panel.lines(fitted(mod1), col = "grey", lwd = 2))