rmZeroThicknessLayers: Remove layers with a thickness of 'zero cm'

View source: R/rmZeroThicknessLayers.R

rmZeroThicknessLayersR Documentation

Remove layers with a thickness of 'zero cm'

Description

Find layers in a snow profile that are zero cm thick (i.e. height vector stays constant for some layers, even though grain types or hardness may change). Then, either remove those layers, or reset them with the layer characteristics of the lower adjacent (non-zero-thickness) layer. In the latter case (i.e., reset), the number of layers won't change, but those non-zero thickness layers will be made ineffective. This procedure is particularly necessary for warping snow profiles (cf., dtwSP, warpSP).

Usage

rmZeroThicknessLayers(x, rm.zero.thickness = TRUE)

Arguments

x

A snowprofile or snowprofileLayers object

rm.zero.thickness

Want to remove zero-thickness layers from profile? boolean, default TRUE. If FALSE, those zero-thickness layers will be reset to the lower adjacent (non-zero-thickness) layer; thus, the number of layers won't be changed.

Value

A modified copy of the input object. For snowprofile objects, the field $changes will be initialized or extended.

Author(s)

fherla


sarp.snowprofile.alignment documentation built on Aug. 8, 2022, 1:05 a.m.