wofost_model {Rwofost} | R Documentation |
WOFOST crop growth model
Description
Create a WOFOST crop growth model object. Trhough this interface, you first create a model object and then you run it. The advantage is that you can easily change single parameters of the model and run the model again.
Usage
wofost_model(crop, weather, soil, control)
run(x, ...)
crop(x) <- value
soil(x) <- value
control(x) <- value
weather(x) <- value
force(x) <- value
Arguments
crop |
list. Crop parameters |
weather |
data.frame with weather data. See Details |
soil |
list. Soil parameters |
control |
list. Model control options |
value |
crop, weather, soil, or control data, as above; or a data.frame for "force" |
x |
WOFOST model |
... |
additiontal arguments. |
Details
The weather data must be passed as a data.frame with the following variables and units.
variable | description | class / unit | |
date | "Date" class variable | - | |
srad | Solar radiation | kJ m-2 day-1 | |
tmin | Minimum temperature | degrees C | |
tmax | Maximum temperature | degrees C | |
vapr | Vapor pressure | kPa | |
wind | Wind speed | m s-1 | |
prec | Precipitation | mm day-1 | |
Note that there should not be any time gaps between the days in the data.frame
Value
WofostModel object
References
Van Diepen, C.A., J. Wolf, and H van Keulen, 1989. WOFOST: a simulation model of crop production. Soil Use and Management, 5: 16-24
Van Keulen, H. and J. Wolf, 1986. Modelling of agricultural production : weather, soils and crops. http://edepot.wur.nl/168025
Examples
# 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")