Repository navigation
feat(analysis): map GHG FBS lines to CEDA emissions sources - #1135
Conversation
| # Everything else (target schema, caches, attribution sources) is inherited. | ||
|
|
||
| !include:GHG_national_Cornerstone_nowcast_facilities_transportation_2024.yaml | ||
| # The GHGRP floor moves combustion CO2 between sectors and needs the |
There was a problem hiding this comment.
@catherinebirney I'm trying to interpret this - if we will want to update our base methods (after #1133) to include this more granular detail or not
There was a problem hiding this comment.
couldn't hurt to make this more clear in the fbs method - makes sense to be as clear about the metadata as we can
There was a problem hiding this comment.
@MoLi7 can you rebase on main and update this include to use just GHG_national_Cornerstone_2024
…sources Rename gas E to E_USA_GAS and reserve E_USA_ES for ceda EmissionsSource x industries. Stub ES as zeros (123 rows) until the #1135 crosswalk fills it; add empty E_USA_ES_LONG for the GWP long table.
|
@MoLi7 overall the mapping looks good - it does look like it is missing a few activities
|
@catherinebirney good callout, I tried to fix them in 0f4eba9, lmk if it doesn't make sense to you. |
Adds bedrock/analysis/emissions_source_crosswalk: a hand-written crosswalk from GHG FBS lines (source x GHGI activity x gas) to CEDA's 123 EmissionsSource codes, per-sector splits for lines the FBS still lumps together, and a comparison against CEDA's own source-level E. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-gas N2O Adds crosswalk rows for activities in the method YAML that had no emissions in the 2024 run: coal residential and commercial CH4/N2O go to the residential sources (CEDA has no commercial coal source for those gases), the T_4_57 species rows now cover Electronics Industry, PV and MEMS as well as Semiconductors, and N2O on T_3_27 / T_3_30 is marked as having no CEDA source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nerstone_2024 The nowcast and facilities_transportation 2024 methods it included were removed when the GHG methods were consolidated. The helper now inherits from and includes GHG_national_Cornerstone_2024, which carries the same soils and non-energy-use blocks, and is renamed to match. Drops the removed egrid_fbs_method_for_config from the default-method lookup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0f4eba9 to
cdc1d1f
Compare
|
ok if @catherinebirney is good with the mapping then I think we can approve - i'll leave it to you |
catherinebirney
left a comment
There was a problem hiding this comment.
mappings look good to me - I compared them to the mapping files we originally created for the EPA GHGI data to CEDA and looks like everything is covered here for the similar UMD naming
…_Cornerstone_2024 Rebuilt on the consolidated method, non-energy use already follows the EPA table's national fuel mix sector by sector, so the national fit is a no-op safeguard and no sector needs the prefix fallback. Updates the README and docstring to say so, and narrows the helper's sources_to_cache to the USDA cropland source the soils tables read, so it no longer pulls the facility datasets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you both for your inputs @catherinebirney @bl-young ! Merging it now. @bl-young would you drive the FBS refresh process after this? Not this week urgent but we will need to add E_USA_ES to snapshot. |
|
Yes in the next few days we will cut the full time series with the updated FBS names and these extensions as well. So i'll roll this in. |
|
@bl-young that plan sounds good. Claude helped me get a few follow-up items after merge. 1 and 2 are mechanical, 3 and 4 need judgement calls. Happy to discuss them later.
|
|
yes this is started in #1136 |
…hots (#1136) * feat(ghg): retain ActivityProducedBy on Cornerstone GHG FBS builds Enable source-resolved E export by keeping GHGI activity names through generateFlowBySector, and pool waste Use resplits by activity so those labels survive. * feat(snapshots): wire E_USA_GAS / E_USA_ES / E_USA_ES_LONG with stub sources Rename gas E to E_USA_GAS and reserve E_USA_ES for ceda EmissionsSource x industries. Stub ES as zeros (123 rows) until the #1135 crosswalk fills it; add empty E_USA_ES_LONG for the GWP long table. * drop FBA columns from the FBS when we retain activity names --------- Co-authored-by: catherinebirney <60186515+catherinebirney@users.noreply.github.com>
cc:
Closes:
What changed? Why?
Adds
bedrock/analysis/emissions_source_crosswalk, which tags every GHG FBS line (source × GHGI activity × gas) with one of CEDA's 123EmissionsSourcecodes. Lines the FBS still lumps together (soils, non-energy use, general aviation, residential/commercial, unspecified HFCs) are split without moving any sector total, and per-source totals are compared with CEDA's ownE_USA_ES. This is groundwork for exporting E by source on Cornerstone codes (#1134).Impact
No output change: analysis only, no config, pipeline code or snapshot touched.
Review focus
fbs_to_ceda_emissions_source.csv: the mapping choices;check:notes mark the judgment calls.build_nested_split.py: non-energy use is fitted to the EPA table's national fuel mix while keeping sector totals..gitignore: one exception so the crosswalk CSV is tracked.Testing
black, ruff and mypy pass repo-wide; hermetic pytest was not run (collection needs S3, blocked locally) and this folder adds no tests.
Evidence
2024 canonical FBS (
GHG_national_Cornerstone_2024, rebuilt atcdc1d1fwithretain_activity_columns=True; every source × gas total matches a rebuild without the flag and the earliernowcast_facilities_transportation_2024build).Against CEDA
E_USA_ES(AR5 CO2e, industries only):Flagged sources (data or allocation differences, not mapping): electricity N2O 3.9 vs 17.1 (eGRID), motor gasoline 45.6 vs 113.8 (households), HFC-23 from HCFC-22 0.39 vs 2.0, field-burning CH4 0.65 vs 0.29.
🤖 Generated with Claude Code