precip.dep {seas} | R Documentation |
Calculate the cumulative precipitation departure (CPD) for a station with a given precipitation normal.
precip.dep(x, norm, var="precip")
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 |
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).
Returns a data.frame
similar to x
, but contains the
departures in the dep
column.
The selection of fun
in precip.norm
, such as
using mean
or median
, will affect
the result of this function; width
has only a minor effect.
Periods with missing (NA
) values in var
of x
will
have a flat departure, neither increasing nor decreasing.
M.W. Toews
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")