# \donttest{
#Load example daily meteorological data
data(examplemeteo)
#Load example plot plant data
data(exampleforest)
#Default species parameterization
data(SpParamsMED)
#Define soil with default soil params (4 layers)
examplesoil <- defaultSoilParams(4)
#Initialize control parameters
control <- defaultControl("Granier")
#Initialize input
x <- spwbInput(exampleforest,examplesoil, SpParamsMED, control)
#Call simulation function
S1<-spwb(x, examplemeteo, latitude = 41.82592, elevation = 100)
#Queries the tables in 'Soil'
names(S1$Soil)
#Monthly summary (averages) of soil relative water content
summary(S1, freq="months",FUN=mean, output="RWC")
#Queries the tables in 'Plants'
names(S1$Plants)
#Monthly summary (averages) of plant stress
summary(S1, freq="months",FUN=mean, output="PlantStress",
bySpecies = TRUE)
# }
Run the code above in your browser using DataLab