wofost_model: WOFOST crop growth model

Description Usage Arguments Details Value References Examples

View source: R/wofost.R

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

1
2
3
4
5
6
7
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. stopError(logica). If an error occurs and stopError is TRUE, and error message is given. Otherwise, a warning is given and some simulation data (up till when the error occurred) may be returned

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 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")

Rwofost documentation built on Oct. 1, 2021, 5:07 p.m.