# Compare diffuse only to direct only
run_dir <- runYplant(pilularis, fbeam=1, altitude=90, azimuth=0, reflec=0.15, transmit=0.1)
run_diff <- runYplant(pilularis, fbeam=0, reflec=0.15, transmit=0.1)
# Compare density functions of absorbed PAR by leaf:
plot(density(run_dir$PARleaf, from=0, to=1), xlim=c(0,1), main="", lwd=2, col="blue",
xlab="Absorbed PAR (relative units)")
lines(density(run_diff$PARleaf, from=0, to=1), lwd=2, col="red")
legend("topright",c("Diffuse","Direct"), lwd=2, col=c("red","blue"))Run the code above in your browser using DataLab