index_arguments.rXptot: arguments for index rXptot

Description Usage Arguments Examples

View source: R/calc_indices_get_arguments.R

Description

arguments for index rXptot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## S3 method for class 'rXptot'
index_arguments(
  climindvis,
  NAmaxAgg = 20,
  trend = FALSE,
  NAmaxTrend = 20,
  q_threshold = 95,
  operator = ">",
  dd_threshold = 1,
  baseperiod,
  th_object = NULL,
  NAmaxQ = 365,
  qens_all = TRUE,
  ...
)

Arguments

climindvis

Object of type climindvis as returned by make_object which must contain the variable precipitation (prec)

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

Threshold of quantile, for example 95th, 98th, 99th quantile. Default=95.

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.

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="rXptot",aggt="annual",q_threshold=99)

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

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