if (FALSE) {
#Load example daily meteorological data
data(examplemeteo)
#Prepare a two-year meteorological data with half precipitation during
#the second year
meteo2001 = examplemeteo
meteo2002 = examplemeteo
meteo2002$Precipitation = meteo2002$Precipitation/2
row.names(meteo2002) = seq(as.Date("2002-01-01"),
as.Date("2002-12-31"), by="day")
meteo_01_02 = rbind(meteo2001, meteo2002)
#Load example plot plant data
data(exampleforestMED)
#Default species parameterization
data(SpParamsMED)
#Initialize control parameters
control = defaultControl("Granier")
#Initialize soil with default soil params (4 layers)
examplesoil = soil(defaultSoilParams(4))
#Call simulation function
fd<-fordyn(exampleforestMED, examplesoil,
SpParamsMED, meteo_01_02, control,
latitude = 41.82592, elevation = 100)
#Stand-level summaries
fd$StandSummary
#Tree table by annual steps
fd$TreeTable
#Dead tree table by annual steps
fd$DeadTreeTable
}
Run the code above in your browser using DataLab