calc_WYstats: calc_WYstats

Description Usage Arguments Details Value See Also Examples

View source: R/calc_WYstats.R

Description

Function to calculate NSE, RMSE, and VE goodness-of-fit statistics by WY

Usage

1
2
calc_WYstats(data, runoffIndex, segOutflowIndex, writeWYstats = FALSE,
  outFile = NULL)

Arguments

data

A dataframe output from read_Statvar

runoffIndex

Integer, index number of observed gage flow in PRMS input data file (and subsequently variable name in statvar file)

segOutflowIndex

Integer, index number of segment corresponding to observed gage location (and subsequently variable name in statvar file)

writeWYstats

Logical, if TRUE write .csv file of WY stats.

outFile

Character, pathname and filename of .csv file if writeWYstats = TRUE

Details

Uses gage data and segment data from imported statvar file. Note that segments and runoff data indexes must be specified in the control file under statVar_element and statVar_names before PRMS is run, and the statvar file read into R using the read_Statvar function for this function to work best. If the data is in another format (ex. pre-formatted table with just obs/sim) it's best just to use the hydroGOF package

Uses documentation in hydroGOF package for calculating the following statistics by WY:

NSE: Nash-Sutcliffe Efficiency

RMSE: Root Mean Square Error

VE: Volumetric Efficiency

pbias: Percent Bias

See hydroGOF package for more documentation and references

Value

A dataframe containing goodness-of-fit statistics by water year

See Also

read_Statvar, NSE, rmse, VE, pbias

Examples

1
2
exampleData <- read_Statvar(file = "data/rghw_Daymet.statvar")
basinStats <- calc_WYstats(data = exampleData, runoffIndex = 6, segOutflowIndex = 9)

cpenn-usgs/prmsTools documentation built on May 6, 2019, 9:49 p.m.