Learn R Programming

seas (version 0.2-1)

precip.dep: Cumulative precipitation departure

Description

Calculate the cumulative precipitation departure (CPD) for a station with a given precipitation normal.

Usage

precip.dep(dat, norm, id)

Arguments

dat
data.frame of climate data
norm
precip.norm object containing the precipitation normal for the same station as dat
id
unique station identifier used to extract a subset of data from dat; if missing will use norm$id (if it exists)

Value

  • Returns a data.frame with year, jday, date, precip, and dep fields.

Details

This function is useful for looking at the behavior of a precipitation time-series in relation to its precipitation normal over an extended period of time. This is especially useful for identifying changes in precipitation, and is useful for relating to groundwater recharge patterns (i.e. http://wlapwww.gov.bc.ca/rfc/river_forecast/grwater/obsw002.html).

References

Hodge, W.S., 2001, A Preliminary Survey of Methyl Tertiary-Butyl Ether (MTBE) in Groundwater at Selected Well Sites in British Columbia, Canada, Groundwater Section, Water Protection Branch, Ministry of Water, Land and Air Protection.

See Also

precip.norm

Examples

Run this code
data(mscstn)
data(mscdata)

d <- mksub(mscdata, id=1108447, rm.id=FALSE)
d.ss <- seas.sum(d)
d.dep <- precip.dep(d,precip.norm(d.ss,fun="mean"))
plot(dep ~ date, d.dep, type="l", main="CPD from mean normals")

d.dep <- precip.dep(d, precip.norm(d.ss,fun="median"))
plot(dep ~ date, d.dep, type="l", main="CPD from median normals")

Run the code above in your browser using DataLab