rvn_custom_read {RavenR}R Documentation

Read Raven Custom Output files

Description

rvn_custom_read is used to read any Raven custom output file

Usage

rvn_custom_read(ff = NA, no_runname = FALSE, tzone = "UTC")

Arguments

ff

full file path to the custom output file

no_runname

boolean for whether a runName is supplied, important for parsing the filename

tzone

string indicating the timezone of the data in ff

Details

rvn_custom_read parses the filename and predicts the file format accordingly, so it is important to use the unmodified file names for this function. The use (or not) of a runname is accounted for.

The returned object is a time series object (xts format), which can be used to easily plot the time series data. The options of the custom output are included in the rav.obj attributes.

The timezone is provided by the tzone argument as "UTC" by default, and should be adjusted by the user to the local time zone as needed, based on the model run.

Value

custom_out

data frame with the custom output data stored as xts object

See Also

rvn_custom_output_plot for plotting custom output

Examples


# find sample rvh file for Nith subwatershed
ff <- system.file("extdata","run1_SNOW_Daily_Average_ByHRU.csv", package="RavenR")

# extract and plot custom data
mycustomdata <- rvn_custom_read(ff)
summary(mycustomdata[,1:5])
plot(mycustomdata[,5],main='Daily Average SNOW - HRU 5')


[Package RavenR version 2.2.2 Index]