{"id":350944,"name":"OpenGHG Inversions","description":"A Python package that is being developed as part of the OpenGHG project with the aim of merging the data-processing and simulation modelling capabilities of OpenGHG with the atmospheric Bayesian inverse models developed by the Atmospheric Chemistry Research Group at the University of Bristol.","url":"https://github.com/openghg/openghg_inversions","last_synced_at":"2026-07-21T21:04:35.418Z","repository":{"id":65456007,"uuid":"557261403","full_name":"openghg/openghg_inversions","owner":"openghg","description":"University of Bristol Atmospheric Chemistry Research Group RHIME Inversion code (with openghg dependency)","archived":false,"fork":false,"pushed_at":"2026-07-19T02:00:41.000Z","size":193572,"stargazers_count":8,"open_issues_count":125,"forks_count":1,"subscribers_count":1,"default_branch":"devel","last_synced_at":"2026-07-19T02:13:15.371Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://openghg.github.io/openghg_inversions/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openghg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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","notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2022-10-25T11:19:47.000Z","updated_at":"2026-07-14T20:48:14.000Z","dependencies_parsed_at":"2023-10-11T06:00:33.336Z","dependency_job_id":"94ee4760-0852-45bb-94c4-4bd071828cb7","html_url":"https://github.com/openghg/openghg_inversions","commit_stats":{"total_commits":134,"total_committers":5,"mean_commits":26.8,"dds":"0.18656716417910446","last_synced_commit":"6858aee6e2b434cf7b7e895bf3bedbb984dc087d"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/openghg/openghg_inversions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openghg","download_url":"https://codeload.github.com/openghg/openghg_inversions/tar.gz/refs/heads/devel","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35647761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-19T02:00:06.923Z","response_time":112,"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"}},"owner":{"login":"openghg","name":"OpenGHG","uuid":"67903512","kind":"organization","description":"","email":"contact@openghg.org","website":"https://www.openghg.org","location":null,"twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/67903512?v=4","repositories_count":7,"last_synced_at":"2023-03-05T03:42:58.184Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/openghg","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-15T05:26:57.152Z","updated_at":"2023-03-05T03:42:58.187Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openghg","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openghg/repositories"},"packages":[{"id":13498783,"name":"openghg_inversions","ecosystem":"pypi","description":"OpenGHG Inversions","homepage":"https://github.com/openghg/openghg_inversions","licenses":"MIT License","normalized_licenses":["MIT"],"repository_url":"https://github.com/openghg/openghg_inversions","keywords_array":[],"namespace":null,"versions_count":1,"first_release_published_at":"2026-01-30T12:35:26.000Z","latest_release_published_at":"2026-01-30T12:35:26.000Z","latest_release_number":"0.6.0","last_synced_at":"2026-07-19T20:01:24.043Z","created_at":"2026-02-10T18:39:11.946Z","updated_at":"2026-07-19T20:01:24.043Z","registry_url":"https://pypi.org/project/openghg_inversions/","install_command":"pip install openghg_inversions --index-url https://pypi.org/simple","documentation_url":"https://openghg_inversions.readthedocs.io/","metadata":{"funding":null,"documentation":null,"classifiers":["License :: OSI Approved :: MIT License","Operating System :: OS Independent","Programming Language :: Python :: 3"],"normalized_name":"openghg-inversions","project_status":null},"repo_metadata":{"id":65456007,"uuid":"557261403","full_name":"openghg/openghg_inversions","owner":"openghg","description":"University of Bristol Atmospheric Chemistry Research Group RHIME Inversion code (with openghg dependency)","archived":false,"fork":false,"pushed_at":"2026-06-24T15:06:12.000Z","size":131830,"stargazers_count":8,"open_issues_count":115,"forks_count":1,"subscribers_count":1,"default_branch":"devel","last_synced_at":"2026-06-24T15:14:34.134Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://openghg.github.io/openghg_inversions/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openghg.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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","notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2022-10-25T11:19:47.000Z","updated_at":"2026-06-24T13:29:05.000Z","dependencies_parsed_at":"2023-10-11T06:00:33.336Z","dependency_job_id":"94ee4760-0852-45bb-94c4-4bd071828cb7","html_url":"https://github.com/openghg/openghg_inversions","commit_stats":{"total_commits":134,"total_committers":5,"mean_commits":26.8,"dds":"0.18656716417910446","last_synced_commit":"6858aee6e2b434cf7b7e895bf3bedbb984dc087d"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/openghg/openghg_inversions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openghg","download_url":"https://codeload.github.com/openghg/openghg_inversions/tar.gz/refs/heads/devel","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34765322,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-25T02:00:05.521Z","response_time":101,"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"},"owner_record":{"login":"openghg","name":"OpenGHG","uuid":"67903512","kind":"organization","description":"","email":"contact@openghg.org","website":"https://www.openghg.org","location":null,"twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/67903512?v=4","repositories_count":7,"last_synced_at":"2023-03-05T03:42:58.184Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/openghg","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-15T05:26:57.152Z","updated_at":"2023-03-05T03:42:58.187Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openghg","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openghg/repositories"},"tags":[{"name":"v0.6.0","sha":"2f3d5a4fd5c2e27d8659c63fe2e1b84615a4cfb8","kind":"commit","published_at":"2026-01-30T12:09:23.000Z","download_url":"https://codeload.github.com/openghg/openghg_inversions/tar.gz/v0.6.0","html_url":"https://github.com/openghg/openghg_inversions/releases/tag/v0.6.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/openghg/openghg_inversions@v0.6.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.6.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.6.0/manifests"},{"name":"v0.5","sha":"f0faae35dec0eed049cdb91d4669fff102b9cad3","kind":"commit","published_at":"2025-10-27T10:28:50.000Z","download_url":"https://codeload.github.com/openghg/openghg_inversions/tar.gz/v0.5","html_url":"https://github.com/openghg/openghg_inversions/releases/tag/v0.5","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/openghg/openghg_inversions@v0.5","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.5","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.5/manifests"},{"name":"v0.4","sha":"456196a1c741eee93d4fb3a0fdf761b78d7cb379","kind":"commit","published_at":"2025-08-08T14:24:38.000Z","download_url":"https://codeload.github.com/openghg/openghg_inversions/tar.gz/v0.4","html_url":"https://github.com/openghg/openghg_inversions/releases/tag/v0.4","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/openghg/openghg_inversions@v0.4","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.4","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.4/manifests"},{"name":"v0.3","sha":"c8d3fa28a45c53fb3c99da16cf81b808e8af6d6e","kind":"commit","published_at":"2025-04-24T10:19:14.000Z","download_url":"https://codeload.github.com/openghg/openghg_inversions/tar.gz/v0.3","html_url":"https://github.com/openghg/openghg_inversions/releases/tag/v0.3","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/openghg/openghg_inversions@v0.3","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.3","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.3/manifests"},{"name":"v0.2","sha":"71f762446a396bb30485e70e6d6ba72dec8de740","kind":"tag","published_at":"2024-08-19T12:49:44.000Z","download_url":"https://codeload.github.com/openghg/openghg_inversions/tar.gz/v0.2","html_url":"https://github.com/openghg/openghg_inversions/releases/tag/v0.2","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/openghg/openghg_inversions@v0.2","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.2","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.2/manifests"},{"name":"v0.1.3","sha":"e5c6e764e3f5d328e932f52470ba29a5a3c0fe6f","kind":"commit","published_at":"2024-04-15T15:48:18.000Z","download_url":"https://codeload.github.com/openghg/openghg_inversions/tar.gz/v0.1.3","html_url":"https://github.com/openghg/openghg_inversions/releases/tag/v0.1.3","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/openghg/openghg_inversions@v0.1.3","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.1.3","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.1.3/manifests"},{"name":"v0.1.2","sha":"245f30dd588040357ca7c77d8a3c9e7044272098","kind":"commit","published_at":"2024-03-04T14:28:04.000Z","download_url":"https://codeload.github.com/openghg/openghg_inversions/tar.gz/v0.1.2","html_url":"https://github.com/openghg/openghg_inversions/releases/tag/v0.1.2","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/openghg/openghg_inversions@v0.1.2","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.1.2","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.1.2/manifests"},{"name":"v0.1.1","sha":"0e30e671c20b1557c3419eb223f4e5c2e0a4ffb8","kind":"commit","published_at":"2024-02-12T13:49:31.000Z","download_url":"https://codeload.github.com/openghg/openghg_inversions/tar.gz/v0.1.1","html_url":"https://github.com/openghg/openghg_inversions/releases/tag/v0.1.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/openghg/openghg_inversions@v0.1.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.1.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.1.1/manifests"},{"name":"v0.1","sha":"6f3a7138706a9dece696438d558937ccc00259e0","kind":"tag","published_at":"2024-02-01T16:48:57.000Z","download_url":"https://codeload.github.com/openghg/openghg_inversions/tar.gz/v0.1","html_url":"https://github.com/openghg/openghg_inversions/releases/tag/v0.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/openghg/openghg_inversions@v0.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/tags/v0.1/manifests"}]},"repo_metadata_updated_at":"2026-07-15T22:30:24.941Z","dependent_packages_count":0,"downloads":66,"downloads_period":"last-month","dependent_repos_count":0,"rankings":{"downloads":null,"dependent_repos_count":44.50543141552442,"dependent_packages_count":7.87211410704349,"stargazers_count":null,"forks_count":null,"docker_downloads_count":null,"average":26.188772761283957},"purl":"pkg:pypi/openghg-inversions","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/pypi/openghg_inversions","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/pypi/openghg_inversions","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/pypi/openghg_inversions/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2026-06-27T09:00:25.794Z","issues_count":163,"pull_requests_count":196,"avg_time_to_close_issue":5702318.266666667,"avg_time_to_close_pull_request":1739355.3666666667,"issues_closed_count":75,"pull_requests_closed_count":150,"pull_request_authors_count":13,"issue_authors_count":14,"avg_comments_per_issue":0.6687116564417178,"avg_comments_per_pull_request":0.3622448979591837,"merged_pull_requests_count":137,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":51,"past_year_pull_requests_count":52,"past_year_avg_time_to_close_issue":1322202.3529411764,"past_year_avg_time_to_close_pull_request":393905.4411764706,"past_year_issues_closed_count":17,"past_year_pull_requests_closed_count":34,"past_year_pull_request_authors_count":9,"past_year_issue_authors_count":8,"past_year_avg_comments_per_issue":0.7254901960784313,"past_year_avg_comments_per_pull_request":0.5961538461538461,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":33,"issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/issues","maintainers":[{"login":"EricSaboya","count":11,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/EricSaboya"},{"login":"aliceramsden","count":7,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/aliceramsden"},{"login":"SutarPrasad","count":5,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/SutarPrasad"},{"login":"qq23840","count":4,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/qq23840"}],"active_maintainers":[{"login":"SutarPrasad","count":5,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/SutarPrasad"},{"login":"qq23840","count":4,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/qq23840"},{"login":"EricSaboya","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/EricSaboya"}]},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/openghg_inversions/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/openghg_inversions/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/openghg_inversions/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/openghg_inversions/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/openghg_inversions/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/openghg_inversions/codemeta","maintainers":[{"uuid":"brendan-m-murphy","login":"brendan-m-murphy","name":null,"email":null,"url":null,"packages_count":1,"html_url":"https://pypi.org/user/brendan-m-murphy/","role":"Owner","created_at":"2026-03-10T19:34:15.050Z","updated_at":"2026-03-10T19:34:15.050Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/maintainers/brendan-m-murphy/packages"}],"registry":{"name":"pypi.org","url":"https://pypi.org","ecosystem":"pypi","default":true,"packages_count":912778,"maintainers_count":391644,"namespaces_count":0,"keywords_count":289179,"github":"pypi","metadata":{"funded_packages_count":54301},"icon_url":"https://github.com/pypi.png","created_at":"2022-04-04T15:19:23.364Z","updated_at":"2026-06-10T05:13:28.296Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages","maintainers_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/maintainers","namespaces_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/namespaces"}}],"commits":{"id":1349828,"full_name":"openghg/openghg_inversions","default_branch":"main","total_commits":1239,"total_committers":18,"total_bot_commits":20,"total_bot_committers":1,"mean_commits":68.83333333333333,"dds":0.3591606133979015,"past_year_total_commits":404,"past_year_total_committers":7,"past_year_total_bot_commits":20,"past_year_total_bot_committers":1,"past_year_mean_commits":57.714285714285715,"past_year_dds":0.26485148514851486,"last_synced_at":"2026-07-19T20:04:24.985Z","last_synced_commit":"767a4ad6093293e6ea4eaaeaacc61ed757e1fec2","created_at":"2023-09-12T10:44:49.101Z","updated_at":"2026-07-19T20:02:30.308Z","committers":[{"name":"Brendan Murphy","email":"brendan.murphy@bristol.ac.uk","login":"brendan-m-murphy","count":794},{"name":"EricSaboya","email":"ericsaboya54@gmail.com","login":"EricSaboya","count":131},{"name":"alexdanjou","email":"158201791+alexdanjou","login":"alexdanjou","count":86},{"name":"Ben","email":"qq23840@bristol.ac.uk","login":"qq23840","count":84},{"name":"SutarPrasad","email":"vq21425@bristol.ac.uk","login":"SutarPrasad","count":38},{"name":"copilot-swe-agent[bot]","email":"198982749+Copilot","login":"Copilot","count":20},{"name":"cv18710","email":"cv18710@bp1-login02.data.bp.acrc.priv","login":null,"count":15},{"name":"hdelongueville","email":"qq24644@bristol.ac.uk","login":"hdelongueville","count":14},{"name":"zh21490","email":"zh21490@bp1-login02.data.bp.acrc.priv","login":null,"count":12},{"name":"bq24992","email":"bq24992@bp1-login02.data.bp.acrc.priv","login":null,"count":10},{"name":"joe-pitt","email":"joseph.pitt@bristol.ac.uk","login":"joe-pitt","count":9},{"name":"Gareth Jones","email":"oxidising@gmail.com","login":"gareth-j","count":8},{"name":"Stephen Pearson","email":"s.pearson@bristol.ac.uk","login":null,"count":7},{"name":"Elena Fillola","email":"ef17148@bristol.ac.uk","login":"elenafillo","count":4},{"name":"lukewestern","email":"luke.western@bristol.ac.uk","login":"lukewestern","count":4},{"name":"ro21302","email":"ro21302@bp1-login02.data.bp.acrc.priv","login":null,"count":1},{"name":"Helene De Longueville","email":"qq24644@bristol.ac.be","login":null,"count":1},{"name":"Alexandre Danjou","email":"bq24992@bc4login3.bc4.acrc.priv","login":null,"count":1}],"past_year_committers":[{"name":"Brendan Murphy","email":"brendan.murphy@bristol.ac.uk","login":"brendan-m-murphy","count":297},{"name":"SutarPrasad","email":"vq21425@bristol.ac.uk","login":"SutarPrasad","count":38},{"name":"Ben","email":"qq23840@bristol.ac.uk","login":"qq23840","count":36},{"name":"copilot-swe-agent[bot]","email":"198982749+Copilot","login":"Copilot","count":20},{"name":"Alexandre Danjou","email":"alexandre.danjou.pro@gmail.com","login":"alexdanjou","count":8},{"name":"Elena Fillola","email":"ef17148@bristol.ac.uk","login":"elenafillo","count":4},{"name":"joe-pitt","email":"joseph.pitt@bristol.ac.uk","login":"joe-pitt","count":1}],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-07-21T00:00:11.329Z","repositories_count":6386327,"commits_count":868085905,"contributors_count":35904680,"owners_count":1227877,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"openghg/openghg_inversions","html_url":"https://github.com/openghg/openghg_inversions","last_synced_at":"2026-07-19T08:31:01.713Z","status":"active","issues_count":171,"pull_requests_count":214,"avg_time_to_close_issue":5378075.604938271,"avg_time_to_close_pull_request":1670613.6875,"issues_closed_count":81,"pull_requests_closed_count":160,"pull_request_authors_count":13,"issue_authors_count":14,"avg_comments_per_issue":0.6491228070175439,"avg_comments_per_pull_request":0.37383177570093457,"merged_pull_requests_count":146,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":54,"past_year_pull_requests_count":63,"past_year_avg_time_to_close_issue":1436671.9047619049,"past_year_avg_time_to_close_pull_request":452127.71794871794,"past_year_issues_closed_count":21,"past_year_pull_requests_closed_count":39,"past_year_pull_request_authors_count":6,"past_year_issue_authors_count":7,"past_year_avg_comments_per_issue":0.5185185185185185,"past_year_avg_comments_per_pull_request":0.6031746031746031,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":37,"created_at":"2023-09-12T10:44:53.262Z","updated_at":"2026-07-19T08:31:01.713Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/openghg%2Fopenghg_inversions/issues","issue_labels_count":{"bug":12,"enhancement":11,"tidy":2,"overview-task":2,"refactor":2,"documentation":2,"testing":1,"legacy code":1,"fine first issue":1,"performance":1,"umbrella":1,"needs-scoping":1},"pull_request_labels_count":{"documentation":2,"bug":2,"enhancement":1},"issue_author_associations_count":{"CONTRIBUTOR":146,"NONE":13,"COLLABORATOR":9,"MEMBER":3},"pull_request_author_associations_count":{"CONTRIBUTOR":192,"COLLABORATOR":13,"NONE":6,"MEMBER":3},"issue_authors":{"brendan-m-murphy":91,"hdelongueville":18,"joe-pitt":13,"alexdanjou":11,"qq23840":9,"gareth-j":9,"EricSaboya":7,"rt17603":4,"SutarPrasad":3,"dangrosvenor":2,"supriyamantri":1,"lukewestern":1,"rebeccawardbristol":1,"Copilot":1},"pull_request_authors":{"brendan-m-murphy":132,"alexdanjou":28,"hdelongueville":11,"qq23840":10,"joe-pitt":7,"aliceramsden":7,"gareth-j":4,"EricSaboya":4,"Copilot":3,"pearson01":3,"SutarPrasad":3,"elenafillo":1,"LiBowei9":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-07-19T00:00:22.519Z","repositories_count":14860189,"issues_count":32169664,"pull_requests_count":105846449,"authors_count":11350917,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{"bug":4,"refactor":2,"enhancement":2,"overview-task":1,"tidy":1,"umbrella":1,"documentation":1,"needs-scoping":1},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{"CONTRIBUTOR":45,"NONE":4,"MEMBER":3,"COLLABORATOR":2},"past_year_pull_request_author_associations_count":{"CONTRIBUTOR":57,"MEMBER":3,"COLLABORATOR":2,"NONE":1},"past_year_issue_authors":{"brendan-m-murphy":43,"qq23840":3,"SutarPrasad":3,"rt17603":2,"Copilot":1,"hdelongueville":1,"supriyamantri":1},"past_year_pull_request_authors":{"brendan-m-murphy":50,"alexdanjou":3,"Copilot":3,"qq23840":3,"SutarPrasad":3,"LiBowei9":1},"maintainers":[{"login":"EricSaboya","count":11,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/EricSaboya"},{"login":"aliceramsden","count":7,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/aliceramsden"},{"login":"SutarPrasad","count":6,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/SutarPrasad"},{"login":"qq23840","count":4,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/qq23840"}],"active_maintainers":[{"login":"SutarPrasad","count":6,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/SutarPrasad"},{"login":"qq23840","count":4,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/qq23840"}]},"events":{"total":{"CreateEvent":84,"CommitCommentEvent":2,"ReleaseEvent":3,"DeleteEvent":71,"PullRequestEvent":113,"IssuesEvent":73,"IssueCommentEvent":103,"PushEvent":432,"GollumEvent":1,"PullRequestReviewCommentEvent":48,"PullRequestReviewEvent":56},"last_year":{"ReleaseEvent":2,"DeleteEvent":31,"PullRequestEvent":26,"IssuesEvent":24,"IssueCommentEvent":18,"PushEvent":175,"GollumEvent":1,"PullRequestReviewEvent":15,"PullRequestReviewCommentEvent":35,"CreateEvent":40}},"keywords":[],"dependencies":[{"ecosystem":"actions","filepath":".github/workflows/workflow.yaml","sha":null,"kind":"manifest","created_at":"2023-09-26T02:30:58.400Z","updated_at":"2023-09-26T02:30:58.400Z","repository_link":"https://github.com/openghg/openghg_inversions/blob/devel/.github/workflows/workflow.yaml","dependencies":[{"id":13941565492,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false},{"id":13941565493,"package_name":"actions/setup-python","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"pypi","filepath":"pyproject.toml","sha":null,"kind":"manifest","created_at":"2023-09-26T02:30:58.408Z","updated_at":"2023-09-26T02:30:58.408Z","repository_link":"https://github.com/openghg/openghg_inversions/blob/devel/pyproject.toml","dependencies":[{"id":13941565494,"package_name":"pymc","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13941565495,"package_name":"xarray","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13941565496,"package_name":"pandas","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13941565497,"package_name":"matplotlib","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13941565498,"package_name":"scipy","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13941565499,"package_name":"numpy","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13941565500,"package_name":"openghg","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false}]},{"ecosystem":"pypi","filepath":"requirements.txt","sha":null,"kind":"manifest","created_at":"2023-09-26T02:31:00.515Z","updated_at":"2023-09-26T02:31:00.515Z","repository_link":"https://github.com/openghg/openghg_inversions/blob/devel/requirements.txt","dependencies":[{"id":13941565501,"package_name":"pymc","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13941565502,"package_name":"xarray","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13941565503,"package_name":"pandas","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13941565504,"package_name":"matplotlib","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13941565505,"package_name":"scipy","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13941565506,"package_name":"numpy","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":13941565507,"package_name":"openghg","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false}]},{"ecosystem":"pypi","filepath":"setup.py","sha":null,"kind":"manifest","created_at":"2023-09-26T02:31:00.525Z","updated_at":"2023-09-26T02:31:00.525Z","repository_link":"https://github.com/openghg/openghg_inversions/blob/devel/setup.py","dependencies":[]},{"ecosystem":"pypi","filepath":"requirements-dev.txt","sha":null,"kind":"manifest","created_at":"2023-10-11T06:00:33.248Z","updated_at":"2023-10-11T06:00:33.248Z","repository_link":"https://github.com/openghg/openghg_inversions/blob/devel/requirements-dev.txt","dependencies":[{"id":14141027024,"package_name":"flake8","ecosystem":"pypi","requirements":"*","direct":true,"kind":"development","optional":false},{"id":14141027025,"package_name":"pytest","ecosystem":"pypi","requirements":"\u003e=6.2.5","direct":true,"kind":"development","optional":false}]}],"score":11.985413505508884,"created_at":"2026-04-07T15:00:29.102Z","updated_at":"2026-07-21T21:04:35.418Z","avatar_url":"https://github.com/openghg.png","language":"Python","category":"Emissions","sub_category":"Emission Observation and Modeling","monthly_downloads":66,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"\u003cimg src=\"https://github.com/openghg/logo/raw/main/OpenGHG_Logo_Landscape.png\" width=\"100\"\u003e\n\n# OpenGHG Inversions\n\nOpenGHG Inversions is a Python package that is being developed as part of the [OpenGHG project](https://openghg.org) with the aim of merging the data-processing and simulation modelling capabilities of OpenGHG with the atmospheric Bayesian inverse models developed by the Atmospheric Chemistry Research Group (ACRG) at the University of Bristol, UK.\n\nCurrently, OpenGHG Inversions includes the following regional inversion models:\n- Hierarchical Bayesian Markov Chain Monte Carlo (HBMCMC) model (as described in Ganesan et al., 2014, _ACP_)\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10650595.svg)](https://doi.org/10.5281/zenodo.10650595)\n\n## Installation\n\n### Using Pixi (recommended for development)\n\nOpenGHG Inversions reads and writes NetCDF/HDF5 data through OpenGHG,\n`xarray`, `h5netcdf`, `h5py`, and `netcdf4`. If these packages\nare installed from unrelated PyPI wheels, their bundled HDF5 libraries can\nbe incompatible. The Pixi environment in this repository installs the\ncompiled HDF5/NetCDF stack from conda-forge and installs\n`openghg_inversions` in editable mode.\n\nInstall [Pixi](https://pixi.prefix.dev/latest/installation/), then run:\n\n```bash\ngit clone https://github.com/openghg/openghg_inversions.git\ncd openghg_inversions\npixi install -e dev\npixi run -e dev python -c \"import openghg_inversions, h5py, h5netcdf, netCDF4\"\n```\n\nUseful development commands:\n\n```bash\npixi run -e dev test\npixi run -e dev lint\npixi run -e dev typecheck\npixi run -e dev tox\n```\n\nTo run the optional real country-file HDF5 smoke check on a machine that\ncan access the ACRG country files, set the country directory and run the\nPixi task:\n\n```bash\nOPENGHG_COUNTRY_FILE_SMOKE_DIR=/group/chem/acrg/LPDM/countries pixi run -e dev country-file-smoke\n```\n\nThe smoke check opens `country_EUROPE_EEZ_PARIS_gapfilled.nc` and\n`country_EUROPE.nc` with xarray's default backend, `h5netcdf`, and\n`netcdf4`, then exercises `openghg_inversions._country_file.load_country_dataset`.\nIt prints the `xarray`, `h5netcdf`, `h5py`, and `netCDF4` versions and the\nper-engine result. Without `OPENGHG_COUNTRY_FILE_SMOKE_DIR`, the real-file\ntests are skipped so uv/pip CI does not need access to cluster data.\n\nTo test against a local OpenGHG checkout without replacing the Pixi-managed\nHDF5/NetCDF dependencies, install only the local package code:\n\n```bash\npixi run -e dev python -m pip install --no-deps -e ~/Documents/openghg\n```\n\nAvoid running plain `pip install -U h5py h5netcdf netcdf4` inside the Pixi\nenvironment, as that can reintroduce incompatible wheels.\n\n### Using pip\n\n```bash\npip install openghg-inversions\n```\n\n### Using uv (faster alternative)\n\n```bash\nuv pip install openghg-inversions\n```\n\nOr with uv's project management:\n\n```bash\n# Add to your project\nuv add openghg-inversions\n\n# Or install in a virtual environment\nuv venv\nuv pip install openghg-inversions\n```\n\n### Development Installation\n\nIf you want to contribute or modify the package:\n\n**With Pixi (recommended when working with NetCDF/HDF5 data):**\n```bash\ngit clone https://github.com/openghg/openghg_inversions.git\ncd openghg_inversions\npixi install -e dev\n```\n\n**With uv:**\n```bash\ngit clone https://github.com/openghg/openghg_inversions.git\ncd openghg_inversions\nuv sync --dev\n```\n\n**With pip:**\n```bash\ngit clone https://github.com/openghg/openghg_inversions.git\ncd openghg_inversions\npip install -e \".[dev]\"\n```\n\n## Installation and Setup\nAs OpenGHG Inversions is dependent on OpenGHG, please ensure that when running locally you are using Python 3.10 or later on Linux or MacOS. Please see the [OpenGHG project](https://github.com/openghg/openghg/) for further installation instructions of OpenGHG and setting up an object store.\n\n### Setup a virtual environment\n\nCheck that you have Python 3.10 or greater:\n```bash\npython --version\n```\n(Note for Bristol ACRG group: If you are on Blue Pebble, the default anaconda module `lang/python/anaconda` is Python 3.9. Use `module avail` to list other options; `lang/python/miniconda/3.10.10.cuda-12` or `lang/python/miniconda/3.12.2.inc-perl-5.30.0` will work.)\n\nMake a virtual environment\n```bash\npython -m venv openghg_inv\n```\n\nNext activate the environment\n```bash\nsource openghg_inv/bin/activate\n```\n\n### Installation using `pip`\n\nFirst you'll need to clone the repository\n\n```bash\ngit clone https://github.com/openghg/openghg_inversions.git\n```\n\nNext make sure `pip` and related install tools are up to date and then install OpenGHG Inversions using the editable install flag (`-e`)\n\n```bash\npip install --upgrade pip setuptools wheel\npip install -e openghg_inversions\n```\n\nOptionally, install the developer requirements (there is more information about this in the \"Contributing\" section below):\n``` bash\npip install -r requirements-dev.txt\n```\n\n### Verify that PyMC is using fast linear algebra libraries\nAt this point, run\n\n``` bash\npython -c \"import pymc\"\n```\nThis should run without printing any messages.\nIf you receive a message about `pymc` or `pytensor` using the `numpy` C-API, then your inversions might run slowly because the fast linear algebra libraries used by `numpy` haven't been found.\n\nSolutions to this are:\n1. Use the Pixi development environment above, which installs `numpy` and the NetCDF/HDF5 stack from conda-forge.\n2. Try `python -m pip install numpy` after upgrading `pip, setuptools, wheel`.\n3. Create a `conda` env, install `numpy` using `conda`, then use `pip` to upgrade `pip, setuptools, wheel` and install `openghg_inversions`.\n\n\n## Using OpenGHG Inversions\n\n### Getting Started\n\nFor an overview of OpenGHG inversions, see this [primer](docs/getting_started.md).\n\n### Modern RHIME entry points\n\nNew RHIME runs can be launched without calling an internal source file path:\n\n```python\nfrom openghg_inversions.rhime import run_rhime, run_rhime_multisector\n\nresult = run_rhime(\n    species=\"ch4\",\n    sites=[\"TAC\"],\n    averaging_period=[\"1h\"],\n    domain=\"EUROPE\",\n    start_date=\"2019-01-01\",\n    end_date=\"2019-01-02\",\n    output_path=\"outputs\",\n    output_name=\"example\",\n    flux_sources=[\"total-ukghg-edgar7\"],\n)\n```\n\nFor SLURM batch scripts and installed environments, use the console entry point:\n\n```bash\nopenghg-inversions run-rhime 2019-01-01 2019-01-02 -c rhime.ini --output-path outputs\nopenghg-inversions run-rhime-multisector 2019-01-01 2019-01-02 -c rhime_multisector.ini\n```\n\nThe new RHIME config template is available at\n`openghg_inversions/config/templates/rhime_template.ini`. New configs should use\n`flux_sources`; legacy `emissions_name` is accepted when `flux_sources` is absent.\nSee the [RHIME terminology and quickstart](docs/usage/rhime.rst) page for the\ncanonical config vocabulary.\n\nRHIME terminology:\n\n- `species`: primary gas or tracer name used for object-store lookup and output naming.\n- `source`: OpenGHG metadata key used to retrieve flux data.\n- `flux_sources`: RHIME field containing requested OpenGHG flux `source` values.\n- `sector_sources`: optional mapping from RHIME sector names to OpenGHG flux `source` values.\n- `sector`: model component optimized separately, usually backed by one flux `source`.\n- `tracer`: additional species used to constrain the primary species through linked forward models.\n- `emissions_name`: legacy compatibility spelling only; use `flux_sources` in new RHIME configs.\n\n### Legacy HBMCMC Compatibility\n\nNew runs should use `openghg-inversions run-rhime` or the Python\n`run_rhime(...)` API above. The historical `run_hbmcmc.py` script remains as a\ncompatibility wrapper for old fixedbasis-style INI files: it translates\nsupported legacy names and options to modern RHIME arguments and then calls\n`run_rhime(...)`.\nThis branch is no longer preserving the exact historical fixedbasisMCMC /\ninferpymc passthrough behaviour. Use release `0.6` or earlier if you need the\nold fixedbasis implementation.\n\nDirect `fixedbasisMCMC(...)` calls are a temporary legacy Python path, not a\nwrapper around `run_rhime(...)`. New work should not target that API.\n\nModern RHIME preparation, `InversionOutput`, and postprocessing use retained\n`BasisFunctions` / `BasisOperator` objects as the primary basis representation.\nDerived flux, country, PARIS, and legacy-format products record the\noperator-backed reconstruction path and retained basis artifact source/path when\nknown. Legacy flat basis NetCDF artifacts remain readable as an explicit\ncompatibility fallback, but new workflows should save and load DataTree\n`BasisFunctions` artifacts.\n\nThe old output names `hbmcmc` and `hbmcmc_postprocessing` are deprecated\naliases for the modern `legacy` output format. The compatibility wrapper keeps\nthe old HBMCMC filename convention for these outputs; direct `run_rhime` calls\nuse RHIME filenames unless configured otherwise.\n\nThe compatibility entry point still accepts the old INI layout and command-line\noverrides.\n\n#### Ways of passing arguments to the inversion\n\n##### Passing options in an `ini` file\n\nExtra options can be added to an `ini` file in almost any location.\nThe [template ini file](openghg_inversions/hbmcmc/config/openghg_hbmcmc_input_template_example.ini) puts\nthese option under the heading `MCMC.OPTIONS`:\n\n``` ini\n[MCMC.OPTIONS]\naveraging_error = True\nfix_basis_outer_regions = True\nuse_bc = True\nnuts_sampler = \"numpyro\"\nsave_trace = False\nmin_error = \"percentile\"\npollution_events_from_obs = True\nreparameterise_log_normal = False\nsampler_kwargs = {\"target_accept\": 0.99}\n```\n\nThese options are read from the old file layout and translated where a modern\nRHIME equivalent exists. Fixedbasis-only options that are enabled and no longer\nhave a RHIME equivalent raise a targeted error.\n\n##### Passing options at the command line\n\nWhen running inversions using the script `run_hbmcmc.py`, you must specify the start and end date of\nthe inversion period, and you pass an `ini` file using the flag `-c`.\n\nIn addition, you can pass the output path using the flag `--output-path`; this is useful if your SLURM script\nuses different output locations for different array jobs.\n\nYou can also pass supported RHIME-compatible keyword arguments to `run_hbmcmc.py` using the `--kwargs` flag.\nFor instance:\n\n``` bash\npython run_hbmcmc.py \"2019-01-01\" \"2019-02-01\" -c \"example.ini\" --kwargs '{\"averaging_error\": true, \"min_error\": 20.0, \"nuts_sampler\": \"numpyro\"}'\n```\nIt is crucial that you enclose the dictionary in single quotes, otherwise the command line will split the dictionary on white space.\n\nAgain, this can be used to change supported inversion arguments on the fly (say, in a SLURM script).\nUnsupported fixedbasis-only options now raise targeted errors instead of being\npassed through to `inferpymc`.\n\nThe format of the dictionary inside single quotes must be JSON, because the value of `kwargs` is parsed using `json.loads`.\nPython translates JSON according to [this table](https://docs.python.org/3/library/json.html#encoders-and-decoders).\nIn particular, `\"true\"` in JSON translate to `True` in Python (but `\"True\"` will be translated as a string).\n\nThe parsing in our `ini` files is more flexible; in particular, values that are Python statements will be translated to Python, so you don't need to worry about translation.\n\n#### What parameters can you set?\n\nThe following sections detail some parameters that enable/specify optional behaviour in the inversion.\n\n##### Parameters for `fixedbasisMCMC`\n\nThese are compatibility-era notes for old fixedbasis-style workflows, not the\nrecommended interface for new runs. New configs should use the RHIME vocabulary\nabove. See the docstring for `fixedbasisMCMC` in the [hbmcmc module](openghg_inversions/hbmcmc/hbmcmc.py)\nfor the current compatibility arguments.\n\n\nArguments affecting the data using in the inversion:\n- `sites`: a list of the sites to use in the inversion. Other information applied on a site-to-site basis that is presented in lists must be in the same order as used in the `sites` list.\n- `inlet`: a list of inlets for each site. If only one inlet is available for a given site and species, then `None` may be used as the value for that site. If there are a range of inlet heights at a single site, and these should correspond to a single footprint release height, then you may use, for instance, `slice(140, 160)` to combine inlet heights between 140 and 160 meters into a single timeseries of observations.\n-`instrument`, `fp_height`, `obs_data_level`, and `met_model` must either be lists of the same length as `sites`, or a single value may be supplied and will be converted to a list of the correct length.\n\n\nArguments affecting the inverse model:\n- `averaging_error`: if `True`, the error from resampling to the given `averaging_period` will be added to the observation's error.\n- `use_bc`: defaults to `True`. If `False`, no boundary conditions will be used in the inversion. This implicitly assumes that contributions from the boundary have been subtracted from the observations.\n- `fix_basis_outer_regions`:\n  - Default value is `False`\n  - If `True`, the \"outer regions\" of the (`EUROPE`) domain use basis regions specified by a file provided by the Met Office (from their \"InTem\" model), and the \"inner region\", which includes the UK, is fit using our basis algorithms.\n  - This option is only available for the `EUROPE` domain currently.\n- `calculate_min_error`: calculate min_error (see below) on the fly using the \"residual error method\" or a method based on percentiles of observations. Available arguments:\n  - `residual`: use \"residual error method\"\n  - `percentile`: use method based on percentiles\n  - `None`: in this case, you should pass in a value directly using (for instance) `min_error = 12.3`\n- `min_error_options`: additional parameters to pass to the function that compute min error. This should be a dictionary, and the available options depend on the function used. (The functions to compute min. model error are in `model_error.py`).\n  - If `calculate_min_error = \"residual\"`, then, for instance, you could use `min_error_options = {\"robust\": False, \"by_site\": True}`. (By default, `robust` is `False`, this is just to show the possibilities.)\n- `filters`: filters to apply to data (after it is resampled and aligned)\n  - `filters = None` will skip filtering\n  - if `filters` is a list of filters (or a string containing a single filter name), those filters will be applied to all sites.\n  - if `filters` is a dictionary with site codes as keys and lists of filters as values, then each site will have filters applied individually according to this dictionary. All sites must supplied; to skip a site, pass `None` instead of a list (or omit that site from the dictionary). For instance: `filters = {\"MHD\": [\"pblh_inlet_diff\", \"pblh_min\"], \"JFJ\": None}`.\n  - the list of available filters can be found in the `filtering` function in the [utils module](openghg_inversions/utils.py).\n  - Further parameters affecting the model are in the next subsection: they are passed to `inferpymc`.\n  - `xprior` and `bcprior`: these should be a dictionary containing `\"pdf\": \u003cdistribution\u003e` and the arguments that should be passed to the PyMC distribution with that name. `\u003cdistribution\u003e`\n\nArguments affecting the output of the inversion:\n- `save_trace`:\n  - The default value is `False`.\n  - If `True`, the arviz `InferenceData` output from sampling will be saved to the output path of the inversion, with a file name of the form `f\"{outputname}{start_data}_trace.nc`. To load this trace into arviz, you need to use `InferenceData.from_netcdf`.\n  - Alternatively, you can pass a path (including filename), and that path will be used.\n\n\n##### Parameters for `inferpymc`\n\nIn release `0.6` and earlier, unrecognised `fixedbasisMCMC` keyword arguments\nwere passed through to `inferpymc`. Current compatibility paths validate\nRHIME-compatible options instead. The argument routing design is being cleaned\nup as part of the fixedbasis retirement work.\n\nHistorical inferpymc-era parameters included:\n- `min_error`: a non-negative float value specifying a lower bound for the model-measurement mismatch error (i.e. the error on (y - y_mod)).\n- `nuts_sampler`: a string, which defaults to `\"pymc\"`. The other option is `\"numpyro\"`, which will the [JAX](https://jax.readthedocs.io/en/latest/index.html) accelerated sampler from [Numpyro](https://num.pyro.ai/en/stable/index.html); this tends to be significantly faster than the NUTS sampler built into PyMC.\n- `pollution_events_from_obs`: Determines whether the model error is calculated as a fraction of:\n  - the measured enhancement above the modelled baseline (if `True`)\n  - the prior modelled enhancement (if `False`)\n- `no_model_error`: if `True`, only use obs error in likelihood (omitting min. model error and model error from scaling pollution events).\n- `reparameterise_log_normal`: if `True`, then log normal priors will be sampled by transforming samples from standard normal random variable to samples from the appropriate log normal distribution.\n\n\n### The output from inversions\n\nThe results of an inversions are returned as an xarray `Dataset`.\n\nThe dimension `nmeasure` consists of the time for each observation stacked into a single 1D array.\n\nTODO: complete this part\n\n- `Yerror`: obs. error used in the inversion; if `add_averaging` is True, this will contain the combined \"repeatability\" and \"variability\"; otherwise, it will just contain \"repeatability\", if it is available, or \"variability\"\n- `Yerror_repeatablity`: obs. repeatability. If repeatability isn't available for some sites, then this is filled with zeros.\n- `Yerror_variability`: obs. variability.\n\n\n\n## Contributing\n\n### Code quality tools\n\nTo contribute to `openghg_inversions`, you should also install the developer packages:\n```bash\npip install -r requirements-dev.txt\n```\nThis will install the packages `pytest`, `pytest-xdist`, `ruff`, `tox`, and `tox-uv`.\n\nWe use `ruff` to lint our code. To check for lint issues, run:\n``` bash\nruff check openghg_inversions\n```\nin your `openghg_inversions` repository (with your virtual env activated).\n\nTo fix issues that Ruff can safely update, run:\n``` bash\nruff check --fix openghg_inversions\n```\n\nYou can run the tests using:\n``` bash\npytest\n```\nin the `openghg_inversions` repository. (Make sure your virtual env is activated.)\n\n### Using `tox` to check code\n\nAlternatively, use `tox` to run tests and check the code format.\n`tox` creates isolated environments to run the tests, which means it can test against different\nversions of OpenGHG.\nIt does this automatically, so you don't need to manage pip or conda virtual environments to do this.\n\nTo install `tox` globally in a \"safe\" way, use:\n\n```bash\nuv tool install tox --with tox-uv\n```\nor, within a virtual environment, install `tox` and `tox-uv`.\n\nCalling `tox -p` will run tests against OpenGHG devel and the last two releases of OpenGHG, and run Ruff lint checks.\n\nTo specify individual jobs, you can use, e.g.:\n\n```bash\ntox -e py310-openghgDev\n```\n\nto run the tests against the devel branch.\n\nUse `tox -l` to list all options.\n\nTo pass arguments to pytest, Ruff, mypy, etc, you can use, e.g.\n\n```bash\ntox -- \"openghg_inversions/hbmcmc\"\n```\n\nwhich will pass the positional argument \"openghg_inversions/hbmcmc\" to the commands invoked by tox.\n\n### Using branches\n\nTo contribute new code, make a branch off of the `devel` branch.\nWhen your code is ready to be added, push it to github (`origin`).\nYou can then open a \"pull request\" on github and request a code review.\nIt's helpful to write a description of the changes made in your PR, as well as linking to any relevant issues.\n\nYour code must past the tests and be reviewed before it can be merged.\nAfter this, you can merge your branch and close it (it can always be recovered later if necessary).\n\n## Citation and contributors\n\nIf you use this software, please cite the version-specific Zenodo DOI for the\nrelease you used.\n\nThe recommended prose description is:\n\n\u003e We use RHIME, the Regional Hierarchical Inversion Modelling Environment,\n\u003e implemented in the `openghg_inversions` Python package.\n\nThe formal software citation lists the principal creators of the citable\nsoftware artifact. Additional code, testing, documentation, scientific, and\nproject contributions are recorded in the Zenodo metadata and GitHub history.\n\n## References\nGanesan et al. (2014),_ACP_;\n\nWestern et al. (2021), _Enviro. Sci. Tech Lett._\n","funding_links":[],"readme_doi_urls":["https://doi.org/10.5281/zenodo.10650595"],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":["greenhouse-gas"],"project_url":"https://ost.ecosyste.ms/api/v1/projects/350944","html_url":"https://ost.ecosyste.ms/projects/350944"}