loadCalculations: Calculate annual loads and summarize trends

Description Usage Arguments Format Details Value Note Author(s) References Examples

View source: R/loadCalculations.R

Description

Function to calculate pesticide loads in kilograms per year and summarize trends.

Usage

1
2
3
4
5
6
7
8
loadCalculations(
  dailyDat,
  pestPredict,
  modRes,
  concTrends,
  yrtype = 1,
  alpha = 0.1
)

Arguments

dailyDat

is the daily streamflow data in the form of a data frame with three columns representing a station ID, date, and streamflow.

pestPredict

is the continuous (daily) estimation of pesticide concentrations for one or more pesticides at a single site. This should be in the form of the fourth element of the list returned by fitswavecav.

modRes

is the first element of the list returned by fitswavecav and includes the scale parameter for one or more pesticide trend models at a single site. The scale parameter is used in the bias correction.

concTrends

the SEAWAVE-Q trend in flow-normalized annual load. Cannot be different (computationally) from the trend in flow-normalized annual concentration when there is no trend in flow (Oelsner and others, 2017).

yrtype

allows one to calculate annual loads based on a calendar year or a water year, where a water year is the 12-month period October 1 through September 30 designated by the calendar year in which it ends. A yrtype of 1 represents a calendar year and is the default because that is the way the original model was developed. A yrtype of 2 represents a water year.

alpha

is the significance level or alpha value for statistical significance and confidence intervals.

Format

The first data frame returned has one row for each pesticide-year at a particular site and four columns. The general format is as follows:

pstaid character the station identification number
pcode character the parameter code for which a load was calculated
year or wyear numeric the year or water year for which a load was calculated
load numeric the load in kilograms per year

The second data frame returned has one row for each pesticide at a particular site and 11 columns. The general format is as follows:

pcode character the parameter code for which a load trend was calculated
mclass numeric a value of 1 or 2
mclass numeric a value of 1 or 2
alpha numeric a significance level
ltndPpor numeric the load trend in percent over the period of record
luciPpor numeric the load upper confidence interval for the trend in
percent over the period of record
llciPpor numeric the load lower confidence interval for the trend in
percent over the period of record
baseLoad numeric the base load, the load for the first year of trend period
ltndOrigPORPercentBase numeric the load trend in original units over
the period of record
(calculation based on percent per year and base load)
luciOrigPORPercentBase numeric the load trend upper confidence interval
for the trend in original units over the period of record
(calculation based on percent per year and base load)
llciOrigPORPercentBase numeric the load trend lower confidence interval
for the trend in original units over the period of record
(calculation based on percent per year and base load)
ltndlklhd numeric is the load trend likelihood

Details

Parameter load (mass) is the product of water-quality concentration (a mass per volume) and an associated streamflow rate (volume per time). This function generates an annual time series of pesticide loads on either a calendar year basis or a water year basis and summarizes load trends.

Value

Two data frames, the first contains the annual loads, the second contains the trend summary.

Note

In this load calculation function, daily pesticide concentration estimates provided by the fitswavecav function are corrected for retransformation bias (the concentration model is built on the base-10 logarithm of concentration; therefore, a bias correction is required when transforming back to the original units) and then used to calculate daily loads. The bias correction is based on the quasi-maximum likelihood estimator (Cohn and others, 1989) that was developed for natural logarithms, with an adjustment for the base-10 logarithm of the concentration. To calculate loads, the bias-corrected concentration estimates (assumed to be in micrograms per liter) are multiplied by daily streamflow and a constant, 0.892998605, which converts the load units (micrograms per liter * cubic feet per second) to kilograms per year. Daily loads are summed to annual values. See page 70 and equation 26 of Oelsner and others (2017) for further details regarding the load calculation and bias correction. Users may modify this function to convert to units other than kilograms per year.

Author(s)

Karen R. Ryberg

References

Cohn, T.A., DeLong, L.L., Gilroy, E.J., Hirsch, R.M., and Wells, D.K., 1989, Estimating constituent loads: Water Resources Research, v. 25, no. 5, p. 937–942.

Oelsner, G.P., Sprague, L.A., Murphy, J.C., Zuellig, R.E., Johnson, H.M., Ryberg, K.R., Falcone, J.A., Stets, E.G., Vecchia, A.V., Riskin, M.L., De Cicco, L.A., Mills, T.J., and Farmer, W.H., 2017, Water-quality trends in the Nation's rivers and streams, 1972–2012—Data preparation, statistical methods, and trend results (ver. 2.0, October 2017): U.S. Geological Survey Scientific Investigations Report 2017–5006, 136 p., https://doi.org/10.3133/sir20175006.

Examples

1
2
3
4
5
6
7
8
9
data(swData)
modMoRivOmaha <- combineData(qwdat = qwMoRivOmaha, cqwdat = cqwMoRivOmaha)
myfit1 <- fitswavecav(cdat = modMoRivOmaha, cavdat = cqwMoRivOmaha, 
tanm = "myfit1", pnames = c("04035", "04037", "04041"), yrstart = 1995, 
yrend = 2003, tndbeg = 1995, tndend = 2003, iwcav = c("flowa30", "flowa1"), 
dcol = "dates", qwcols = c("R", "P"))
MoRivOmahaLoadsYr <- loadCalculations(cqwMoRivOmaha[, 1:3], myfit1[[4]], 
myfit1[[1]], myfit1[[6]])
MoRivOmahaLoadsYr

seawaveQ documentation built on Dec. 15, 2020, 5:12 p.m.