A friend of mine recently published a very interesting article on the pedologic interpretation of asymetric peak functions fit to soil profile data (Myers et al., 2011). I won't bother summarizing or paraphrasing the article here, as the original article is very accessible, rather I thought I would share some new functionality in AQP that was inspired by the article. While reading the article I thought that it would be interesting to use one of these peak functions, the logistic power peak (LPP) function, to simulate soil property depth-functions. Simulated values could be used to evaluate new algorithms with a set of tightly controlled properties that vary with depth. One of the nice aspects of these peak functions is that they can create a wide range of shapes that mimic common anisotropic depth-functions associated with pedogenic processes such as illuviation, ferrolysis, or seasonal fluctuation of groundwater levels. An example R session demonstrating the use of LPP-simulated soil property depth-functions is presented below.

lpp_profiles.png
Image: LPP-simulated Profiles

Generate 10 Simulated Soil Profiles with fixed LPP Parameters

library(aqp)
require(RColorBrewer)
require(latticeExtra)
# read the manual page
?random_profile
# init some colors and a function to interpolate colors
cols <- rev(brewer.pal(8'Spectral'))
cr <- colorRamp(cols)
# make some simulated profiles with defined LPP parameters
d <- ldply(1:10random_profilen=c(678)n_prop=1method='LPP',
lpp.a=5lpp.b=10lpp.d=5lpp.e=5lpp.u=25)
# color horizons based on simulated property
hz.cols <- cr(rescaler(d$p1type='range'))
d$soil_color <- rgb(hz.colsmax=255)
# upgrade to SoilProfileCollection object
depths(d) <- id ~ top + bottom
# plot
plot(d)
X

lpp_aggregate.png
Image: Aggregate LPP-simulated Data

Plot the Original 10 Simulated Profiles, Along with slice-wise Median and IQR

# aggregated over all profiles, along 1cm-slices
a <- slab(dfm= ~ p1)
# compute slice mid-points for plotting
a$mid <- with(a(top + bottom) / 2)
# plot and save results for later...
(p1 <- xyplot(mid ~ p.q50data=a,
lower=a$p.q25upper=a$p.q75ylim=c(150,-5)alpha=0.5,
panel=panel.depth_functionprepanel=prepanel.depth_function,
cf=a$contributing_fractionxlab='Simulated Data'ylab='Depth',
main='LPP(a=5, b=10, d=5, e=5, u=25)',
par.settings=list(superpose.line=list(col='black'lwd=2))
))
# add original data as step-functions
p1 + as.layer(xyplot(top ~ p1groups=iddata=horizons(d),
horizontal=TRUEtype='S',
par.settings=list(superpose.line=list(col='blue'lwd=1lty=2))))
X

References
Myers, D.B., N.R. Kitchen, K.A. Sudduth, R.J. Miles, E.J. Sadler, and S. Grunwald. 2011. Peak Functions for Modeling High Resolution Soil Profile Data. Geoderma. 166(1): 74-83.