average.planform: average.planform

Description Usage Arguments Details Value See Also Examples

View source: R/average.planform.R

Description

Applys a function summarizing replicated ADCP data and calculates water speeds, flow headings, transect direction (from river right), and distance along transect.

Usage

1
2
3
average.planform(data, transectNames, FUN = mean, binWidth,
  depthReference = "unit", layerReference = "surface", x1 = "minimum",
  x2 = "maximum", project = TRUE)

Arguments

data

Either a list of MATLAB files exported from RiverSurveyor to be compiled or an object of class "adcp.planform".

transectNames

A list of transect names corresponding to the transects represented by the MATLAB files. See 'details' for additional information.

FUN

Function used to summarize ADCP data, default is mean

binWidth

Width used to bin data along a transect, for summarization. Default is the 95 percentile of distances between samples.

depthReference

Defines the depth measurements to be used. The default ("unit") uses the method defined in RiverSurveyor, but depthReference can be set to use measurements from the vertical beam ("VB"), bottom-track beams ("BT"), or both ("composite").

layerReference

Defines layerAvg bounds x1 and x2 as a distance from surface ("surface", default), distance above bottom ("bottom"), or percent of total depth ("percent").

x1

Lower bound velocities are averaged over. Either a numeric representing a depth or percentage or a character where "minimum" equals the minimum distance from the reference point (i.e., 0 when layerReference = "surface" and bottomCellDepth when layerReference = "bottom") and "maximum" equals maximum distance from the reference point. Must be numeric if layerReference = "percent". Defaults to "minimum".

x2

Upper bound velocities are averaged over. Either a numeric representing a depth or percentage or a character where "minimum" equals the minimum distance from the reference point (i.e., 0 when layerReference = "surface" and bottomCellDepth when layerReference = "bottom") and "maximum" equals maximum distance from the reference point. Must be numeric if layerReference = "percent". Defaults to "maximum".

project

Logical. If TRUE (default), transect replicates are projected to a mean transect line using an orthogonal projection of the x and y coordinates. If FALSE transects are not projected to a mean transect line.

Details

When assigning transectNames, order matters, the transect names must be in the same order of the MATLAB files assigned to the data argument. Ex., if the first two files in the list are Transect1a and Transect1b, which are replicates of Transect1, t first two files in the name list are "Transect1" and "Transect1". The processing functions will spatially average and compile all data from the same transects, this tells the processing functions to average and compile these two files. Listing the names as "Transect1a" and "Transect1b" results in the transects being processed separately. transectNames will only expect characters and names must be enclosed in "".

Value

A data.table with the distance from the right bank (tDist), the transect name (transectName), UTM x coordinates (UTM_X), UTM y coordinates (UTM_Y), depth, depth averaged velocity to the east (Mean.Vel.E), depth averaged velocity to the north (Mean.Vel.N), depth of the bottom most cell in an ensemble (bottomCellDepth), distance of the bottom cell to the bottom (distToBottom), bottom cell velocity to the east (BC.Vel.E), bottom cell velocity to the north (BC.Vel.N), bottom cell vertical velocity (BC.Vel.Up), bottom cell error velocity (BC.Vel.Error), layer averaged velocity to the east (layerVel.E), layer averaged velocity to the north (layerVel.N), layer averaged vertical velocity (layerVel.Up), longitude, latitude, altitude of water surface, temperature, depth averaged speed, depth averaged flow heading (Heading), layer averaged speed, layer averaged flow heading (LayerAvgSpeedHeading), and discharge of ensembles (SpecificQ). If project = TRUE, orthogonally projected longitude, latitude, and UTM coordinates (Longitude_Proj, Latitude_Proj, UTM_X_Proj, UTM_Y_Proj) are also returned.

See Also

xSec.planform and transectHeading.

Examples

1
2
3
4
5
6
data(mNine)
#mNine is a list of MATLAB files
names(mNine)
#Drop the last letter (l or r) from the MATLAB file names
tNames <- substr(names(mNine), 0, nchar(names(mNine))-1)
average.planform(mNine, tNames)

jasonfischer/rivSurveyR documentation built on May 18, 2019, 5:54 p.m.