Skip to content

Commit 5fec1b8

Browse files
committed
Update bm_subtraction method
1 parent 28c7abb commit 5fec1b8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

message_ix_models/model/bmt/utils.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,11 @@ def subtract_material_demand(
148148
pd.DataFrame
149149
Modified demand data with material demand subtracted
150150
"""
151+
# Method adopted in NAVIGATE workflow 2023 by PNK
151152
# Retrieve data once
152-
mat_demand = scenario.par("demand", {"level": "demand"})
153+
target_commodities = ["cement", "steel", "aluminum"]
154+
# Updated filter from level to commodities to avoid non-material commodities
155+
mat_demand = scenario.par("demand", {"commodity": target_commodities})
153156
index_cols = ["node", "year", "commodity"]
154157

155158
if method == "bm_subtraction":
@@ -173,7 +176,10 @@ def subtract_material_demand(
173176
.rename(columns={"value": new_col})
174177
.assign(
175178
commodity=lambda _df: _df.commodity.str.extract(
176-
f"{rc}_mat_demand_(cement|steel|aluminum)", expand=False
179+
f"{rc}_mat_demand_(cement|steel|aluminum)",
180+
expand=False,
181+
# Directly provided by STURM reporting
182+
# No need to multiply intensities and floor space
177183
)
178184
)
179185
.dropna(subset=["commodity"])

0 commit comments

Comments
 (0)