Skip to content

Conversation

@khaeru
Copy link
Member

@khaeru khaeru commented Oct 30, 2025

#430 ← previous PR | following PR → (none)

  • iiasa/message_data#626
  • Implement runs using ExogenousEmissionPrice.
  • Add a SLURM batch script for running mix-models transport on UniCC.
    • Small adjustments and clean-ups to other code to work in this environment.
  • New utility class .sdmx.StructureFactory.

New scenario labels

The PR extends the set of MESSAGEix-Transport scenario codes or labels. Previously, for each SSP, there were 3, for instance:

  • SSP2 —a baseline.
  • SSP2 tax —an arbitrary, exponentially increasing price, same in all regions.
  • SSP2 exo price —using PRICE_EMISSION data drawn from base model scenarios.

These are now extended in the following 2 ways:

  1. Materials-enabled scenarios with an M prefix, e.g. M SSP2, M SSP2 tax, etc. These activate the code in message_ix_models.model.transport.material that adds/modifies data for MESSAGEix-Materials integration.

  2. Full set of … exo price scenarios.

    Instead of a single, handpicked source scenario for emission price trajectories, now every available file in data/transport/R12/price-emission/*.csv is selectable. The different price emission source scenarios are now identified by a short suffix like a1b2, that is a hash of the (unique) full scenario URL.

    So for instance SSP2 exo price is now SSP2 exo price 2e17, still using prices from "SSP_SSP2_v5.3.1/SSP2 - Low Emissions#2". Likewise:

    • LED-SSP2 exo priceLED-SSP2 exo price 1aa5, prices from "SSP_LED_v5.3.1/SSP2 - Very Low Emissions#2".
    • SSP1 exo priceSSP1 exo price 4c35, prices from "SSP_SSP1_v5.3.1/SSP1 - Low Emissions#2"
    • SSP3 exo priceSSP3 exo price c536, prices from "SSP_SSP3_v5.3.1/baseline_1000f#1"
    • SSP4 exo priceSSP4 exo price 853b, prices from "SSP_SSP4_v5.3.1/SSP4 - Low Overshoot#2"
    • SSP5 exo priceSSP5 exo price 6321, prices from "SSP_SSP5_v5.3.1/SSP5 - Low Overshoot#2"

    These additions are available for (a) all the SSPs and (b) all the DIGSY-… scenarios, since we are using the latter in CircEUlar runs for 2025-W48 #462 for CircEUlar.

In short, to run any of these scenarios: edit .github/workflows/transport.yaml as usual. Where one previously would have used the labels like SSP2, now one can also/instead use labels like:

  • M SSP2 exo price 2e17: SSP2, materials enabled, exogenous price as mentioned above for this short hash.
  • DIGSY-BEST-C exo price 2e17: DIGSY input data, SSP2, no materials (because no M prefix), same price.

As before, the IIASA_ECE_CL_TRANSPORT_SCENARIO(1.3.0).xml file (note the new version #) can be inspected/searched to check exactly which settings will be applied for a given label.

Other notes for usage

  • CircEUlar runs for 2025-W48 #462 is based on this branch.
  • As mentioned previously in Slack, not all of the visible base model scenarios have a 'complete' (distinct for all nodes and periods). For SSP2 in particular, the files that do are:
    • "SSP_SSP2_v5.3.1/SSP2 - Low Emissions#2" = 2e17
    • "SSP_SSP2_v5.3.1/SSP2 - Medium Emissions_a#2" = 4a33
    • "SSP_SSP2_v5.3.1/NPIREF_price_cap_5$_bkp#1" = 5cad
    • "SSP_SSP2_v5.3.1/INDC2030i_SSP2 - Low Emissions#1" = 3888
  • If the criteria is relaxed, i.e. n=World prices are okay, there is a larger set of about 22 different inputs.
  • For the PREMISE pathways project, any 2 of the above plus an SSP2 baseline could be used to give results with different policy responses.

How to review

TBA

PR checklist

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

@khaeru khaeru added this to the 2025-12 milestone Oct 30, 2025
@khaeru khaeru self-assigned this Oct 30, 2025
@khaeru khaeru added enh New features or functionality transport MESSAGEix-Transport variant or transport in the base model labels Oct 30, 2025
@khaeru khaeru force-pushed the transport/2025-w44 branch from 3c6c62d to bd49756 Compare October 30, 2025 09:33
@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

❌ Patch coverage is 95.83333% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.3%. Comparing base (bfeba06) to head (db8473b).

Files with missing lines Patch % Lines
message_ix_models/model/transport/plot.py 80.6% 12 Missing ⚠️
message_ix_models/report/plot.py 90.6% 8 Missing ⚠️
message_ix_models/cli.py 66.6% 2 Missing ⚠️
message_ix_models/model/transport/operator.py 33.3% 2 Missing ⚠️
message_ix_models/model/workflow.py 80.0% 2 Missing ⚠️
message_ix_models/util/sdmx.py 87.5% 2 Missing ⚠️
message_ix_models/model/buildings/rc_afofi.py 0.0% 1 Missing ⚠️
message_ix_models/model/transport/check.py 97.8% 1 Missing ⚠️
message_ix_models/model/transport/report.py 97.0% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #447     +/-   ##
=======================================
- Coverage   75.6%   75.3%   -0.4%     
=======================================
  Files        278     285      +7     
  Lines      22740   22966    +226     
=======================================
+ Hits       17201   17302    +101     
- Misses      5539    5664    +125     
Files with missing lines Coverage Δ
message_ix_models/__init__.py 100.0% <100.0%> (ø)
message_ix_models/model/emissions.py 98.7% <100.0%> (ø)
message_ix_models/model/transport/__init__.py 100.0% <100.0%> (ø)
message_ix_models/model/transport/build.py 98.3% <100.0%> (+4.2%) ⬆️
message_ix_models/model/transport/config.py 99.4% <100.0%> (+0.4%) ⬆️
message_ix_models/model/transport/data.py 98.9% <100.0%> (-0.1%) ⬇️
message_ix_models/model/transport/demand.py 100.0% <ø> (ø)
message_ix_models/model/transport/key.py 100.0% <100.0%> (ø)
message_ix_models/model/transport/material.py 100.0% <100.0%> (ø)
message_ix_models/model/transport/passenger.py 96.6% <100.0%> (ø)
... and 40 more

... and 33 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@khaeru khaeru force-pushed the transport/2025-w44 branch from bd49756 to 1be671a Compare October 31, 2025 10:29
@khaeru khaeru mentioned this pull request Nov 6, 2025
7 tasks
@khaeru khaeru force-pushed the transport/2025-w44 branch 3 times, most recently from 7a6303d to bc4ca5e Compare November 12, 2025 14:21
khaeru added a commit that referenced this pull request Nov 18, 2025
@khaeru khaeru force-pushed the transport/2025-w44 branch 2 times, most recently from b4bd5ae to 2e4fe45 Compare November 19, 2025 15:52
khaeru added a commit that referenced this pull request Nov 21, 2025
@khaeru khaeru force-pushed the transport/2025-w44 branch 7 times, most recently from b133d02 to ecde703 Compare November 25, 2025 14:29
@khaeru khaeru force-pushed the transport/2025-w44 branch 4 times, most recently from dcab36b to 81fee17 Compare November 26, 2025 21:09
@khaeru khaeru force-pushed the transport/2025-w44 branch from 81fee17 to fee6358 Compare December 9, 2025 12:20
@khaeru khaeru force-pushed the transport/2025-w44 branch from fee6358 to 23eaa2f Compare December 9, 2025 12:45
- Incorporate features from .transport.plot.Plot.
  - New attributes strage, single.
  - Remove url attribute.
- Add PlotFromIAMC, PlotTimeSeries subclasses; adjust existing plots.
- New COMMON global collection of plotnine elements.
- Move items from .transport.plot: LabelFirst, change level of
  matplotlib logger.
- New functions collect() and prepare_computer().
- Use prepare_computer() in callback(); remove PLOTS global.
- Use in .transport.build instead of hard-coded string.
- Add assert_all_passed() method.
- Record number of checks in total and passing.
- Static and dynamic collections of checks of model build data
  previously in .tests.model.transport.test_build.
- Simplify .test_build.test_debug().
- Add input dataflow to .transport.data.
- Add ScenarioCodeAnnotations.extra_modules.
- Set extra_modules for non-materials and materials variants.
- Bump version 1.2.1 → 1.3.0.
- Adjust labels and data file contents prepared using the new codes.
- Adjust tests.
- Drop PRICE_EMISSION_URL.
- Adjust and expand tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enh New features or functionality transport MESSAGEix-Transport variant or transport in the base model

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants