snowprofile | R Documentation |
Conveniently create a snowprofile object. Calls low-level constructor (only available internally: new_snowprofile), asserts correctness through a snowprofile validator function (validate_snowprofile) and yields meaningful error messages. Use low-level constructor if you generate many (!) profiles.
snowprofile(
station = as.character(NA),
station_id = as.character(NA),
datetime = as.POSIXct(NA),
latlon = as.double(c(NA, NA)),
elev = as.double(NA),
angle = as.double(NA),
aspect = as.double(NA),
hs = as.double(NA),
maxObservedDepth = as.double(NA),
type = "manual",
band = as.character(NA),
zone = as.character(NA),
comment = as.character(NA),
hn24 = as.double(NA),
hn72 = as.double(NA),
ski_pen = as.double(NA),
layers = snowprofileLayers(dropNAs = FALSE, validate = FALSE),
tests = snowprofileTests(dropNAs = FALSE),
instabilitySigns = snowprofileInstabilitySigns(dropNAs = FALSE),
validate = TRUE,
dropNAs = TRUE
)
station |
character string |
station_id |
character string |
datetime |
date and time as class POSIXct in most meaningful timezone (timezone can be converted very easily:
e.g. |
latlon |
2-element vector latitude (first), longitude (second) |
elev |
profile elevation (m) |
angle |
slope angle (degree) |
aspect |
slope aspect (degree) |
hs |
total snow height (cm); if not provided, the field will be derived from the profile layers. |
maxObservedDepth |
equivalent to |
type |
character string, must be either 'manual', 'modeled', 'vstation', 'aggregate', or 'whiteboard' |
band |
character string describing elevation band as ALP, TL, BTL (alpine, treeline, below treeline) |
zone |
character string describing the zone or region of the profile location (e.g., BURNABY_MTN) |
comment |
character string with any text comments |
hn24 |
height of new snow within 24 h |
hn72 |
height of new snow within 72 h |
ski_pen |
skier penetration depth (m) |
layers |
snowprofileLayers object |
tests |
snowprofileTests object |
instabilitySigns |
snowprofileInstabilitySigns object |
validate |
Validate the object with validate_snowprofile? |
dropNAs |
Do you want to drop non-mandatory |
snowprofile object
shorton, fherla
summary.snowprofile, plot.snowprofile, snowprofileLayers, snowprofileTests, snowprofileInstabilitySigns, SPpairs
## Empty snowprofile:
snowprofile()
## Test profile:
testProfile <- snowprofile(station = 'SARPstation', station_id = 'SARP007',
datetime = as.POSIXct('2019/04/01 10:00:00', tz = 'PDT'),
latlon = c(49.277223, -122.915084), aspect = 180,
layers = snowprofileLayers(height = c(10, 25, 50),
hardness = c(3, 2, 1),
gtype = c('FC', NA, 'PP')))
summary(testProfile)
plot(testProfile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.