index_arguments.spi: arguments for index spi

Description Usage Arguments Details References Examples

View source: R/calc_indices_get_arguments.R

Description

arguments for index spi

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## S3 method for class 'spi'
index_arguments(
  climindvis,
  timescale = 6,
  ref = NULL,
  distribution = "gamma",
  limit = Inf,
  trend = FALSE,
  NAmaxAgg = 20,
  forecast = FALSE,
  NAmaxTrend = 20,
  ...
)

Arguments

climindvis

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

timescale

Integer. Timescale for monthly SPI calculation. The timescale is the window length (in month) of a backward looking running mean. Default = 6.

ref

Vector with start and end year for reference period. If no reference period is specified, the full period is used as reference period.

distribution

A character string naming a distribution of package stats (see for example GammaDist). For more information on the choice of the distribution, see section Details. Default = "gamma".

limit

Truncate SPI values that are larger than a given threshold, as values larger than 4 are not reasonable. Default = 4. The truncation can be disabled by setting limit = Inf.

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.

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%).

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%).

Details

The SPI calculation is based on the SCI package from Lukas Gudmundsson & James Stagge. For the SPI calculation, aggt needs to be set to "monthly". For the argument distribution, provide a distribution for which the corresponding density function (dname), the corresponding distribution function (pname) and the quantile function (qname) are defined (see for example GammaDist). Distributions are listed in the package stats.
Note, that it is important, what distribution you choose for the transformation of your rainfall data. If you are not sure, consider the references below.

References

Stagee, J.H. ; Tallaksen, L.M.; Gudmundsson, L.; van Loon, A.; Stahl, K.: Candidate Distributions for Climatological Drought Indices (SPI and SPEI), 2015, International Journal of Climatology, 35, 4027-4040, doi:10.1002/joc.4267.

Examples

1
2
data(object_st) # load example objects
calc_index(object_st,index="spi",aggt="monthly")

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