floodfreq: Count Number of Floods and Estimate Daily Risk and Annual...

Description Usage Arguments Details Value See Also Examples

View source: R/floodfreq.R

Description

This function splits a data set by day and counts the number of days in the data set where the water level (.wl) exceeded a specified flood elevation (.fldlvl) at least once. It then calculates the proportion of days with flooding (as an estimate of daily flood risk) and the expected number of days with flood events per year (by scaling by the daily risk by 365.25 days per year).

Usage

1
floodfreq(.data, .dt, .wl, .fldlvl)

Arguments

.data

A source data frame. can be NULL if .dt and .wl are defined in the enclosing environment.

.dt

Dates and times. A data column in .data or a data vector defined in the enclosing environment that contains date-time information. Must inherit from POSIXct.

.wl

Water level. A numerical data column in .data or a numerical vector defined in the enclosing environment.

.fldlvl

The water level that defines a flood event. Needs to be expressed in the same units and the same datum as the water level data.)

Details

There is no effort to account for partial data within days. This function is principally intended for exploratory data review or as a building block for more complex analyses. The function, floodmeans() provides closely related statistics, averaged on a year-by-year basis, and offering estimates of year to year variability. floodcounts() provides the raw annual counts of the number of days with flooding.

Value

A named numeric vector consisting of the values days, flood_days, daily_p_flood, and floods_p_yr.

See Also

Other Flood frequency analysis functions: .sim_once(), floodcast_tub(), floodgraph(), floodmean()

Examples

1
2
3
4
old <- prov_tides[prov_tides$Year >= 1940 & prov_tides$Year < 1950,]
new <- prov_tides[prov_tides$Year >= 2010 & prov_tides$Year < 2020,]
floodcount(old, DateTime, MLLW, 1.987)
floodcount(new, DateTime, MLLW, 1.987)

ccb60/SLRSIM documentation built on Jan. 21, 2022, 1:31 a.m.