deriveDatetag {sarp.snowprofile} | R Documentation |
Derive datetag from deposition dates in simulated profiles
Description
This routine derives the datetags of simulated snow profile layers from deposition dates. Datetags usually are deposition dates
for crust layers, and burial dates for other weak layers (e.g., SH, FC). If no datetags can be derived, a datetag column of NAs will
nevertheless be added to the snowprofile layers. The routine also adds a bdate
column for burial dates that are calculated along the way.
Usage
deriveDatetag(x, adjust_bdates = TRUE, ...)
## S3 method for class 'snowprofileSet'
deriveDatetag(x, adjust_bdates = TRUE, ...)
## S3 method for class 'snowprofile'
deriveDatetag(x, adjust_bdates = TRUE, ...)
## S3 method for class 'snowprofileLayers'
deriveDatetag(x, adjust_bdates = TRUE, checkMonotonicity = TRUE, ...)
Arguments
x |
a snowprofileSet, snowprofile or snowprofileLayers object |
adjust_bdates |
boolean switch to compute bdates similar to human interpretation. see Details. |
... |
passed on to subsequent methods |
checkMonotonicity |
check ascending order of layers. This acts as a check for whether multiple layers objects are stacked, which is not allowed. |
Details
bdate
s are computed by taking the ddate
of the overlying layer. For snowpack simulations with thin layer
resolution, this approach yields very similar ddate
s and bdate
s for most layers, since most layers form and
instantly get buried by another layer of the same storm. To make bdate
s more similar to human interpretation,
bdate
s can be adjusted, so that (similar) layers with the same ddate
(i.e., same storm) inherit the same bdate
(similar means: identical gtype & hardness).
Value
The input object will be returned with the columns datetag
and bdate
added to the profile layers
Methods (by class)
-
deriveDatetag(snowprofileSet)
: for snowprofileSets -
deriveDatetag(snowprofile)
: for snowprofiles -
deriveDatetag(snowprofileLayers)
: for snowprofileLayers
Author(s)
fherla
Examples
## This is not the most meaningful example, but it nicely illustrates the routine:
print(SPpairs$A_manual)
(A_addedDatetags <- deriveDatetag(SPpairs$A_manual))