Skip to content

Commit

Permalink
make sure DC transmission projects appear in the correct year (#187)
Browse files Browse the repository at this point in the history
* make sure DC transmission projects appear in the correct year

This script forces DC transmission projects that are built after the
current investment year to have p_nom_opt = 0. The planned capacity
continues to be stored in p_nom.

The changes are a compromise with behaviour of PyPSA-Eur scripts:

prepare_network.py sets p_nom_min = p_nom for opt setting
add_brownfield.py sets p_nom_min = p_nom_opt from previous

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* only force onshore NEP projects between cutin and cutout years

E.g. only force in projects planned to go into service between 2020
and 2030. Allow later lines to be built, but don't force them.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* hack the correct capacities in the post networks before exporting data. still requires fixing for 2040

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* set p_nom_min in postprocessing of transmission projects

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix Syntax warning

* correctly account for international links and  inverter costs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* consider international h2 and AC transmission

* read discretization values from config

* read threshold from config as well

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* rename prefix

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Michael Lindner <[email protected]>
  • Loading branch information
3 people authored Sep 18, 2024
1 parent 080ea77 commit 3b9d8fa
Show file tree
Hide file tree
Showing 4 changed files with 211 additions and 94 deletions.
11 changes: 9 additions & 2 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#run
run:
prefix: 202417mergetag013
prefix: 240918_nep_DC
name:
# - CurrentPolicies
- KN2045_Bal_v4
Expand Down Expand Up @@ -184,7 +184,7 @@ lines:

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#enable
enable:
retrieve: true # set to false once initial data is retrieved
retrieve: false # set to false once initial data is retrieved
retrieve_cutout: false # set to false once initial data is retrieved
clustering:
# simplify_network:
Expand Down Expand Up @@ -612,3 +612,10 @@ must_run_biogas:
enable: false
p_min_pu: 0.6
regions: ['DE']

transmission_projects:
new_link_capacity: keep #keep or zero

onshore_nep_force:
cutin_year: 2020
cutout_year: 2030
3 changes: 3 additions & 0 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ resources = path_provider("resources/", RDIR, policy, exclude)

RESULTS = "results/" + RDIR


module pypsaeur:
snakefile:
"submodules/pypsa-eur/Snakefile"
Expand Down Expand Up @@ -232,6 +233,7 @@ rule modify_prenetwork:
land_transport_electric_share=config_provider(
"sector", "land_transport_electric_share"
),
onshore_nep_force=config_provider("onshore_nep_force"),
input:
network=RESULTS
+ "prenetworks-brownfield/elec_s{simpl}_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
Expand Down Expand Up @@ -458,6 +460,7 @@ rule export_ariadne_variables:
energy_totals_year=config_provider("energy", "energy_totals_year"),
co2_price_add_on_fossils=config_provider("co2_price_add_on_fossils"),
co2_sequestration_cost=config_provider("sector", "co2_sequestration_cost"),
post_discretization=config_provider("solving", "options", "post_discretization"),
input:
template=resources("template_ariadne_database.xlsx"),
industry_demands=expand(
Expand Down
Loading

0 comments on commit 3b9d8fa

Please sign in to comment.