Name | HDP-python JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | Heatwave Diagnostics Package (HDP) for computing heatwave metrics over gridded timeseries data. |
upload_time | 2025-02-25 19:29:54 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.12.3 |
license | MIT License
Copyright (c) 2024 Cameron Cummins
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
hdp
heat
heatwave
heatwave diagnostics package
climate
climate model
timeseries
heatwave metrics
diagnostics
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# HDP: Heatwave Diagnostics Package
[](https://pypi.org/project/HDP-python/)
[](https://hdp.readthedocs.io/en/latest/)

The Heatwave Diagnostics Package (HDP) is an open-source Python project that equips researchers with computationally-efficient tools to quantify heatwave metrics across multiple parameters for daily, gridded data produced by climate model large ensembles.
The HDP offers functions that leverage Xarray, Dask, and Numba to take full advantage of the available hardware capabilites. These functions have been optimized to both run quickly in serial execution and scale effectively in parallel and distributed computing systems. In addition to computing heatwave datasets, the HDP also contains several plotting functions that generate summary figures for quickly evaluating changes in heatwave patterns spatially, temporally, and across the heatwave parameter space. The user can choose to use the resulting matplotlib figures as base templates for creating their own custom figures or opt to create a standardized deck of figures that broadly summarize the different metric trends. All graphical plots can then be stored in a Jupyter notebook for easy viewing and consolidated storage.
# Why create the HDP?
Existing tools used to quantify heatwave metrics (such as ehfheatwaves, heatwave3, nctoolkit) were not designed to sample large sections of the heatwave parameter space. Many of these tools struggle to handle the computational burden of analyzing terabyte-scale datasets and do not offer a complete workflow for generating heatwave diagnostics from daily, gridded climate model output. The HDP expands upon this work to empower the user to conduct parameter-sampling analysis and reduce the computational burden of calculating heatwave metrics from increasingly large model output.
# Documentation
To learn more about the HDP and how to use it, check out the full ReadTheDocs documentation at https://hdp.readthedocs.io/en/latest/user.html#.
# Quick-Start
The code block below showcases an example HDP workflow for a 400 GB high performance computer:
```
from dask.distributed import Client, LocalCluster
import numpy as np
import xarray
impory hdp
cluster = LocalCluster(n_workers=10, memory_limit="40GB", threads_per_worker=1, processes=True)
client = Client(cluster)
input_dir = "/local1/climate_model_output/"
baseline_tasmax = xarray.open_zarr(f"{input_dir}CESM2_historical_day_tasmax.zarr")["tasmax"]
test_tasmax = xarray.open_zarr(f"{input_dir}CESM2_ssp370_day_tasmax.zarr")["tasmax"]
baseline_measures = hdp.measure.format_standard_measures(temp_datasets=[baseline_tasmax])
test_measures = hdp.measure.format_standard_measures(temp_datasets=[test_tasmax])
percentiles = np.arange(0.9, 1.0, 0.01)
thresholds_dataset = hdp.threshold.compute_thresholds(
[baseline_measures["tasmax"]],
percentiles
)
definitions = [[3,0,0], [3,1,1], [4,0,0], [4,1,1], [5,0,0], [5,1,1]]
metrics_dataset = compute_group_metrics(test_measures, thresholds_dataset, definitions)
metrics_dataset = metrics_dataset.to_zarr("/local1/test_metrics.zarr", mode='w')
figure_notebook = create_notebook(metrics_dataset)
figure_notebook.save_notebook("/local1/heatwave_summary_figures.ipynb")
```
# Contributing
Please report any bugs, ask questions, and make suggestions through the [GitHub Issues form of this repository](https://github.com/AgentOxygen/HDP/issues).
# Acknowledgements
I would like to acknowledge the following people for their contributions to this project:
1. Dr. Geeta Persad for her guidance, mentorship, and encouragement throughout the development of this package.
2. Dr. Jane Baldwin for sharing her initial heatwave analysis code that inspired the HDP and providing her expertise on the science of extreme heat.
3. Dr. Tammas Loughran for developing [ehfheatwaves](https://github.com/tammasloughran/ehfheatwaves) which served as a comparable project and informed the software design of the HDP.
4. Dr. Ifeanyi Nduka for his design input and expertise in quantifying extreme heat.
5. (Soon to be Dr.) Sebastian Utama for helping me debug my code and brainstorm ideas.
Raw data
{
"_id": null,
"home_page": null,
"name": "HDP-python",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12.3",
"maintainer_email": null,
"keywords": "HDP, heat, heatwave, heatwave diagnostics package, climate, climate model, timeseries, heatwave metrics, diagnostics",
"author": null,
"author_email": "Cameron Cummins <cameron.cummins@utexas.edu>",
"download_url": "https://files.pythonhosted.org/packages/0b/f5/b198bb1f3a2e430299f9c0e8d76dc36dfd1610c72c85cf44cef68a0159e3/hdp_python-0.2.0.tar.gz",
"platform": null,
"description": "# HDP: Heatwave Diagnostics Package\n\n[](https://pypi.org/project/HDP-python/)\n[](https://hdp.readthedocs.io/en/latest/)\n\n\nThe Heatwave Diagnostics Package (HDP) is an open-source Python project that equips researchers with computationally-efficient tools to quantify heatwave metrics across multiple parameters for daily, gridded data produced by climate model large ensembles.\n\nThe HDP offers functions that leverage Xarray, Dask, and Numba to take full advantage of the available hardware capabilites. These functions have been optimized to both run quickly in serial execution and scale effectively in parallel and distributed computing systems. In addition to computing heatwave datasets, the HDP also contains several plotting functions that generate summary figures for quickly evaluating changes in heatwave patterns spatially, temporally, and across the heatwave parameter space. The user can choose to use the resulting matplotlib figures as base templates for creating their own custom figures or opt to create a standardized deck of figures that broadly summarize the different metric trends. All graphical plots can then be stored in a Jupyter notebook for easy viewing and consolidated storage.\n\n# Why create the HDP?\n\nExisting tools used to quantify heatwave metrics (such as ehfheatwaves, heatwave3, nctoolkit) were not designed to sample large sections of the heatwave parameter space. Many of these tools struggle to handle the computational burden of analyzing terabyte-scale datasets and do not offer a complete workflow for generating heatwave diagnostics from daily, gridded climate model output. The HDP expands upon this work to empower the user to conduct parameter-sampling analysis and reduce the computational burden of calculating heatwave metrics from increasingly large model output.\n\n# Documentation\n\nTo learn more about the HDP and how to use it, check out the full ReadTheDocs documentation at https://hdp.readthedocs.io/en/latest/user.html#.\n\n# Quick-Start\n\nThe code block below showcases an example HDP workflow for a 400 GB high performance computer:\n\n```\nfrom dask.distributed import Client, LocalCluster\nimport numpy as np\nimport xarray\nimpory hdp\n\n\ncluster = LocalCluster(n_workers=10, memory_limit=\"40GB\", threads_per_worker=1, processes=True)\nclient = Client(cluster)\n\ninput_dir = \"/local1/climate_model_output/\"\n\nbaseline_tasmax = xarray.open_zarr(f\"{input_dir}CESM2_historical_day_tasmax.zarr\")[\"tasmax\"]\ntest_tasmax = xarray.open_zarr(f\"{input_dir}CESM2_ssp370_day_tasmax.zarr\")[\"tasmax\"]\n\nbaseline_measures = hdp.measure.format_standard_measures(temp_datasets=[baseline_tasmax])\ntest_measures = hdp.measure.format_standard_measures(temp_datasets=[test_tasmax])\n\npercentiles = np.arange(0.9, 1.0, 0.01)\n\n\nthresholds_dataset = hdp.threshold.compute_thresholds(\n [baseline_measures[\"tasmax\"]],\n percentiles\n)\n\ndefinitions = [[3,0,0], [3,1,1], [4,0,0], [4,1,1], [5,0,0], [5,1,1]]\n\nmetrics_dataset = compute_group_metrics(test_measures, thresholds_dataset, definitions)\nmetrics_dataset = metrics_dataset.to_zarr(\"/local1/test_metrics.zarr\", mode='w')\n\nfigure_notebook = create_notebook(metrics_dataset)\nfigure_notebook.save_notebook(\"/local1/heatwave_summary_figures.ipynb\")\n```\n\n# Contributing\n\nPlease report any bugs, ask questions, and make suggestions through the [GitHub Issues form of this repository](https://github.com/AgentOxygen/HDP/issues).\n\n# Acknowledgements\n\nI would like to acknowledge the following people for their contributions to this project:\n1. Dr. Geeta Persad for her guidance, mentorship, and encouragement throughout the development of this package.\n2. Dr. Jane Baldwin for sharing her initial heatwave analysis code that inspired the HDP and providing her expertise on the science of extreme heat.\n3. Dr. Tammas Loughran for developing [ehfheatwaves](https://github.com/tammasloughran/ehfheatwaves) which served as a comparable project and informed the software design of the HDP.\n4. Dr. Ifeanyi Nduka for his design input and expertise in quantifying extreme heat.\n5. (Soon to be Dr.) Sebastian Utama for helping me debug my code and brainstorm ideas.\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2024 Cameron Cummins\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "Heatwave Diagnostics Package (HDP) for computing heatwave metrics over gridded timeseries data.",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://github.com/AgentOxygen/HDP",
"Issues": "https://github.com/AgentOxygen/HDP"
},
"split_keywords": [
"hdp",
" heat",
" heatwave",
" heatwave diagnostics package",
" climate",
" climate model",
" timeseries",
" heatwave metrics",
" diagnostics"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "c6968504898e7589601c9c0e02f919e660561ab12160162444b5fb3716418759",
"md5": "ed75e0eac18d1b85c616a06f4d8459d7",
"sha256": "b3284059f468d6af448fc346073c6adf0fd3cdb9d72f12a41622ebbe8149688d"
},
"downloads": -1,
"filename": "hdp_python-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ed75e0eac18d1b85c616a06f4d8459d7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12.3",
"size": 31437,
"upload_time": "2025-02-25T19:29:50",
"upload_time_iso_8601": "2025-02-25T19:29:50.560408Z",
"url": "https://files.pythonhosted.org/packages/c6/96/8504898e7589601c9c0e02f919e660561ab12160162444b5fb3716418759/hdp_python-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0bf5b198bb1f3a2e430299f9c0e8d76dc36dfd1610c72c85cf44cef68a0159e3",
"md5": "2cf8a9066448153827e03888bb8a5837",
"sha256": "73741db10154448cc75ddf74d704512fc5e71b71580cfd67c0597837260eca67"
},
"downloads": -1,
"filename": "hdp_python-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "2cf8a9066448153827e03888bb8a5837",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12.3",
"size": 660862,
"upload_time": "2025-02-25T19:29:54",
"upload_time_iso_8601": "2025-02-25T19:29:54.520494Z",
"url": "https://files.pythonhosted.org/packages/0b/f5/b198bb1f3a2e430299f9c0e8d76dc36dfd1610c72c85cf44cef68a0159e3/hdp_python-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-25 19:29:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AgentOxygen",
"github_project": "HDP",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "hdp-python"
}