solarElevation <- 0.67 # in radians
SWR_direct <- 1100
SWR_diffuse <- 300
PAR_direct <- 550
PAR_diffuse <- 150
LAI <- 2
nlayer <- 10
LAIlayerlive <- matrix(rep(LAI/nlayer,nlayer),nlayer,1)
LAIlayerdead <- matrix(0,nlayer,1)
meanLeafAngle <- 60 # in degrees
sdLeafAngle <- 20
beta <- light_leafAngleBetaParameters(meanLeafAngle*(pi/180), sdLeafAngle*(pi/180))
## Extinction coefficients
kb <- light_directionalExtinctionCoefficient(beta["p"], beta["q"], solarElevation)
kd_PAR <- 0.5
kd_SWR <- kd_PAR/1.35
Run the code above in your browser using DataLab