Introduce use_cornerstone_ghg_model bucket flag (GHG model allocation) - #553
Open
briantobin-99 wants to merge 1 commit into
Open
Conversation
briantobin-99
force-pushed
the
btobin__introduce-ghg-model-bucket
branch
from
July 30, 2026 18:52
07ea65e to
399da38
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
briantobin-99
force-pushed
the
btobin__introduce-ghg-model-bucket
branch
from
July 30, 2026 23:56
399da38 to
9fa0b3f
Compare
briantobin-99
marked this pull request as ready for review
July 31, 2026 00:09
bl-young
reviewed
Jul 31, 2026
| v0_3_umd_2024_ghgia: bool = False # DRI: catherine.birney | ||
| # "GHG model allocation" bucket: Cornerstone GHG FBS (pre-built parquet at | ||
| # usa_ghg_data_year) vs the legacy CEDA-methodology FBS (2023 only). | ||
| use_cornerstone_ghg_model: bool = False |
Member
There was a problem hiding this comment.
Should this be true by default?
| use_ghg_national_2023_m2: true | ||
|
|
||
| # Must remain false whenever use_ghg_national_2023_m2 is true. | ||
| new_ghg_method: false |
Member
There was a problem hiding this comment.
if we do set the default to be True this will need to be revised
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.
cc:
Closes:
What changed? Why?
Introduces the "GHG model allocation" bucket flag and dissolves the year-locked inventory flags into the data-year knob:
use_cornerstone_ghg_model: ON = load the pre-builtGHG_national_Cornerstone_{usa_ghg_data_year}FBS parquet from GCS (with the eGRID variant whenimplement_electricity_disaggregationis on); OFF = theGHG_national_CEDA_{year}flowsa FBS (legacy CEDA allocation methodology; raises a clear error for years ≠ 2023, where no CEDA method file exists).new_ghg_method(identical mechanism) andv0_3_umd_2024_ghgia(the same mechanism year-locked to 2024). Which inventory and attribution vintages a year carries (EPA GHGI vs UMD GHGIA, MECS survey year) is defined by the per-year method files intransform/ghg/, not by config flags.update_mecs_methodandv0_3_umd_2023_ghgia— intermediate 2023 inventory states that never shipped — along with their now-unselectable variant method files (GHG_national_Cornerstone_2023_{ghgi_mecs,umd_ghgia}.yaml) and the duplicated year-guard blocks (_select_flowsa_ghg_methodis gone; selection lives in one place inload_E_from_flowsa).use_ghg_national_2023_m2carries over to the new flag.Config migration:
2025_usa_cornerstone_v0_3.yaml, thev03_waterfall_*configs, and the electricity configs swap theirnew_ghg_method/v0_3_umd_2024_ghgiakeys foruse_cornerstone_ghg_model. Under the new scheme, the waterfall G2→G3 diff ("US data update") is purelyusa_ghg_data_year: 2023 → 2024.Testing
Unit suite, black, ruff, and mypy green.
derive_E_usa()under2025_usa_cornerstone_v0_3matches the pinnedE_USA_ESsnapshot exactly (max abs diff 0.0). Snapshot integration suite (test_integration run) passes on the stack including this change.