Science Score: 59.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 7 DOI reference(s) in README -
✓Academic publication links
Links to: researchgate.net -
✓Committers with academic emails
2 of 20 committers (10.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.7%) to scientific vocabulary
Keywords from Contributors
Repository
Climate indices for drought monitoring
Basic Info
- Host: GitHub
- Owner: monocongo
- License: other
- Language: Python
- Default Branch: master
- Homepage: https://monocongo.github.io/climate_indices/
- Size: 29.6 MB
Statistics
- Stars: 376
- Watchers: 21
- Forks: 173
- Open Issues: 107
- Releases: 2
Metadata Files
README.md

climate_indices
Python library of indices useful for climate monitoring
This project contains Python implementations of various climate index algorithms which provide a geographical and temporal picture of the severity and duration of precipitation and temperature anomalies useful for climate monitoring and research.
The following indices are provided:
- SPI, Standardized Precipitation Index, utilizing both gamma and Pearson Type III distributions
- SPEI, Standardized Precipitation Evapotranspiration Index, utilizing both gamma and Pearson Type III distributions
- PET, Potential Evapotranspiration, utilizing either Thornthwaite or Hargreaves equations
- PNP, Percentage of Normal Precipitation
- PCI, Precipitation Concentration Index
This Python implementation of the above climate index algorithms is being developed with the following goals in mind:
- to provide an open source software package to compute a suite of climate indices commonly used for climate monitoring, with well documented code that is faithful to the relevant literature and which produces scientifically verifiable results
- to provide a central, open location for participation and collaboration for researchers, developers, and users of climate indices
- to facilitate standardization and consensus on best-of-breed climate index algorithms and corresponding compliant implementations in Python
- to provide transparency into the operational code used for climate monitoring activities at NCEI/NOAA, and consequent reproducibility of published datasets computed from this package
- to incorporate modern software engineering principles and scientific programming best practices
This is a developmental/forked version of code that was originally developed by NIDIS/NCEI/NOAA. See drought.gov.
Migration Guide for v2.2.0
Breaking Change: Exception-Based Error Handling
Version 2.2.0 introduces a significant architectural improvement in error handling. The library now uses exception-based error handling instead of returning None tuples for error conditions.
What Changed
Before (v2.1.x and earlier): ```python
Old behavior - functions returned None tuples on failure
result = someinternalfunction(data) if result == (None, None, None, None): # Handle error case pass ```
After (v2.2.0+): ```python
New behavior - functions raise specific exceptions
try: result = someinternalfunction(data) except climateindices.compute.InsufficientDataError as e: # Handle insufficient data case print(f"Not enough data: {e.nonzerocount} values found, {e.requiredcount} required") except climate_indices.compute.PearsonFittingError as e: # Handle fitting failure case print(f"Fitting failed: {e}") ```
New Exception Hierarchy
DistributionFittingError(base class)InsufficientDataError- raised when there are too few non-zero values for statistical fittingPearsonFittingError- raised when L-moments calculation fails for Pearson Type III distribution
Impact on Users
- Direct API users: No changes needed - the public SPI/SPEI functions handle exceptions internally
- Library integrators: If you were checking for
Nonereturn values from internal functions, update to use try/catch blocks - Benefits: More informative error messages, better debugging, and automatic fallback from Pearson to Gamma distribution when appropriate
Code Quality Improvements
Version 2.2.0 also addresses floating point comparison issues (python:S1244) throughout the codebase:
Floating Point Comparisons: ```python
❌ OLD: Direct equality checks (unreliable)
if values == 0.0: handlezerocase()
✅ NEW: Safe comparison using numpy.isclose()
if np.isclose(values, 0.0, atol=1e-8): handlezerocase() ```
Benefits:
- Eliminates floating point precision issues in statistical parameter validation
- Improves test reliability and numerical robustness
- Follows scientific computing best practices for floating point arithmetic
- See docs/floating_point_best_practices.md for comprehensive guidelines
Citation
You can cite climate_indices in your projects and research papers via the BibTeX
entry below.
@misc {climate_indices,
author = "James Adams",
title = "climate_indices, an open source Python library providing reference implementations of commonly used climate indices",
url = "https://github.com/monocongo/climate_indices",
month = "may",
year = "2017--"
}
Owner
- Name: James Adams
- Login: monocongo
- Kind: user
- Website: https://www.drought.gov/drought/data-maps-tools/software
- Repositories: 75
- Profile: https://github.com/monocongo
GitHub Events
Total
- Issues event: 14
- Watch event: 30
- Delete event: 1
- Issue comment event: 34
- Push event: 9
- Pull request review comment event: 5
- Pull request review event: 2
- Pull request event: 10
- Fork event: 9
- Create event: 3
Last Year
- Issues event: 14
- Watch event: 30
- Delete event: 1
- Issue comment event: 34
- Push event: 9
- Pull request review comment event: 5
- Pull request review event: 2
- Pull request event: 10
- Fork event: 9
- Create event: 3
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| James Adams | m****o@g****m | 650 |
| James.Adams | J****s@C****l | 213 |
| james.adams | j****s@o****m | 60 |
| james.a | j****a@c****m | 23 |
| James Adams | j****s@v****m | 11 |
| Benjamin Root | b****t@g****m | 10 |
| Arnab Paul Choudhury | a****4@g****m | 9 |
| Nathan Nayda | n****a@s****m | 6 |
| kikocorreoso | k****o@g****m | 4 |
| dependabot[bot] | 4****] | 3 |
| AGericke | g****e@i****n | 3 |
| Ben Lewis | b****n | 1 |
| David de Klerk | d****k@e****k | 1 |
| DeepSource Bot | b****t@d****o | 1 |
| haysengithub | d****e@g****m | 1 |
| Scott Wales | s****s@u****u | 1 |
| Laura Guillory | l****y@g****m | 1 |
| deepsource-autofix[bot] | 6****] | 1 |
| kikocorreoso | y****u@e****m | 1 |
| snyk-bot | s****t@s****o | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 323
- Total pull requests: 246
- Average time to close issues: 3 months
- Average time to close pull requests: 15 days
- Total issue authors: 110
- Total pull request authors: 18
- Average comments per issue: 2.74
- Average comments per pull request: 0.93
- Merged pull requests: 219
- Bot issues: 0
- Bot pull requests: 3
Past Year
- Issues: 14
- Pull requests: 11
- Average time to close issues: about 5 hours
- Average time to close pull requests: 21 days
- Issue authors: 10
- Pull request authors: 1
- Average comments per issue: 0.71
- Average comments per pull request: 1.64
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- monocongo (164)
- crestedcaracaryn (6)
- bennyistanto (5)
- kikocorreoso (5)
- WeatherGod (4)
- aleccourt (4)
- SouhailAB (4)
- tommylees112 (3)
- Lixia0911 (3)
- wsor330 (3)
- s-m-t-c (3)
- itati01 (3)
- jamaa (2)
- yheng0821 (2)
- fipoucat (2)
Pull Request Authors
- monocongo (216)
- WeatherGod (10)
- Seven-milk (7)
- kikocorreoso (3)
- dependabot[bot] (3)
- nnayda (2)
- go1me (1)
- oshin94 (1)
- cshields143 (1)
- dawiedotcom (1)
- ScottWales (1)
- Emmadd (1)
- itati01 (1)
- Daafip (1)
- Laura-Guillory (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 1,350 last-month
- Total docker downloads: 100
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 18
- Total maintainers: 1
proxy.golang.org: github.com/monocongo/climate_indices
- Documentation: https://pkg.go.dev/github.com/monocongo/climate_indices#section-documentation
- License: other
-
Latest release: v0.1.0-beta
published almost 8 years ago
Rankings
pypi.org: climate-indices
Reference implementations of various climate indices typically used for drought monitoring
- Homepage: https://github.com/monocongo/climate_indices
- Documentation: https://climate-indices.readthedocs.io/
- License: BSD License
-
Latest release: 2.2.0
published 7 months ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v2 composite
- pytest * develop
- toml 0.10.2 develop
- cftime 1.6.2
- dask 2022.2.0
- h5netcdf 1.1.0
- python >=3.8,<3.12
- scipy 1.9.3
- xarray 2023.1.0
- toml >=0.10.2