#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
x1 <- spwbInput(exampleforest,examplesoil, SpParamsMED, control)
# Transpiration according to Granier's model, plant water potential
# and plant stress for a given day
t1 <- transp_transpirationGranier(x1, examplemeteo, 1,
latitude = 41.82592, elevation = 100, slope = 0, aspect = 0,
modifyInput = FALSE)
#Switch to 'Sperry' transpiration mode
control <- defaultControl("Sperry")
#Initialize input
x2 <- spwbInput(exampleforest,examplesoil, SpParamsMED, control)
# Transpiration according to Sperry's model
t2 <- transp_transpirationSperry(x2, examplemeteo, 1,
latitude = 41.82592, elevation = 100, slope = 0, aspect = 0,
modifyInput = FALSE)
#Switch to 'Sureau' transpiration mode
control <- defaultControl("Sureau")
#Initialize input
x3 <- spwbInput(exampleforest,examplesoil, SpParamsMED, control)
# Transpiration according to Sureau model
t3 <- transp_transpirationSureau(x3, examplemeteo, 1,
latitude = 41.82592, elevation = 100, slope = 0, aspect = 0,
modifyInput = FALSE)
Run the code above in your browser using DataLab