{"id":13948947,"url":"https://github.com/monocongo/climate_indices","last_synced_at":"2026-01-14T17:49:22.396Z","repository":{"id":41355831,"uuid":"94227441","full_name":"monocongo/climate_indices","owner":"monocongo","description":"Climate indices for drought monitoring","archived":false,"fork":false,"pushed_at":"2026-01-01T19:44:19.000Z","size":32063,"stargazers_count":386,"open_issues_count":103,"forks_count":173,"subscribers_count":21,"default_branch":"master","last_synced_at":"2026-01-05T12:46:00.598Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://monocongo.github.io/climate_indices/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monocongo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-06-13T15:21:07.000Z","updated_at":"2025-12-29T09:24:30.000Z","dependencies_parsed_at":"2024-11-05T23:38:18.517Z","dependency_job_id":"a10e6313-a48c-46db-8f25-e70875ca5186","html_url":"https://github.com/monocongo/climate_indices","commit_stats":{"total_commits":978,"total_committers":19,"mean_commits":"51.473684210526315","dds":"0.33537832310838445","last_synced_commit":"3c503463b91f407cab21c4e3876e7e20d8926399"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/monocongo/climate_indices","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monocongo%2Fclimate_indices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monocongo%2Fclimate_indices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monocongo%2Fclimate_indices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monocongo%2Fclimate_indices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monocongo","download_url":"https://codeload.github.com/monocongo/climate_indices/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monocongo%2Fclimate_indices/sbom","scorecard":{"id":531225,"data":{"date":"2025-08-11","repo":{"name":"github.com/monocongo/climate_indices","commit":"bd2ddd07711b5494b034fcbe3de0e6b647a9143a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/6 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"28 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/unit-tests-workflow.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests-workflow.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/monocongo/climate_indices/unit-tests-workflow.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests-workflow.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/monocongo/climate_indices/unit-tests-workflow.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/unit-tests-workflow.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/monocongo/climate_indices/unit-tests-workflow.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1","Warn: containerImage not pinned by hash: Dockerfile:18: pin your Docker image by updating python:3.11-slim to python:3.11-slim@sha256:9e885f8239c31f8429448f933638dd13037c9119e2a362aeebdd37ec3bee7c85","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: all commits (30) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T05:47:38.845Z","repository_id":41355831,"created_at":"2025-08-20T05:47:38.845Z","updated_at":"2025-08-20T05:47:38.845Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28221002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2026-01-06T02:00:07.049Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-08T05:01:34.989Z","updated_at":"2026-01-14T17:49:22.391Z","avatar_url":"https://github.com/monocongo.png","language":"Python","funding_links":[],"categories":["Climate Change"],"sub_categories":["Climate Data Processing and Analysis"],"readme":"![Banner Image](assets/Global_Monthly_SPI.jpg)\n\n# climate_indices\n\n[//]: # ([![Coverage Status]\u0026#40;https://coveralls.io/repos/github/monocongo/climate_indices/badge.svg?branch=master\u0026#41;]\u0026#40;https://coveralls.io/github/monocongo/climate_indices?branch=master\u0026#41;)\n[//]: # ([![Codacy Status]\u0026#40;https://api.codacy.com/project/badge/Grade/48563cbc37504fc6aa72100370e71f58\u0026#41;]\u0026#40;https://www.codacy.com/app/monocongo/climate_indices?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=monocongo/climate_indices\u0026amp;utm_campaign=Badge_Grade\u0026#41;)\n[![Actions Status](https://github.com/monocongo/climate_indices/workflows/tests/badge.svg)](https://github.com/monocongo/climate_indices/actions)\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-green.svg)](https://opensource.org/licenses/BSD-3-Clause)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/climate-indices)\n\n#### Python library of indices useful for climate monitoring\n\nThis project contains Python implementations of various climate index algorithms which provide\na geographical and temporal picture of the severity and duration of precipitation and temperature\nanomalies useful for climate monitoring and research.\n\nThe following indices are provided:\n\n- [SPI](https://climatedataguide.ucar.edu/climate-data/standardized-precipitation-index-spi),\n  Standardized Precipitation Index, utilizing both gamma and Pearson Type III distributions\n- [SPEI](https://www.researchgate.net/publication/252361460_The_Standardized_Precipitation-Evapotranspiration_Index_SPEI_a_multiscalar_drought_index),\n  Standardized Precipitation Evapotranspiration Index, utilizing both gamma and Pearson Type III distributions\n- [PET](https://www.ncdc.noaa.gov/monitoring-references/dyk/potential-evapotranspiration), Potential Evapotranspiration, utilizing either [Thornthwaite](http://dx.doi.org/10.2307/21073)\n  or [Hargreaves](http://dx.doi.org/10.13031/2013.26773) equations\n- [PNP](http://www.droughtmanagement.info/percent-of-normal-precipitation/),\n  Percentage of Normal Precipitation\n- [PCI](https://www.tandfonline.com/doi/abs/10.1111/J.0033-0124.1980.00300.X), Precipitation Concentration Index\n\nThis Python implementation of the above climate index algorithms is being developed\nwith the following goals in mind:\n\n- to provide an open source software package to compute a suite of\n  climate indices commonly used for climate monitoring, with well\n  documented code that is faithful to the relevant literature and\n  which produces scientifically verifiable results\n- to provide a central, open location for participation and collaboration\n  for researchers, developers, and users of climate indices\n- to facilitate standardization and consensus on best-of-breed\n  climate index algorithms and corresponding compliant implementations in Python\n- to provide transparency into the operational code used for climate\n  monitoring activities at NCEI/NOAA, and consequent reproducibility\n  of published datasets computed from this package\n- to incorporate modern software engineering principles and scientific programming\n  best practices\n\n\nThis is a developmental/forked version of code that was originally developed by NIDIS/NCEI/NOAA. \nSee [drought.gov](https://www.drought.gov/drought/python-climate-indices).\n\n- [__Documentation__](https://climate-indices.readthedocs.io/en/latest/)\n- [__License__](LICENSE)\n- [__Disclaimer__](DISCLAIMER)\n\n## Migration Guide for v2.2.0\n\n**Breaking Change: Exception-Based Error Handling**\n\nVersion 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.\n\n### What Changed\n\n**Before (v2.1.x and earlier):**\n```python\n# Old behavior - functions returned None tuples on failure\nresult = some_internal_function(data)\nif result == (None, None, None, None):\n    # Handle error case\n    pass\n```\n\n**After (v2.2.0+):**\n```python\n# New behavior - functions raise specific exceptions\ntry:\n    result = some_internal_function(data)\nexcept climate_indices.compute.InsufficientDataError as e:\n    # Handle insufficient data case\n    print(f\"Not enough data: {e.non_zero_count} values found, {e.required_count} required\")\nexcept climate_indices.compute.PearsonFittingError as e:\n    # Handle fitting failure case\n    print(f\"Fitting failed: {e}\")\n```\n\n### New Exception Hierarchy\n\n- `DistributionFittingError` (base class)\n  - `InsufficientDataError` - raised when there are too few non-zero values for statistical fitting\n  - `PearsonFittingError` - raised when L-moments calculation fails for Pearson Type III distribution\n\n### Impact on Users\n\n- **Direct API users**: No changes needed - the public SPI/SPEI functions handle exceptions internally\n- **Library integrators**: If you were checking for `None` return values from internal functions, update to use try/catch blocks\n- **Benefits**: More informative error messages, better debugging, and automatic fallback from Pearson to Gamma distribution when appropriate\n\n### Code Quality Improvements\n\nVersion 2.2.0 also addresses floating point comparison issues (`python:S1244`) throughout the codebase:\n\n**Floating Point Comparisons:**\n```python\n# ❌ OLD: Direct equality checks (unreliable)\nif values == 0.0:\n    handle_zero_case()\n\n# ✅ NEW: Safe comparison using numpy.isclose()\nif np.isclose(values, 0.0, atol=1e-8):\n    handle_zero_case()\n```\n\n**Benefits:**\n- Eliminates floating point precision issues in statistical parameter validation\n- Improves test reliability and numerical robustness\n- Follows scientific computing best practices for floating point arithmetic\n- See `docs/floating_point_best_practices.md` for comprehensive guidelines\n\n#### Citation\nYou can cite `climate_indices` in your projects and research papers via the BibTeX \nentry below.\n```\n@misc {climate_indices,\n    author = \"James Adams\",\n    title  = \"climate_indices, an open source Python library providing reference implementations of commonly used climate indices\",\n    url    = \"https://github.com/monocongo/climate_indices\",\n    month  = \"may\",\n    year   = \"2017--\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonocongo%2Fclimate_indices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonocongo%2Fclimate_indices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonocongo%2Fclimate_indices/lists"}