Skip to content

rpkgs/scPDSI

Repository files navigation

scPDSI

R-CMD-check codecov License CRAN

This R package is used to calculate the conventional Palmer Drought Severity Index (PDSI) and the Self-Calibrating Palmer Drought Severity Index (scPDSI), the widely used drought indicators around the world, at monthly and weekly scale. Precipitation and potential evapotranspiration (PE) data are required to calculate the PDSI and scPDSI.

This package is build up on the C++ codes of the scPDSI provided by Nathan Wells, Steve Goddard and Michael J. Hayes in the University of Nebraska-Lincoln.

Installation

Get it from the CRAN repository:

install.packages('scPDSI')

Or install from GitHub (usually the development version):

devtools::install_github('kongdd/scPDSI')

Please cite these references if you use the scPDSI on your work:

Example

This is an example showing how to calculate the scPDSI:

## P and PE are the vectors of monthly precipitation and PE data.
sc_pdsi <- pdsi(P, PE, start = 1960, sc = TRUE)

plot(sc_pdsi)                 # Plot the calculated PDSI (X) values
plot(sc_pdsi, index = "PHDI") # plot Palmer hydrological drought index
plot(sc_pdsi, index = "WPLM") # plot weighted PDSI

Copyright and license

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages