#Load example daily meteorological data
data(examplemeteo)
#Load example plot plant data
data(exampleforest)
#Default species parameterization
data(SpParamsMED)
#Define soil parameters
examplesoil <- defaultSoilParams(4)
# Day to be simulated
d <- 100
meteovec <- unlist(examplemeteo[d,-1])
date <- as.character(examplemeteo$dates[d])
#Simulate water balance one day only (Granier mode)
control <- defaultControl("Granier")
x1 <- spwbInput(exampleforest,examplesoil, SpParamsMED, control)
sd1 <- spwb_day(x1, date, meteovec,
latitude = 41.82592, elevation = 100, slope=0, aspect=0)
#Simulate water balance for one day only (Sperry mode)
control <- defaultControl("Sperry")
x2 <- spwbInput(exampleforest, examplesoil, SpParamsMED, control)
sd2 <-spwb_day(x2, date, meteovec,
latitude = 41.82592, elevation = 100, slope=0, aspect=0)
#Plot plant transpiration (see function 'plot.swb.day()')
plot(sd2)
#Simulate water balance for one day only (Sureau mode)
control <- defaultControl("Sureau")
x3 <- spwbInput(exampleforest, examplesoil, SpParamsMED, control)
sd3 <-spwb_day(x3, date, meteovec,
latitude = 41.82592, elevation = 100, slope=0, aspect=0)
#Simulate water and carbon balance for one day only (Granier mode)
control <- defaultControl("Granier")
x4 <- growthInput(exampleforest,examplesoil, SpParamsMED, control)
sd4 <- growth_day(x4, date, meteovec,
latitude = 41.82592, elevation = 100, slope=0, aspect=0)
Run the code above in your browser using DataLab