hydromad {hydromad} | R Documentation |
The hydromad
function can be used to specify models with their
model equations, data, parameters and settings. It allows a general
two-component structure, where the Soil Moisture Accounting
(sma
) component and the Routing (routing
) component can
be arbitrary functions. A method can be specified for fitting the
dependent routing component.
hydromad(DATA = zoo(), ..., sma = hydromad.getOption("sma"), routing = hydromad.getOption("routing"), rfit = NULL, warmup = hydromad.getOption("warmup"))
DATA |
a
|
... |
values or ranges for named parameters. Any parameters not given here
will be taken from defaults given in |
sma |
name of the Soil Moisture Accounting (SMA) component. May be
|
routing |
name of the routing component (i.e. the component which takes in
effective rainfall from |
rfit |
optional specification for fitting the routing component. If a
character string is given, then a corresponding function
routing |
warmup |
warmup period in number of time steps. |
The hydromad()
function allows models to be specified with
the given component models and parameter specifications. The resulting
object can later be modified using the
update
method using the same syntax.
Methods for working with the model objects are listed under
hydromad.object
.
For a tutorial, type
vignette("tutorial", package = "hydromad")
.
For an overview of the package, see the paper
vignette("hydromad_paper")
.
For a list of the package functions with their help pages, see the website http://hydromad.catchment.org/.
the result from hydromad()
is a
hydromad object.
Felix Andrews felix@nfrac.org
F.T. Andrews, B.F.W. Croke and A.J. Jakeman (2011). An open software environment for hydrological model assessment and development. Environmental Modelling and Software 26 (2011), pp. 1171-1185. http://dx.doi.org/10.1016/j.envsoft.2011.04.006
data(Cotter) x <- Cotter[1:1000] ## IHACRES CWI model with exponential unit hydrograph ## an unfitted model, with ranges of possible parameter values modx <- hydromad(x, sma = "cwi", routing = "expuh", tau_s = c(2,100), v_s = c(0,1)) modx ## now try to fit it fitx <- fitByOptim(modx) fitx summary(fitx) xyplot(fitx, with.P = TRUE, type = c("l", "g")) data(Canning) x <- window(Canning, start = "1980-01-01", end = "1982-01-01") xyplot(x) ## IHACRES CWI model with extra parameter l ## Fixed UH (fit once) by inverse method ## an unfitted model, with ranges of possible parameter values mod0 <- hydromad(x, sma = "cwi", l = c(0, 100), routing = "armax", rfit = list("inverse", order = c(1,1))) mod0 ## now try to fit the free parameters fit1 <- fitByOptim(mod0) fit1 summary(fit1) xyplot(fit1)