{"id":13948831,"url":"https://github.com/openclimatedata/pyhector","last_synced_at":"2026-02-19T08:49:22.825Z","repository":{"id":45047468,"uuid":"79934283","full_name":"openclimatedata/pyhector","owner":"openclimatedata","description":"Python interface for the simple global climate carbon-cycle model Hector","archived":false,"fork":false,"pushed_at":"2024-03-06T14:34:24.000Z","size":16963,"stargazers_count":44,"open_issues_count":4,"forks_count":10,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-07-11T05:19:22.215Z","etag":null,"topics":["climate-model","hector-model","python-wrapper"],"latest_commit_sha":null,"homepage":"http://pyhector.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openclimatedata.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"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":".zenodo.json"}},"created_at":"2017-01-24T17:14:54.000Z","updated_at":"2025-06-01T09:17:58.000Z","dependencies_parsed_at":"2024-03-17T06:59:04.837Z","dependency_job_id":null,"html_url":"https://github.com/openclimatedata/pyhector","commit_stats":{"total_commits":508,"total_committers":3,"mean_commits":"169.33333333333334","dds":0.5433070866141732,"last_synced_commit":"5e44ce0b8e6d1cdc11a7ac1183d832b02d8c4a48"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/openclimatedata/pyhector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openclimatedata%2Fpyhector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openclimatedata%2Fpyhector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openclimatedata%2Fpyhector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openclimatedata%2Fpyhector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openclimatedata","download_url":"https://codeload.github.com/openclimatedata/pyhector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openclimatedata%2Fpyhector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265407519,"owners_count":23760044,"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","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":["climate-model","hector-model","python-wrapper"],"created_at":"2024-08-08T05:01:32.105Z","updated_at":"2026-02-19T08:49:22.795Z","avatar_url":"https://github.com/openclimatedata.png","language":"Python","funding_links":[],"categories":["Climate Change","Observation and Conservation of Ecosystems"],"sub_categories":["Earth and Climate Modeling","Ocean and Climate"],"readme":"pyhector\n========\n\n+----------------+------------------------+\n| |PyPI Version| | |PyPI Python Versions| |\n+----------------+------------------------+\n| |Docs|         | |Launch Binder|        |\n+----------------+------------------------+\n| |JOSS|         | |Zenodo|               |\n+----------------+------------------------+\n\n.. sec-begin-index\n\n**pyhector** is a Python interface for the simple global climate\ncarbon-cycle model `Hector \u003chttps://github.com/JGCRI/hector\u003e`_.\n\n**pyhector** makes the simple climate model Hector easily installable\nand usable from Python and can for example be used in the analysis of\nmitigation scenarios, in integrated assessment models, complex climate\nmodel emulation, and uncertainty analyses.\n\n`Hector \u003chttps://github.com/JGCRI/hector\u003e`_ is written in C++ and\ndeveloped at the `Pacific Northwest National Laboratory\n\u003chttps://www.pnnl.gov/\u003e`_.\n\nSee the Hector `repository \u003chttps://github.com/JGCRI/hector\u003e`_ and\n`documentation website \u003chttps://jgcri.github.io/hector/\u003e`_ for further\ninformation.\n\nThe Python interface **pyhector** is developed by `Sven Willner\n\u003chttp://svenwillner.com\u003e`_ and `Robert Gieseke\n\u003chttps://github.com/rgieseke\u003e`_.\n\nPyhector uses `pybind11 \u003chttps://github.com/pybind/pybind11\u003e`_ to wrap\nHector's API. The version of Hector used can be read using Pyhector's\n``__hector_version__`` field.\n\n.. sec-end-index\n.. sec-begin-installation\n\nInstallation\n------------\n\nPrerequisites\n~~~~~~~~~~~~~\n\n`Hector \u003chttps://github.com/JGCRI/hector\u003e`_ requires `Boost\n\u003chttp://www.boost.org/\u003e`_, so to install and use **pyhector** you need\nto have the filesystem and system modules of *Boost* installed (see also the `Hector build\ninstructions \u003chttps://jgcri.github.io/hector/articles/BuildHector.html#standalone-executable\u003e`_).\n\nOn Ubuntu/Debian these can be installed by invoking\n\n.. code:: bash\n\n    sudo apt-get install libboost-filesystem-dev libboost-system-dev\n\nOn macOS *Boost* is available through the Homebrew package manager, it\nmight be advisable to use a Homebrew installed Python for installing\n**pyhector**:\n\n.. code:: bash\n\n    brew install boost\n\nWindows is (as Hector) in principle supported but not yet tested for\n**pyhector**. Pull request with installation notes for Windows are\nwelcome.\n\nInstall using pip\n~~~~~~~~~~~~~~~~~\n\nYou can install **pyhector** from\n`PyPI \u003chttps://pypi.python.org/pypi/pyhector\u003e`_ by invoking\n\n.. code:: bash\n\n    pip install pyhector\n\n.. sec-end-installation\n.. sec-begin-usage\n\nUsage\n-----\n\nThis repository also contains a `Jupyter Notebook\n\u003chttps://jupyter.readthedocs.io/en/latest/index.html\u003e`_ you can `run\nlive \u003chttp://mybinder.org/repo/openclimatedata/pyhector\u003e`_ and\nexperiment with, courtesy of the `Binder \u003chttp://mybinder.org/\u003e`_\nproject. The notebook can be viewed as a `static version\n\u003chttp://nbviewer.jupyter.org/github/openclimatedata/pyhector/blob/main/index.ipynb\u003e`_\nusing nbviewer.\n\nBasic example\n~~~~~~~~~~~~~\n\n.. code:: python\n\n    import pyhector\n\n    output = pyhector.run(pyhector.ssp126)\n\nAdvanced example\n~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n    import pyhector\n    import matplotlib.pyplot as plt\n    from pyhector import ssp119, ssp126, ssp245, ssp370, ssp434, ssp460, ssp534_over, ssp585\n\n    for ssp in [ssp119, ssp126, ssp245, ssp370, ssp434, ssp460, ssp534_over, ssp585]:\n        output = pyhector.run(ssp, {\"core\": {\"endDate\": 2100}})\n        temp = output[\"temperature.global_tas\"]\n        temp = temp.loc[1850:] - temp.loc[1850:1900].mean()\n        temp.plot(label=ssp.name)\n    plt.title(\"Global mean temperature\")\n    plt.ylabel(\"°C over pre-industrial (1850-1900 mean)\")\n    plt.legend(loc=\"best\")\n    plt.show()\n\n.. image-start\n\n.. image:: ./docs/example-plot.png\n    :alt: Temperature Plot of RCP scenarios\n\n.. image-end\n.. sec-end-usage\n.. sec-begin-development\n\nDevelopment\n-----------\n\nFor local development you can clone the repository, update the\ndependencies and install in a virtual environment with ``pip``.\n\n.. code:: bash\n\n    git clone https://github.com/openclimatedata/pyhector.git --recursive\n    cd pyhector\n    python3 -m venv venv\n    ./venv/bin/pip install --editable --verbose .\n\n\nTo update **pyhector** and all submodules you can run\n\n.. code:: bash\n\n    git pull --recurse-submodules\n    git submodule update --init --recursive\n    ./venv/bin/pip install --editable .\n\nTests can be run locally with\n\n::\n\n    python setup.py test\n\n.. sec-end-development\n\n.. |PyPI Python Versions| image:: https://img.shields.io/pypi/pyversions/pyhector.svg\n   :target: https://pypi.org/project/pyhector/\n.. |PyPI Version| image:: https://img.shields.io/pypi/v/pyhector.svg\n   :target: https://pypi.org/project/pyhector/\n.. |Docs| image:: https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat\n   :target: https://pyhector.readthedocs.io/en/latest/\n.. |Launch Binder| image:: https://img.shields.io/badge/launch-binder-e66581.svg\n   :target: https://mybinder.org/v2/gh/openclimatedata/pyhector/main?filepath=notebooks/index.ipynb\n.. |JOSS| image:: https://img.shields.io/badge/JOSS-10.21105%2Fjoss.00248-brightgreen.svg\n   :target: https://doi.org/10.21105/joss.00248\n.. |Zenodo| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.1194599.svg\n   :target: https://zenodo.org/record/1194599\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenclimatedata%2Fpyhector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenclimatedata%2Fpyhector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenclimatedata%2Fpyhector/lists"}