Skip to content

Commit

Permalink
Use y=2019 data from (IEA, 2024) edition of EWEB
Browse files Browse the repository at this point in the history
…in .transport.base for scaling of outputs to match the base model.
  • Loading branch information
khaeru committed Nov 29, 2024
1 parent d4fdf8c commit 9cc2154
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions message_ix_models/model/transport/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,17 @@ def prepare_reporter(rep: "message_ix.Reporter") -> str:
e_iea = Key("energy:n-y-product-flow:iea")
e_fnp = KeySeq(e_iea.drop("y"))
e_cnlt = Key("energy:c-nl-t:iea+0")
k = KeySeq("in:nl-t-ya-c-l-h:transport+units")
k = KeySeq("in:nl-t-ya-c-l-h:transport+units") # MESSAGE solution values

# First period
y0 = rep.get("y0")

# Transform IEA EWEB data for comparison
# - The specific edition of the data used is set in .build.add_exogenous_data()
# - Data for 2019 is used to proxy for `y0` = 2020, to avoid incorporating COVID
# impacts.
assert y0 == 2020, f"IEA Extended World Energy Balances: no data for y={y0}"
rep.add(e_fnp[0], "select", e_iea, indexers=dict(y=y0), drop=True)
rep.add(e_fnp[0], "select", e_iea, indexers=dict(y=2019), drop=True)
rep.add(e_fnp[1], "aggregate", e_fnp[0], "groups::iea to transport", keep=False)
# TODO Dump e_fnp[1] to CSV for AJ comparison
rep.add(
Expand Down
4 changes: 2 additions & 2 deletions message_ix_models/model/transport/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ def add_exogenous_data(c: Computer, info: ScenarioInfo) -> None:
# Add IEA Extended World Energy Balances data; select only the flows related to
# transport
kw = dict(
provider="OECD",
edition="2022",
provider="IEA",
edition="2024",
flow=(
"DOMESAIR DOMESNAV PIPELINE RAIL ROAD TOTTRANS TRNONSPE WORLDAV WORLDMAR"
).split(),
Expand Down

0 comments on commit 9cc2154

Please sign in to comment.