# NOT RUN {
#Load example daily meteorological data
data(examplemeteo)
#Load example plot plant data
data(exampleforestMED)
#Default species parameterization
data(SpParamsMED)
#Initialize soil with default soil params (4 layers)
examplesoil1 = soil(defaultSoilParams(4))
#Initialize control parameters
control = defaultControl("Granier")
#Initialize input
x1 = forest2spwbInput(exampleforestMED,examplesoil1, SpParamsMED, control)
# Modify Z50 and Z95 of cohort T1_54
x1m <- modifyInputParams(x1, c("T1_54/Z50" = 200, "T1_54/Z95" = 2000))
# Inspect original and modified objects
x1$below
x1m$below
# Inspect dependencies: fine root distribution across soil layers
x1$belowLayers$V
x1m$belowLayers$V
# Modify rock fragment content and sand proportion of soil layer 1
x1s <- modifyInputParams(x1, c("rfc@1" = 5, "sand@1" = 10))
# Inspect original and modified soils
x1$soil
x1s$soil
# When modifying growth input objects dependencies increase
x1 = forest2growthInput(exampleforestMED,examplesoil1, SpParamsMED, control)
customParams = c("T1_54/Al2As" = 2000, "T1_54/LAI_live" = 2)
x1m <- modifyInputParams(x1, customParams)
# }
Run the code above in your browser using DataLab