Description Usage Arguments Details Value See Also Examples
View source: R/calc_seasonalstats.R
Function to calculate NSE, RMSE, and VE goodness-of-fit statistics over a period of selected months
1 2 | calc_seasonalstats(data, seasMonths, runoffIndex, segOutflowIndex,
writeWYstats = FALSE, outFile = NULL)
|
data |
A |
seasMonths |
An array of selected months (numerical format, eg. May is 5) |
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 |
outFile |
Character, pathname and filename of .csv file if |
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
A dataframe containing goodness-of-fit statistics by water year
read_Statvar
, NSE
,
rmse
, VE
, pbias
1 2 3 | exampleData <- read_Statvar(file = "data/rghw_Daymet.statvar")
apr_sept_Stats <- calc_seasonalstats(data = exampleData, seasMonths = c(4,5,6,7,8,9),
runoffIndex = 6, segOutflowIndex = 9)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.