deriveDatetag: Derive datetag from deposition dates in simulated profiles

View source: R/deriveDatetag.R

deriveDatetagR 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

bdates are computed by taking the ddate of the overlying layer. For snowpack simulations with thin layer resolution, this approach yields very similar ddates and bdates for most layers, since most layers form and instantly get buried by another layer of the same storm. To make bdates more similar to human interpretation, bdates 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))


sarp.snowprofile documentation built on March 31, 2023, 5:17 p.m.