Skip to content

Commit d4f0bef

Browse files
macflo8khaeru
authored andcommitted
Extend SSP 2020 activity calibration procedure
Adjust bounds, constraints and historic activity manually to resolve infeasibilities
1 parent 262df7d commit d4f0bef

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

message_ix_models/model/material/data_util.py

+45-1
Original file line numberDiff line numberDiff line change
@@ -1720,11 +1720,55 @@ def calibrate_for_SSPs(scenario: "Scenario") -> None:
17201720
df = scenario.par(
17211721
"growth_activity_up", filters={"node_loc": "R12_RCPA", "year_act": 2020}
17221722
)
1723-
df = df[df["technology"].str.endswith("_i")]
1723+
df = df[
1724+
(df["technology"].str.endswith("_i")) | (df["technology"].str.endswith("_I"))
1725+
]
17241726
df["value"] = 5
17251727
scenario.add_par("growth_activity_up", df)
17261728
scenario.commit("remove growth constraints in RCPA industry")
17271729

1730+
# remove sp_eth_I historical activity, which is most likely from old scenario runs
1731+
df = scenario.par("historical_activity", filters={"technology": "sp_eth_I"})
1732+
scenario.check_out()
1733+
scenario.remove_par("historical_activity", df)
1734+
scenario.commit("remove sp_eth_I hist act from 2015")
1735+
1736+
# correct wrong Viet Nam IEA numbers
1737+
df = scenario.par(
1738+
"historical_activity",
1739+
filters={"node_loc": "R12_RCPA", "technology": "sp_el_I", "year_act": 2015},
1740+
)
1741+
df["value"] = 7
1742+
scenario.check_out()
1743+
scenario.add_par("historical_activity", df)
1744+
scenario.commit("increase wrong RCPA hist act in 2015")
1745+
1746+
df = scenario.par(
1747+
"initial_activity_up",
1748+
filters={
1749+
"node_loc": "R12_RCPA",
1750+
"year_act": 2020,
1751+
"technology": "loil_i",
1752+
},
1753+
)
1754+
df["value"] = 0.058
1755+
scenario.check_out()
1756+
scenario.add_par("initial_activity_up", df)
1757+
scenario.commit("add loil_i ini act for RCPA 2020")
1758+
1759+
df = scenario.par(
1760+
"growth_activity_lo",
1761+
filters={
1762+
"node_loc": "R12_FSU",
1763+
"year_act": 2020,
1764+
"technology": "loil_i",
1765+
},
1766+
)
1767+
df["value"] = -5
1768+
scenario.check_out()
1769+
scenario.add_par("growth_activity_lo", df)
1770+
scenario.commit("fix loil_i gro lo for FSU 2020")
1771+
17281772
for bound in ["up", "lo"]:
17291773
par = f"bound_activity_{bound}"
17301774
df = scenario.par(par, filters={"year_act": 2020})

0 commit comments

Comments
 (0)