Generates a soil profile that can then replace the existing one in an ‘.apsimx’ or ‘.apsim’ simulation file
plotting function for a soil profile, it requires ‘ggplot2’
checking an apsimx soil profile for reasonable values
apsimx_soil_profile(
nlayers = 10,
Depth = NULL,
Thickness = NULL,
BD = NULL,
AirDry = NULL,
LL15 = NULL,
DUL = NULL,
SAT = NULL,
KS = NULL,
crop.LL = NULL,
crop.KL = NULL,
crop.XF = NULL,
Carbon = NULL,
SoilCNRatio = NULL,
FOM = NULL,
FOM.CN = NULL,
FBiom = NULL,
FInert = NULL,
NO3N = NULL,
NH4N = NULL,
PH = NULL,
ParticleSizeClay = NULL,
ParticleSizeSilt = NULL,
ParticleSizeSand = NULL,
soil.bottom = 150,
water.table = 200,
soil.type = 0,
crops = c("Maize", "Soybean", "Wheat"),
metadata = NULL,
soilwat = NA,
swim = NA,
soilorganicmatter = NA,
dist.parms = list(a = 0, b = 0.2)
)# S3 method for soil_profile
plot(
x,
...,
property = c("all", "water", "BD", "AirDry", "LL15", "DUL", "SAT", "KS", "Carbon",
"SoilCNRatio", "FOM", "FOM.CN", "FBiom", "FInert", "NO3N", "NH4N", "PH")
)
check_apsimx_soil_profile(x)
Number of soil layers (default = 10)
specific depths for each soil layer (cm)
thickness for each soil layer (mm)
bulk density for each soil layer (g/cc) -- ‘cc’ is cubic cm
air dry for each soil layer (mm/mm)
lower limit (15 bar) for each soil layer (mm/mm)
drainage upper limit (0.33 bar) for each soil layer (mm/mm)
saturation (0 bar) for each soil layer (mm/mm)
saturated hydraulic conductivity (mm/day)
lower limit for a specific crop
root ability to extract water for a specific crop
soil root exploration for a specific crop
organic carbon (percent)
organic carbon C:N ratio
fresh organic matter (kg/ha)
fresh organic matter C:N ratio
Fraction of microbial biomass (0-1)
Fraction of inert carbon (0-1)
nitrate nitrogen (Chemical) (ppm)
ammonium nitrogen (Chemical) (ppm)
soil pH
particle size clay (in percent)
particle size silt (in percent)
particle size sand (in percent)
bottom of the soil profile (cm)
water table level (not used at the moment) (cm)
might use it in the future for auto filling missing information
name of crops being grown
list with soil metadata. For possible parameters and values see an example of inspect_apsimx
with soil.child = “Metadata”.
optional ‘list’ of class ‘soilwat_parms’
optional ‘list’ of class ‘swim_parms’
optional ‘list’ of class ‘soilorganicmatter_parms’
parameter values for creating a profile. If a == 0 and b == 0 then
a constant value of 1 is used. If a == 0 and b != 0, then an exponential decay is used.
If a != 0 and b != 0 then the equation is a*soil.layer*exp(-b*soil.layer)
.
object of class ‘soil_profile’ or the ‘soil’ component within an object of class ‘soil_profile’.
additional plotting arguments (none use at the moment).
“all” for plotting all soil properties, “water” for just SAT, DUL and LL15
a soil profile with class ‘soil_profile’ with elements ‘soil’, ‘crops’, ‘metadata’, ‘soilwat’ and ‘swim’.
it produces a plot
It does not produce output unless potential issues are found. Only warnings are produced and it returns an object of class ‘soil_profile’.
Soil Profiles
Real soils might have discontinuities, but for APSIM it might be beneficial to be able to create a soil profile with an arbitrary number of layers and have flexibility in the distribution of soil physical and chemical properties. Steps:
1. apsimx_soil_profile
is a function which can create a soil matrix with many layers
2. It allows for creating a smooth distribution for Physical (or Water), Chemical, InitialWater, Analysis, InitialN, Organic or SoilOrganicMatter
3. The distribution can be specified with the ‘a’ and ‘c’ parameter of an exponential decay function, using a list. E.g. DUL = list(0.35, 0, -0.1).
This means that the top value for DUL will be 0.35 and it will decay with a rate of -0.1.
4. If an increase and then a decay is needed the Ricker function can be used. See ‘SSricker’ in the ‘nlraa’ package.
# NOT RUN {
sp <- apsimx_soil_profile()
require(ggplot2)
plot(sp)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab