find_boxcoef: find_boxcoef. Find box coefficient pairs between SSC...

Description Usage Arguments Details Value See Also Examples

View source: R/find_boxcoef.R

Description

Function to find box coefficient pairs between SSC point samples (pumped or grab) and SSC cross-section samples (EWI,EDI,EWT) at a site.

Usage

1
2
3
4
5
6
7
8
find_boxcoef(
  x,
  site_no = NULL,
  timediff = 1,
  methods_NX = c(30, 40, 50, 55, 70, 100, 900, 920, 930, 940, 4033, 4080),
  methods_X = c(10, 15, 20),
  includeUV = FALSE
)

Arguments

x

A dataframe output from get_localNWIS

site_no

Character of a site number in the x dataframe from get_localNWIS if x contains more than one site. Default is NULL.

timediff

Number of hours to look before and after a point sample for a paired cross-section sample. Default is 1 (ie. look for a paired samples 1 hour before and 1 hour after a non-cross section/point sample timestamp)

methods_NX

Vector of Sampling Method (P82398) values that define non-cross section/point samples of the box coefficient. Default is:

methods_NX = c(30,40,50,55,70,100,900,920,930,940,4033,4080)

30 (single vertical), 40 (multiple verticals), 50 (point sample), 55 (composite - multiple point samples), 60 (weighted bottle), 70 (grab sample - dip), 100 (Van Dorn), 900 (SS pumping), 920 (SS BSV DI att), 930 (SS partial depth), 940 (SS partial width), 4033 (suction lift peristaltic), 4080 (peristaltic pump).

The option 'missing' can be added to include samples that have no associated sampling method for the record number, or a blank sampling method value

methods_X

Vector of Sampling Method (P82398) values that define cross section samples of the box coefficient. Default is:

methods_X = c(10,15,20)

10 (EWI), 15 (multiple verticals non-isokinetic EWT), or 20 (EDI).

The option 'missing' can be added to include samples that have no associated sampling method for the record number, or a blank sampling method value

includeUV

Logical. If x was returned from get_UVflow, run optional addition of available Approved Unit Value discharge to output table. Default is FALSE.

Details

Returns a dataframe of paired samples, flow values, and calculated box coefficient at given site_no for SSC (P80154). A summary count of all box coefficient pairs for all sites in x can be found using the related function summary_boxcoef.

The function finds non-cross section/point samples defined by methods_NX and all possible cross section pairs within the time window (ex. a grab sample and 2 EWI passes (A and B passes) would yield 2 pairs. It is up to the user to determine which box coefficients to utilize based on timing, flow conditions, and other considerations.

Rejected samples are not included.

Value

A dataframe containing sample pairs with SSC result values of point and cross-section sample, with date/time stamps.

See Also

get_localNWIS, get_UVflow, summary_boxcoef

Examples

1
2
3
4
5
6
7
8
9
data("exampleData",package="sedReview")
x <- exampleData

#find box coefficient sample pairs at site 05586300
boxcoef_05586300 <- find_boxcoef(x, site_no = "05586300")

#find box coefficient sample pairs at site 06934500 
#and expand paired sample window to +/- 2 hours from point sample
boxcoef_06934500 <- find_boxcoef(x, site_no = "06934500", timediff = 2)

USGS-R/sedReview documentation built on Aug. 24, 2020, 9 p.m.