From 9cc21540584e229ed6a2c073be9a81a17874f37c Mon Sep 17 00:00:00 2001 From: Paul Natsuo Kishimoto Date: Thu, 28 Nov 2024 10:19:58 +0100 Subject: [PATCH] Use y=2019 data from (IEA, 2024) edition of EWEB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …in .transport.base for scaling of outputs to match the base model. --- message_ix_models/model/transport/base.py | 7 +++++-- message_ix_models/model/transport/build.py | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/message_ix_models/model/transport/base.py b/message_ix_models/model/transport/base.py index b4ca52492..b2f7d3c59 100644 --- a/message_ix_models/model/transport/base.py +++ b/message_ix_models/model/transport/base.py @@ -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( diff --git a/message_ix_models/model/transport/build.py b/message_ix_models/model/transport/build.py index f01c0e390..f269aa13f 100644 --- a/message_ix_models/model/transport/build.py +++ b/message_ix_models/model/transport/build.py @@ -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(),