Skip to content

Commit

Permalink
Implemented new CLI commands for heat_profiles script
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias157 committed Oct 14, 2024
1 parent d7d616f commit 5c9657d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Binary file modified src/Analysis/preprocessing_dag.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Modules/heat_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def CLI(ctx, dark_style: bool, plot_ext: str):
@click.argument('cutout', type=str)
@click.option('--weather-year', type=int, required=False, default=2012, help="The weather year")
@click.option('--plot', is_flag=True, required=False, help="Plot the average temperatures on a map?")
def cmd1(ctx, cutout: str, weather_year: int, plot: bool):
def generate(ctx, cutout: str, weather_year: int, plot: bool):
"A command in the CLI"

# Get files
Expand Down
10 changes: 4 additions & 6 deletions src/preprocessing
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,19 @@ rule format_dkstat_industry_data:
rule heat_profiles:
input:
[
f"{modules_path}heat_profiles_func.py",
f"{data_path}BalmorelData/muni_input_data.gdx"
f"{modules_path}heat_profiles.py",
f"M:/Project/RQII/DK+Surrounding2012.nc"
]
params:
model_path=config["balmorel_input"]["model_path"],
scenario=config["balmorel_input"]["scenario"],
load_again=config["balmorel_input"]["load_again"]
weather_year=config["timeseries"]["weather_year"]
output:
[
f"{out_path}DH_VAR_T.inc",
f"{out_path}INDIVUSERS_DH_VAR_T.inc"
]
shell:
"""
python {modules_path}format_balmorel_data.py --model-path={params.model_path} --scenario={params.scenario} --load-again={params.load_again} heat-profiles
python {modules_path}heat_profiles.py generate {input[1]} --weather-year={params.weather_year} --plot
"""

rule exo_heat_demand:
Expand Down

0 comments on commit 5c9657d

Please sign in to comment.