Skip to content

Adjust .ssp.transport#485

Merged
khaeru merged 12 commits intomainfrom
project/ssp/transport/2026-03-11
Apr 28, 2026
Merged

Adjust .ssp.transport#485
khaeru merged 12 commits intomainfrom
project/ssp/transport/2026-03-11

Conversation

@khaeru
Copy link
Copy Markdown
Member

@khaeru khaeru commented Mar 11, 2026

This PR implements changes to .ssp.transport.process_df(…, method=METHOD.C) requested today:

  • Reduce Emissions|CO2|Energy|Demand|Transportation by the amount computed for Emissions|CO2|Energy|Demand|Bunkers|International Aviation.
  • Ensure the reduction in Emissions|…|Transportation for region="World" is equal to added values for Emissions|…|Bunkers|International Aviation.
    • This meant disabling the previously-specified method where the share/portion of AIR transport in total transport final energy consumption of fossil fuels was used to reduce the global total.
  • Update variables such as the following, in particular the third which was not previously included:
    Emissions|BC
    Emissions|BC|Energy
    Emissions|BC|Energy and Industrial Processes
    Emissions|BC|Energy|Demand
    
  • In contrast for the first item, hold values for Emissions|{e}|Energy|Demand|Transportation fixed, where e ≠ "CO2".
  • Overwrite, rather than increment, any existing values for Emissions|{e}|Energy|Demand|Bunkers|International Aviation.
    • Adjust ‘higher’ aggregates for the difference between those existing values and the replacements.
  • Also write/adjust final energy [or all] values for year=2020.
  • Update implied emission factors in data/transport/emi-intensity.csv.
  • Compute final energy values (thus derived emissions values) for n=World by sum across other regions, rather than by adjusting existing n=World values.

The commits are also reproduced on ssp-dev.

How to review

  • Read the diff.
  • Note that the CI checks all pass.

PR checklist

  • Continuous integration checks all ✅
  • Add or expand tests; coverage checks both ✅
  • Add, expand, or update documentation.
  • Update doc/whatsnew.

@khaeru khaeru self-assigned this Mar 11, 2026
@khaeru khaeru added enh New features or functionality report genno-based reporting and post-solve processing transport MESSAGEix-Transport variant or transport in the base model p:SSP-2024 2024 SSP updates and ScenarioMIP labels Mar 11, 2026
@khaeru khaeru force-pushed the project/ssp/transport/2026-03-11 branch from e429704 to 686cb38 Compare March 11, 2026 15:32
@khaeru khaeru force-pushed the project/ssp/transport/2026-03-11 branch from 686cb38 to 7eb86ce Compare March 11, 2026 15:41
@khaeru khaeru force-pushed the project/ssp/transport/2026-03-11 branch from 7eb86ce to 3968c1b Compare March 12, 2026 14:23
@khaeru khaeru force-pushed the project/ssp/transport/2026-03-11 branch from 3968c1b to c2004dc Compare March 12, 2026 15:11
@khaeru khaeru force-pushed the project/ssp/transport/2026-03-11 branch from 30349ce to 05390bd Compare March 13, 2026 14:38
@khaeru khaeru force-pushed the project/ssp/transport/2026-03-11 branch from 05390bd to c95efe2 Compare April 2, 2026 10:47
@khaeru khaeru force-pushed the project/ssp/transport/2026-03-11 branch from c95efe2 to 4cfc5ae Compare April 27, 2026 08:29
khaeru added 9 commits April 28, 2026 10:09
- check(): compute diff data frame and debug dump before assertions.
- Expand cases for test_v_to_emi_coords().
- Replace prior method using AIR share of transport final energy.
- Adjust global totals for all regions.
- Handle distinction between CO2 and other species in construction of
  the broadcasting quantity.
@khaeru khaeru force-pushed the project/ssp/transport/2026-03-11 branch from 4cfc5ae to 06c8f0d Compare April 28, 2026 08:09
khaeru added a commit that referenced this pull request Apr 28, 2026
khaeru added a commit that referenced this pull request Apr 28, 2026
@khaeru khaeru marked this pull request as ready for review April 28, 2026 09:04
@khaeru khaeru requested a review from r-aneeque as a code owner April 28, 2026 09:04
@khaeru khaeru force-pushed the project/ssp/transport/2026-03-11 branch from 70ad5cc to 2c0c7ad Compare April 28, 2026 09:33
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.1%. Comparing base (e817c34) to head (2c0c7ad).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #485   +/-   ##
=====================================
  Coverage   74.1%   74.1%           
=====================================
  Files        318     318           
  Lines      25560   25568    +8     
=====================================
+ Hits       18952   18966   +14     
+ Misses      6608    6602    -6     
Files with missing lines Coverage Δ
message_ix_models/project/ssp/transport.py 100.0% <100.0%> (+2.9%) ⬆️
...sage_ix_models/tests/project/ssp/test_transport.py 99.2% <100.0%> (+<0.1%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@khaeru khaeru added this to the 2026-05 milestone Apr 28, 2026
@khaeru
Copy link
Copy Markdown
Member Author

khaeru commented Apr 28, 2026

Merging despite the job macos-latest-py3.14-upstream-main not completing; this job is known to be flaky and has stalled multiple times on this PR.

@khaeru khaeru merged commit 80bd446 into main Apr 28, 2026
45 of 46 checks passed
@khaeru khaeru deleted the project/ssp/transport/2026-03-11 branch April 28, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enh New features or functionality p:SSP-2024 2024 SSP updates and ScenarioMIP report genno-based reporting and post-solve processing transport MESSAGEix-Transport variant or transport in the base model

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant