weighingGauge5: Simplified weighing gauge processing

View source: R/weighingGauge5.R

weighingGauge5R Documentation

Simplified weighing gauge processing

Description

This function removes gauge resets (large negative changes usually due to servicing) and uses a simple method (cumulative maxima) to remove jitter. It is a good idea to use weighingGauge1 to infill missing values before calling this function and weighingGaugePlot to look at your data before and after calling this function.

Usage

weighingGauge5(
  obs,
  precipCol = 1,
  resetThreshold = 50,
  quiet = TRUE,
  logfile = ""
)

Arguments

obs

Required. A standard CRHMr obs file.

precipCol

Optional. The number of the column containing the weighing gauge cumulative precipitation data, not including the datetime. Default is column 1. These values are cumulative preciptiation. This function can only work on 1 column of precipitation. The precipitation cannot contain missing values - infill them using weighingGauge1 first.

resetThreshold

Optional. The minimum (absolute value) of negative values considered to be gauge resets. Default is 50 mm.

quiet

Optional. Suppresses display of messages, except for errors. If you are calling this function in an R script, you will usually leave quiet=TRUE (i.e. the default). If you are working interactively, you will probably want to set quiet=FALSE.

logfile

Optional. Name of the file to be used for logging the action. Normally not used.

Value

If unsuccessful, returns FALSE. If sucessful, returns a modified version of the obs dataframe containing only the datetime and the modified cumulative precipitation values.

Note

This version does not explicitly incorporate the effects of evaporation.

Author(s)

Kevin Shook, based on an algorithm developed by Thai Nguyen of Alberta Environment.

See Also

weighingGauge1 weighingGaugePlot weighingGaugeInterval

Examples

## Not run: 
wg1 <- weighingGauge1(wg,  maxGapLength=500)
wg5 <- weighingGauge5(wg1,  resetThreshold=70)
## End(Not run)


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