Description Usage Arguments Value References Examples
LINTUL1 is a relatively simple crop growth simulation model. It computes potential production.
1 2 3 4 5 6 7 8 9 10 | lintul1(crop, control, weather)
lintul1_crop()
## S4 replacement method for signature 'Rcpp_Lintul1Model'
crop(x)<-value
## S4 replacement method for signature 'Rcpp_Lintul1Model'
control(x)<-value
## S4 replacement method for signature 'Rcpp_Lintul1Model'
weather(x)<-value
## S4 method for signature 'Rcpp_Lintul1Model'
run(x, ...)
|
x |
Rcpp_Lintul1Model object |
crop |
list with named crop parameters. See Details. An example is returned by |
control |
list with named control parameters |
weather |
data.frame with daily weather data |
value |
a list with crop or control parameters, or a data.frame with weather data. As above |
... |
additional arguments. None implemented |
matrix
Spitters, C.J.T. and A.H.C.M. Schapendonk, 1990. Evaluation of breeding strategies for drought tolerance in potato by means of crop growth simulation. Plant and Soil 123: 193-203.
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | library(Rlintul)
w <- example_weather()
crop <- lintul1_crop()
contr <- list(emergence=as.Date('2012-04-01'), maxdur=200)
m <- lintul1(crop, contr, w)
# or
m <- lintul1()
crop(m) <- crop
control(m) <- contr
weather(m) <- w
x <- run(m)
head(x)
# or
m$run()
m
# change parameters
m$crop$RUE <- 3.5
m$control$emergence=as.Date('2012-04-01')
m$run()
out <- m$out
out
date <- as.Date(m$control$emergence, origin="1970-01-01") + out$step
par(mfrow=c(1,2))
plot(date, out$LAI)
prod <- cbind(out$WRT, out$WLV, out$WST, out$WSO)
wtot <- rowSums(prod)
plot(date, wtot, type='l', lwd=2)
lines(date, prod[,2], col='green', lwd=2)
lines(date, prod[,4], col='red', lwd=2)
# test LINTUL1
library(meteor)
library(Rlintul)
f1 <- system.file("lintul/test/1/res.dat", package="Rlintul")
s <- readLIN1output(f1)
f2 <- system.file("extdata/Netherlands_Wageningen.csv", package="meteor")
wth <- read.csv(f2)
wth$date <- as.Date(wth$date)
wth$srad <- wth$srad / 1000
crop <- lintul1_crop()
sdate <- dateFromDoy(58, 1971)
contr <- list(emergence=sdate+2, start = sdate, maxdur=365)
x <- run(lintul1(crop, contr, wth))
x$DOY <- doyFromDate(x$date)
plot(s[,'TIME'], s[,'LAI'], type='l')
points(x[, 'DOY'], x[, 'LAI'])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.