Description Usage Arguments Value Details Indices See Also
View source: R/calc_indices_main.R
The function calculated climate indices for different temporal aggregations for gridded and station data. It also works for seasonal forecast ensembles (grid and station). As input a climindvis object (output of make_object
is needed.
1 | calc_index(climindvis, index, aggt, ...)
|
climindvis |
Object of type climindvis as returned by |
index |
Name of index to be calculated, e.g. "dd","tnn","spi". (for a complete list of indices see see section "indices" below). |
aggt |
Aggregation type for temporal aggregation:
|
... |
for index specific arguments see links in section "indices" below. |
The function returns an S3 object of class climindvis_index with the following entries:
index Array of index values of dimension: spatial dimensions x (ensemble members) x aggregations x years
index_info List with information about the indices (name (@iname), @aggt, names of aggregations (@aggnames), @years, index format (@iformat), index dimensions (@idims)) used for plotting functions.
lon Array of longitudes
lat Array of latitudes
index_trend Array of dimension spatial dimension(s) x (ensemble) x aggregation x 4. The dimensions of the last dimension are 1: fit of trend estimate, 2: lower confidence interval, 3: upper confidence interval and 4:fit of loess-curve.
trend_info Array of dimension spatial dimension(s) x (ensemble) x aggregation x 6. The dimensions of the last dimension are the 1:start year, 2: end year, 3. p-value, 4. relative trend, 5. absolute trend and 6. the method used to calculate the trend. Methods are numeric and correspond to (1) Least Squares Fit, (2) Logistic Regression and (3) MannKendall.
Note that indices are only calculated if all days of an aggregation period are available in the time series . If e.g. the dataset only contains data for Jan-May and aggt="seasonal" is chosen, the index will only be calculated for the season MAM. If the aggregation period spans years, the index will not be calculated for the last year.
The following indexs can be calculated with the ClimIndVis package. For index specific arguments and examples, see links.
Threshold Indices:
dd Dry days (Prec < 1mm). For arguments and default values see index_arguments.dd
fd Frost days (Tmin<0C). For arguments and default values see index_arguments.fd
th_tmin Days with minimum temperature below a user defined threshold (Tmin < threshold). For arguments and default values see index_arguments.th_tmin
th_tmax Days with maximum temperature above a user defined threshold (Tmax > threshold). For arguments and default values see index_arguments.th_tmax
th_topt Days with average temperature within a user defined temperature range (threshold <= Tavg <= threshold2). For arguments and default values see index_arguments.th_topt
th Threshold function for days below/above a user defined threshold (Variable >/>=/</<= threshold). For arguments and default values see index_arguments.th
th_range Threshold function for days within a user defined range (threshold >/>=/</<= variable >/>=/</<= threshold2). For arguments and default values see index_arguments.th_range
Minimum-Maximum Indices:
tnn Minimum value of daily minimum temperature. For arguments and default values see index_arguments.tnn
tnx Maximum value of daily minimum temperature. For arguments and default values see index_arguments.tnx
txn Minimum value of daily maximum temperature. For arguments and default values see index_arguments.txn
txx Maximum value of daily maximum temperature. For arguments and default values see index_arguments.txx
varmin Minimum value of user defined variable. For arguments and default values see index_arguments.varmin
varmax Maximum value of user defined variable. For arguments and default values see index_arguments.varmin
rx Maximum rx-day precipitation. index_arguments.rx
minmax_xdays Maximum/minimum rx-day value of variable. For arguments and default values see index_arguments.minmax_xdays
Spell-Duration Indices:
cwd Consecutive wet days. For arguments and default values see index_arguments.cwd
cdd Consecutive dry days. For arguments and default values see index_arguments.cdd
cxd Consecutive days of variable above/below a threshold. For arguments and default values see index_arguments.cxd
csdi Cold spell duration index. Count of days with at least 6 consecutive days when TN < 10th percentile. For arguments and default values see index_arguments.csdi
wsdi Warm spell duration index. Count of days with at least 6 consecutive days when TX > 90th percentile. For arguments and default values see index_arguments.wsdi
Quantile Indices:
tn10p Percentage of days when TN < 10th percentile. For arguments and default values see index_arguments.tn10p
tn90p Percentage of days when TN > 90th percentile.For arguments and default values see index_arguments.tn90p
tx10p Percentage of days when TX < 10th percentile.For arguments and default values see index_arguments.tx10p
tx90p Percentage of days when TX > 90th percentile.For arguments and default values see index_arguments.tx90p
qth Number of days above/below thershold. (works for precip and temperature data). For arguments and default values see index_arguments.qth
rXptot Total precipitation when RR > Xp, e.g. (r95ptot). For arguments and default values see index_arguments.rXptot
qval Percentile value for each aggregation period and year. For arguments and default values see index_arguments.qval
qrange Percentile range for each aggregation period and year. For arguments and default values see index_arguments.qrange
further Indices:
mean For arguments and default values see index_arguments.mean
sum For arguments and default values see index_arguments.sum
spi Standard precipitation index. Argument aggt needs to be set to monthly for this index. For more arguments and default values see index_arguments.spi
spi_forecast Argument aggt needs to be set to monthly for this index. For more arguments and default values see index_arguments.spi_forecast
sdii Simple precipitation intensity index. Ratio of total rainfall to the number of days when precipitation is higher than a dry day threshold. For arguments and default values see index_arguments.sdii
prcptot Total precipitation in wet days. For arguments and default values see index_arguments.prcptot
rainy_season_start Start of the rainy season. Argument aggt needs to be set to dates and start_days and end_days additionally provided for this index. For more arguments and default values see index_arguments.rainy_season_start
#'
rainy_season_end End of the rainy season. Argument aggt needs to be set to dates and start_days and end_days additionally provided for this index. For more arguments and default values see index_arguments.rainy_season_end
#'
rainy_season_dur Duration of the rainy season. Argument aggt needs to be set to dates and day_start and day_end additionally provided for this index. For more arguments and default values see index_arguments.rainy_season_dur
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.