weighingGauge1: Fills gaps in weighing gauge precipitation data

View source: R/weighingGauge1.R

weighingGauge1R Documentation

Fills gaps in weighing gauge precipitation data

Description

This method fills missing values in accumulated precipitation data from a weighing gauge using linear interpoaltion. This function is a wrapper for functions and was suggested by Craig Smith. This function need not be called if your data does not contain any gaps. It is a good idea to use weighingGaugePlot to look at your data before calling this function.

Usage

weighingGauge1(
  obs,
  precipCol = 1,
  maxGapLength = 5,
  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.

maxGapLength

Optional. The maximum gap length included in the analysis (in time intervals). Default is 5 time intervals. Used by interpolate.

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 gap-filled total precipitation values.

Note

This version does not explicitly incorporate the effects of evaporation.

Author(s)

Kevin Shook

See Also

weighingGauge2 weighingGauge3 weighingGauge4 weighingGaugePlot weighingGaugeInterval

Examples

## Not run: 
test1 <- weighingGauge1(wg,  maxGapLength=6)
## End(Not run)


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