Create a climdex.pcic::climdexInput from a dataclim object

Share:

Description

This function creates a climdex.pcic::climdexInput object from a dataclim object.

Usage

1
createClimdex(myDataclim, basePeriod)

Arguments

myDataclim

A dataclim object.

basePeriod

A numeric vector containing the years of the base period, e.g. 1961:1990. The basePeriod is used for the computation of the quantile threshold needed for some indices in the climdex.pcic package. If NULL (the default), the basePeriod will be extracted from the respective slot of the dataclim object.

Details

This is a simple wrapper to convert a dataclim object to a climdexInput object.

Note that if basePeriod is not a sequence of consecutive years, the range min(basePeriod):max(basePeriod) will be input to the climdex.pcic computations.

Value

A climdexInput object.

Author(s)

Boris Orlowsky <boris@climate-babel.org>

See Also

climdex.pcic-package

Examples

1
2
3
4
5
data(potsdam)
date <- as.Date(potsdam$date)
myDataclim <- createDataclim(date=date, tmin=potsdam$tmin, tmax=potsdam$tmax,
                          prec=potsdam$prec, basePeriod=1981:2010)
myClimdex <- createClimdex(myDataclim, 1981:2010)