PcpFiltPosTh | R Documentation |
Cleans up a cumulative precipitation time series by transferring changes below a specified threshold to neighbouring periods, and eliminating large negative changes associated with gauge servicing (bucket emptying). The filtering is done using a brute-force algorithm that identifies small or negative changes (below dPcpTh) then transfers them to neighbouring positive changes thus aggregating all changes to values above dPcpTh. The transfers are made in ascending order, starting with the lowest (most negative). The cumulative total remains unchanged. This description (and most of the comments in the code) were written by Alan Barr.
PcpFiltPosTh(Pcp, dPcpTh = 0.1, dpServicingTh = -100, quiet = TRUE)
Pcp |
Required. Measured cumulative precipitation (mm). |
dPcpTh |
Optional. Minimum interval precipitation (mm). Default is 0.1 mm. |
dpServicingTh |
Optional. Threshold for change in storage due to servicing (mm). Default is -100 mm. |
quiet |
Optional. Suppresses display of messages, except for errors. If
|
If unsuccessful, returns the value FALSE
. If successful, returns a time
series of cleaned values. Writes parameter values to screen.
Kevin Shook. The code is copied from a MATLAB program PcpFiltPosTh.m written by Alan Barr, 28 Aug 2012.
## Not run:
testp <- PcpFiltPosTh(dl2$precip, dPcpTh = 0.05, dpServicingTh = -50)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.