floodcounts: Extract annual flood counts

Description Usage Arguments Details Value

View source: R/floodcounts.R

Description

The function accepts historic data on water level indexed by date and time and produces a data frame showing the number of days each year that experienced at least some flooding. Flooding is defined as an observation of water level above a user-defined flood level.

Usage

1
floodcounts(.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

The related function, floodfreq() offers calculation of similar statistics over an arbitrary period of time. The function floodmean(), calculates these statistics year by year, and reports observed mean and standard error of the yearly statistics. A graphica lalternative is provided by floodgraph.

Value

A data frame continuing the following values:

year

The calander year for the folowing statistics.

days

Total number of days that year with (some) data. No effort is to check if data that day is complete.

flood_days

Days with at least one observation of a water level above the user-defined flood level.

daily_p_flood

Daily probability of flooding, as estimated crudely as the proportion of all days with data that show at least one observation above the user-defined flood level.

adjusted

Estimated number of flood events this year if data had been complete. Estimated as daily_p_flood \times 365.25.


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