computePunstable {sarp.snowprofile.pyface} | R Documentation |
Compute probability of layer instability based on random forest model
Description
This function enables comfortable and fast R access to Stephanie Mayer's python implementation of her random forest model to estimate the probability of dry snow layer instability. The routine can be run very efficiently on large snowprofileSets. Layer properties required are sphericity, viscous deformation rate (10e-6 s-1), density (kg m-3), grain size (mm), and the critical crack length (m) (which can be computed very efficiently automatically if shear strength (kPA) is available.) Additionally, skier penetration depth in (m) is required.
Usage
computePunstable(x, ...)
## S3 method for class 'snowprofileSet'
computePunstable(
x,
ski_pen = NA,
recompute_crit_cut_length = TRUE,
buffer = TRUE,
...
)
## S3 method for class 'snowprofile'
computePunstable(x, ski_pen = NA, recompute_crit_cut_length = TRUE, ...)
## S3 method for class 'snowprofileLayers'
computePunstable(x, ski_pen = NA, ...)
Arguments
x |
|
... |
passed on to subsequent methods |
ski_pen |
skier penetration depth (m), one scalar for each profile in x |
recompute_crit_cut_length |
This routine can very efficiently compute the critical crack length with computeCritCutLength.
SNOWPACK often provides NA values of the critical crack length even for layers that have a real solution to it. With this flag you can conveniently
recompute all critical crack lengths ( |
buffer |
internal switch to ensure fast computation at low memory cost. Leave at |
Value
x is returned with $p_unstable
(and potentially $crit_cut_length
, $slab_rho
, and slab_rhogs
) appended to each profile's layers object.
Methods (by class)
-
snowprofileSet
: for sarp.snowprofile::snowprofileSets -
snowprofile
: for snowprofiles -
snowprofileLayers
: for snowprofileLayers
Author(s)
fherla and smayer
References
Mayer, S., Herwijnen, A. Van, Techel, F., & Schweizer, J. (accepted, 2022). A random forest model to assess snow instability from simulated snow stratigraphy. The Cryosphere Discussions. https://doi.org/10.5194/tc-2022-34
Examples
## load a handful of example profiles from a PRO file
profiles <- snowprofilePro(system.file("extdata/snowprofile.pro",
package = "sarp.snowprofile.pyface"),
remove_soil = TRUE, suppressWarnings = TRUE)
summary(profiles)
names(profiles[[1]]$layers)
## compute p_unstable alongside critical crack length, slab_rho, slab_rhogs:
if (have_dependencies()) {
profiles <- computePunstable(profiles)
names(profiles[[1]]$layers)
}