snowprofilePrf {sarp.snowprofile} | R Documentation |
Construct snowprofile object from PRF file
Description
Read .prf files from SNOWPACK model output
Usage
snowprofilePrf(Filename, ProfileDate = NA, tz = "UTC")
Arguments
Filename |
path to prf file |
ProfileDate |
read a single profile from file (default = NA will read all profiles) |
tz |
time zone (default = 'UTC') |
Details
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.
Value
a single snowprofile object of list of multiple snowprofile objects
Author(s)
shorton
See Also
snowprofilePro, scanProfileDates, snowprofileSno
Examples
## 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')
[Package sarp.snowprofile version 1.3.2 Index]