# NOT RUN {
#Load example plot plant data
data(exampleforest)
#Default species parameterization
data(SpParamsMED)
#Initialize soil with default soil params
S = soil(defaultSoilParams())
#Calculate conic root system for trees
V1 = root.conicRS(Z=rep(2000,nrow(exampleforest$treeData)), S$dVec)
print(V1)
#Calculate LDR root system for trees (Schenck & Jackson 2002)
V2 = root.ldrRS(Z50 = rep(200,nrow(exampleforest$treeData)),
Z95 = rep(1000,nrow(exampleforest$treeData)), S$dVec)
print(V2)
#Plot LDR root systems (31 layers of 5 mm each)
P = root.ldrProfile(c(100,500), c(200,1500), rep(50, 31))
matplot(x=t(P), y=seq(0,1500, by=50), type="l", xlim=c(0,0.5), ylim=c(1500,0), ylab = "Depth (mm)",
xlab="Root density")
legend("bottomright", legend=c("Z50 = 100, Z95 = 200",
"Z50 = 200, Z95 = 1500"), col=c("black","red"), lty=1:2, bty="n")
# }
Run the code above in your browser using DataLab