Repository navigation
feat(ghg): retain ActivityProducedBy and stub source-resolved E snapshots - #1136
Conversation
Enable source-resolved E export by keeping GHGI activity names through generateFlowBySector, and pool waste Use resplits by activity so those labels survive.
…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.
|
@bl-young We have a potential for issues due to the work incorporating the GHGRP floor selecting the top activity set activity when new rows are inserted. Right now, the mapping created in #1135 would work correctly because mappings are based on all activities (*) - but if we ever change that mapping, we could end up with incorrectly mapped activities to ceda. The GHGRP floor moves CO2 from industries that are above their own facility reports to industries that are below them, and the national total for that fuel stays the same. When the floor takes CO2 away, it shrinks the rows that are already there. Those rows keep their real line names. When the floor gives CO2 to another industry, it inserts new rows. Each new row copies the first line name in that group, while the amount is a blend of every line in the group. Groups with one name are labeled correctly: natural gas, motor gasoline, and distillate. Natural gas is the large move. |
|
I ran the 2024 FBS method and the parquet output does look good - but it does have 5 empty columns appended for we should drop |
|
yeah or maybe all 5? is that a function of leaving the activity names in there you think? |
The regular FBS (without activity names) has columns for Produced/Consumed sector type but the other 3 are appended by keeping the activity names - and we do not need those 3 |
catherinebirney
left a comment
There was a problem hiding this comment.
addressed the extra blank columns with f5b8b2a
approved
cc: @MoLi7
Related: #1134, #1135
What changed? Why?
Cornerstone GHG year methods set
retain_activity_columns: trueso regenerated FBS keepsActivityProducedBy(GHGI line names) throughgenerateFlowBySector. Waste Use resplits pool on that column when present so activity labels survive. Gas E mass is unchanged; the pin is not bumped here.Snapshot generation renames the gas matrix to
E_USA_GASand reservesE_USA_ESfor cedaEmissionsSourcex industries (AR6 kg CO2e), plusE_USA_ES_LONGfor the GWP long table. Until the #1135 crosswalk fills real labels,E_USA_ESis a zero stub (123 placeholder rows) and the long table is schema-only empty.Impact
Published E and the pinned GHG FBS are unchanged until a pin bump or
E_USA_*snapshot regeneration.Testing
Waste Use activity pooling unit test; FBS regen compare collapses activity until the pin bumps.
Review focus
ActivityProducedBy).E_USA_ESintentionally does not map to ceda codes yet.Heads-up
Do not regenerate or publish
E_USA_*snapshots from this branch until the ceda reader cutover: a regen would overwrite published gasE_USA_ESwith stub zeros. Follow-ups: FBS pin bump (year stem), #1135 crosswalk fill-in, coordinated snapshot bump with ceda.