Description Usage Arguments Details Value Note References See Also Examples
This function creates threshold quantiles for use with climdexInput.raw or climdexInput.csv.
1 2 3 4 |
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. |
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 climdexInput.raw
.
A set of threshold quantiles
Units are assumed to be mm/day for precipitation and degrees Celsius for temperature. No units conversion is performed internally.
http://etccdi.pacificclimate.org/list_27_indices.shtml
climdex.pcic-package
, climdexInput.raw
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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.
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.