Skip to content

Commit

Permalink
Merge pull request #47 from martinvonk/dev
Browse files Browse the repository at this point in the history
Update main to v0.6.0
  • Loading branch information
martinvonk authored Nov 11, 2024
2 parents 6bc210e + d88d301 commit 368d909
Show file tree
Hide file tree
Showing 7 changed files with 1,260 additions and 294 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ If you happen to use this package, please cite: Vonk, M. A. (2024). SPEI: A simp
| Standardized Precipitation Evaporation Index | SPEI | 2 |
| Standardized Groundwater Index | SGI | 3,4 |
| Standardized Streamflow Index | SSFI | 5 |
| Standardized Soil Moisture Index | SSMI | 6 |

The package is not limited to only these four drought indices. If any of the distributions in the Scipy library is valid, the drought index can be calculated.
The package is not limited to only these five drought indices. If any of the distributions in the Scipy library is valid on the observed hydrological series, the drought index can be calculated.

## Installation

Expand All @@ -49,6 +50,7 @@ To get the development version download or clone the GitHub repository to your l
3. J.P. Bloomfield and B.P. Marchant, B. P. (2013) - Analysis of groundwater drought building on the standardised precipitation index approach. DOI: 10.5194/hess-17-4769-2013
4. A. Babre, A. Kalvāns, Z. Avotniece, I. Retiķe, J. Bikše, K.P.M. Jemeljanova, A. Zelenkevičs and A. Dēliņa (2022) - The use of predefined drought indices for the assessment of groundwater drought episodes in the Baltic States over the period 1989–2018. DOI: 10.1016/j.ejrh.2022.101049
5. E. Tijdeman, K. Stahl and L.M. Tallaksen (2020) - Drought characteristics derived based on the Standardized Streamflow Index: A large sample comparison for parametric and nonparametric methods. DOI: 10.1029/2019WR026315
6. Carrão. H., Russo, S., Sepulcre-Canto, G., Barbosa, P.: An empirical standardized soil moisture index for agricultural drought assessment from remotely sensed data. DOI: 10.1016/j.jag.2015.06.011s

Note that the method for calculating the drought indices does not come from these articles and SciPy is used for deriving the distribution. However the literature is helpful as a reference to understand the context and application of drought indices.

Expand Down
32 changes: 14 additions & 18 deletions doc/examples/example01_indices.ipynb

Large diffs are not rendered by default.

264 changes: 264 additions & 0 deletions doc/examples/example05_multiyear_drought.ipynb

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/spei/_version.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
from importlib import metadata
from platform import python_version

__version__ = "0.5.1"
__version__ = "0.6.0"


def show_versions() -> str:
msg = f"Versions\npython: {python_version()}\nspei: {__version__}\n"
msg = f"python: {python_version()}\nspei: {__version__}\n"

requirements = metadata.requires("spei")
if requirements:
deps = [x for x in requirements if "extra" not in x]
for dep in deps:
msg += f"{dep}: {metadata.version(dep)}\n"
msg += f"{dep}: {metadata.version(dep)}"
msg += "\n" if deps.index(dep) < len(deps) - 1 else ""

return msg
Loading

0 comments on commit 368d909

Please sign in to comment.