Skip to content

Commit

Permalink
constant nodal export
Browse files Browse the repository at this point in the history
  • Loading branch information
cpschau committed Oct 25, 2024
1 parent f050b43 commit 777024f
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 19 deletions.
9 changes: 5 additions & 4 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ rule add_export:
snapshots=config["snapshots"],
USD_to_EUR=config["costs"]["USD2013_to_EUR2013"],
lifetime=config["costs"]["lifetime"],
constant_nodal_export=config["export"]["constant_nodal_export"],
input:
overrides="data/override_component_attrs",
export_ports="data/export_ports.csv",
Expand Down Expand Up @@ -284,15 +285,15 @@ rule prepare_res_potentials:
),
output:
**{
f"{tech}_{year}_{discountrate}_potential_s{simpl}_{clusters}": f"resources/custom_renewables/{tech}/{tech}_{year}_{discountrate}_potential_s{simpl}_{clusters}.csv"
f"{tech}_{year}_{discountrate}_potential_s{simpl}_{clusters}": f"resources/custom_renewables/{tech}/{tech}_{year}_{discountrate}_potential_s{{simpl}}_{{clusters}}.csv"
for tech in config["custom_data"]["renewables"]
for year in config["scenario"]["planning_horizons"]
for discountrate in config["costs"]["discountrate"]
for simpl in config["scenario"]["simpl"]
for clusters in config["scenario"]["clusters"]
},
**{
f"{tech}_{year}_{discountrate}_installable_s{simpl}_{clusters}": f"resources/custom_renewables/{tech}/{tech}_{year}_{discountrate}_installable_s{simpl}_{clusters}.csv"
f"{tech}_{year}_{discountrate}_installable_s{simpl}_{clusters}": f"resources/custom_renewables/{tech}/{tech}_{year}_{discountrate}_installable_s{{simpl}}_{{clusters}}.csv"
for tech in config["custom_data"]["renewables"]
for year in config["scenario"]["planning_horizons"]
for discountrate in config["costs"]["discountrate"]
Expand All @@ -310,15 +311,15 @@ rule override_respot:
countries=config["countries"],
input:
**{
f"custom_res_pot_{tech}_{year}_{discountrate}_s{simpl}_{clusters}": f"resources/custom_renewables/{tech}/{tech}_{year}_{discountrate}_potential_s{simpl}_{clusters}.csv"
f"custom_res_pot_{tech}_{year}_{discountrate}_s{simpl}_{clusters}": f"resources/custom_renewables/{tech}/{tech}_{year}_{discountrate}_potential_s{{simpl}}_{{clusters}}.csv"
for tech in config["custom_data"]["renewables"]
for year in config["scenario"]["planning_horizons"]
for discountrate in config["costs"]["discountrate"]
for simpl in config["scenario"]["simpl"]
for clusters in config["scenario"]["clusters"]
},
**{
f"custom_res_ins_{tech}_{year}_{discountrate}_s{simpl}_{clusters}": f"resources/custom_renewables/{tech}/{tech}_{year}_{discountrate}_installable_s{simpl}_{clusters}.csv"
f"custom_res_ins_{tech}_{year}_{discountrate}_s{simpl}_{clusters}": f"resources/custom_renewables/{tech}/{tech}_{year}_{discountrate}_installable_s{{simpl}}_{{clusters}}.csv"
for tech in config["custom_data"]["renewables"]
for year in config["scenario"]["planning_horizons"]
for discountrate in config["costs"]["discountrate"]
Expand Down
7 changes: 4 additions & 3 deletions config.bright_BI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ summary_dir: results/
costs_dir: data/ #TODO change to the equivalent of technology data

run:
name: TScenariofsd
name: 241023_constant_delivery
name_subworkflow: "" # scenario name of the pypsa-earth subworkflow
shared_cutouts: true # set to true to share the default cutout(s) across runs
# Note: value false requires build_cutout to be enabled
Expand All @@ -28,7 +28,7 @@ scenario:
opts:
- "Co2L"
sopts:
- "144H"
- "3H"
demand:
- "BI" # BI/DE/GH

Expand All @@ -40,7 +40,7 @@ policy_config:
allowed_excess: 1.0
is_reference: false # Whether or not this network is a reference case network, relevant only if additionality is _true_
remove_h2_load: false #Whether or not to remove the h2 load from the network, relevant only if is_reference is _true_
path_to_ref: "/nimble/home/haz43975/pypsa-earth-sec/results/U_BI_AdaptedScenario/postnetworks/elec_s_11_ec_lv1.0_Co2L_720H_2035_0.071_BI_0export.nc" # Path to the reference case network for additionality calculation, relevant only if additionality is _true_ and is_reference is _false_
path_to_ref: "/scratch/htc/cschauss/BRIGHT/submodules/pypsa-earth-sec/results/241023_constant_delivery/postnetworks/elec_s_11_ec_lv1.0_Co2L_3H_2035_0.071_BI_0export.nc" # Path to the reference case network for additionality calculation, relevant only if additionality is _true_ and is_reference is _false_
limit_SMR_dispatch: true # Limits the dispatch of SMR to the reference case
re_country_load: false # Set to "True" to force the RE electricity to be equal to the electricity required for hydrogen export and the country electricity load. "False" excludes the country electricity load from the constraint.

Expand Down Expand Up @@ -69,6 +69,7 @@ export:
store: false # [True, False] # specifies wether an export store to balance demand is implemented
store_capital_costs: "no_costs" # ["standard_costs", "no_costs"] # specifies the costs of the export store. "standard_costs" takes CAPEX of "hydrogen storage tank type 1 including compressor"
export_profile: "constant" # use "ship" or "constant"
constant_nodal_export: True
ship:
ship_capacity: 0.4 # TWh # 0.05 TWh for new ones, 0.003 TWh for Susio Frontier, 0.4 TWh according to Hampp2021: "Corresponds to 11360 t H2 (l) with LHV of 33.3333 Mwh/t_H2. Cihlar et al 2020 based on IEA 2019, Table 3-B"
travel_time: 288 # hours # From Agadir to Rotterdam and back (12*24)
Expand Down
4 changes: 2 additions & 2 deletions config.bright_BI_ref.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ summary_dir: results/
costs_dir: data/ #TODO change to the equivalent of technology data

run:
name: 20241021_biofuels
name: 241023_constant_delivery
name_subworkflow: "" # scenario name of the pypsa-earth subworkflow
shared_cutouts: true # set to true to share the default cutout(s) across runs
# Note: value false requires build_cutout to be enabled
Expand All @@ -28,7 +28,7 @@ scenario:
opts:
- "Co2L"
sopts:
- "8H"
- "3H"
demand:
- "BI" # BI/DE/GH

Expand Down
7 changes: 4 additions & 3 deletions config.bright_DE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ summary_dir: results/
costs_dir: data/ #TODO change to the equivalent of technology data

run:
name: 092524_test_2
name: 241023_constant_delivery
name_subworkflow: "" # scenario name of the pypsa-earth subworkflow
shared_cutouts: true # set to true to share the default cutout(s) across runs
# Note: value false requires build_cutout to be enabled
Expand All @@ -28,7 +28,7 @@ scenario:
opts:
- "Co2L"
sopts:
- "720H"
- "3H"
demand:
- "DE" # BI/DE/GH

Expand All @@ -40,7 +40,7 @@ policy_config:
allowed_excess: 1.0
is_reference: false # Whether or not this network is a reference case network, relevant only if additionality is _true_
remove_h2_load: false #Whether or not to remove the h2 load from the network, relevant only if is_reference is _true_
path_to_ref: "/nimble/home/haz43975/pypsa-earth-sec/results/092524_test_2/postnetworks/elec_s_11_ec_lv1.0_Co2L_720H_2035_0.071_DE_0export.nc" # Path to the reference case network for additionality calculation, relevant only if additionality is _true_ and is_reference is _false_
path_to_ref: "/scratch/htc/cschauss/BRIGHT/submodules/pypsa-earth-sec/results/241023_constant_delivery/postnetworks/elec_s_11_ec_lv1.0_Co2L_3H_2035_0.071_DE_0export.nc" # Path to the reference case network for additionality calculation, relevant only if additionality is _true_ and is_reference is _false_
limit_SMR_dispatch: true # Limits the dispatch of SMR to the reference case
re_country_load: false # Set to "True" to force the RE electricity to be equal to the electricity required for hydrogen export and the country electricity load. "False" excludes the country electricity load from the constraint.

Expand Down Expand Up @@ -69,6 +69,7 @@ export:
store: false # [True, False] # specifies wether an export store to balance demand is implemented
store_capital_costs: "no_costs" # ["standard_costs", "no_costs"] # specifies the costs of the export store. "standard_costs" takes CAPEX of "hydrogen storage tank type 1 including compressor"
export_profile: "constant" # use "ship" or "constant"
constant_nodal_export: True
ship:
ship_capacity: 0.4 # TWh # 0.05 TWh for new ones, 0.003 TWh for Susio Frontier, 0.4 TWh according to Hampp2021: "Corresponds to 11360 t H2 (l) with LHV of 33.3333 Mwh/t_H2. Cihlar et al 2020 based on IEA 2019, Table 3-B"
travel_time: 288 # hours # From Agadir to Rotterdam and back (12*24)
Expand Down
4 changes: 2 additions & 2 deletions config.bright_DE_ref.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ summary_dir: results/
costs_dir: data/ #TODO change to the equivalent of technology data

run:
name: 092524_test_2
name: 241023_constant_delivery
name_subworkflow: "" # scenario name of the pypsa-earth subworkflow
shared_cutouts: true # set to true to share the default cutout(s) across runs
# Note: value false requires build_cutout to be enabled
Expand All @@ -28,7 +28,7 @@ scenario:
opts:
- "Co2L"
sopts:
- "720H"
- "3H"
demand:
- "DE" # BI/DE/GH

Expand Down
7 changes: 4 additions & 3 deletions config.bright_GH.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ summary_dir: results/
costs_dir: data/ #TODO change to the equivalent of technology data

run:
name: U_GH_AdaptedScenario_2
name: 241023_constant_delivery
name_subworkflow: "" # scenario name of the pypsa-earth subworkflow
shared_cutouts: true # set to true to share the default cutout(s) across runs
# Note: value false requires build_cutout to be enabled
Expand All @@ -28,7 +28,7 @@ scenario:
opts:
- "Co2L"
sopts:
- "720H"
- "3H"
demand:
- "GH" # BI/DE/GH

Expand All @@ -40,7 +40,7 @@ policy_config:
allowed_excess: 1.0
is_reference: false # Whether or not this network is a reference case network, relevant only if additionality is _true_
remove_h2_load: false #Whether or not to remove the h2 load from the network, relevant only if is_reference is _true_
path_to_ref: "/nimble/home/haz43975/pypsa-earth-sec/results/U_GH_AdaptedScenario_2/postnetworks/elec_s_11_ec_lv1.0_Co2L_720H_2035_0.071_GH_0export.nc" # Path to the reference case network for additionality calculation, relevant only if additionality is _true_ and is_reference is _false_
path_to_ref: "/scratch/htc/cschauss/BRIGHT/submodules/pypsa-earth-sec/results/241023_constant_delivery/postnetworks/elec_s_11_ec_lv1.0_Co2L_3H_2035_0.071_GH_0export.nc" # Path to the reference case network for additionality calculation, relevant only if additionality is _true_ and is_reference is _false_
limit_SMR_dispatch: true # Limits the dispatch of SMR to the reference case
re_country_load: false # Set to "True" to force the RE electricity to be equal to the electricity required for hydrogen export and the country electricity load. "False" excludes the country electricity load from the constraint.

Expand Down Expand Up @@ -69,6 +69,7 @@ export:
store: false # [True, False] # specifies wether an export store to balance demand is implemented
store_capital_costs: "no_costs" # ["standard_costs", "no_costs"] # specifies the costs of the export store. "standard_costs" takes CAPEX of "hydrogen storage tank type 1 including compressor"
export_profile: "constant" # use "ship" or "constant"
constant_nodal_export: True
ship:
ship_capacity: 0.4 # TWh # 0.05 TWh for new ones, 0.003 TWh for Susio Frontier, 0.4 TWh according to Hampp2021: "Corresponds to 11360 t H2 (l) with LHV of 33.3333 Mwh/t_H2. Cihlar et al 2020 based on IEA 2019, Table 3-B"
travel_time: 288 # hours # From Agadir to Rotterdam and back (12*24)
Expand Down
4 changes: 2 additions & 2 deletions config.bright_GH_ref.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ summary_dir: results/
costs_dir: data/ #TODO change to the equivalent of technology data

run:
name: U_GH_AdaptedScenario_2
name: 241023_constant_delivery
name_subworkflow: "" # scenario name of the pypsa-earth subworkflow
shared_cutouts: true # set to true to share the default cutout(s) across runs
# Note: value false requires build_cutout to be enabled
Expand All @@ -28,7 +28,7 @@ scenario:
opts:
- "Co2L"
sopts:
- "720H"
- "3H"
demand:
- "GH" # BI/DE/GH

Expand Down
2 changes: 2 additions & 0 deletions scripts/add_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ def add_export(n, hydrogen_buses_ports, export_profile):
bus1="H2 export bus",
p_nom_extendable=True,
)
if snakemake.params.constant_nodal_export:
n.links.loc[n.links.index.str.contains("export"), "p_min_pu"] = 1

export_links = n.links[n.links.index.str.contains("export")]
logger.info(export_links)
Expand Down
9 changes: 9 additions & 0 deletions submit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@

micromamba activate pypsa-earth

cp config.bright_BI_ref.yaml config.yaml
snakemake --profile slurm all

cp config.bright_BI.yaml config.yaml
snakemake --profile slurm all

cp config.bright_DE_ref.yaml config.yaml
snakemake --profile slurm all

cp config.bright_DE.yaml config.yaml
snakemake --profile slurm all

cp config.bright_GH_ref.yaml config.yaml
snakemake --profile slurm all

cp config.bright_GH.yaml config.yaml
snakemake --profile slurm all

Expand Down

0 comments on commit 777024f

Please sign in to comment.