first fixes for CI

This commit is contained in:
lisazeyen 2023-08-30 15:57:47 +02:00
parent 9d8dd81958
commit c0152c25a4
4 changed files with 31 additions and 16 deletions

View File

@ -26,7 +26,7 @@ run:
shared_cutouts: true
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#foresight
foresight: perfect
foresight: overnight
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#scenario
# Wildcard docs in https://pypsa-eur.readthedocs.io/en/latest/wildcards.html
@ -34,22 +34,21 @@ scenario:
simpl:
- ''
ll:
- v1.0
- v1.5
clusters:
- 37
- 128
# - 256
# - 512
#- 1024
- 256
- 512
- 1024
opts:
- ''
sector_opts:
- Co2L0-3H-T-H-B-I-A-solar+p3-dist1
planning_horizons:
- 2020
- 2030
- 2040
# - 2020
# - 2030
# - 2040
- 2050
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#countries
@ -493,6 +492,20 @@ sector:
OCGT: gas
biomass_to_liquid: false
biosng: false
limit_max_growth:
enable: false
# allowing 30% larger than max historic growth
factor: 1.3
max_growth: # unit GW
onwind: 16 # onshore max grow so far 16 GW in Europe https://www.iea.org/reports/renewables-2020/wind
solar: 28 # solar max grow so far 28 GW in Europe https://www.iea.org/reports/renewables-2020/solar-pv
offwind-ac: 35 # offshore max grow so far 3.5 GW in Europe https://windeurope.org/about-wind/statistics/offshore/european-offshore-wind-industry-key-trends-statistics-2019/
offwind-dc: 35
max_relative_growth:
onwind: 3
solar: 3
offwind-ac: 3
offwind-dc: 3
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#industry
industry:
@ -545,6 +558,7 @@ industry:
hotmaps_locate_missing: false
reference_year: 2015
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#costs
costs:
year: 2030

View File

@ -14,13 +14,12 @@ foresight: perfect
scenario:
ll:
- v1.5
- v1.0
clusters:
- 5
sector_opts:
- 8760H-T-H-B-I-A-solar+p3-dist1
planning_horizons:
- 2020
- 2030
- 2040
- 2050
@ -65,6 +64,7 @@ renewable:
industry:
St_primary_fraction:
2020: 0.8
2030: 0.6
2040: 0.5
2050: 0.4

View File

@ -113,6 +113,7 @@ rule solve_sector_network_perfect:
params:
solving=config["solving"],
foresight=config["foresight"],
sector=config["sector"],
planning_horizons=config["scenario"]["planning_horizons"],
co2_sequestration_potential=config["sector"].get(
"co2_sequestration_potential", 200

View File

@ -270,7 +270,7 @@ def add_max_growth(n, config):
Add maximum growth rates for different carriers.
"""
opts = config["sector"]["limit_max_growth"]
opts = snakemake.params["sector"]["limit_max_growth"]
# take maximum yearly difference between investment periods since historic growth is per year
factor = n.investment_period_weightings.years.max() * opts["factor"]
for carrier in opts["max_growth"].keys():
@ -396,7 +396,7 @@ def prepare_network(
if foresight == "perfect":
n = add_land_use_constraint_perfect(n)
if config["sector"]["limit_max_growth"]["enable"]:
if snakemake.params["sector"]["limit_max_growth"]["enable"]:
n = add_max_growth(n, config)
if n.stores.carrier.eq("co2 stored").any():
@ -859,12 +859,12 @@ if __name__ == "__main__":
snakemake = mock_snakemake(
"solve_sector_network_perfect",
configfiles="config/config.perfect.yaml",
configfiles="../config/test/config.perfect.yaml",
simpl="",
opts="",
clusters="37",
ll="v1.0",
sector_opts="2p0-4380H-T-H-B-I-A-solar+p3-dist1",
clusters="5",
ll="v1.5",
sector_opts="8760H-T-H-B-I-A-solar+p3-dist1",
planning_horizons="2030",
)
configure_logging(snakemake)