Learn R Programming

climdex.pcic (version 1.1-4)

climdexInput.raw: Any of tmin (daily minimum temperature), tmax (daily maximum temperature), tavg (daily mean temperature), and prec (daily precipitation) can be passed in. tavg will be derived from the mean of tmax and tmin if it is not supplied. If any of tmin, tmax, and prec are not supplied, the set of indices which can be calculated will be limited to indices which do not involve the missing variables.

Description

For all data supplied, the associated dates must also be supplied.

Usage

climdexInput.raw(tmax = NULL, tmin = NULL, prec = NULL,
  tmax.dates = NULL, tmin.dates = NULL, prec.dates = NULL,
  base.range = c(1961, 1990), n = 5, northern.hemisphere = TRUE,
  tavg = NULL, tavg.dates = NULL, quantiles = NULL, temp.qtiles = c(0.1,
  0.9), prec.qtiles = c(0.95, 0.99), max.missing.days = c(annual = 15,
  monthly = 3), 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.
northern.hemisphere
Whether this point is in the northern hemisphere.
tavg
Daily mean temperature data.
tavg.dates
Dates for the daily mean temperature data.
quantiles
Threshold quantiles for supplied variables.
temp.qtiles
Quantiles to calculate for temperature variables
prec.qtiles
Quantiles to calculate for precipitation
max.missing.days
Vector containing thresholds for number of days allowed missing per year (annual) and per month (monthly).
min.base.data.fraction.present
Minimum fraction of base data that must be present for quantile to be calculated for a particular day

Value

References

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

See Also

climdex.pcic-package, strptime.

Examples

Run this code
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))

Run the code above in your browser using DataLab