xs_area: Cross Section Area

Description Usage Arguments Details Value Examples

View source: R/xs.r

Description

Compute cross section flow area directly from cross section geometry.

Usage

1
2
3
4
xs_area(d, time.col = "Time", station.col = "Station",
  distance.col = "Distance", elevation.col = "Elevation",
  bank.stations = NULL, reference.elevation = NULL,
  bottom.elevation = NULL)

Arguments

d

The cross section data, i.e. output of read_xs.

time.col

The column containing time stamps.

station.col

The column containing cross section station IDs.

distance.col

The column containing cross section distances.

elevation.col

The column containing cross section elevations.

bank.stations

A table defining the bank station distances to use when computing cross section area. If NULL, the full extent of each cross section will be used. See details for more information.

reference.elevation

Use predefined reference elevations when computing cross section area. Can be a constant or a two column station of cross section labels and associated reference elevation. If NULL, the maximum elevation of each cross section will be used.

bottom.elevation

Use predefined bottom elevations when computing cross section area. Can be a constant or a two column station of cross section labels and associated bottom elevation. If NULL, the minimum elevation of each cross section will be used.

Details

The bank.stations argument can be formatted in multiple ways to accommodate different bank station definitions. If bank stations are fixed at the same distances in each cross section and do not change over time, bank.stations can be a two-element numeric vector specifying constant left and right bank stations, respectively. If bank stations vary by station but are fixed in time, bank.stations can be formatted as a three-column table with the first column containing station IDs, the second column containing the left bank stations and the third column containing the right bank stations. This can be used if e.g. the bank stations are read from a RAS output file using read_bank_stations. If bank stations vary both by station and across time, bank.stations can be formatted as a four column table with columns "Time", "Station", "LOB", "ROB". This can be used if e.g. the bank stations are read from a RAS output file using read_bed_limits.

Value

A wide-format table of cross section areas.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
simple.quasi = system.file("sample-data/SampleQuasiUnsteady.hdf",
  package = "RAStestR")

quasi.xs = read_xs(simple.quasi)
xs_area(quasi.xs)
xs_area(quasi.xs, reference.elevation = 1200)
xs_area(quasi.xs, reference.elevation = 1200, bottom.elevation = 1170)

quasi.banks = read_bank_stations(simple.quasi)
xs_area(quasi.xs, bank.stations = quasi.banks, reference.elevation = 1200)

mkoohafkan/RAStestR documentation built on July 14, 2019, 11:41 p.m.