intensity {hydromad} | R Documentation |
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)
DATA |
time-series-like object with columns |
power |
power on rainfall used to estimate effective rainfall. |
maxP |
level of rainfall at which full runoff occurs (effective rainfall == rainfall). |
scale |
constant multiplier of the result, for mass balance.
If this parameter is set to |
return_state |
ignored. |
the simulated effective rainfall, a time series of the same length as the input series.
Felix Andrews felix@nfrac.org
hydromad(sma = "intensity")
to work with models as objects (recommended).
## view default parameter ranges: str(hydromad.options("intensity")) data(HydroTestData) mod0 <- hydromad(HydroTestData, sma = "intensity", routing = "expuh") mod0 ## 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") + layer(panel.lines(fitted(mod1), col = "grey", lwd = 2))