@@ -44,8 +44,6 @@ CDIR = "" if run["shared_cutouts"] else RDIR
4444RESULTS = "results/" + RDIR
4545
4646
47- data_dir = Path ("data" )
48-
4947localrules :
5048 purge ,
5149
@@ -151,23 +149,6 @@ rule sync:
151149 rsync -uvarh --no-g {params.cluster}/logs . || echo "No logs directory, skipping rsync"
152150 """
153151
154- data_dir = Path ("data" )
155-
156- rule get_data :
157- input :
158- [p for p in data_dir .rglob ("*" ) if p .is_file ()],
159- output :
160- [
161- str (Path ("data" ) / p .relative_to (data_dir ))
162- for p in data_dir .rglob ("*" )
163- if p .is_file ()
164- ],
165- shell :
166- """
167- mkdir -p data
168- cp -nR {data_dir}/. data/
169- """
170-
171152
172153rule clean :
173154 message :
@@ -199,24 +180,11 @@ rule retrieve_ariadne_database:
199180 output :
200181 data = resources ("ariadne_database.csv" ),
201182 log :
202- "logs/retrieve_ariadne_database.log" ,
183+ "logs/pypsa-de/ retrieve_ariadne_database.log" ,
203184 resources :
204185 mem_mb = 1000 ,
205186 script :
206- "scripts/retrieve_ariadne_database.py"
207-
208-
209- use rule prepare_sector_network from pypsaeur with :
210- input :
211- unpack (pypsaeur .input_profile_offwind ),
212- * * {
213- k : v
214- for k , v in rules .prepare_sector_network .input .items ()
215- if k != "district_heat_share"
216- },
217- district_heat_share = resources (
218- "district_heat_share_base_s_{clusters}_{planning_horizons}-modified.csv"
219- ),
187+ "scripts/pypsa-de/retrieve_ariadne_database.py"
220188
221189
222190rule modify_cost_data :
@@ -241,7 +209,7 @@ rule modify_cost_data:
241209 log :
242210 logs ("modify_cost_data_{planning_horizons}.log" ),
243211 script :
244- "scripts/modify_cost_data.py"
212+ "scripts/pypsa-de/ modify_cost_data.py"
245213
246214
247215if config ["enable" ]["retrieve" ] and config ["enable" ].get ("retrieve_cost_data" , True ):
@@ -267,7 +235,7 @@ rule build_mobility_demand:
267235 log :
268236 logs ("build_mobility_demand_{clusters}_{planning_horizons}.log" ),
269237 script :
270- "scripts/build_mobility_demand.py"
238+ "scripts/pypsa-de/ build_mobility_demand.py"
271239
272240
273241rule build_egon_data :
@@ -284,7 +252,7 @@ rule build_egon_data:
284252 log :
285253 logs ("build_egon_data.log" ),
286254 script :
287- "scripts/build_egon_data.py"
255+ "scripts/pypsa-de/ build_egon_data.py"
288256
289257
290258ruleorder : modify_district_heat_share > build_district_heat_share
@@ -308,7 +276,7 @@ rule modify_district_heat_share:
308276 log :
309277 logs ("modify_district_heat_share_{clusters}_{planning_horizons}.log" ),
310278 script :
311- "scripts/modify_district_heat_share.py"
279+ "scripts/pypsa-de/ modify_district_heat_share.py"
312280
313281
314282rule modify_prenetwork :
@@ -380,35 +348,12 @@ rule modify_prenetwork:
380348 RESULTS
381349 + "logs/modify_prenetwork_base_s_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.log" ,
382350 script :
383- "scripts/modify_prenetwork.py"
351+ "scripts/pypsa-de/ modify_prenetwork.py"
384352
385353
386354ruleorder : modify_industry_demand > build_industrial_production_per_country_tomorrow
387355
388356
389- use rule solve_sector_network_myopic from pypsaeur with :
390- params :
391- ** {
392- k : v
393- for k , v in rules .solve_sector_network_myopic .params .items ()
394- if k != "custom_extra_functionality"
395- },
396- custom_extra_functionality = os .path .join (
397- os .path .dirname (workflow .snakefile ), "scripts/additional_functionality.py"
398- ),
399- energy_year = config_provider ("energy" , "energy_totals_year" ),
400- input :
401- ** {
402- k : v
403- for k , v in rules .solve_sector_network_myopic .input .items ()
404- if k != "network"
405- },
406- network = RESULTS
407- + "prenetworks-final/base_s_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc" ,
408- co2_totals_name = resources ("co2_totals.csv" ),
409- energy_totals = resources ("energy_totals.csv" ),
410-
411-
412357rule modify_existing_heating :
413358 params :
414359 iiasa_reference_scenario = config_provider ("iiasa_database" , "reference_scenario" ),
@@ -426,7 +371,7 @@ rule modify_existing_heating:
426371 log :
427372 logs ("modify_existing_heating.log" ),
428373 script :
429- "scripts/modify_existing_heating.py"
374+ "scripts/pypsa-de/ modify_existing_heating.py"
430375
431376
432377rule retrieve_mastr :
@@ -458,23 +403,7 @@ rule build_existing_chp_de:
458403 log :
459404 logs ("build_existing_chp_de_{clusters}.log" ),
460405 script :
461- "scripts/build_existing_chp_de.py"
462-
463-
464- use rule add_existing_baseyear from pypsaeur with :
465- input :
466- ** rules .add_existing_baseyear .input ,
467- custom_powerplants = resources ("german_chp_{clusters}.csv" ),
468-
469-
470- use rule build_existing_heating_distribution from pypsaeur with :
471- input :
472- ** {
473- k : v
474- for k , v in rules .build_existing_heating_distribution .input .items ()
475- if k != "existing_heating"
476- },
477- existing_heating = resources ("existing_heating.csv" ),
406+ "scripts/pypsa-de/build_existing_chp_de.py"
478407
479408
480409rule modify_industry_demand :
@@ -494,19 +423,7 @@ rule modify_industry_demand:
494423 log :
495424 logs ("modify_industry_demand_{planning_horizons}.log" ),
496425 script :
497- "scripts/modify_industry_demand.py"
498-
499-
500- use rule build_industrial_production_per_node from pypsaeur with :
501- input :
502- ** {
503- k : v
504- for k , v in rules .build_industrial_production_per_node .input .items ()
505- if k != "industrial_production_per_country_tomorrow"
506- },
507- industrial_production_per_country_tomorrow = resources (
508- "industrial_production_per_country_tomorrow_{planning_horizons}-modified.csv"
509- ),
426+ "scripts/pypsa-de/modify_industry_demand.py"
510427
511428
512429rule build_wasserstoff_kernnetz :
@@ -537,7 +454,7 @@ rule build_wasserstoff_kernnetz:
537454 log :
538455 logs ("build_wasserstoff_kernnetz.log" ),
539456 script :
540- "scripts/build_wasserstoff_kernnetz.py"
457+ "scripts/pypsa-de/ build_wasserstoff_kernnetz.py"
541458
542459
543460rule cluster_wasserstoff_kernnetz :
@@ -552,7 +469,7 @@ rule cluster_wasserstoff_kernnetz:
552469 log :
553470 logs ("cluster_wasserstoff_kernnetz_{clusters}.log" ),
554471 script :
555- "scripts/cluster_wasserstoff_kernnetz.py"
472+ "scripts/pypsa-de/ cluster_wasserstoff_kernnetz.py"
556473
557474
558475rule download_ariadne_template :
@@ -622,7 +539,7 @@ rule export_ariadne_variables:
622539 log :
623540 RESULTS + "logs/export_ariadne_variables.log" ,
624541 script :
625- "scripts/export_ariadne_variables.py"
542+ "scripts/pypsa-de/ export_ariadne_variables.py"
626543
627544
628545rule plot_ariadne_variables :
@@ -667,7 +584,7 @@ rule plot_ariadne_variables:
667584 log :
668585 RESULTS + "logs/plot_ariadne_variables.log" ,
669586 script :
670- "scripts/plot_ariadne_variables.py"
587+ "scripts/pypsa-de/ plot_ariadne_variables.py"
671588
672589
673590rule ariadne_all :
@@ -689,7 +606,7 @@ rule ariadne_all:
689606 run = config_provider ("run" , "name" ),
690607 ),
691608 script :
692- "scripts/plot_ariadne_scenario_comparison.py"
609+ "scripts/pypsa-de/ plot_ariadne_scenario_comparison.py"
693610
694611
695612rule build_scenarios :
@@ -705,7 +622,7 @@ rule build_scenarios:
705622 log :
706623 "logs/build_scenarios.log" ,
707624 script :
708- "scripts/build_scenarios.py"
625+ "scripts/pypsa-de/ build_scenarios.py"
709626
710627
711628rule plot_hydrogen_network_incl_kernnetz :
@@ -731,7 +648,7 @@ rule plot_hydrogen_network_incl_kernnetz:
731648 + "benchmarks/plot_hydrogen_network_incl_kernnetz/base_s_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}"
732649 )
733650 script :
734- "scripts/plot_hydrogen_network_incl_kernnetz.py"
651+ "scripts/pypsa-de/ plot_hydrogen_network_incl_kernnetz.py"
735652
736653
737654rule plot_ariadne_report :
@@ -779,7 +696,7 @@ rule plot_ariadne_report:
779696 log :
780697 RESULTS + "logs/plot_ariadne_report.log" ,
781698 script :
782- "scripts/plot_ariadne_report.py"
699+ "scripts/pypsa-de/ plot_ariadne_report.py"
783700
784701
785702rule ariadne_report_only :
0 commit comments