# NOT RUN {
#Load example daily meteorological data
data(examplemeteo)
#Load example plot plant data
data(exampleforest)
#Default species parameterization
data(SpParamsMED)
#Initialize soil with default soil params
examplesoil = soil(defaultSoilParams())
#Call simulation function
S1<-swb(forest2swbInput(exampleforest,SpParamsMED, examplesoil$dVec),
examplesoil, examplemeteo)
#Plot results
plot(S1)
#Monthly summary (averages) of soil water balance
summary(S1, freq="months",FUN=mean, output="SoilWaterBalance")
#Simulation with PET calculated with Penman-Monteith
examplesoil = soil(defaultSoilParams())
S2<-swb(forest2swbInput(exampleforest,SpParamsMED, examplesoil$dVec, petMode="PenmanMonteith"),
examplesoil, examplemeteo, latitude = 0.73,
elevation = 100, petMode="PenmanMonteith")
#Simulation with transpiration calculated using Sperry & Love
examplesoil = soil(defaultSoilParams())
S3<-swb(forest2swbInput(exampleforest,SpParamsMED, examplesoil$dVec, hydraulicMode="Sperry"),
examplesoil, examplemeteo, hydraulicMode="Sperry")
#Simulation with PET calculated using PenmanMonteiht
#and transpiration calculated using Sperry & Love
examplesoil = soil(defaultSoilParams())
S4<-swb(forest2swbInput(exampleforest,SpParamsMED, examplesoil$dVec,
petMode = "PenmanMonteith", hydraulicMode="Sperry"),
examplesoil, examplemeteo, latitude = 0.73,
elevation = 100, petMode = "PenmanMonteith", hydraulicMode="Sperry")
# }
Run the code above in your browser using DataLab