# \donttest{
#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
meteo2002$dates <- 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(exampleforest)
#Default species parameterization
data(SpParamsMED)
#Initialize control parameters
control <- defaultControl("Granier")
#Define soil with default soil params (4 layers)
examplesoil <- defaultSoilParams(4)
#Call simulation function
fd<-fordyn(exampleforest, 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