iiasa / message-ix-models

Tools for the MESSAGEix-GLOBIOM family of models
https://docs.messageix.org/models
Apache License 2.0
16 stars 31 forks source link

Report CO₂ emissions from transportation #134

Closed khaeru closed 8 months ago

khaeru commented 8 months ago

This PR adds code that mirrors the behaviour of message_data (‘legacy’) reporting, as an exploration of how to exactly replicate these calculations using genno. For this purpose, the code only replaces the portions of message_data.tools.post_processing.default_tables.retr_CO2emi that calculate CO₂ emissions from transportation.

The goals are:

Some things specifically omitted, that could be tackled in follow-up PRs:

Housekeeping

How to review

See:

PR checklist

codecov[bot] commented 8 months ago

Codecov Report

Merging #134 (519bdfc) into main (c9f1638) will increase coverage by 1.8%. The diff coverage is 99.2%.

@@           Coverage Diff           @@
##            main    #134     +/-   ##
=======================================
+ Coverage   71.5%   73.3%   +1.8%     
=======================================
  Files         80      82      +2     
  Lines       5439    5663    +224     
=======================================
+ Hits        3889    4152    +263     
+ Misses      1550    1511     -39     
Files Coverage Δ
message_ix_models/model/config.py 100.0% <100.0%> (ø)
message_ix_models/report/__init__.py 80.0% <100.0%> (+2.2%) :arrow_up:
message_ix_models/report/sim.py 77.9% <ø> (-1.2%) :arrow_down:
message_ix_models/tests/report/test_compat.py 100.0% <100.0%> (ø)
...essage_ix_models/tests/report/test_computations.py 100.0% <100.0%> (ø)
message_ix_models/tests/test_report.py 92.7% <100.0%> (+0.7%) :arrow_up:
message_ix_models/util/scenarioinfo.py 100.0% <100.0%> (ø)
message_ix_models/report/compat.py 99.2% <99.2%> (ø)
message_ix_models/report/computations.py 94.7% <90.0%> (+42.7%) :arrow_up:

... and 2 files with indirect coverage changes