From 9f641b4b2463f87d90aaed5f833d80d63f9fb9fd Mon Sep 17 00:00:00 2001 From: Ahmad Date: Tue, 11 Apr 2023 23:39:35 +0200 Subject: [PATCH 1/5] rename build_load_data to build_electricity_demand Signed-off-by: Ahmad --- rules/build_electricity.smk | 6 +++--- scripts/{build_load_data.py => build_electricity_demand.py} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename scripts/{build_load_data.py => build_electricity_demand.py} (100%) diff --git a/rules/build_electricity.smk b/rules/build_electricity.smk index 9be7408d..0074a8a9 100644 --- a/rules/build_electricity.smk +++ b/rules/build_electricity.smk @@ -18,19 +18,19 @@ if config["enable"].get("prepare_links_p_nom", False): "../scripts/prepare_links_p_nom.py" -rule build_load_data: +rule build_electricity_demand: input: ancient("data/load_raw.csv"), output: RESOURCES + "load.csv", log: - LOGS + "build_load_data.log", + LOGS + "build_electricity_demand.log", resources: mem_mb=5000, conda: "../envs/environment.yaml" script: - "../scripts/build_load_data.py" + "../scripts/build_electricity_demand.py" rule build_powerplants: diff --git a/scripts/build_load_data.py b/scripts/build_electricity_demand.py similarity index 100% rename from scripts/build_load_data.py rename to scripts/build_electricity_demand.py From 90d8f0ac3f303b9b39455aadafe6dd7602d36944 Mon Sep 17 00:00:00 2001 From: Ahmad Date: Tue, 11 Apr 2023 23:39:35 +0200 Subject: [PATCH 2/5] rename build_load_data to build_electricity_demand Signed-off-by: Ahmad --- rules/build_electricity.smk | 6 +++--- scripts/{build_load_data.py => build_electricity_demand.py} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename scripts/{build_load_data.py => build_electricity_demand.py} (100%) diff --git a/rules/build_electricity.smk b/rules/build_electricity.smk index 9be7408d..0074a8a9 100644 --- a/rules/build_electricity.smk +++ b/rules/build_electricity.smk @@ -18,19 +18,19 @@ if config["enable"].get("prepare_links_p_nom", False): "../scripts/prepare_links_p_nom.py" -rule build_load_data: +rule build_electricity_demand: input: ancient("data/load_raw.csv"), output: RESOURCES + "load.csv", log: - LOGS + "build_load_data.log", + LOGS + "build_electricity_demand.log", resources: mem_mb=5000, conda: "../envs/environment.yaml" script: - "../scripts/build_load_data.py" + "../scripts/build_electricity_demand.py" rule build_powerplants: diff --git a/scripts/build_load_data.py b/scripts/build_electricity_demand.py similarity index 100% rename from scripts/build_load_data.py rename to scripts/build_electricity_demand.py From 763d77d19d0614eed198c23bc97338eebf61995c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 14 Apr 2023 19:05:42 +0000 Subject: [PATCH 3/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/build_cop_profiles.py | 1 + scripts/build_gas_network.py | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/build_cop_profiles.py b/scripts/build_cop_profiles.py index 94cc8fb4..91d03469 100644 --- a/scripts/build_cop_profiles.py +++ b/scripts/build_cop_profiles.py @@ -12,6 +12,7 @@ sink. The quadratic regression used is based on Staffell et al. (2012) + https://doi.org/10.1039/C2EE22653G. """ diff --git a/scripts/build_gas_network.py b/scripts/build_gas_network.py index 907b151c..a9f28e0d 100644 --- a/scripts/build_gas_network.py +++ b/scripts/build_gas_network.py @@ -29,6 +29,7 @@ def diameter_to_capacity(pipe_diameter_mm): Based on p.15 of + https://gasforclimate2050.eu/wp-content/uploads/2020/07/2020_European-Hydrogen-Backbone_Report.pdf """ # slopes definitions From 2984b3bb993fec591b48ce27c767d1fb3bfb237a Mon Sep 17 00:00:00 2001 From: Ahmad Date: Fri, 14 Apr 2023 21:26:25 +0200 Subject: [PATCH 4/5] updated docs from build_load_data to build_electricity_demand Signed-off-by: Ahmad --- doc/tutorial.rst | 4 ++-- doc/tutorial_sector.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/tutorial.rst b/doc/tutorial.rst index b6f5311b..82ccc55a 100644 --- a/doc/tutorial.rst +++ b/doc/tutorial.rst @@ -155,7 +155,7 @@ This triggers a workflow of multiple preceding jobs that depend on each rule's i 19[label = "build_hydro_profile", color = "0.44 0.6 0.85", style="rounded"]; 20[label = "retrieve_cost_data", color = "0.30 0.6 0.85", style="rounded"]; 21[label = "build_powerplants", color = "0.16 0.6 0.85", style="rounded"]; - 22[label = "build_load_data", color = "0.00 0.6 0.85", style="rounded"]; + 22[label = "build_electricity_demand", color = "0.00 0.6 0.85", style="rounded"]; 23[label = "retrieve_load_data", color = "0.34 0.6 0.85", style="rounded,dashed"]; 1 -> 0 2 -> 1 @@ -232,7 +232,7 @@ In the terminal, this will show up as a list of jobs to be run: base_network 1 1 1 build_bus_regions 1 1 1 build_hydro_profile 1 1 1 - build_load_data 1 1 1 + build_electricity_demand 1 1 1 build_powerplants 1 1 1 build_renewable_profiles 4 1 1 build_shapes 1 1 1 diff --git a/doc/tutorial_sector.rst b/doc/tutorial_sector.rst index 1d8e8ba5..1cbd6779 100644 --- a/doc/tutorial_sector.rst +++ b/doc/tutorial_sector.rst @@ -140,7 +140,7 @@ successfully. 18[label = "retrieve_ship_raster", color = "0.15 0.6 0.85", style="rounded"]; 19[label = "retrieve_cost_data", color = "0.50 0.6 0.85", style="rounded"]; 20[label = "build_powerplants", color = "0.49 0.6 0.85", style="rounded"]; - 21[label = "build_load_data", color = "0.39 0.6 0.85", style="rounded"]; + 21[label = "build_electricity_demand", color = "0.39 0.6 0.85", style="rounded"]; 22[label = "retrieve_load_data", color = "0.05 0.6 0.85", style="rounded"]; 23[label = "build_gas_input_locations", color = "0.45 0.6 0.85", style="rounded"]; 24[label = "prepare_network", color = "0.31 0.6 0.85", style="rounded"]; @@ -367,7 +367,7 @@ implemented in the workflow: 18[label = "retrieve_ship_raster", color = "0.09 0.6 0.85", style="rounded"]; 19[label = "retrieve_cost_data", color = "0.04 0.6 0.85", style="rounded"]; 20[label = "build_powerplants", color = "0.28 0.6 0.85", style="rounded"]; - 21[label = "build_load_data", color = "0.46 0.6 0.85", style="rounded"]; + 21[label = "build_electricity_demand", color = "0.46 0.6 0.85", style="rounded"]; 22[label = "retrieve_load_data", color = "0.44 0.6 0.85", style="rounded"]; 23[label = "build_energy_totals", color = "0.53 0.6 0.85", style="rounded"]; 24[label = "build_population_weighted_energy_totals", color = "0.03 0.6 0.85", style="rounded"]; From b877b41019ffa4ed8da0ee703a0b875b246c89d4 Mon Sep 17 00:00:00 2001 From: Ahmad Date: Sun, 16 Apr 2023 02:28:56 +0200 Subject: [PATCH 5/5] - incorporated the remaining changes - added a released note about the renaming of build_load_data to build_electricity_demand --- doc/preparation.rst | 6 +++--- doc/release_notes.rst | 4 +++- scripts/build_electricity_demand.py | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/preparation.rst b/doc/preparation.rst index a180bb0d..b5a12062 100644 --- a/doc/preparation.rst +++ b/doc/preparation.rst @@ -86,13 +86,13 @@ Rule ``build_powerplants`` .. automodule:: build_powerplants -.. _load_data: +.. _electricity_demand: -Rule ``build_load_data`` +Rule ``build_electricity_demand`` ============================= -.. automodule:: build_load_data +.. automodule:: build_electricity_demand .. _ship: diff --git a/doc/release_notes.rst b/doc/release_notes.rst index e668e92e..3d05f27c 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -12,6 +12,8 @@ Upcoming Release * Bugfix: Correct typo in the CPLEX solver configuration in ``config.default.yaml``. +* Renamed script file from PyPSA-EUR ``build_load_data`` to ``build_electricity_demand``. + PyPSA-Eur 0.8.0 (18th March 2023) ================================= @@ -558,7 +560,7 @@ More OPSD integration: This will overwrite the capacities calculated from the heuristic approach in :func:`estimate_renewable_capacities()` [`#212 `_]. -* Electricity consumption data is now retrieved directly from the `OPSD website `_ using the rule :mod:`build_load_data`. +* Electricity consumption data is now retrieved directly from the `OPSD website `_ using the rule :mod:`build_electricity_demand`. The user can decide whether to take the ENTSO-E power statistics data (default) or the ENTSO-E transparency data [`#211 `_]. diff --git a/scripts/build_electricity_demand.py b/scripts/build_electricity_demand.py index 01e3fb1e..4bf0306b 100755 --- a/scripts/build_electricity_demand.py +++ b/scripts/build_electricity_demand.py @@ -276,7 +276,7 @@ if __name__ == "__main__": if "snakemake" not in globals(): from _helpers import mock_snakemake - snakemake = mock_snakemake("build_load_data") + snakemake = mock_snakemake("build_electricity_demand") configure_logging(snakemake)