Merge adjacent layers that have identical properties, such as grain type, hardness etc..
a snowprofile or snowprofileLayers object with height grid information
a character array of layer properties that are considered when searching for identical layers
snowprofileLayers object will be returned with the dimensions
gtype and any other
properties given in 'properties'. Depth and thickness information will be auto-calculated. For snowprofile objects, the
field 'changes' will be initialized or extended.
1 2 3 4 5 6 7 8 9 10 11
## Merge identical layers based on hardness and grain type: fewerLayers <- mergeIdentLayers(x = SPpairs$A_modeled, properties = c("hardness", "gtype")) summary(SPpairs$A_modeled)[, c("hs", "nLayers")] summary(fewerLayers)[, c("hs", "nLayers")] ## compare profile plots before and after merging (i.e., appear identical!) opar <- par(no.readonly =TRUE) par(mfrow = c(1, 2)) plot(SPpairs$A_modeled, main = "original", ylab = "Snow height") plot(fewerLayers, main = "merged layers", ylab = "Snow height") par(opar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.