R/MakeSeasLAI.R
make_seasLAI.RdA daily sequence of leaf area index is derived from maximum and minimum values, dates and shape parameters using different methods.
make_seasLAI(
method = "b90",
years,
maxlai,
winlaifrac = 0,
budburst_doy = 121,
leaffall_doy = 279,
emerge_dur = 28,
leaffall_dur = 58,
shp_optdoy = budburst_doy + emerge_dur,
shp_budburst = 0.5,
shp_leaffall = 10,
lai_doy_table = data.frame(lai_doy = c(1, 121, 150, 280, 320, 365), lai_frac = c(0, 0,
0.5, 1, 0.5, 0))
)Name of method for generating the sequence. Must be one of "b90", "linear", "Coupmodel".
Vector of years to be returned.
Maximum leaf are index.
Fraction of maxlai during winter (ignored when
method = 'linear').
Budburst day of year (ignored when method =
'linear').
Day of year when leaf fall begins (ignored when
method = 'linear').
Number of days from budburst until maximum leaf area index is reached.
Number of days until minimum leaf are index is reached.
Day of year when optimum value is reached (required when
method = "Coupmodel").
Shape parameter for the growth phase (required when
method = "Coupmodel").
Shape parameter growth cessation (required when
method = "Coupmodel").
Data.frame with day of year ('doy') and LAI fraction
values ('lai_frac'), required when method = "linear"). Can be
provided as a single data.frame or a list of data.frames with one entry for
each year of the simulation.
A vector of daily lai values covering the years specified.
# Intraannual courses of leaf area index
lai_b90 <- make_seasLAI(method = "b90",
year = 2001,
maxlai = 5,
winlaifrac = 0,
budburst_doy = 121,
leaffall_doy = 280,
emerge_dur = 15,
leaffall_dur = 30)
lai_doy_table <- data.frame(lai_doy = c(1,110,117,135,175,220,250,290,365),
lai_frac = c(0.1,0.1,0.5,0.7,1.2,1.2,1.0,0.1,0.1))
lai_linear <- make_seasLAI(method = "linear",
year = 2001,
maxlai = 5,
lai_doy_table = lai_doy_table)
lai_coupmodel <- make_seasLAI(method = "Coupmodel",
year = 2001,
maxlai = 5,
winlaifrac = 0.05,
budburst_doy = 100,
leaffall_doy = 280,
shp_optdoy = 180,
shp_budburst = 0.5,
shp_leaffall = 5)
plot(lai_b90, type = "n", xlab = "doy", ylab = "lai [m²/m²]", ylim = c(0,6))
lines(lai_b90, col ="green",lwd = 2,)
lines(lai_linear, col ="red",lwd = 2)
lines(lai_coupmodel, col ="blue",lwd = 2)
# incorparating between-year variability
years <- 2002:2004
lai <- make_seasLAI(method = "Coupmodel",
year = years,
maxlai = c(4,6,5),
budburst_doy = c(100,135,121),
leaffall_doy = 280,
shp_budburst = c(3,1,0.3),
shp_leaffall = 3,
shp_optdoy =c(210,180,240) )
dates <- seq.Date(as.Date("2002-01-01"), as.Date("2004-12-31"), by = "day")
plot(dates,lai, col = "green", ylab = "lai [m²/m²]",
type ="l", xlab = "", lwd = 2)
# doy/value-tables
lai_linear1 <- make_seasLAI(method = "linear",
year = years,
maxlai = c(4,6,5),
lai_doy_table = lai_doy_table)
plot(dates,lai_linear1, col = "green", ylab = "lai [m²/m²]",
type ="l", xlab = "", lwd = 2)
# linear interpolation for lists of annual tables
lai_doy_table_l <- list("2002" = data.frame(lai_doy = c(1,90,97,115,155,200,230,270,365),
lai_frac = c(0.1,0.1,0.5,0.7,1.2,1.2,1.0,0.1,0.1)),
"2003" = data.frame(lai_doy = c(1,100,107,125,165,210,240,280,365),
lai_frac = c(0.1,0.1,0.5,0.7,1.2,1.2,1.0,0.1,0.1)),
"2004"= data.frame(lai_doy = c(1,110,117,135,175,220,250,290,365),
lai_frac = c(0.1,0.1,0.5,0.7,1.2,1.2,1.0,0.1,0.1)))
lai_linear2 <- make_seasLAI(method = "linear",
year = years,
maxlai = c(4,6,5),
lai_doy_table = lai_doy_table_l)
lines(dates,lai_linear2, col = "darkgreen", ylab = "lai [m²/m²]",
type ="l", xlab = "", lwd = 2)