# NOT RUN {
# weather data
f <- system.file("extdata/Netherlands_Swifterbant.csv", package="meteor")
w <- read.csv(f)
w$date <- as.Date(w$date)
crop <- wofost_crop("barley")
soil <- wofost_soil("ec1")
contr <- wofost_control()
contr$modelstart <- as.Date("1980-02-06")
contr$latitude=52.57
contr$elevation=50
# create model
m <- wofost_model(crop, w, soil, contr)
# run model
x <- run(m)
plot(x[,"date"], x[, "LAI"], cex=.5)
# make a change
m$control$modelstart = as.Date("1980-02-20")
# run model again
y <- run(m)
lines(y[,"date"], y[, "LAI"], col="red")
# change the crop
crop(m) <- wofost_crop("potato_704")
p <- run(m)
lines(p[,"date"], p[, "LAI"], col="blue")
# }
Run the code above in your browser using DataLab