climdex.pcic (version 1.1-11)

climdex.tx90p: Computation of these percentiles involves use of a boostrap procedure, described below but described in more depth in [Zhang, 2005].

Description

Computation of these values outside of the base period involves comparing the temperature data for each day with the corresponding percentiles for a 5 day running window surrounding that day. The resulting monthly series is then the monthly percentage of values that meet the criteria.

Usage

climdex.tx90p(ci, freq = c("monthly", "annual"))

Arguments

ci

Object of type climdexInput.

freq

Time frequency to aggregate to.

Value

A vector containing a timeseries containing values of the index on a monthly or annual timescale.

Details

Computation of these values inside the base period is more complicated. It involves comparison of the daily temperature data with the corresponding day of temperature data in each of (n - 1) sets of data. The sets consist of the data for the base period with the current year replaced with each of the other years. The results of these comparisons are then averaged to give a value between 0 and 1. Finally, the resulting daily series is aggregated to a monthly series by averaging these daily values and multiplying by 100 to give a monthly percentile value.

References

http://etccdi.pacificclimate.org/list_27_indices.shtml

See Also

climdexInput.raw, climdexInput.csv.

Examples

Run this code
# NOT RUN {
library(PCICt)

## Create a climdexInput object from some data already loaded in and
## ready to go.

## Parse the dates into PCICt.
tmax.dates <- as.PCICt(do.call(paste, ec.1018935.tmax[,c("year",
"jday")]), format="%Y %j", cal="gregorian")
tmin.dates <- as.PCICt(do.call(paste, ec.1018935.tmin[,c("year",
"jday")]), format="%Y %j", cal="gregorian")
prec.dates <- as.PCICt(do.call(paste, ec.1018935.prec[,c("year",
"jday")]), format="%Y %j", cal="gregorian")

## Load the data in.
ci <- climdexInput.raw(ec.1018935.tmax$MAX_TEMP,
ec.1018935.tmin$MIN_TEMP, ec.1018935.prec$ONE_DAY_PRECIPITATION,
tmax.dates, tmin.dates, prec.dates, base.range=c(1971, 2000))

## Create a monthly timeseries of the TX90p index.
tx90p <- climdex.tx90p(ci)
# }

Run the code above in your browser using DataLab