1 | InitializeState(stand, site, parms)
|
stand |
|
site |
|
parms |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (stand, site, parms)
{
names.state <- c("Year", "Month", "t", "hdom", "N", "G",
"dg", "Vu", "LAI", "Wl", "Wr", "Wsbr", "rotation", "cycle",
"Nharv", "rm.sprouts", "Ww", "Wb", "Wbr", "Wa", "W",
"wsbrg", "ASW", "Wlitt", "RAD.day", "RAD", "CanCover",
"lightIntcptn", "phi.p", "phi.pa", "fT", "fF", "fCalpha",
"fN", "fAge", "fVPD", "fSW", "PhysMod", "alphaC", "GPP",
"NPP", "RainIntcptn", "netRad", "fCg", "CanCond", "Etransp",
"CanTransp", "Transp", "EvapTransp", "excessSW", "scaleSW",
"pR", "pFS", "pS", "pF", "difWl", "difWr", "difWsbr",
"Littfall", "difLitter", "difRoots", "TotalLitter", "Ndead",
"Wdl", "Wds", "Wdr")
.length.state.vec <- length(names.state)
state.vector <- rep(NA, .length.state.vec)
names(state.vector) <- names.state
state.init <- state.vector
state.init[names(stand)] <- stand
state.init["ASW"] <- site[["ASW"]]
if (state.init[["t"]] == 0) {
state.init <- CreateNewPlantation(state = state.init,
parms = parms)
}
return(state.init)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.