index_arguments.qth: arguments for index qth

Description Usage Arguments Examples

View source: R/calc_indices_get_arguments.R

Description

arguments for index qth

Usage

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

Arguments

climindvis

Object of type climindvis as returned by make_object which must contain the variable "thvar".

thvar

Variable for which q_threshold should be calculated (tmin/tmax/tavg/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%).

iformat

Format for indicator "perc"(default)/"days"

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.

q_threshold

Percentile threshold (numerical). Value between 0 and 100.

n

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

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.

operator

One of ">",">=","<","<="

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="qth",aggt="annual",thvar="tmin",q_threshold=5,operator=">=")

## for forecasts
data(object_hc_st, object_fc_st) # load example objects
ind_hc<-calc_index(object_hc_st,index="qth",aggt="monthly",thvar="tmin",q_threshold=5,operator=">=")
ind_fc<-calc_index(object_fc_st,index="qth",aggt="monthly",th_object=ind_hc,thvar="tmin",q_threshold=5,operator=">=")

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