phaseCorrect: Corrects precipitation for undercatch and calculates phase

View source: R/phaseCorrect.R

phaseCorrectR Documentation

Corrects precipitation for undercatch and calculates phase

Description

Applies an iterative solution to calculate the psychrometric hydrometeor temperature. The hydrometeor temperature is then used to partition the raw precipitation into rainfall and snowfall. The snowfall is adjusted for gauge undercatch, if selected.

Usage

phaseCorrect(
  obs,
  Tcol = 1,
  RHcol = 2,
  Ucol = 3,
  Pcol = 4,
  RH_type = 1,
  shield = 1,
  quiet = TRUE,
  logfile = ""
)

Arguments

obs

Required. A CRHMr data frame of observations.

Tcol

Required. Column number containing the air temperature (not including the datetime). Default is column 1. The values must be in ^\circC.

RHcol

Required. Column number containing the RH (not including the datetime). Default is column 2. The values must be as percentages.

Ucol

Required. Column number containing the wind speeds (not including the datetime). Default is column 3. The values must be in m/s.

Pcol

Required. Column number containing the precipitaion (not including the datetime). Default is column 4. The values must be in mm.

RH_type

Optional. Set to 1 if RH is relative to water, any othe value if relative to ice. Default is 1.

shield

Optional. Set to 1 to use Alter shield undercatch correction from MacDonald and Pomeroy (2007). Set to 2 to use Alter shield undercatch correction from Smith. Set to any other value for unadjusted precipitation. Default is 1.

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 successful, returns the original dataframe with additional columns for the rain, snow, total precipitation and rain ratio.

Author(s)

Phillip Harder

References

Harder, P., and J. Pomeroy (2013), “Estimating precipitation phase using a psychrometric energy balance method”, Hydrol. Process., 27(13), 1901-1914, doi:10.1002/hyp.9799.

Macdonald, J., and J. Pomeroy (2007), “Gauge Undercatch of Two Common Snowfall Gauges in a Prairie Environment”, Proc. 64th East. Snow Conf. St. John's, Canada., 119-126.

Examples

corrected <- phaseCorrect(BadLake7376, Tcol=1, RHcol=2, Ucol=3, Pcol=5)

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