xSec.planform: xSec.planform

Description Usage Arguments Details Value See Also Examples

View source: R/xSec.planform.R

Description

Compiles planform ADCP data exported from SonTek RiverSurveyor as MATLAB file into an object of class "adcp.planform" which inherits from data.table

Usage

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

Arguments

data

A list of MATLAB files exported from RiverSurveyor to be compiled

transectNames

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

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"). If layerReference is "bottom" x1 and x2 are reversed.

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 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, distance from starting point, and temperature. 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

layerAvg and project.transect

Examples

1
2
3
4
5
6
7
8
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)
xSec.planform(mNine, tNames)
#Get velocities within a meter of the river bottom
xSec.planform(mNine, tNames, layerReference = "bottom", x1 = 1, x2 = "minimum")

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