{"id":20276,"name":"carbon budget","description":"This model maps gross greenhouse gas emissions from forests between 2001 and 2015, gross carbon removals by forests between 2001, and the difference between them (net flux).","url":"https://github.com/wri/carbon-budget","last_synced_at":"2026-04-17T07:30:51.132Z","repository":{"id":25781324,"uuid":"87964647","full_name":"wri/carbon-budget","owner":"wri","description":"Calculate gross GHG emissions, gross carbon removals (sequestration), and net flux from forests globally","archived":false,"fork":false,"pushed_at":"2026-03-17T20:55:02.000Z","size":6176,"stargazers_count":87,"open_issues_count":3,"forks_count":37,"subscribers_count":18,"default_branch":"master","last_synced_at":"2026-03-27T08:05:40.202Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wri.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-04-11T18:05:56.000Z","updated_at":"2026-03-14T08:28:03.000Z","dependencies_parsed_at":"2024-01-12T04:52:34.844Z","dependency_job_id":"568b773b-86b7-45ee-a7c6-a084e74b0ba3","html_url":"https://github.com/wri/carbon-budget","commit_stats":{"total_commits":4255,"total_committers":68,"mean_commits":62.5735294117647,"dds":0.0947121034077556,"last_synced_commit":"18ac969b65b7ecb73f32f049d71bec8041a809bd"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/wri/carbon-budget","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wri","download_url":"https://codeload.github.com/wri/carbon-budget/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31537791,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"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":"wri","name":"World Resources Institute","uuid":"4615146","kind":"organization","description":"","email":"datalab@wri.org","website":"https://wri.org","location":"Washington, DC","twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/4615146?v=4","repositories_count":207,"last_synced_at":"2024-04-14T16:16:20.039Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/wri","funding_links":[],"total_stars":1155,"followers":97,"following":0,"created_at":"2022-11-03T00:18:19.167Z","updated_at":"2024-04-14T16:17:11.365Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wri","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wri/repositories"},"packages":[{"id":11733727,"name":"github.com/wri/carbon-budget","ecosystem":"go","description":null,"homepage":null,"licenses":"gpl-3.0","normalized_licenses":["GPL-3.0"],"repository_url":"https://github.com/wri/carbon-budget","keywords_array":[],"namespace":null,"versions_count":11,"first_release_published_at":"2020-03-17T02:38:33.000Z","latest_release_published_at":"2025-06-06T16:36:08.000Z","latest_release_number":"v1.4.2","last_synced_at":"2026-04-08T03:03:09.285Z","created_at":"2025-06-05T11:17:47.296Z","updated_at":"2026-04-08T03:03:09.285Z","registry_url":"https://pkg.go.dev/github.com/wri/carbon-budget","install_command":"go get github.com/wri/carbon-budget","documentation_url":"https://pkg.go.dev/github.com/wri/carbon-budget#section-documentation","metadata":{},"repo_metadata":{"id":25781324,"uuid":"87964647","full_name":"wri/carbon-budget","owner":"wri","description":"Calculate gross GHG emissions, gross carbon removals (sequestration), and net flux from forests globally","archived":false,"fork":false,"pushed_at":"2025-09-23T17:04:29.000Z","size":6262,"stargazers_count":85,"open_issues_count":4,"forks_count":37,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-10-08T22:10:01.119Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wri.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-04-11T18:05:56.000Z","updated_at":"2025-09-16T15:15:30.000Z","dependencies_parsed_at":"2024-01-12T04:52:34.844Z","dependency_job_id":"1deea3e3-203f-4a03-87ec-f116a3c5ba50","html_url":"https://github.com/wri/carbon-budget","commit_stats":{"total_commits":4255,"total_committers":68,"mean_commits":62.5735294117647,"dds":0.0947121034077556,"last_synced_commit":"18ac969b65b7ecb73f32f049d71bec8041a809bd"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/wri/carbon-budget","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wri","download_url":"https://codeload.github.com/wri/carbon-budget/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018652,"owners_count":26086576,"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":"2025-10-14T02:00:06.444Z","response_time":60,"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":"wri","name":"World Resources Institute","uuid":"4615146","kind":"organization","description":"","email":"datalab@wri.org","website":"https://wri.org","location":"Washington, DC","twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/4615146?v=4","repositories_count":207,"last_synced_at":"2024-04-14T16:16:20.039Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/wri","funding_links":[],"total_stars":1155,"followers":97,"following":0,"created_at":"2022-11-03T00:18:19.167Z","updated_at":"2024-04-14T16:17:11.365Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wri","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wri/repositories"},"tags":[{"name":"v1.4.2","sha":"5a887ab2befae0b21592bd1ec18cdda6a1b973b0","kind":"commit","published_at":"2025-06-06T16:36:08.000Z","download_url":"https://codeload.github.com/wri/carbon-budget/tar.gz/v1.4.2","html_url":"https://github.com/wri/carbon-budget/releases/tag/v1.4.2","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/wri/carbon-budget@v1.4.2","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.4.2","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.4.2/manifests"},{"name":"v1.4.1","sha":"abf16a24d7b1323443ad4378d7636c6324bb11fa","kind":"commit","published_at":"2025-01-23T18:29:59.000Z","download_url":"https://codeload.github.com/wri/carbon-budget/tar.gz/v1.4.1","html_url":"https://github.com/wri/carbon-budget/releases/tag/v1.4.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/wri/carbon-budget@v1.4.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.4.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.4.1/manifests"},{"name":"v1.4.0","sha":"f8348b8a58d024ceee22d07b388c93fa9a08263e","kind":"commit","published_at":"2024-12-19T19:24:50.000Z","download_url":"https://codeload.github.com/wri/carbon-budget/tar.gz/v1.4.0","html_url":"https://github.com/wri/carbon-budget/releases/tag/v1.4.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/wri/carbon-budget@v1.4.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.4.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.4.0/manifests"},{"name":"v1.3.2","sha":"18ac969b65b7ecb73f32f049d71bec8041a809bd","kind":"commit","published_at":"2024-04-16T19:59:48.000Z","download_url":"https://codeload.github.com/wri/carbon-budget/tar.gz/v1.3.2","html_url":"https://github.com/wri/carbon-budget/releases/tag/v1.3.2","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/wri/carbon-budget@v1.3.2","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.3.2","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.3.2/manifests"},{"name":"v1.3.1","sha":"eb9a055bee5d76b9fd485511db8e9baa89ac5945","kind":"commit","published_at":"2024-02-07T14:23:07.000Z","download_url":"https://codeload.github.com/wri/carbon-budget/tar.gz/v1.3.1","html_url":"https://github.com/wri/carbon-budget/releases/tag/v1.3.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/wri/carbon-budget@v1.3.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.3.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.3.1/manifests"},{"name":"v1.2.3","sha":"4e29674bb7bdad9b1dfe6bce2aff16277f2656fa","kind":"commit","published_at":"2023-07-03T19:38:12.000Z","download_url":"https://codeload.github.com/wri/carbon-budget/tar.gz/v1.2.3","html_url":"https://github.com/wri/carbon-budget/releases/tag/v1.2.3","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/wri/carbon-budget@v1.2.3","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.2.3","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.2.3/manifests"},{"name":"v1.2.2","sha":"80e23b2ba7f760f7fe75bbc062c59376066ae851","kind":"commit","published_at":"2022-03-22T13:48:53.000Z","download_url":"https://codeload.github.com/wri/carbon-budget/tar.gz/v1.2.2","html_url":"https://github.com/wri/carbon-budget/releases/tag/v1.2.2","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/wri/carbon-budget@v1.2.2","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.2.2","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.2.2/manifests"},{"name":"v1.2.1","sha":"7e87b0d53fa8a93e8d225f716b735cd424a1aeca","kind":"commit","published_at":"2021-03-31T14:35:02.000Z","download_url":"https://codeload.github.com/wri/carbon-budget/tar.gz/v1.2.1","html_url":"https://github.com/wri/carbon-budget/releases/tag/v1.2.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/wri/carbon-budget@v1.2.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.2.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.2.1/manifests"},{"name":"v1.2.0","sha":"9d9eddb7ab35410bf279f38c21e1a901f7dcb995","kind":"commit","published_at":"2020-10-30T15:37:39.000Z","download_url":"https://codeload.github.com/wri/carbon-budget/tar.gz/v1.2.0","html_url":"https://github.com/wri/carbon-budget/releases/tag/v1.2.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/wri/carbon-budget@v1.2.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.2.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v1.2.0/manifests"},{"name":"v0.1.1","sha":"57f19ebcecd67732e7772a7537afeb6695086e83","kind":"commit","published_at":"2020-03-18T14:22:02.000Z","download_url":"https://codeload.github.com/wri/carbon-budget/tar.gz/v0.1.1","html_url":"https://github.com/wri/carbon-budget/releases/tag/v0.1.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/wri/carbon-budget@v0.1.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v0.1.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v0.1.1/manifests"},{"name":"v0.1.0","sha":"dfcd9f5320f32dec9285b9d2ead61fba4e5a9d87","kind":"commit","published_at":"2020-03-17T02:38:33.000Z","download_url":"https://codeload.github.com/wri/carbon-budget/tar.gz/v0.1.0","html_url":"https://github.com/wri/carbon-budget/releases/tag/v0.1.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/wri/carbon-budget@v0.1.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v0.1.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/tags/v0.1.0/manifests"}]},"repo_metadata_updated_at":"2025-10-19T06:14:32.000Z","dependent_packages_count":0,"downloads":null,"downloads_period":null,"dependent_repos_count":0,"rankings":{"downloads":null,"dependent_repos_count":5.757538697138725,"dependent_packages_count":5.395053785167736,"stargazers_count":null,"forks_count":null,"docker_downloads_count":null,"average":5.57629624115323},"purl":"pkg:golang/github.com/wri/carbon-budget","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/go/github.com/wri/carbon-budget","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/go/github.com/wri/carbon-budget","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/go/github.com/wri/carbon-budget/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2025-09-24T05:48:56.177Z","issues_count":2,"pull_requests_count":72,"avg_time_to_close_issue":1494812.0,"avg_time_to_close_pull_request":1067229.7878787878,"issues_closed_count":2,"pull_requests_closed_count":66,"pull_request_authors_count":6,"issue_authors_count":2,"avg_comments_per_issue":8.5,"avg_comments_per_pull_request":0.05555555555555555,"merged_pull_requests_count":60,"bot_issues_count":0,"bot_pull_requests_count":1,"past_year_issues_count":0,"past_year_pull_requests_count":15,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":270033.75,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":12,"past_year_pull_request_authors_count":3,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":0.13333333333333333,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":12,"issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/issues","maintainers":[{"login":"dagibbs22","count":39,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/dagibbs22"},{"login":"melrose-wri","count":24,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/melrose-wri"},{"login":"gtempus","count":5,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/gtempus"},{"login":"loganbyers","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/loganbyers"}],"active_maintainers":[{"login":"melrose-wri","count":12,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/melrose-wri"},{"login":"dagibbs22","count":2,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/dagibbs22"},{"login":"loganbyers","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/loganbyers"}]},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fwri%2Fcarbon-budget/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fwri%2Fcarbon-budget/version_numbers","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fwri%2Fcarbon-budget/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fwri%2Fcarbon-budget/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fwri%2Fcarbon-budget/codemeta","maintainers":[],"registry":{"name":"proxy.golang.org","url":"https://proxy.golang.org","ecosystem":"go","default":true,"packages_count":2092408,"maintainers_count":0,"namespaces_count":780333,"keywords_count":112764,"github":"golang","metadata":{"funded_packages_count":53458},"icon_url":"https://github.com/golang.png","created_at":"2022-04-04T15:19:22.939Z","updated_at":"2026-04-09T05:03:48.640Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages","maintainers_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/maintainers","namespaces_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/namespaces"}}],"commits":{"id":1254246,"full_name":"wri/carbon-budget","default_branch":"master","total_commits":4304,"total_committers":67,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":64.23880597014926,"dds":0.10432156133828996,"past_year_total_commits":13,"past_year_total_committers":2,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":6.5,"past_year_dds":0.07692307692307687,"last_synced_at":"2026-04-08T03:36:21.649Z","last_synced_commit":"e8cd9f3617e1d0a1df5fef7b91c42b9c8841ed14","created_at":"2023-03-27T11:01:10.419Z","updated_at":"2026-04-08T03:22:19.881Z","committers":[{"name":"dagibbs22","email":"dagibbs22@gmail.com","login":"dagibbs22","count":3855},{"name":"sgibbes","email":"sgibbes@wri.org","login":null,"count":198},{"name":"Melissa.Rose","email":"melissa.rose@wri.org","login":"melrose-wri","count":86},{"name":"Ubuntu","email":"charlie.hofmann@gmail.com","login":"mappingvermont","count":24},{"name":"elizabethgoldman","email":"egoldman@wri.org","login":"elizabethgoldman","count":18},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-251.ec2.internal","login":null,"count":9},{"name":"Samantha Gibbes","email":"samantha.gibbes@wri.org","login":null,"count":8},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-207.ec2.internal","login":null,"count":8},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-239.ec2.internal","login":null,"count":5},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-57.ec2.internal","login":null,"count":5},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-48.ec2.internal","login":null,"count":4},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-90.ec2.internal","login":null,"count":3},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-69.ec2.internal","login":null,"count":3},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-36.ec2.internal","login":null,"count":3},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-218.ec2.internal","login":null,"count":3},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-198.ec2.internal","login":null,"count":3},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-181.ec2.internal","login":null,"count":3},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-149.ec2.internal","login":null,"count":3},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-108.ec2.internal","login":null,"count":3},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-26.ec2.internal","login":null,"count":2},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-221.ec2.internal","login":null,"count":2},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-211.ec2.internal","login":null,"count":2},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-188.ec2.internal","login":null,"count":2},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-176.ec2.internal","login":null,"count":2},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-172.ec2.internal","login":null,"count":2},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-170.ec2.internal","login":null,"count":2},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-166.ec2.internal","login":null,"count":2},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-164.ec2.internal","login":null,"count":2},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-137.ec2.internal","login":null,"count":2},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-105.ec2.internal","login":null,"count":2},{"name":"Thomas Maschler","email":"tmaschler@wri.org","login":null,"count":2},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-110.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-120.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-124.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-130.ec2.internal","login":null,"count":1},{"name":"eriklindquist","email":"eriklindquist","login":"eriklindquist","count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-97.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-93.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-88.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-84.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-75.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-68.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-67.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-61.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-59.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-56.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-51.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-50.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-5.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-44.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-43.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-35.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-34.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-225.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-223.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-216.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-215.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-210.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-199.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-195.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-186.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-178.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-177.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-169.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-136.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-133.ec2.internal","login":null,"count":1},{"name":"Ubuntu","email":"ubuntu@ip-172-30-2-131.ec2.internal","login":null,"count":1}],"past_year_committers":[{"name":"Melissa.Rose","email":"melissa.rose@wri.org","login":"melrose-wri","count":12},{"name":"dagibbs22","email":"dagibbs22@gmail.com","login":"dagibbs22","count":1}],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-09T00:00:23.197Z","repositories_count":6212574,"commits_count":909134600,"contributors_count":35059691,"owners_count":1143417,"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":"wri/carbon-budget","html_url":"https://github.com/wri/carbon-budget","last_synced_at":"2026-04-08T03:03:00.206Z","status":"error","issues_count":2,"pull_requests_count":72,"avg_time_to_close_issue":1494812.0,"avg_time_to_close_pull_request":1067229.7878787878,"issues_closed_count":2,"pull_requests_closed_count":66,"pull_request_authors_count":6,"issue_authors_count":2,"avg_comments_per_issue":8.5,"avg_comments_per_pull_request":0.05555555555555555,"merged_pull_requests_count":60,"bot_issues_count":0,"bot_pull_requests_count":1,"past_year_issues_count":0,"past_year_pull_requests_count":11,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":404671.375,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":8,"past_year_pull_request_authors_count":3,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":0.0,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":8,"created_at":"2023-05-09T10:40:33.697Z","updated_at":"2026-04-08T03:03:00.206Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/wri%2Fcarbon-budget/issues","issue_labels_count":{"bug":1},"pull_request_labels_count":{"enhancement":2,"dependencies":1},"issue_author_associations_count":{"NONE":2},"pull_request_author_associations_count":{"MEMBER":64,"COLLABORATOR":5,"CONTRIBUTOR":2,"NONE":1},"issue_authors":{"znicholls":1,"applecarble":1},"pull_request_authors":{"dagibbs22":39,"melrose-wri":24,"gtempus":5,"eriklindquist":2,"loganbyers":1,"dependabot[bot]":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-09T00:00:10.509Z","repositories_count":14176794,"issues_count":34581712,"pull_requests_count":113108460,"authors_count":11231496,"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":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{"MEMBER":5},"past_year_issue_authors":{},"past_year_pull_request_authors":{"melrose-wri":4,"loganbyers":1},"maintainers":[{"login":"dagibbs22","count":39,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/dagibbs22"},{"login":"melrose-wri","count":24,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/melrose-wri"},{"login":"gtempus","count":5,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/gtempus"},{"login":"loganbyers","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/loganbyers"}],"active_maintainers":[{"login":"melrose-wri","count":4,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/melrose-wri"},{"login":"loganbyers","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/loganbyers"}]},"events":{"total":{"CreateEvent":17,"CommitCommentEvent":20,"ReleaseEvent":2,"DeleteEvent":10,"MemberEvent":1,"PullRequestEvent":14,"ForkEvent":3,"WatchEvent":11,"IssueCommentEvent":1,"PushEvent":69,"PullRequestReviewEvent":10,"PullRequestReviewCommentEvent":9},"last_year":{"DeleteEvent":1,"PullRequestEvent":5,"ForkEvent":3,"WatchEvent":6,"PushEvent":22,"PullRequestReviewCommentEvent":6,"PullRequestReviewEvent":5,"CreateEvent":1}},"keywords":[],"dependencies":[{"ecosystem":"pypi","filepath":"requirements.txt","sha":null,"kind":"manifest","created_at":"2022-08-01T08:09:25.526Z","updated_at":"2022-08-01T08:09:25.526Z","repository_link":"https://github.com/wri/carbon-budget/blob/master/requirements.txt","dependencies":[{"id":536176660,"package_name":"cftime","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":536176661,"package_name":"awscli","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":536176662,"package_name":"boto3","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":536176663,"package_name":"botocore","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":536176664,"package_name":"netCDF4","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":536176665,"package_name":"numpy","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":536176666,"package_name":"pandas","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":536176667,"package_name":"psycopg2","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":536176668,"package_name":"rasterio","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":536176669,"package_name":"scipy","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":536176670,"package_name":"simpledbf","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":536176671,"package_name":"virtualenv","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":536176672,"package_name":"xlrd","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":536176673,"package_name":"psutil","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false}]},{"ecosystem":"docker","filepath":"Dockerfile","sha":null,"kind":"manifest","created_at":"2023-01-14T03:24:26.488Z","updated_at":"2023-01-14T03:24:26.488Z","repository_link":"https://github.com/wri/carbon-budget/blob/master/Dockerfile","dependencies":[{"id":6892329615,"package_name":"osgeo/gdal","ecosystem":"docker","requirements":"ubuntu-small-3.0.4","direct":true,"kind":"build","optional":false}]}],"score":null,"created_at":"2023-09-11T14:52:11.338Z","updated_at":"2026-04-17T07:30:51.213Z","avatar_url":"https://github.com/wri.png","language":"Python","category":"Biosphere","sub_category":"Biomass","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"## Global forest carbon flux framework\n\n### Purpose and scope\nThis framework maps gross greenhouse gas emissions from forests, \ngross carbon removals (sequestration) by forests, and the difference between them (net flux), all between 2001 and 2024. \nGross emissions includes CO2, CH4, and N2O and all carbon pools (aboveground biomass, belowground biomass, \ndead wood, litter, and soil), and gross removals includes removals into aboveground and belowground biomass carbon. \nAlthough the framework is run for all tree canopy densities in 2000 (per Hansen et al. 2013), it is most relevant to\npixels with canopy density \u003e30% in 2000 or pixels which subsequently had tree cover gain (per Potapov et al. 2022).\nIn addition to natural terrestrial forests, it also covers planted forests in most of the world, mangroves, and non-mangrove natural forests.\nThe framework essentially spatially applies IPCC national greenhouse gas inventory rules (2016 guidelines) for forests.\nIt covers only forests converted to non-forests, non-forests converted to forests and forests remaining forests (no other land \nuse transitions). The framework is described and published in [Harris et al. (2021) Nature Climate Change\n\"Global maps of twenty-first century forest carbon fluxes\"](https://www.nature.com/articles/s41558-020-00976-6) and was updated in \n[Gibbs et al. (2025) Earth System Science Data \"Revised and updated geospatial monitoring of 21st century forest carbon fluxes\"](https://essd.copernicus.org/articles/17/1217/2025/)\nUpdates have been made to the framework since the original publication, which covered 2001-2019. The most up-to-date description of model \nchanges is available [here](https://www.globalforestwatch.org/blog/data-and-tools/whats-new-carbon-flux-monitoring/).\n\n### Inputs\nWell over twenty inputs are needed for this framework. Most are spatial, but some are tabular.\nAll spatial data are converted to 10x10 degree raster tiles at 0.00025x0.00025 degree resolution \n(approximately 30x30 m at the equator) before ingestion. \nSpatial data include annual tree cover loss, biomass densities in 2000, drivers of tree cover loss, \necozones, tree cover extent in 2000, elevation, etc. \nMany inputs can be processed the same way (e.g., many rasters can be processed using the same `gdal` function) but some need special treatment.\nThe input processing scripts are in the `data_prep` folder and are mostly run in `mp_prep_other_inputs_annual.py` or\n`mp_prep_other_inputs_one_off.py`. \nThe tabular data are generally annual biomass removal (i.e. \nsequestration) factors (e.g., mangroves, planted forests, natural forests), which are then applied to spatial data. \nDifferent inputs are needed for different steps in the framework. \n\nInputs can either be downloaded from AWS s3 storage or used if found locally in the folder `/usr/local/tiles/` in the Docker container\nin which the framework runs (see below for more on the Docker container).\nThe framework looks for files locally before downloading them in order to reduce run time. \nThe framework can still be run without AWS credentials; inputs will be downloaded from s3 but outputs will not be uploaded to s3.\nIn that case, outputs will only be stored locally.\n\n### Outputs\nThere are three key outputs produced: gross GHG emissions, gross removals, and net flux, all summed per pixel for 2001-2024. \nThese are produced at two resolutions: 0.00025x0.00025 degrees \n(approximately 30x30 m at the equator) in 10x10 degree rasters (to make outputs a \nmanageable size), and 0.04x0.04 degrees (approximately 4x4km at the equator) as global rasters for static maps.\n\nFramework runs also automatically generate a .txt log. This log includes nearly everything that is output in the console.\nThis log is useful for documenting framework runs and checking for mistakes/errors in retrospect, \nalthough it does not capture errors that terminate runs.\nFor example, users can examine it to see if the correct input tiles were downloaded or if the intended tiles were used when running the framework.  \n\nOutput rasters and logs are uploaded to s3 unless the `--no-upload` flag (`-nu`) is activated as a command line argument\nor no AWS s3 credentials are supplied to the Docker container.\nThis is good for local test runs or versions of the framework that are independent of s3 \n(that is, inputs are stored locally and not on s3, and the user does not have a connection to s3 storage or s3 credentials).\n\n#### 30-m output rasters\n\nThe 30-m outputs are used for zonal statistics (i.e. emissions, removals, or net flux in polygons of interest)\nand mapping on the Global Forest Watch web platform or at small scales (where 30-m pixels can be distinguished). \nIndividual emissions pixels can be assigned specific years based on Hansen loss during further analyses \nbut removals and net flux are cumulative over the entire framework run and cannot be assigned specific years. \nThis 30-m output is in megagrams (Mg) CO2e/ha 2001-2024 (i.e. densities) and includes all tree cover densities (\"full extent\"):\n`((TCD2000\u003e0 AND WHRC AGB2000\u003e0) OR Hansen gain=1 OR mangrove AGB2000\u003e0)`.\nHowever, the framework is designed to be used specifically for forests, so the framework creates three derivative 30-m\noutputs for each key output (gross emissions, gross removals, net flux) as well (only for the standard version, not for sensitivity analyses).\nTo that end, the \"forest extent\" rasters also have pre-2000 oil palm plantations in Indonesia and Malaysia removed\nfrom them because carbon emissions and removals in those pixels would represent agricultural/tree crop emissions,\nnot forest/forest loss. \n\n1) Mg CO2e per pixel values for the full extent (all tree cover densities): \n   `((TCD2000\u003e0 AND WHRC AGB2000\u003e0) OR Hansen gain=1 OR mangrove AGB2000\u003e0)`\n2) Mg CO2e per hectare values for forest pixels only (colloquially, TCD\u003e30 or Hansen gain pixels): \n   `(((TCD2000\u003e30 AND WHRC AGB2000\u003e0) OR Hansen gain=1 OR mangrove AGB2000\u003e0) NOT IN pre-2000 plantations)`\n3) Mg CO2e per pixel values for forest pixels only (colloquially, TCD\u003e30 or Hansen gain pixels):  \n   `(((TCD2000\u003e30 AND WHRC AGB2000\u003e0) OR Hansen gain=1 OR mangrove AGB2000\u003e0) NOT IN pre-2000 plantations)`\n\nThe per hectare outputs are used for making pixel-level maps (essentially showing emission and removal factors), \nwhile the per pixel outputs are used for getting total values within areas because the values\nof those pixels can be summed within areas of interest. The per pixel maps are calculated by `per hectare * pixel area/10000`.\n(The pixels of the per hectare outputs should not be summed but they can be averaged in areas of interest.)\nStatistics from this framework should always be based on the \"forest extent\" rasters, not the \"full extent\" rasters.\nThe full extent outputs should generally not be used but are created by the framework in case they are needed.\n\nIn addition to these three key outputs, there are many intermediate output rasters from the framework,\nsome of which may be useful for QC, analyses by area of interest, or other purposes. \nAll of these are at 0.00025x0.00025 degree resolution and reported as per hectare values (as opposed to per pixel values), if applicable. \nIntermediate outputs include the annual aboveground and belowground biomass removal rates\nfor all kinds of forests, the type of removal factor applied to each pixel, the carbon pool densities in 2000, \ncarbon pool densities in the year of tree cover loss, and the number of years in which removals occurred. \n\nAlmost all framework output have metadata associated with them, \nviewable using the `gdalinfo` command line utility (https://gdal.org/programs/gdalinfo.html). \nMetadata includes units, date created, framework version, geographic extent, and more. Unfortunately, the metadata are not viewable \nwhen looking at file properties in ArcMap\nor in the versions of these files downloadable from the Global Forest Watch Open Data Portal (https://data.globalforestwatch.org/).\n\n#### 4-km output rasters\n\nThe 4-km outputs are used for static large-scale maps, like in publications and presentations. \nThe units are Mt CO2e/pixel/year (in order to show absolute values). They are created using the \"forest extent\" \nper pixel 30-m rasters, not the \"full extent\" 30-m rasters. They should not be used for analysis. \n\n#### A note on signs\n\nAlthough gross emissions are traditionally given positive (+) values and\ngross removals are traditionally given negative (-) values, \nthe 30-m gross removals rasters are positive, while the 4-km gross removals rasters are negative. \nNet flux at both scales can be positive or negative depending on the balance of emissions and removals in the area of interest\n(negative for net sink, positive for net source).\n\n\n### Running the framework\nThe framework runs from the command line inside a Linux Docker container. \nOnce you have Docker configured on your system (download from Docker website), \nhave cloned this repository (on the command line in the folder you want to clone to, `git clone https://github.com/wri/carbon-budget`), \nand have configured access to AWS (if desired), you will be able to run the framework. \nYou can run the framework anywhere that the Docker container can be launched. That includes local computers (good for \nrunning test areas) and AWS ec2 instances (good for larger areas/global runs). \n\nThere are two ways to run the framework: as a series of individual scripts, or from a master script, which runs the individual scripts sequentially.\nWhich one to use depends on what you are trying to do. \nGenerally, the individual scripts (which correspond to specific framework stages) are\nmore appropriate for development and testing, while the master script is better for running\nthe main part of the framework from start to finish in one go. \nRun globally, both options iterate through a list of ~275 10 x 10 degree tiles. (Different framework stages have different numbers of tiles.)\nRun all tiles in the framework extent fully through one framework stage before starting on the next stage. \n(The master script does this automatically.) If a user wants to run the framework on just one or a few tiles, \nthat can be done through a command line argument (`--tile-id-list` or `-l`). \nIf individual tiles are listed, only those will be run. This is a natural system for testing or for\nrunning the framework for smaller areas. You can see the tile boundaries in `pixel_area_tile_footprints.zip` in this repo.\nFor example, to run the framework for Madagascar, only tiles 10S_040E, 10S_050E, and 20S_040E need to be run and the\ncommand line argument would be `-l 10S_040E,10S_050E,20S_040E`. \n\n#### Building the Docker container\n\nYou can do the following on the command line in the same folder as the repository on your system.\nThis will enter the command line in the Docker container\n\nFor runs on a local computer, use `docker-compose` so that the Docker is mapped to your computer's drives.\nIn my setup, `C:/GIS/Carbon_model/test_tiles/docker_output/` on my computer is mapped to `/usr/local/tiles` in\nthe Docker container in `docker-compose.yaml`. If running on another computer, you will need to change the local \nfolder being mapped in `docker-compose.yaml` to match your computer's directory structure. \nI do this for development and testing. \nIf you want the framework to be able to download from and upload to s3, you will also need to provide \nyour own AWS secret key and access key as environment variables (`-e`) in the `docker-compose run` command:\n\n`docker-compose build`\n\n`docker-compose run --rm -e AWS_SECRET_ACCESS_KEY=... -e AWS_ACCESS_KEY_ID=... carbon-budget`\n\nIf you don't have AWS credentials, you can still run the framework in the docker container but uploads will \nnot occur. In this situation, you need all the basic input files for all tiles in the docker folder `/usr/local/tiles/`\non your computer:\n\n`docker-compose build`\n\n`docker-compose run --rm carbon-budget`\n\nFor runs on an AWS r5d ec2 instance (for full framework runs), use `docker build`. \nYou need to supply AWS credentials for the framework to work because otherwise you won't be able to get \noutput tiles off of the spot machine and you will lose your outputs when you terminate the spot machine.\n\n`docker build . -t gfw/carbon-budget`\n\n`docker run --rm -it -e AWS_SECRET_ACCESS_KEY=... -e AWS_ACCESS_KEY_ID=... gfw/carbon-budget`\n\nBefore doing a framework run, confirm that the dates of the relevant input and output s3 folders are correct in `constants_and_names.py`. \nDepending on what exactly the user is running, the user may have to change lots of dates in the s3 folders or change none.\nUnfortunately, I can't really give better guidance than that; it really depends on what part of the framework is being run and how.\n(I want to make the situations under which users change folder dates more consistent eventually.)\n\nThe framework can be run either using multiple processors or one processor. The former is for large scale framework runs,\nwhile the latter is for framework development or running on small-ish countries that use only a few tiles. \nThe user can limit use to just one processor with the `-sp` command line flag. \nOne important thing to note is that if a user tries to use too many processors, the system will run out of memory and\ncan crash (particularly on AWS ec2 instances). Thus, it is important not to use too many processors at once.\nGenerally, the limitation in running the framework is the amount of memory available on the system rather than the number of processors.\nEach script has been somewhat calibrated to use a safe number of processors for an r5d.24xlarge EC2 instance,\nand often the number of processors being used is 1/2 or 1/3 of the actual number available.\nIf the tiles were smaller (e.g., 1x1 degree), more processors could be used but then there'd also be more tiles to process, so I'm not sure that would be any faster.\nUsers can track memory usage in real time using the `htop` command line utility in the Docker container. \n\n\n#### Individual scripts\nThe flux framework is comprised of many separate scripts (or stages), each of which can be run separately and\nhas its own inputs and output(s). There are several data preparation\nscripts, several for the removals (sequestration/gain) framework, a few to generate carbon pools, one for calculating\ngross emissions, one for calculating net flux, one for creating derivative outputs \n(aggregating key results into coarser resolution rasters for mapping and creating per-pixel and forest-extent outputs). \nEach script really has two parts: its `mp_` (multiprocessing) part and the part that actually does the calculations\non each 10x10 degree tile.\nThe `mp_` scripts (e.g., `mp_create_model_extent.py`) are the ones that are run. They download input files,\ndo any needed preprocessing, change output folder names as needed, list the tiles that are going to be run, etc.,\nthen initiate the actual work done on each tile in the script without the `mp_` prefix.\nThe order in which the individual stages must be run is very specific; many scripts depend on\nthe outputs of other scripts. Looking at the files that must be downloaded for the \nscript to run will show what files must already be created and therefore what scripts must have already been\nrun. Alternatively, you can look at the top of `run_full_model.py` to see the order in which framework stages are run. \nThe date component of the output directory on s3 generally must be changed in `constants_and_names.py`\nfor each output file. \n\nStages are run from the project folder as Python modules: `/usr/local/app# python -m [folder.script] [arguments]`\n\nFor example: \n\nExtent stage: `/usr/local/app# python -m data_prep.mp_model_extent -l 00N_000E -t std -nu`\n\nCarbon pool creation stage: `/usr/local/app# python -m carbon_pools.mp_create_carbon_pools -l 00N_000E,10S_050W -t std -ce loss -d 20259999`\n\n##### Running the emissions stage\nThe gross emissions script is the only part of the framework that uses C++. Thus, the appropriate version of the C++ \nemissions file must be compiled for emissions to run. \nThere are a few different versions of the emissions C++ script: one for the standard version and a few other for\nsensitivity analyses. \n`mp_calculate_gross_emissions.py` will compile the correct C++ files (for all carbon pools and for soil only) \neach time it is run, so the C++ files do not need to be compiled manually. \nHowever, for completeness, the command for compiling the C++ script is (subbing in the actual file name): \n\n`c++ /usr/local/app/emissions/cpp_util/calc_gross_emissions_[VERSION].cpp -o /usr/local/app/emissions/cpp_util/calc_gross_emissions_[VERSION].exe -lgdal`\n\nFor the standard framework and the sensitivity analyses that don't specifically affect emissions, it is:\n\n`c++ /usr/local/app/emissions/cpp_util/calc_gross_emissions_generic.cpp -o /usr/local/app/emissions/cpp_util/calc_gross_emissions_generic.exe -lgdal`\n\n`mp_calculate_gross_emissions.py` can also be used to calculate emissions from soil only. \nThis is set by the `-p` argument: `biomass_soil` or `soil_only`.  \n\nEmissions stage: `/usr/local/app# python -m emissions.mp_calculate_gross_emissions -l 30N_090W,10S_010E -t std -p biomass_soil -d 20259999`\n\n#### Master script \nThe master script runs through all of the non-preparatory scripts in the framework: some removal factor creation, gross removals, carbon\npool generation, gross emissions for biomass+soil, gross emissions for soil only, \nnet flux, aggregation, and derivative output creation. \nIt includes all the arguments needed to run every script. \nThus, the table below also explains the potential arguments for the individual framework stages. \nThe user can control what framework components are run to some extent and set the date part of \nthe output directories. The order in which the arguments are used does not matter (does not need to match the table below).\nPreparatory scripts like creating soil carbon tiles or mangrove tiles are not included in the master script because\nthey are run very infrequently. \n\n| Argument | Short argument | Required/Optional | Relevant stage | Description | \n| -------- | ----- | ----------- | ------- | ------ |\n| `model-type` | `-t` | Required | All | Standard version (`std`) or a sensitivity analysis. Refer to `constants_and_names.py` for valid list of sensitivity analyses. |\n| `stages` | `-s` | Required | All | The framework stage at which the run should start. `all` will run the following stages in this order: model_extent, forest_age_category_IPCC, annual_removals_IPCC, annual_removals_all_forest_types, gain_year_count, gross_removals_all_forest_types, carbon_pools, gross_emissions_biomass_soil, gross_emissions_soil_only, net_flux, create_derivative_outputs |\n| `tile-id-list` | `-l` | Required | All | List of tile ids to use in the framework. Should be of form `00N_110E` or `00N_110E,00N_120E` or `all` |\n| `run-through` | `-r` | Optional | All | If activated, run stage provided in `stages` argument and all following stages. Otherwise, run only stage in `stages` argument. Activated with flag. |\n| `run-date` | `-d` | Optional | All | Date of run. Must be format YYYYMMDD. This sets the output folder in s3. |\n| `no-upload` | `-nu` | Optional | All | No files are uploaded to s3 during or after framework run (including logs and framework outputs). Use for testing to save time. When AWS credentials are not available, upload is automatically disabled and this flag does not have to be manually activated. |\n| `single-processor` | `-sp` | Optional | All | Tile processing will be done without `multiprocessing` module whenever possible, i.e. no parallel processing. Use for testing. |\n| `log-note` | `-ln`| Optional | All | Adds text to the beginning of the log |\n| `carbon-pool-extent` | `-ce` | Optional | Carbon pool creation | Extent over which carbon pools should be calculated: loss or 2000 or loss,2000 or 2000,loss |\n| `std-net-flux-aggreg` | `-std` | Optional | Aggregation | The s3 standard framework net flux aggregated tif, for comparison with the sensitivity analysis map. |\n| `save-intermdiates` | `-si`| Optional | `run_full_model.py` | Intermediate outputs are not deleted within `run_full_model.py`. Use for local framework runs. If uploading to s3 is not enabled, intermediate files are automatically saved. |\n| `mangroves` | `-ma` | Optional | `run_full_model.py` | Create mangrove removal factor tiles as the first stage. Activate with flag. |\n| `us-rates` | `-us` | Optional | `run_full_model.py` | Create US-specific removal factor tiles as the first stage (or second stage, if mangroves are enabled). Activate with flag. |\n\nThese are some sample commands for running the flux framework in various configurations. You wouldn't necessarily want to use all of these;\nthey simply illustrate different configurations for the command line arguments. \nLike the individual framework stages, the full framework run script is also run from the project folder with the `-m` flag.\n\nRun: standard version; save intermediate outputs; run framework from annual_removals_IPCC;\nupload to folder with date 20259999; run 00N_000E; get carbon pools at time of loss; add a log note;\nuse multiprocessing (implicit because no `-sp` flag); only run listed stage (implicit because no -r flag)\n\n`python -m run_full_model -t std -si -s annual_removals_IPCC -d 20259999 -l 00N_000E -ce loss -ln \"00N_000E test\"`\n\nRun: standard version; save intermediate outputs; run framework from annual_removals_IPCC; run all subsequent framework stages;\ndo not upload outputs to s3; run 00N_000E; get carbon pools at time of loss; add a log note; \nuse multiprocessing (implicit because no -sp flag)\n\n`python -m run_full_model -t std -si -s annual_removals_IPCC -r -nu -l 00N_000E -ce loss -ln \"00N_000E test\"`\n\nRun: standard version; save intermediate outputs; run framework from the beginning; run all framework stages;\nupload to folder with date 20259999; run 00N_000E; get carbon pools at time of loss; add a log note;\nuse multiprocessing (implicit because no -sp flag)\n\n`python -m run_full_model -t std -si -s all -r -d 20259999 -l 00N_000E -ce loss -ln \"00N_000E test\"`\n\nRun: standard version; save intermediate outputs; run framework from the beginning; run all framework stages;\nupload to folder with date 20259999; run 00N_000E, 10N_110E, and 50N_080W; get carbon pools at time of loss; \nadd a log note; use multiprocessing (implicit because no -sp flag)\n\n`python -m run_full_model -t std -si -s all -r -d 20259999 -l 00N_000E,10N_110E,50N_080W -ce loss -ln \"00N_000E test\"`\n\nRun: standard version; run framework from the beginning; run all framework stages;\nupload to folder with date 20259999; run 00N_000E and 00N_010E; get carbon pools at time of loss; \nuse singleprocessing; add a log note; do not save intermediate outputs (implicit because no -si flag)\n\n`python -m run_full_model -t std -s all -r -nu -d 20259999 -l 00N_000E,00N_010E -ce loss -sp -ln \"Two tile test\"`\n\nFULL STANDARD FRAMEWORK RUN: standard framework; save intermediate outputs; run framework from the beginning; run all framework stages;\nrun all tiles; get carbon pools at time of loss; add a log note;\nupload outputs to s3 with dates specified in `constants_and_names.py` (implicit because no -nu flag); \nuse multiprocessing (implicit because no -sp flag)\n\n`python -m run_full_model -t std -si -s all -r -l all -ce loss -ln \"Running all tiles\"`\n\n### Sensitivity analysis\nNOT SUPPORTED AT THIS TIME.\n\nSeveral variations of the framework are included; these are the sensitivity variants, as they use different inputs or parameters. \nThey can be run by changing the `--model-type` (`-t`) argument from `std` to an option found in `constants_and_names.py`. \nEach sensitivity analysis variant starts at a different stage in the framework and runs to the final stage,\nexcept that sensitivity analyses do not include the creation of the supplementary outputs (per pixel tiles, forest extent tiles).\nSome use all tiles and some use a smaller extent.\n\n| Sensitivity analysis | Description                                                                                                                           | Extent | Starting stage | \n| -------- |---------------------------------------------------------------------------------------------------------------------------------------| ------ | ------ |\n| `std` | Standard framework                                                                                                                    | Global | `mp_model_extent.py` |\n| `maxgain` | Maximum number of years of gain (removals) for gain-only and loss-and-gain pixels                                                     | Global | `gain_year_count_all_forest_types.py` |\n| `no_shifting_ag` | Shifting agriculture driver is replaced with commodity-driven deforestation driver. NOTE: this is not currently supported.            | Global | `mp_calculate_gross_emissions.py` |\n| `convert_to_grassland` | Forest is assumed to be converted to grassland instead of cropland in the emissions framework. NOTE: this is not currently supported. | Global | `mp_calculate_gross_emissions.py` |\n| `biomass_swap` | Uses Saatchi 1-km AGB map instead of Baccini 30-m map for starting carbon densities                                                   | Extent of Saatchi map, which is generally the tropics| `mp_model_extent.py` |\n| `US_removals` | Uses IPCC default removal factors for the US instead of US-specific removal factors from USFS FIA                                     | Continental US | `mp_annual_gain_rate_AGC_BGC_all_forest_types.py` |\n| `no_primary_gain` | Primary forests and IFLs are assumed to not have any removals                                                                         | Global | `mp_forest_age_category_IPCC.py` |\n| `legal_Amazon_loss` | Uses Brazil's PRODES annual deforestation system instead of Hansen loss                                                               | Legal Amazon| `mp_model_extent.py` |\n| `Mekong_loss` | Uses Hansen loss v2.0 (multiple loss in same pixel). NOTE: Not used for flux framework v1.2.0, so this is not currently supported.    | Mekong region | N/A |\n\n\n### Updating the framework with new tree cover loss\nFor the current general configuration of the framework, these are the changes that need to be made to update the\nframework with a new year of tree cover loss data. In the order in which the changes would be needed for rerunning the framework:\n\n1) Update the framework version variable `version` in `constants_and_names.py`.\n\n2) Change the tree cover loss tile source to the new tree cover loss tiles in `constants_and_names.py`.\nChange the tree cover loss tile pattern in `constants_and_names.py`.\n\n3) Change the number of loss years variable `loss_years` in `constants_and_names.py`.\n\n4) In `constants.h` (emissions/cpp_util/), change the number of framework years (`int model_years`) \n   and the loss tile pattern (`char lossyear[]`).\n\n5) In `equations.cpp` (emissions/cpp_util/), change the number of framework years (`int model_years`). \n\n6) Obtain and pre-process the updated drivers of tree cover loss framework and tree cover loss from fires \n   using `mp_prep_other_inputs_annual.py`. Note that the drivers map probably needs to be reprojected to WGS84 \n   and resampled (0.005x0.005 deg) in ArcMap or similar before processing into 0.00025x0.00025 deg 10x10 tiles using this script. \n   `mp_prep_other_inputs_annual.py` has some additional notes about that. You can choose which set of tiles to pre-process \n   by providing the following options for the process argument (-p):\n   - tcld: Pre-processes drivers of tree cover loss tiles \n   - tclf: Pre-processes tree cover loss due to fires tiles \n   - all: Pre-processes both drivers of tree cover loss and tree cover loss due to fires tiles\n\n7) Make sure that changes in forest age category produced by `mp_forest_age_category_IPCC.py` \n   and the number of gain years produced by `mp_gain_year_count_all_forest_types.py` still make sense.\n\nStrictly speaking, if only the drivers, tree cover loss from fires, and tree cover loss are being updated, \nthe framework only needs to be run from forest_age_category_IPCC onwards (loss affects IPCC age category).\nHowever, for completeness, I suggest running all stages of the framework from model_extent onwards for an update so that\nframework outputs from all stages have the same version in their metadata and the same dates of output as the framework stages\nthat are actually being changed. A full framework run (all tiles, all stages) takes about 18 hours on an r5d.24xlarge \nEC2 instance with 3.7 TB of storage and 96 processors.\n\n\n### Other modifications to the framework\nIt is recommended that any changes to the framework be tested in a local Docker instance before running on an ec2 instance.\nI like to output files to test folders on s3 with dates 20259999 because that is clearly not a real run date. \nA standard development route is: \n\n1) Make changes to a single framework script and run using the single processor option on a single tile (easiest for debugging) in local Docker.\n\n2) Run single script on a few representative tiles using a single processor in local Docker.\n\n3) Run single script on a few representative tiles using multiple processor option in local Docker.\n\n4) Run the master script on a few representative tiles using multiple processor option in local Docker to \n   confirm that changes work when using master script.\n\n5) Run single script on a few representative tiles using multiple processors on ec2 instance (need to commit and push changes to GitHub first).\n\n6) Run master script on all tiles using multiple processors on EC2 instance. \n   If the changes likely affected memory usage, make sure to watch memory with `htop` to make sure that too much memory isn't required. \n   If too much memory is needed, reduce the number of processors being called in the script. \n\nDepending on the complexity of the changes being made, some of these steps can be ommitted. Or if only a few tiles are \nbeing modeled (for a small country), only steps 1-4 need to be done.  \n\n### Running framework tests\nThere is an incipient testing component using `pytest`. It is currently only available for the deadwood and litter\ncarbon pool creation step of the framework but can be expanded to other aspects of the framework. \nTests can be run from the project folder with the command `pytest`. \nYou can get more verbose output with `pytest -s`.\nTo run tests that just have a certain flag (e.g., `rasterio`), you can do `pytest -m rasterio -s`.\n\n\n### Dependencies\nTheoretically, this framework should run anywhere that the correct Docker container can be started \nand there is access to the AWS s3 bucket or all inputs are in the correct folder in the Docker container. \nThe Docker container should be self-sufficient in that it is configured to include the right Python packages, C++ compiler, GDAL, etc.\nIt is described in `Dockerfile`, with Python requirements (installed during Docker creation) in `requirements.txt`.\nOn an AWS ec2 instance, I have only run it on r5d instance types but it might be able to run on others.\nAt the least, it needs a certain type of memory configuration on the ec2 instance (at least one large SSD volume, I believe). \nOtherwise, I do not know the limitations and constraints on running this framework in an ec2 instance. \n\n### Contact information\nDavid Gibbs: david.gibbs@wri.org\n\nMelissa Rose: melissa.rose@wri.org\n\nNancy Harris: nancy.harris@wri.org\n\nGlobal Forest Watch, World Resources Institute, Washington, D.C.\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/20276","html_url":"https://ost.ecosyste.ms/projects/20276"}