SPI
gma.climet.index.SPI
function SPI(pre, axis = None, scale = 1, periodicity = 12, distribution = "Gamma", fit_method = "MLE", calibration = None):
Calculate the Standardized Precipitation Index.
Parameters:
pre: array.
Precipitation (mm).
Optional:
axis = int. Default None.
Calculation axis. If not set (None), multidimensional data will be expanded to 1 dimension for calculation.
scale = int. Default 1.
Time scale. For example: 1, 3 or others.
periodicity = int. Default 12.
Periodicity of data. For example: the monthly scale can have a period of 12.
distribution = str. Default 'Gamma'.
Distribution type to be used for the internal fitting/transform computation.
Supported distributions include: 'Gamma', 'LogLogistic', 'Pearson3'.
fit_method = str. Default 'MLE'.
Fitting methods for distribution parameters.
Supported method include: 'MLE': Maximum Likelihood Estimation, 'LMoment': L-Moment Estimation(PWD), 'LMoment2': L-Moment Estimation.
calibration = list||slice||None. Default None.
Fit the calibration interval of distribution parameter data, Based on the periodicity.
Default(None) using all data. For example: Select the data from 1-5 periodicity to fit parameters: calibration = [0, 5] Then apply the parameter fitting results to all data.
*Note: scale||periodicity||Calibrationarebasedoncalculatedaxis!.
Returns:
Type: array.
References.
McKee T B, Doesken N J, Kleis J. The relationship of drought frequency and duration to time scales[R]..
Eighth Conf. on Applied Climatology, Anaheim, CA: AmericanMete||Society||1993.