Skip to content

Commit 8abe89c

Browse files
macflo8khaeru
authored andcommitted
Remove unused option from material build command
1 parent d4f0bef commit 8abe89c

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

message_ix_models/model/material/cli.py

+3-12
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ def cli(ssp):
3939

4040

4141
@cli.command("build")
42-
@click.option(
43-
"--datafile",
44-
default="Global_steel_cement_MESSAGE.xlsx",
45-
metavar="INPUT",
46-
help="File name for external data input",
47-
)
4842
@click.option(
4943
"--iea_data_path",
5044
default="P:ene.model\\IEA_database\\Florian\\",
@@ -63,7 +57,7 @@ def cli(ssp):
6357
@common_params("nodes")
6458
@click.pass_obj
6559
def build_scen(
66-
context, datafile, iea_data_path, tag, mode, scenario_name, old_calib, update_costs
60+
context, iea_data_path, tag, mode, scenario_name, old_calib, update_costs
6761
):
6862
"""Build a scenario.
6963
@@ -99,9 +93,6 @@ def build_scen(
9993
if type(output_scenario_name).__name__ == "NoneType":
10094
output_scenario_name = context.scenario_info["scenario"]
10195

102-
# context.metadata_path = context.metadata_path / "data"
103-
context.datafile = datafile
104-
10596
if context.scenario_info["model"] != "CD_Links_SSP2":
10697
log.warning("WARNING: this code is not tested with this base scenario!")
10798

@@ -318,7 +309,7 @@ def run_reporting(context, remove_ts, profile):
318309
pr = cProfile.Profile()
319310
pr.enable()
320311
log.info("Reporting material-specific variables")
321-
report(context, scenario)
312+
report(scenario)
322313
log.info("Reporting standard variables")
323314
reporting(
324315
mp,
@@ -343,7 +334,7 @@ def exit():
343334
else:
344335
# Remove existing timeseries and add material timeseries
345336
log.info("Reporting material-specific variables")
346-
report(context, scenario)
337+
report(scenario)
347338
log.info("Reporting standard variables")
348339
reporting(
349340
mp,

message_ix_models/model/material/data_cement.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ def gen_data_cement(
171171
ssp = get_ssp_from_context(context)
172172
# Information about scenario, e.g. node, year
173173
s_info = ScenarioInfo(scenario)
174-
context.datafile = "Global_steel_cement_MESSAGE.xlsx"
175174

176175
# Techno-economic assumptions
177176
# TEMP: now add cement sector as well
@@ -357,9 +356,7 @@ def gen_data_cement(
357356

358357
# Create external demand param
359358
parname = "demand"
360-
df_demand = material_demand_calc.derive_demand(
361-
"cement", scenario, old_gdp=False, ssp=ssp
362-
)
359+
df_demand = material_demand_calc.derive_demand("cement", scenario, ssp=ssp)
363360
results[parname].append(df_demand)
364361

365362
# Add CCS as addon

0 commit comments

Comments
 (0)