weighingGauge-functions: Processes weighing gauge precipitation

weighingGauge-functionsR Documentation

Processes weighing gauge precipitation

Description

These functions clean accumulated precipitation data from a weighing gauge. The functions are wrappers for other R and CRHMr functions as well as for functions adapted from MATLAB code by Alan Barr. The typical sequence of operation of the functions is indicated by their numbers, however it it NOT always necessary to execute any given function.

weighingGaugePlot

Plots cumulative and interval precipitation

weighingGauge1

Gap fills the data

weighingGauge2

Removes spikes

weighingGauge3

Applies the Savitzky-Golay polynomial filter

weighingGauge4

Calls PcpFiltPosTh

weighingGauge5

Simplified reset and jitter removal

weighingGaugeInterval

Deacumulates the precipitation

Author(s)

Kevin Shook

See Also

weighingGaugePlot weighingGauge1 weighingGauge2 weighingGauge3 weighingGauge4 weighingGauge5 weighingGaugeInterval

Examples

## Not run: 
# check data - shows jitter, missing values and a large reset
weighingGaugePlot(wg)
# see jitter and missing values only
weighingGaugePlot(wg, endDate = '2010-10-01')

# fill gaps, and check to see if all missing values have been interpolated
wg1 <- weighingGauge1(wg, maxGapLength=10)
weighingGaugePlot(wg1)

# remove the spikes, and check
wg2 <- weighingGauge2(wg1, spikeThreshold=300, maxSpikeGap=3)
weighingGaugePlot(wg2)

# apply the smoothing filter - only for use with high-frequency data
wg3 <- weighingGauge3(wg2, filterLength=5)
weighingGaugePlot(wg3)

# apply Alan Barr's filter
wg4 <- weighingGauge4(wg3, smallDropThreshold = 0.05, serviceThreshold = -50)
weighingGaugePlot(wg4)

# deaccumulate precipitation
wg5 <- weighingGaugeInterval(wg4)

# use simplified method and plot results
# note that the infilled values are used
wg6 <- weighingGauge5(wg1)
weighingGaugePlot(wg6)
wg7 <- weighingGaugeInterval(wg6)
## End(Not run)

CentreForHydrology/CRHMr documentation built on April 6, 2024, 5:27 p.m.