marsDetectEvents: Identify individual rainfall events

Description Usage Arguments Details Value Examples

View source: R/mars_rainfall_functions.R

Description

Return a dataset of rainfall event IDs for a time period

Usage

1
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

1
2
3
4
gage_temp <- 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 Nov. 17, 2019, 6:02 a.m.