get.outofbase.quantiles: Method for getting threshold quantiles for use in computing...

View source: R/quantilesfun.R

get.outofbase.quantilesR Documentation

Method for getting threshold quantiles for use in computing indices

Description

This function creates threshold quantiles for use with climdexInput.raw or climdexInput.csv.

Usage

get.outofbase.quantiles(tmax = NULL, tmin = NULL, tavg = NULL,
  prec = NULL, tmax.dates = NULL, tmin.dates = NULL, tavg.dates = NULL,
  prec.dates = NULL, base.range = c(1961, 1990), n = 5,
  temp.qtiles = c(0.1, 0.25, 0.75, 0.9), prec.qtiles = c(0.25, 0.75, 0.95,
  0.99), min.base.data.fraction.present = 0.1)

Arguments

tmax

Daily maximum temperature data.

tmin

Daily minimum temperature data.

prec

Daily total precipitation data.

tmax.dates

Dates for the daily maximum temperature data.

tmin.dates

Dates for the daily minimum temperature data.

prec.dates

Dates for the daily total precipitation data.

base.range

Years to use for the baseline.

n

Number of days to use as window for daily quantiles.

temp.qtiles

Quantiles to calculate for temperature variables

prec.qtiles

Quantiles to calculate for precipitation

min.base.data.fraction.present

Minimum fraction of base data that must be present for quantile to be calculated for a particular day

quantiles

Threshold quantiles for supplied variables.

Details

This function takes input climate data at daily resolution, and produces as output a set of threshold quantiles. This data structure can then be passed to climdexInput.raw or climdexInput.csv.

For more details on arguments, see link{climdexInput.raw}.

Value

A set of threshold quantiles

Note

Units are assumed to be mm/day for precipitation and degrees Celsius for temperature. No units conversion is performed internally.

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=" tmin.dates <- as.PCICt(do.call(paste, ec.1018935.tmin[,c("year", "jday")]), format=" prec.dates <- as.PCICt(do.call(paste, ec.1018935.prec[,c("year", "jday")]), format="

## Load the data in. quantiles <- get.outofbase.quantiles(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))

References

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

See Also

climdex.pcic-package, climdexInput.raw.


ECA-D/climind documentation built on Nov. 26, 2022, 10:20 a.m.