SPEI
Computing the Standardized Precipitation-Evapotranspiration Index and other reference evapotranspiration.
https://github.com/sbegueria/SPEI
Category: Natural Resources
Sub Category: Water Supply and Quality
Last synced: about 5 hours ago
JSON representation
Repository metadata
An R package for computing the Standardized Precipitation-Evapotranspiration Index (SPEI), Penman-Monteith and other reference evapotranspiration, SPI, etc.
- Host: GitHub
- URL: https://github.com/sbegueria/SPEI
- Owner: sbegueria
- Created: 2013-09-20T11:58:42.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2025-04-01T08:27:43.000Z (26 days ago)
- Last Synced: 2025-04-21T06:49:35.692Z (6 days ago)
- Language: R
- Homepage:
- Size: 1.31 MB
- Stars: 85
- Watchers: 3
- Forks: 34
- Open Issues: 29
- Releases: 4
-
Metadata Files:
- Readme: README.md
README.md
SPEI is an R package incorporating a set of functions for computing potential or reference evapotranspiration and several widely used drought indices, including the Standardized Precipitation-Evapotranspiration Index (SPEI) and the Standardized Precipitation Index (SPI).
The package is centered on the SPEI. For more information on this drought index, please visit
https://spei.csic.es.
Details
Functions <spei>
and <spi>
are the workhorse of the SPEI library. Other functions such as <kern>
, <cdfglo>
or <pglo>
are auxiliary low-level functions and they will not be used directly by the typical user. Functions for computing potential evapotranspiration are provided, too, for helping computing the SPEI. These are: <thornthwaite>
, <hargreaves>
and <penman>
.
Installation
Install the latest stable version from GitHub:
library(devtools)
install_github('sbegueria/SPEI')
Or get the latest version on CRAN:
install.packages('SPEI')
Please, note that the CRAN version may not be the very latest version of the package.
If you are interested in testing the current development version you can do so by installing the devel
branch:
library(devtools)
install_github('sbegueria/SPEI@devel')
References
To cite package ‘SPEI’ in publications use:
- Beguería S, Vicente-Serrano SM (2023). SPEI: Calculation of the Standardized Precipitation-Evapotranspiration Index. https://spei.csic.es, https://github.com/sbegueria/SPEI.
A BibTeX entry for LaTeX users is:
@Manual{,
title = {SPEI: Calculation of the Standardized Precipitation-Evapotranspiration Index},
author = {Santiago Beguería and Sergio M. Vicente-Serrano},
year = {2023},
note = {https://spei.csic.es, https://github.com/sbegueria/SPEI},
}
If you use the SPEI index, consider citing these references:
-
S.M. Vicente-Serrano, S. Beguería, J.I. López-Moreno. 2010. A Multi-scalar drought index sensitive to global warming: The Standardized Precipitation Evapotranspiration Index – SPEI. Journal of Climate 23: 1696, DOI: 10.1175/2009JCLI2909.1.
-
Beguería S, Vicente-Serrano SM, Reig F, Latorre B. 2014. Standardized precipitation evapotranspiration index (SPEI) revisited: parameter fitting, evapotranspiration models, tools, datasets and drought monitoring. International Journal of Climatology 34(10): 3001-3023.
Other (possibly useful) references:
-
Vicente-Serrano, S.M., Beguería, S., López-Moreno, J.I., Angulo, M., El Kenawy, A. 2010. A new global 0.5° gridded dataset (1901-2006) of a multi-scalar drought index: comparison with current drought index datasets based on the Palmer Drought Severity Index. Journal of Hydrometeorology 11: 1033--1043.
-
Beguería, S., Vicente-Serrano, S.M. y Angulo, M. 2010. A multi-scalar global drought data set: the SPEIbase: A new gridded product for the analysis of drought variability and impacts. Bulletin of the American Meteorological Society 91: 1351--1354.
-
Vicente-Serrano, S.M., Beguería, S. and Juan I. López-Moreno. 2011. Comment on “Characteristics and trends in various forms of the Palmer Drought Severity Index (PDSI) during 1900-2008” by A. Dai. Journal of Geophysical Research-Atmosphere 116: D19112, doi:10.1029/2011JD016410.
-
Vicente-Serrano, S.M., Santiago Beguería, Jorge Lorenzo-Lacruz, Jesús Julio Camarero, Juan I. López-Moreno, Cesar Azorín-Molina, Jesús Revuelto, Enrique Morán-Tejeda and Arturo Sánchez-Lorenzo. 2012. Performance of drought indices for ecological, agricultural and hydrological applications. Earth Interactions 16: 1--27.
-
Vicente-Serrano, S.M., Célia Gouveia, Jesús Julio Camarero, Santiago Beguería, Ricardo Trigo, Juan I. López-Moreno, César Azorín-Molina, Edmond Pasho, Jorge Lorenzo-Lacruz, Jesús Revuelto, Enrique Morán-Tejeda and Arturo Sanchez-Lorenzo. 2012. The response of vegetation to drought time-scales across global land biomes. Proceedings of the National Academy of Sciences of the United States of America, doi: 10.1073/pnas.1207068110.
-
Vicente-Serrano, S.M., Gerard Van der Schrier, Santiago Beguería, Cesar Azorín-Molina, Juan-I. Lopez-Moreno. 2015. Contribution of precipitation and reference evapotranspiration to drought indices under different climates. Journal of Hydrology 426: 42--54.
-
Vicente-Serrano, S.M., Beguería, S. 2016. Comment on "Candidate Distributions for Climatological Drought Indices (SPI and SPEI)" by James H. Stagge et al. International Journal of Climatology 36: 2120--213.
Version history
Version 1.8.0, November 2022 (current version on GitHub, submitted to CRAN).
- Solving several minor bugs in
<thornthwaite>
,<hargreaves>
, and<penman>
functions (output difference is lower than 0.1% with respect to version 1.7). - Solving a bug in
<spei>
that resulted in bad cumulative data when using a non-rectangular kernel, resulting in incorrect SPEI values. - Implementation of more thorough data and options checks, and providing a single error message containing all the errors upon failure.
- Implementation of verbosity in all functions: now they print information about the options being used. New argument
verbosity
added, defaulting to TRUE, to override this behavior. - All the functions now accept 3-d arrayed data, enabling the possibility of using the functions on gridded climate data.
- Implementation of different versions of the Penman-Monteith ETo calculation in function
<penman>
. - Implementation of an option to include CO2 concentration data in function
<penman>
. - Implementation of a new option for when no wind data are available in function
<penman>
. - Functions
<spei>
and<spi>
now admit time series of any frequency, and not only monthly (frequency 12) data. - Function
<plot.spei>
completely rewritten based onggplot2
, solving some bugs and enabling more flexibility.
Version 1.7.2, January 2018 (only on GitHub).
- Several code optimizations and improvements (by github user @doug-friedman).
- Added formal unit testing with
testthat
(@doug-friedman). - Move documentation over to
roxygen
(@doug-friedman). - Update
<spei>
function to allow processing data with frequency different than 12 (by github user @MuDestructor).
Version 1.7.1, June 2017.
- Corrected an error in
<spei>
function, which was not working when distribution was Gamma or PeasonIII and using user provided parameters. (Fixed by Emanuele Cordano, [email protected] -- ecor) - Added probability of monthly precipitation = 0 (pze) when using user provided parameters. (Fixed by Emanuele Cordano, [email protected] -- ecor)
Version 1.7, June 2017 (current version on CRAN).
- Corrected a bug in the
<kern>
function which resulted in a multiplicative kernel instead of an additive one such the one expected in the<spei>
and<spi>
functions. - Some small corrections to the plotting function and to the examples.
Version 1.6, September 2013.
- Corrected an error in the function
<thornthwaite>
which resulted in wrong potential evapotranspiration estimates when a multivariate time series was used as input. - Corrected an error in the function
<spi>
which resulted in wrong handling of zero precipitation months when using the Gamma or PearsonIII distribution. - Minor fixes to the
<spi>
and<plot.spei>
functions to correctly handle \code{spei} objects when they result from a call to<spi>
. - Modification to the
<kern>
function, which now yields kernel coefficients averaging one. - Corrected an error in the functions
<spi>
and<spei>
which resulted in ub-pwm method being used irrespective of the value of the \code{fit} parameter used, when using the 'Gamma' or 'PearsonIII' distributions. - Minor changes to the documentation.
Version 1.5, May 2013.
- Optimization of function
<spei>
, now using embed() for accumulating the data at the desired time scale.
Version 1.4, May 2013.
- Minor fixes to functions
<penman>
and<pwm>
. - Documentation of the penman function defined by mistake ed as the saturation vapor pressure, while it should read 'actual vapor pressure'.
- Function zzz.R added to display basic information about the SPEI package at startup.
- Function
<SPEINews>
added to display the NEWS file.
Version 1.3, March 2013.
- Minor fixes to functions
<spei>
and<penman>
. - Added new option for user-supplied SPEI parameters in the
<spei>
function. This overrides the fitting of a probability function to the data. - Added new dataset
<cabinda>
from Allen et al. (1998).
Version 1.2, October 2012.
- Fixed a bug causing several functions to fail when a time series not belonging to matrix class was provided.
- Function
<plot.spei>
now distinguishes between calls to spei and spi and labels the axis accordingly.
Version 1.1, March 2012.
- Functions
<spei>
and<spi>
now yield an object of class "spei". - New functions for summarizing and plotting "spei" objects are provided.
- An option to establish a reference period for the computation of the indices has been implemented in functions
<spei>
and<spi>
.
Version 1.0, January 2012.
First release of the SPEI package.
Any problems?
Feel free to send an issue if you have any questions or problems.
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 2 of the License, or (at your option) any later version.
Owner metadata
- Name: Santiago Beguería
- Login: sbegueria
- Email:
- Kind: user
- Description: Research Scientist, Earth System Science
- Website: santiago.begueria.es
- Location: Zaragoza, Spain
- Twitter:
- Company: Consejo Superior de Investigaciones Científicas
- Icon url: https://avatars.githubusercontent.com/u/5500064?u=d117e303a81c46338cc79b7afa501cb139204262&v=4
- Repositories: 12
- Last ynced at: 2024-06-11T16:25:56.526Z
- Profile URL: https://github.com/sbegueria
GitHub Events
Total
- Issues event: 2
- Watch event: 11
- Delete event: 1
- Issue comment event: 4
- Push event: 2
- Pull request event: 2
- Fork event: 1
- Create event: 1
Last Year
- Issues event: 2
- Watch event: 11
- Delete event: 1
- Issue comment event: 4
- Push event: 2
- Pull request event: 2
- Fork event: 1
- Create event: 1
Committers metadata
Last synced: 6 days ago
Total Commits: 159
Total Committers: 4
Avg Commits per committer: 39.75
Development Distribution Score (DDS): 0.063
Commits in past year: 2
Committers in past year: 1
Avg Commits per committer in past year: 2.0
Development Distribution Score (DDS) in past year: 0.0
Name | Commits | |
---|---|---|
Santiago Beguería | s****a@c****s | 149 |
Emanuele Cordano | c****m@d****t | 5 |
Fergus Reig Gracia | f****g@g****m | 3 |
sbegueria | s****a@M****l | 2 |
Committer domains:
- d01ri1500655.jrc.it: 1
- csic.es: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 58
Total pull requests: 23
Average time to close issues: over 1 year
Average time to close pull requests: 11 months
Total issue authors: 42
Total pull request authors: 8
Average comments per issue: 1.5
Average comments per pull request: 0.7
Merged pull request: 11
Bot issues: 0
Bot pull requests: 0
Past year issues: 5
Past year pull requests: 1
Past year average time to close issues: N/A
Past year average time to close pull requests: 1 minute
Past year issue authors: 5
Past year pull request authors: 1
Past year average comments per issue: 0.6
Past year average comments per pull request: 0.0
Past year merged pull request: 1
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- sbegueria (14)
- user241276 (2)
- Aariq (2)
- 8jiang6 (2)
- cmeeusse (1)
- jalfje (1)
- bluegulcy (1)
- erifarov (1)
- wkqian06 (1)
- arjun231193 (1)
- ormanbotanik (1)
- AmandaBatlle (1)
- sultanduran (1)
- irfades (1)
- phyvera (1)
Top Pull Request Authors
- sbegueria (16)
- doug-friedman (1)
- lukruh (1)
- simmieyungie (1)
- ecor (1)
- lochbika (1)
- dvictori (1)
- MuDestructor (1)
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 2
-
Total downloads:
- cran: 2,336 last-month
- Total docker downloads: 42,037
- Total dependent packages: 8 (may contain duplicates)
- Total dependent repositories: 34 (may contain duplicates)
- Total versions: 10
- Total maintainers: 1
cran.r-project.org: SPEI
Calculation of the Standardized Precipitation-Evapotranspiration Index
- Homepage: https://spei.csic.es
- Documentation: http://cran.r-project.org/web/packages/SPEI/SPEI.pdf
- Licenses: GPL-2
- Latest release: 1.8.1 (published about 2 years ago)
- Last Synced: 2025-04-26T12:02:47.079Z (1 day ago)
- Versions: 9
- Dependent Packages: 6
- Dependent Repositories: 33
- Downloads: 2,336 Last month
- Docker Downloads: 42,037
-
Rankings:
- Docker downloads count: 0.356%
- Forks count: 2.593%
- Dependent repos count: 4.623%
- Average: 5.293%
- Stargazers count: 6.716%
- Dependent packages count: 7.954%
- Downloads: 9.517%
- Maintainers (1)
conda-forge.org: r-spei
- Homepage: http://sac.csic.es/spei
- Licenses: GPL-2.0-only
- Latest release: 1.7 (published about 4 years ago)
- Last Synced: 2025-04-01T02:11:52.262Z (27 days ago)
- Versions: 1
- Dependent Packages: 2
- Dependent Repositories: 1
-
Rankings:
- Dependent packages count: 19.581%
- Dependent repos count: 24.103%
- Average: 29.216%
- Forks count: 31.405%
- Stargazers count: 41.777%
Dependencies
- R >= 3.5.0 depends
- TLMoments * imports
- checkmate * imports
- ggplot2 * imports
- lmom * imports
- lmomco * imports
- lubridate * imports
- reshape * imports
- zoo * imports
- covr * suggests
- testthat * suggests
Score: 16.823960419091215