seas (version 0.4-3)

precip.dep: Cumulative precipitation departure

Description

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

Usage

precip.dep(x, norm, var = "precip")

Arguments

x

a seasonal data.frame of climate data

norm

a precip.norm object containing the precipitation normal for the same station as x

var

a common seasonal variable found in x and norm

Value

Returns a data.frame similar to x, but contains the departures in the dep column.

Details

This function is useful for looking at the behaviour 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 (e.g., http://www.env.gov.bc.ca/wsd/data_searches/obswell/obsw002.html).

See Also

precip.norm

Examples

Run this code
# NOT RUN {
data(mscstn)
data(mscdata)

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

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

Run the code above in your browser using DataLab