findEvents: Function to find storm events.

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/findEvents.R

Description

This function is designed to find storm events based on two optional conditions. The two conditions are currently based on rate of rise, and height.

Usage

1
findEvents(streamProperty, steps, rate, height, lengthOfEvent, eventType)

Arguments

streamProperty

A numeric vector of either stream discharge or height.

steps

The amount of steps (iterations) that the rise must occur within.

rate

The rate of which the stream must rise. This can be a single value or a vector of equal to the length of streamProperty.

height

The height that triggers an event. In case of event types 2,5 the height that it must be above during an event. See details for more information. This can be a single value or a vector of equal to the length of streamProperty.

lengthOfEvent

The maximum amount of steps (iterations) the event contains.

eventType

The type of event condition, wanting to be applied. See details for more information.

Details

This function currently has 5 condition types. It has been designed to met the purpose of the simple use of an bubble meter and automatic sampler. The current event trigger conditions include;

eventType 1: Uses both rate of rise and height to trigger an event.

eventType 2: Uses both rate of rise and height to trigger an event and streamProperty must be above height during the event.

eventType 3: Only uses rate of rise to trigger an event.

eventType 4: Only uses height to trigger an event.

eventType 5: Only uses height to trigger an event and streamProperty must be above height during the event.

Value

eventDirection

A numeric vector containing 5 different values. 0 indicates no event, 1 indicates rising flow during event, 2; decreasing during an event, 3; indicates level during an event, and NA values are used if the streamProperty contains an NA value.

eventCount

A numeric vector counting the number of events in the sequence.. Values of 0 indicate no event. NA values reflect the observed NA values from the streamProperty.

Note

The above methods were created due to demand, more methods could be added, by request.

Author(s)

Jason Lessels

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
require(WIDataRipper)
getSiteVariables(410044)
streamHeight <- getData(410044,start_time="20120101000000",end_time="20120701000000",interval="hour")$data

plot(ecdf(streamHeight[,2]))
abline(h=0.9)
abline(v=1.4)
library(hydroEFS)
events <- findEvents(streamHeight[,2], NULL,NULL, 1.4, 80,4)
names(events)
plot(events$eventDirection)

## End(Not run)

hydroEFS documentation built on May 2, 2019, 4:58 p.m.