xs_cumulative_change: Cross Section Cumulative Change

Description Usage Arguments Details Examples

View source: R/xs.r

Description

Compute cumulative cross section change directy from cross section data.

Usage

1
2
3
4
5
xs_cumulative_change(d, time.col = "Time", station.col = "Station",
  distance.col = "Distance", elevation.col = "Elevation",
  bank.stations = NULL, reference.elevation = NULL,
  bottom.elevation = NULL, station.lengths = NULL, over.time = TRUE,
  longitudinal = TRUE, direction = "downstream")

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.

station.lengths

The cross section length values.

over.time

If TRUE, accumulate data across time steps. This is generally valid only for data output at the computation time step.

longitudinal

If TRUE, accumulate data along the reach. This is generally only valid when all cross sections are included in d.

direction

Accumulate data in the downstream (descending order of cross section IDs) or upstream (ascending order) direction. Ignored if longitudinal is FALSE.

Details

This is essentially a wrapper for processing cross section data through the sequence xs_area –> area_to_volume –> change_table –> cumulative_table.

Examples

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

quasi.xs = read_xs(simple.quasi)
quasi.lengths = xs_lengths(read_station_lengths(simple.quasi))
xs_cumulative_change(quasi.xs, station.lengths = quasi.lengths)
xs_cumulative_change(quasi.xs, station.lengths = quasi.lengths,
  longitudinal = FALSE)
xs_cumulative_change(quasi.xs, station.lengths = quasi.lengths,
  over.time = FALSE, direction = "upstream")

quasi.banks = read_bank_stations(simple.quasi)
xs_cumulative_change(quasi.xs, station.lengths = quasi.lengths,
  bank.stations = quasi.banks, reference.elevation = 1200)

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