Does anyone know of an R code to calculate Palmer Drought Severity Index (PDSI)? [closed]
Asked Answered
T

4

10

Palmer drought severity index is one of the most popular moisture/drought indices around. There is a package in R called a SPEI that allows calculation of two other popular drought indices (Standardised precipitation index and Standardised precipitation and evapotranspiration Index ). I think there should be some package to calculate other moisture indices and particularly PDSI but i have been unable to find one myself.

Telescopium answered 26/1, 2012 at 19:16 Comment(8)
you might try this on the [email protected] mailing list (make sure to mention that you're cross-posting). library(sos); findFn("drought"); findFn("drought Palmer") gets 28 hits for the first query, none (oh well) for the secondOracular
PS: looking at journals.ametsoc.org/doi/abs/10.1175/… quickly, I understand why no-one has tried to implement it in R. Looks like a pain. I wonder how many independent implementations of the algorithm there are ... ?Oracular
I personally knew two implementations an old one in FORTRAN and a new one in C++ that is provided by national drought mitigation center on its websiteTelescopium
If either of them is freely available or (preferably) FOSS, it might not be too hard to make a minimal wrapper for the C++/FORTRAN code that could then be used in R. (A quick google didn't find the code: I got as far as drought.unl.edu/MonitoringTools/DownloadableSPIProgram.aspx but didn't see anything for Palmer)Oracular
If you download the compressed file from here it contains a .exe file as well as C++ source code. I believe it is in the public domain as it is a available freely for download and is maintained by a university and Govt funds greenleaf.unl.edu/downloadsTelescopium
How badly do you want this, and how thoroughly integrated with R do you want it? (Feel free to take this off-SO, to e-mail.)Oracular
pages 18-20 of Liu Sun's thesis seems to provide some relevant formulae: cemml.carleton.ca/davidson/publications/2009/…Licastro
TY...i have a code in C++, i was curious whether anyone is working on it in R...Telescopium
F
4

It looks like we can thank Christian Zang for finally solving the problem: https://github.com/cszang/pdsi

Edit from 2018: This answer was just accepted so I have decided to fork the above-linked repo to my github to guard against future link rot. It will stay there indefinitely.

Freeway answered 25/2, 2016 at 22:15 Comment(0)
T
4

This is the link for .exe file / C++ code that achieves the same.

It contains a manual that describes the input/ output file formats.

I hope that someones skilled enough can write a wrapper for this

http://greenleaf.unl.edu/downloads/

Telescopium answered 11/2, 2012 at 18:43 Comment(1)
Well, has anyone gotten around to doing this????Kareykari
F
4

It looks like we can thank Christian Zang for finally solving the problem: https://github.com/cszang/pdsi

Edit from 2018: This answer was just accepted so I have decided to fork the above-linked repo to my github to guard against future link rot. It will stay there indefinitely.

Freeway answered 25/2, 2016 at 22:15 Comment(0)
D
2

A tool has been created for MatLab:

Jacobi, J., D. Perrone, L. L. Duncan, and G. Hornberger (2013), A tool for calculating the Palmer drought indices, Water Resour. Res., 49, doi:10.1002/wrcr.20342.

Demmy answered 19/9, 2013 at 19:45 Comment(0)
C
2

Now library scPDSI is available in R for calculation of Palmer Drought Severity Index.

Update

The package has been removed from the CRAN repository. But you can use the following code to install the latest archived version

install.packages("https://cran.r-project.org/src/contrib/Archive/scPDSI/scPDSI_0.1.3.tar.gz", 
                 repo=NULL, type="source")
Cupping answered 19/8, 2019 at 17:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.