Learn R Programming

seawaveQ (version 1.0.0)

compwaveconv: Seasonal Wave Computation

Description

Function to compute seasonal wave.

Usage

compwaveconv(cmaxt, jmod, hlife, mclass = 1)

Arguments

cmaxt
is the time of the maximum chemical concentration, decimal time in years.
jmod
is the choice of model or pulse input function, an integer 1 through 14.
hlife
is the model half-life in months, 1 to 4 months
mclass
has not been implemented yet, but will provide additional model options.

Value

  • a numeric vector of size 361 with discrete values of the seasonal wave for decimal season seq(0,1,1/360).

References

Vecchia, A.V., Martin, J.D. and Gilliom, R.J., 2008, Modeling variability and trends in pesticide concentrations in streams: JAWRA Journal of the American Water Resources Association, v. 44, p. 1308--1324, http://onlinelibrary.wiley.com/doi/10.1111/j.1752-1688.2008.00225.x/abstract.

Examples

Run this code
# evaluate seasonal wave for specified decimal seasons
# these example decimal dates represent days at points 0.25, 0.5, and
# 0.75 percent of the way through the year and the end of the year
dseas <- c(0.25, 0.5, 0.75, 1)
swave <- compwaveconv(cmaxt=0.483, jmod=2, hlife=4, mclass=1)
swave[floor(360 * dseas)]
plot(seq(0,1,1/360),swave, typ="l")

Run the code above in your browser using DataLab