Repository navigation
A site can be given a gas capture value for the years it did not report - #135
Merged
Merged
Conversation
On rows that carry their own year, SWEET carried a site's first reported gas collection efficiency back to 1970 and its latest forward to 2050. A site whose rows carry `gas_collection_efficiency_fill` now keeps each reported year's value and takes that one value in every other year. Blank or absent, nothing changes, so no output moves until a caller sets it. Oxidation is not affected. Climate TRACE will set it to the average capture a GHGRP site's own emissions and metered gas imply, so the years after its last report run at that average rather than at the last year alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain, and the change includes regression coverage for fill behavior, compatibility fallbacks, and unchanged oxidation handling.
No open issues 🎉
What changed in this PR
Adds optional gas_collection_efficiency_fill support for dated site rows, using the supplied value for unreported years while preserving reported values and legacy behavior when absent or blank.
Changes:
- Added fill-aware capture resolution and regression tests.
- Confirmed oxidation handling remains unchanged.
- Updated model decisions and changelog documentation.
| File | Description |
|---|---|
| tests/test_carried_series.py | Adds regression tests for fill behavior, fallback compatibility, and unchanged oxidation handling. |
| SWEET_python/MODEL_DECISIONS.md | Documents the Climate TRACE gas-capture fill input path. |
| SWEET_python/city_params.py | Implements the optional capture fill column and fallback resolution logic. |
| changelog/README.md | Adds the December 2026 changelog index entry. |
| changelog/2026-12.md | Records the new gas-capture fill feature. |
Review effort: Lite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
A site's rows can now say what gas capture to use in the years the site did not report one.
Today, on rows that carry their own year (Climate TRACE's consolidated input), SWEET fills a site's unreported years by carrying the nearest report: the first report back to 1970, each report forward to the next, and the latest forward to 2050. A site whose rows carry the new column
gas_collection_efficiency_fill(CAPTURE_FILL_COLUMNincity_params.py) now keeps each reported year's own value and takes that one value in every other year: before the first report, in gaps, and after the last.If the column is missing or blank, nothing changes. No output moves until a caller sets it. Oxidation is not affected.
Why
Climate TRACE is about to work out each GHGRP landfill's gas capture, year by year, from two figures GHGRP publishes: the methane the site emits and the methane it collects (which GHGRP meters). Those yearly values swing a lot within one site: the median site's own years span 0.25.
Carrying the last reported year (2023) forward to 2050 would make every projected year depend on that one year. On Climate TRACE's frozen 2026-11-09 input, it would move PM after the last report by more than 25% at about 390 of the 1,036 sites, compared with using the site's average. Climate TRACE will set the new column to that average.
Changes
city_params.py:CAPTURE_FILL_COLUMN;_carried_series(..., fill=None)usesfillfor every year without a report;_resolve_gas_capturereads the column from a site's dated rows (one value per site; several are averaged).tests/test_carried_series.py: 6 new tests. A fill takes the place of carrying, in gaps and at both ends; a blank fill keeps carrying; a fill with nothing reported is used in every year;_resolve_gas_captureuses the column; oxidation ignores it.MODEL_DECISIONS.md: thegas-capture-efficiencyentry's Climate TRACE path says the caller may give the value for unreported years.changelog/2026-12.mdand the changelog index.Paired pull request
Climate TRACE: RMI/RMI_Climate_TRACE_Waste_Methane#292. It sets the column and can merge only after a SWEET release that carries this.
Acceptance criteria
gas_collection_efficiency_fillset on a site's dated rows, each reported year keeps its value and every other year takes the fill.main.Definition of done
🤖 Generated with Claude Code