Description Usage Arguments Details Value Author(s) References Examples
The SPI function computes the SPI index (McKee et al., 1993) from a predefined time scale (1 month, 3 months, 24 months, etc.) to a period choosen by users.
1 |
nargs |
number of arguments (minimum = 3) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
filename |
name of datafile The datafile in ASCII format must have the following layout:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id |
initial data | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
fd |
final data | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
title |
data title | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
output |
output type ( 1 - graph, 2 - results matrix ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
txlab |
the X axis title | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tylab |
the Y axis title |
Positive SPI values indicate greater than median precipitation and negative values indicate less than median precipitation. Drought periods are represented by relatively high negative deviations. Normally, the 'drought' part of the SPI range is arbitrary split into moderately dry (-1.0 > SPI > -1.49), severely dry (-1.5 > SPI > -1.99) and extremely dry conditions (SPI < -2.0). A drought event starts when SPI value reaches -1.0 and ends when SPI becomes positive again (McKee et al., 1993).
This function use the SPI range defined by National Climatic Data Center (NCDC):
exceptionally moist: | SPI >= 2.0 |
extremely moist: | 1.60 <= SPI < 1.99 |
very moist: | 1.30 <= SPI < 1.59 |
moderately moist: | 0.80 <= SPI < 1.29 |
abnormally moist: | 0.51 <= SPI < 0.79 |
near normal: | -0.50 <= SPI <= 0.50 |
abnormally dry: | -0.79 <= SPI < -0.51 |
moderately dry: | -1.29 <= SPI < -0.80 |
severely dry: | -1.59 <= SPI < -1.30 |
extremely dry: | -1.99 <= SPI < -1.60 |
exceptionally dry: | SPI <= -2.0 |
Returns a data matrix or a graphic with SPI values.
Josemir A Neves (josemir.neves@gmail.com/josemiremparn@rn.gov.br)
McKee, T.B., Doesken, N.J., Kleist, J., 1993. The relationship of drought frequency and duration to time scales. In: Preprints, Eighth Conference on Applied Climatology, January 17 e 22, Anaheim, California, pp. 179 e 184.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ##load data
data(spi_data)
##write to file
write.table(spi_data,file="spi.txt",quote=FALSE,row.names=TRUE)
## Standard format with the output in the text format
spi(3,"spi.txt",1963,2010)
## A full output in graphical format
spi(7,"spi.txt",1963,2010,"Standardized Precipitation Index - Rio Grande do Norte State",1,"years","months")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.