Skip to content

Introduce apply_io_year_adjustments bucket flag (IO year adjustments) - #554

Open
briantobin-99 wants to merge 1 commit into
btobin__introduce-ghg-model-bucketfrom
btobin__introduce-io-adjustments-bucket
Open

Introduce apply_io_year_adjustments bucket flag (IO year adjustments)#554
briantobin-99 wants to merge 1 commit into
btobin__introduce-ghg-model-bucketfrom
btobin__introduce-io-adjustments-bucket

Conversation

@briantobin-99

@briantobin-99 briantobin-99 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

cc:
Closes:

What changed? Why?

Introduces the "IO year adjustments" bucket flag:

  • New apply_io_year_adjustments: ON = CEDA's A/q scaling to usa_io_data_year with the summary dollar-year rebase always applied, bedrock-derived industry inflation factors, and gross output at usa_ghg_data_year as B's denominator. OFF = the pre-v0.3 footing (legacy A tail, reference-data inflation factors, 2017 x in B).
  • Absorbs and deletes scale_a_matrix_with_ceda_method_as_fallback, adjust_summary_A_and_q_dollar_year, and update_inflation_factors (no surviving config sets them separately).
  • cornerstone_industry_avg_margins is deliberately not absorbed — margins remains a standalone flag.
  • use_E_data_year_for_x_in_B survives as a compatibility flag for configs that use GHG-year x without the A/inflation adjustments (the electricity configs and USEEIO-parity footing). Readers use the composite cfg.use_ghg_year_x_in_B property (apply_io_year_adjustments or use_E_data_year_for_x_in_B), so those configs' behavior is unchanged.

Config migration: 2025_usa_cornerstone_v0_3.yaml and the waterfall g2/g3/final configs collapse the four flags into apply_io_year_adjustments: true; ceda-g1a/g1b carry the explicit false. The canonical v0.3 config is now ~6 effective lines.

Testing

Unit suite, black, ruff, and mypy green. The ON path is flag-for-flag identical to the v0.3 set; Snapshot integration suite (test_integration run) passes on the stack including this change.

@bl-young bl-young added the cleanup Code to be cleaned up label Jul 30, 2026
@briantobin-99
briantobin-99 force-pushed the btobin__introduce-io-adjustments-bucket branch from e7d198e to a45bf8d Compare July 30, 2026 18:52
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@briantobin-99
briantobin-99 force-pushed the btobin__introduce-io-adjustments-bucket branch from a45bf8d to eb6f072 Compare July 30, 2026 23:56
@briantobin-99
briantobin-99 requested a review from bl-young July 31, 2026 00:13
@briantobin-99
briantobin-99 marked this pull request as ready for review July 31, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Code to be cleaned up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants