marsDetectEvents: Identify individual rainfall events

View source: R/mars_rainfall_functions.R

marsDetectEventsR Documentation

Identify individual rainfall events

Description

Return a dataset of rainfall event IDs for a time period

Usage

marsDetectEvents(dtime_est, rainfall_in, iet_hr = 6, mindepth_in = 0.1)

Arguments

dtime_est

vector, POSIXct date times

rainfall_in

vector, num, of rainfall depths corresponding to dtime_est, in inches

iet_hr

num, Interevent time, in hours. The default is 6 hours.

mindepth_in

num, minimum depth of a given event, in inches. The default is 0.10 inches.

Details

Function should be used inside mutate to add output to the corresponding table.

Value

Output will be a vector of integers corresponding to dtime_est and representing the event ID for each time step.

Examples

gage_temp <- dplyr::mutate(marsSampleRain, 
  event_id = marsDetectEvents(dtime_est = marsSampleRain$dtime_est, 
  rainfall_in = marsSampleRain$rainfall_in, 
  iet_hr = 6, mindepth_in = 0.10))

taywater/pwdgsi documentation built on April 19, 2024, 11:10 a.m.