index_arguments.wsdi: arguments for index warm spell duration index

Description Usage Arguments Examples

View source: R/calc_indices_get_arguments.R

Description

arguments for index warm spell duration index

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## S3 method for class 'wsdi'
index_arguments(
  climindvis,
  NAmaxAgg = 20,
  trend = FALSE,
  NAmaxTrend = 20,
  q_threshold = 90,
  n = 5,
  min_length = 6,
  spells_span_agg = FALSE,
  baseperiod,
  inbase = FALSE,
  min_base_fraction = 0.1,
  th_object = NULL,
  NAmaxQ = 365,
  qens_all = TRUE,
  fyear = FALSE,
  ...
)

Arguments

climindvis

Object of type climindvis as returned by make_object which must contain the variable maximum temperature (tmax)

NAmaxAgg

Maximum number of missing values in daily data of each aggregation period (e.g. in all January values for the whole time series). Value between 0 (=0%; no missing values allowed) and 100 (=100%; all values can be missing values). If the number of missing values is higher than NAmaxAgg the index value for the respective grid point/station is set to NA. Default = 20 (20%).

trend

Logial (or character). Calculates trends with a predefined method for the chosen index. For information on default method, see trend_methods. You can chose to calculate a non-parameteric trend, by setting trend to a character string "MannKendall". This calculates a TheilSen slope and MannKendall test. Default = FALSE.

NAmaxTrend

Maximum number of years in time series of index which are missing values. Value between 0 (=0%); no years with missing values allowed) and 100 (=100%); all years can be missing values). If exceeded, the trend is set to NA for the respective grid point/station. Note that the value is relative to the length of the time series. Default = 20 (20%).

q_threshold

of warm spell quantile. Default to 90th quantile.

n

Window size (in days) for running window in temperature quantile calculation. Default =5. See details for further information.

min_length

of warm spell definition. Default to 6 days

spells_span_agg

Logical.Should spells starting before the chosen aggregation period be considered? Default=FALSE.

baseperiod

Vector of start and end year for the calculation of quantiles. If not provided, whole range of years in dataset will be used for the calculation of quantiles.

inbase

For temperature quantiles, calculate quantiles inside baseperiod and outside baseperiod follwoing the boostrapping method of Zhang 2005. Only applicable, when baseperiod is selected. Default = TRUE. For hindcast data, inbase is set to FALSE because boostrapping of ensemble and years is computational intensive.

min_base_fraction

Minimum fraction of base data that must be present for quantile to be calculated for a particular day (only applies to temperature quantiles). Default = 0.1.

th_object

Climindvis_index object, default=NULL. if calculating a quantile index for forecast data, a climindvis_index object of hindcasts data for the same spatial dimensions and forecast months has to be provided. Threshold values will then be taken from the hindcast object (object$index_info$quantiles). In this case all other arguments (q, baseperiod, threhold,..) are ignored and taken from the climindvis_index object. In case of autoplot functions, these values are handed over automatically and th_object should be left at default value of NULL..

NAmaxQ

Minimim number of days needed for calculation of quantiles. Default = 365 [days]. For monthly aggregation of precipitation, consider lowering the threshold or expanding the baseperiod.

Examples

1
2
3
4
5
6
7
data(object_st) # load example objects
calc_index(object_st,index="wsdi",aggt="annual",baseperiod=c(1981,2000))

## for forecasts
data(object_hc_st, object_fc_st) # load example objects
ind_hc<-calc_index(object_hc_st,index="wsdi",aggt="monthly")
ind_fc<-calc_index(object_fc_st,index="wsdi",aggt="monthly",th_object=ind_hc)

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