MkDischargeVariance: Make variances for prettyUsgs discharge observations.

Description Usage Arguments Examples

View source: R/dart_prep_streamflow.R

Description

MkDischargeVariance makes variances fr prettyUsgs discharge observations. The formulation of the variances is subjective. Assuming zero-mean Gaussian observation errors, the approach here is to supply a function which estimates the 3-sigma (inner 99.5 observations. This amount seems somewhat easier to conceptualize than 1-sigma, hence here we are. This function divides the error amounts by 3 and either returns the standard deviation or squares the result to return the variance (default).

Usage

1
MkDischargeVariance(prettyUsgs, error3SdFunc, retVariance = TRUE)

Arguments

prettyUsgs

The prettyUsgs discharge observations to which variances are to be added.

error3SdFunc

Function which accepts the data and returns 3-sigma error estimates.

retVariance

Logical Returns variance if TRUE, else returns 1-sigma error.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
dbPath <- '~/usgsDb/'
prettyOrodell <- 
 PrettySiteData(QuerySiteData(QuerySiteName("FOURMILE CREEK AT ORODELL, CO", path=dbPath), 
                              product='00060', path=dbPath),metricOnly=FALSE, metric=TRUE)
prettyOro <- MkDischargeVariance(prettyOrodell, Model3SdErrClimTaper)
prettyO <- subset(prettyOro, dateTime < as.POSIXct('2012-01-01'))
oroPlot <- PlotPrettyData(prettyO)

## End(Not run)

NCAR/rwrfhydro documentation built on Feb. 28, 2021, 12:47 p.m.