# precip.dep: Cumulative precipitation departure In seas: Seasonal Analysis and Graphics, Especially for Climatology

## Description

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

## Usage

 `1` ```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`

## 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.

## Value

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

## Note

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.

Mike Toews

## See Also

`precip.norm`

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10``` ```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") ```

### Example output

```Loading required package: MASS
Warning message:
In data(mscstn) : data set 'mscstn' not found
```

seas documentation built on May 2, 2019, 4:16 a.m.