calc_index: Function to calculate climate indices

Description Usage Arguments Value Details Indices See Also

View source: R/calc_indices_main.R

Description

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.

Usage

1
calc_index(climindvis, index, aggt, ...)

Arguments

climindvis

Object of type climindvis as returned by make_object

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:

  • "annual": annual aggregation

  • "seasonal": seasonal aggregation ("MAM","JJA","SON","DJF"), define subset as character array using parameter selagg, e.g. selagg=("DJF","MAM") for selecting seasons DJF and MAM only.

  • "monthly": Monthly aggregation. For subset of months, define subset as integer array using parameter selagg, e.g. c(1:3) for monthly aggregation of Jan,Feb and March

  • "other": aggregation over all months defined as integer array in aggmons, e.g. c(1:4) aggregates over Jan-Apri.

  • "dates": Aggregation of user defined dates defined in start_days and end_days. start_days and end days are arrays of format date or character(yyyy-mm-dd). If start and end dates are the same for all years they can also be specified as "0000-mm-dd", e.g. "0000-01-01".

  • "xdays": Aggregations over time slices of xday days, e.g. for xday=7, weekly aggregation. If the parameters start and/or end are provided, time slices are only calculated between the two dates. If you want weekly aggregations you thus have to set the starting date to a Monday. This aggregation is not implemented for seasonal forecast data and if small xdays are chosen (e.g. 7 or 10) we recommend to use it only for short time periods. Please note that at the moment the autoplot functions do not work with this aggregation type.

...

for index specific arguments see links in section "indices" below.

Value

The function returns an S3 object of class climindvis_index with the following entries:

Details

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.

Indices

The following indexs can be calculated with the ClimIndVis package. For index specific arguments and examples, see links.

Threshold Indices:

Minimum-Maximum Indices:

Spell-Duration Indices:

Quantile Indices:

further Indices:

See Also

calculate_index.climindvis


Climandes/ClimIndVis documentation built on Oct. 24, 2021, 10:52 a.m.