dur.bias: Calculates bias in flooding duration estimates due to logger...

Description Usage Arguments Details Value See Also Examples

View source: R/dur_bias.R

Description

Seasonality in water levels imparts bias to flooding duration datasets built from short-term water level data. dur.bias calculates and presents these biases in visual and tabular form.

Using data from a nearby, user-defined NOAA station, bias is estimated by comparing the relationship between flooding duration and elevation in datasets covering two time periods: (1) the time periodof water level logger deployment, and (2) the reference time period (some number of years).

Usage

1
2
3
4
5
6
7
dur.bias(
  data,
  dateCol = 1,
  station = 8518750,
  ref.period = c("20120101", "20121231"),
  time = "GMT"
)

Arguments

data

water level dataset. must have a time stamp column named 'datetime' with the first ten digits following the format YYYY-MM-DD.Different separators are fine, but the placement and number of digits for year, month, and day are critical. Date range must be continuous, or the "estimated" curve won't be accurate (datasets with gaps won't work well)

dateCol

index number of the column in 'data' containing dates. Must be a date/POSIX datatype.

station

name or number of NOAA station to be used for reference data. Ideally, use the station closest to where your water level data was collected. This is fed to noaa so must be compatible with noaa's station argument.

ref.period

downloads NOAA tide data to set reference flooding-elevation relationship. This is used to evaluate accuracy of flooding duration estimates determined by water level deployment. Use of whole years is recommended. dates must be entered in format YYYYMMDD, in the form (c(start_date, end_date)).

time

time zone to download reference data (GMT is default; the NOAA website does not have all data available in all time zones.)

Details

Seasonality in water levels imparts bias to flooding duration datasets built from short-term water level data. dur.bias calculates and presents these biases in visual and tabular form.

Value

(1) A summary of root mean square errors is printed, (2) a data frame of elevations, flooding duration estimates, and their associated bias estimates is saved as output, and (3) two plots are made, graphically showing the relationship between predicted and reference flooding duration curves.

See Also

noaa,fld.dur

Examples

1
2
3
4
5
## Not run: 
NL_extract <- NL_6min_2013[NL_6min_2013[, 1] < "2013-02-01", ]
dur.bias(data = NL_extract, station = 8518750, ref.period = c("20130101", "20131231"))

## End(Not run)

VulnToolkit documentation built on Aug. 2, 2021, 5:07 p.m.