Standardized Precipitation Index (SPI) equation using ArcGIS

2442
4
12-05-2019 02:54 AM
BennyIstanto
New Contributor II

Hello,

I usually calculate monthly or 3-monthly Standardized Precipitation Index (SPI) using spreadsheet, based on daily rainfall from weather station. Attached is the spreadsheet example.

And now I would like to use satellite precipitation estimate (raster data) to calculate the SPI. The problem is in the spreadsheet I use some function like: FREQUENCY, GAMA.DIST, NORMSINV. 

My question, is there any similar above function in ArcGIS? If not, I am open to any suggestion.

0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

scipy has some if not all

scipy.stats.invnorm — SciPy v0.7 Reference Guide (DRAFT) 

If you are using time windows in the calculation, then there are python/numpy/scipy sliding windows methods.

If you are using images, how will the spreadsheet formulas translate to image use

BennyIstanto
New Contributor II

Hi Dan, thanks for the answer. Currently I convert all the raster precipitation data into csv, and put it together into spreadsheet, so far its work. But its easy for small areas, and make a big problem if calculate for the whole country and for the whole period of data (1981-now).

0 Kudos
DanPatterson_Retired
MVP Emeritus

Well, climate-indices · PyPI 

is at least one package... haven't looked into it, but there is little point in reinventing the wheel if something already exists and you can do better or apply it to a different data form

0 Kudos
BennyIstanto
New Contributor II

Thanks for the suggestion Dan, I also found this from GitHub - bkomaki/pydrought: Standardized Precipitation Index (SPI) in Python and looks promising. The input is CSV, we'll see if I can find an example on how to modify the script to be able read raster as input.

0 Kudos