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

View source: R/rmZeroThicknessLayers.R

rmZeroThicknessLayersR Documentation

Remove layers with a thickness of 'zero cm'


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).


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



A snowprofile or snowprofileLayers object


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.


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



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