View source: R/snowprofilePrf.R
snowprofilePrf | R Documentation |
Read .prf files from SNOWPACK model output
snowprofilePrf(Filename, ProfileDate = NA, tz = "UTC")
Filename |
path to prf file |
ProfileDate |
read a single profile from file (default = NA will read all profiles) |
tz |
time zone (default = 'UTC') |
Several SNOWPACK model output formats exist see SNOWPACK documentation
Definitions of PRF files are provided at https://models.slf.ch/docserver/snowpack/html/prf_format.html
PRF files typically contain profiles from the same station at multiple time steps. If a specific ProfileDate
is provided a single snowprofile object is returned (search available dates with scanProfileDates
), otherwise all profiles are read and a list of snowprofile objects is returned.
a single snowprofile object of list of multiple snowprofile objects
shorton
snowprofilePro, scanProfileDates, snowprofileSno
## Path to example prf file
Filename <- system.file('extdata', 'example.prf', package = 'sarp.snowprofile')
## Scan dates in file
Dates <- scanProfileDates(Filename)
print(Dates)
## Read a single profile by date and plot
ProfileDate <- Dates[3]
Profile <- snowprofilePrf(Filename, ProfileDate = ProfileDate)
plot(Profile)
## Read entire time series and plot
Profiles <- snowprofilePrf(Filename)
plot(Profiles, main = 'Timeseries read from example.prf')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.