fill_fdclmrenv: Fill an R Environment with L-moments by Annual Flow-Duration...

Description Usage Arguments Value Author(s) See Also Examples

Description

Perform tests for monotonic trend for each of 365 probabilities on the flow-duration curve with year for a succession of USGS streamgage identification numbers in an R environment from fill_dvenv. The function fill_lmrfdcenv populates (fills) with output from fdclmr as another R environment. In source code, this function is structurally almost identical to fill_tfdcenv.

Usage

1
fill_lmrfdcenv(sites=NULL, dvenv=NULL, envir=NULL, silent=FALSE, ...)

Arguments

sites

An optional, likely partial, list of sites within dvenv for population into envir. This option means that a massive environment of daily values can be retained in the user's space but Asquith–Knight discharge decay analyses can be restricted to a smaller subset of sites. If sites=NULL, then internally all of the sites within dvenv will be processed, and this would be almost universally the way to use this function;

dvenv

An R environment previously populated by fill_dvenv;

envir

A user created (usually) R environment by new.env();

silent

Suppress informative calls to message(); and

...

Additional arguments to pass to control fdclmr.

Value

This function is used for its side effects on the envir argument but does return a count of the sites processed by fdclmr.

Author(s)

W.H. Asquith

See Also

fdclmr, lmrfdc_table, fill_dvenv

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
wolfriver <- c("07030392", "07030500", "07031650",
               "07031660", "07031700", "07031740")
wolf.env <- new.env() # the standard declaration of an environment
fill_dvenv(wolfriver, envir=wolf.env) # wolf.env now filled with six tables.
wolf.fdclmr.yr <- new.env() # the standard declaration of an environment
wolf.fdclmr.de <- new.env() # the standard declaration of an environment
fill_lmrfdcenv(dvenv=wolf.env, envir=wolf.fdclmr.yr)
fill_lmrfdcenv(dvenv=wolf.env, envir=wolf.fdclmr.de, decade=TRUE)
# LMRs <- lmrfdc_table(wolf.fdclmr.de) # we could use the LMRs data.frame
# but in the L-moment ratio diagram below, we are incrementing the plot character.
lmomco::plotlmrdia(lmomco::lmrdia(), xlim=c(0,0.8), ylim=c(0,0.8))
for(i in 1:length(wolfriver)) { # Now plot the L-moment ratios of these sites.
   tmp <- get(wolfriver[i], envir=wolf.fdclmr.yr)
   points(tmp$T3, tmp$T4, pch=i, col=grey(0.2))
}
for(i in 1:length(wolfriver)) { # Now plot the L-moment ratios of these sites.
   tmp <- get(wolfriver[i], envir=wolf.fdclmr.de)
   points(tmp$T3, tmp$T4, pch=i, col=6, lwd=3)
} # 
## End(Not run)

wasquith-usgs/akqdecay documentation built on Nov. 9, 2020, 1:13 p.m.