fld.dur: Flooding duration

Description Usage Arguments Details Value See Also Examples

View source: R/fld_dur.R

Description

Calculates the percent of time an elevation is submerged

Usage

1
fld.dur(z, level)

Arguments

z

elevation of interest

level

a numeric vector of water levels. Time interval between measurements must be uniform.

Details

Calculates the percent of time an elevation is submerged

Value

value the decimal fraction of measurements in level that fall above z

See Also

fld.frq

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(NL_6min_2013)
a <- fld.dur(0.9117, NL_6min_2013[,2]); a # flooding duration at MHW
a * length(NL_6min_2013[,2]) / 10 # convert to hours per year

b <- fld.dur(0, NL_6min_2013[,2]); b # flooding duration at MLLW
b * length(NL_6min_2013[,2]) / 10 # hours per year

elev.dur <- data.frame(elev = seq(from = -0.5, to = 1.25, by = 0.005))
elev.dur$dur <- fld.dur(elev.dur$elev, NL_6min_2013[,2]) * length(NL_6min_2013[,2]) / 10 

plot(elev.dur$dur ~ elev.dur$elev, pch = 19, 
ylab = "flooding duration (hours per year)", xlab = "elevation (m; MLLW)")

troyhill/VulnToolkit documentation built on Aug. 10, 2021, 10:55 a.m.