Back to top

[R] [aqp] encoding the mollic/umbric epipedon thickness requirement and more (part 1)

See branch aqp/mollic: https://github.com/ncss-tech/aqp/tree/mollic

Here is a demonstration of the new functionality I am working on for evaluating taxonomic criteria with aqp.

mollic.thickness.requirement calculates the minimum thickness of the materials meeting other requirements for a mollic epipedon, per criterion 6 in U.S. Soil Taxonomy (12th edition). I have used it for QC of pedon data, and also to assess questions about how frequently e.g. the sliding scale portion of the thickness requirement is invoked.

I'll have more fun graphs to show -- using more data -- but for now here is a demo showing how thick the thinnest possible mollic would have to be for each profile and the boundaries of PSCS in a subset of loafercreek.

library(aqp)
library(soilDB)

data("loafercreek")

# subset loafercreek -- profiles with all horizons with clay between 20 and 35
foo <- mutate_profile(loafercreek, in_range = all(na.omit(clay > 20 & clay < 35)) )
s <- filter(foo, in_range)

# make a plot
par(mar=c(0,0,3,0))
plotSPC(s, print.id = F, axis.line.offset = -3.5)
mtext("aqp calculated\nMollic/Umbric Minimum Thickness Requirement\n& Particle Size Control Section Boundaries", 3)
legend("bottomleft", c("particle size control section",
"minimum mollic/umbric thickness",
"absolute depth = 25cm"), lwd=c(3,3,1),
col=c("black","green","black"))

# calculate PSCS boundaries and minimum mollic thickness
s.diag <- profileApply(s, FUN = function(p) {

# growing suite of aqp functions related to application of US soil taxonomic criteria
ep <- estimatePSCS(p)
mss <- getMineralSoilSurfaceDepth(p)
mt <- mollic.thickness.requirement(p)

# construct result for frameify/merge into @diagnostic slot
df1 <- data.frame(feat="particle size control section", top=ep[1], bot=ep[2])
df2 <- data.frame(feat="minimum mollic/umbric thickness", top=mss, bot=mss+mt)
df <- data.frame(id=profile_id(p), rbind(df1, df2))
colnames(df) <- c(idname(p), "featkind", "featdept","featdepb")

return(df)

}, frameify=TRUE)

# co-opting the @diagnostics slot and related plotting functionality
# these are diagnostic criteria/depths/control sections, rather than "features" per se
diagnostic_hz(s) <- rbind(diagnostic_hz(s), s.diag)

addDiagnosticBracket(s, kind = 'particle size control section', lwd=3)
addDiagnosticBracket(s, kind = 'minimum mollic/umbric thickness', lwd=3,
offset=0, tick.length=0, col="green")
abline(h=25)

On a semi-related note, along with these changes will come improvements to the hzdesgnname/hztexclname slot usage, and better / consistent methods for guessing horizon attributes of interest to analyses like these (argillic, mollic, PSCS).

There are many notes in the mollic.thickness.requirement comments about things that need to be expanded on pertaining to other diagnostic feature identification.
Currently, this relies on variants of a new set of aqp methods called `depth.of` and some very heavy handed assumptions about relationships between horizon designations and diagnostic features. However, these assumptions are clearly outlined, can be improved upon, and to some degree are necessary for application of taxonomic concepts to field data.

I have stub code for the various expansions Idiscuss -- but that stuff is not ready for prime time -- yet. I think this algorithm should work reasonably well with most complete and not too unusual pedon descriptions -- I'd be interested in getting feedback or contrasting datasets (non-Xeralfs).

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.