View source: R/deriveDatetag.R
deriveDatetag | R Documentation |
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.
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, ...)
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. |
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).
The input object will be returned with the columns datetag
and bdate
added to the profile layers
deriveDatetag(snowprofileSet)
: for snowprofileSets
deriveDatetag(snowprofile)
: for snowprofiles
deriveDatetag(snowprofileLayers)
: for snowprofileLayers
fherla
## This is not the most meaningful example, but it nicely illustrates the routine:
print(SPpairs$A_manual)
(A_addedDatetags <- deriveDatetag(SPpairs$A_manual))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.