dailyByHourlyP: Distributes daily precipitation according to hourly values

View source: R/dailyByHourlyP.R

dailyByHourlyPR Documentation

Distributes daily precipitation according to hourly values

Description

Used to distrbute daily percipitation totals, according to hourly values. Typically, this is used when the hourly values are of lower quality than the daily values, such as when they are imputed from another location.

Usage

dailyByHourlyP(
  dailyObs,
  dailyPcol = 0,
  hourlyObs,
  hourlyPcol = 0,
  missingRatio = 1,
  quiet = TRUE,
  logfile = ""
)

Arguments

dailyObs

obs Required. A CRHMr data frame containing daily precipitation values.

dailyPcol

Optional. The number of the column containing the daily precipitation. If not specified, the column will be guessed from the variable name. Note that the variable name MUST include the letter 'p', even if the number is specified.

hourlyObs

obs Required. A CRHMr data frame containing hourly precipitation values.

hourlyPcol

Optional. The number of the column containing the hourly precipitation. If not specified, the column will be guessed from the variable name. Note that the variable name MUST include the letter 'p', even if the number is specified.

missingRatio

Optional. The value of the ratio used to multiply the hourly preciptiation when daily precipitation data are not available. The default is 1. If you want to omit these values, use NA_real_.

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 sucessful, returns a modified version of the obs data frame, consiting of the original hourly precipitation data, and the adjusted_precip.

Author(s)

Kevin Shook

Examples

## Not run:  hourly <- dailyByHourlyP(dailyObs = daily, hourlyObs = hourly)


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