Configuration¶
PyPSA-Eur has several configuration options which are documented in this section and are collected in a config.yaml
file located in the root directory. Users should copy the provided default configuration (config.default.yaml
) and amend their own modifications and assumptions in the user-specific configuration file (config.yaml
); confer installation instructions at Set Up the Default Configuration.
Top-level configuration¶
version: 0.6.1
tutorial: false
logging:
level: INFO
format: '%(levelname)s:%(name)s:%(message)s'
run:
clusters: [37, 128, 256, 512, 1024]
prepare_links_p_nom: false
retrieve_databundle: true
retrieve_cost_data: true
build_cutout: false
retrieve_cutout: true
build_natura_raster: false
retrieve_natura_raster: true
custom_busmap: false
Unit | Values | Description | |
---|---|---|---|
version | – | 0.x.x | Version of PyPSA-Eur |
tutorial | bool | {true, false} | Switch to retrieve the tutorial data set instead of the full data set. |
logging | |||
– level | – | Any of {‘INFO’, ‘WARNING’, ‘ERROR’} | Restrict console outputs to all infos, warning or errors only |
– format | – | Custom format for log messages. See LogRecord attributes. | |
summary_dir | – | e.g. ‘results’ | Directory into which results are written. |
countries | – | Subset of {‘AL’, ‘AT’, ‘BA’, ‘BE’, ‘BG’, ‘CH’, ‘CZ’, ‘DE’, ‘DK’, ‘EE’, ‘ES’, ‘FI’, ‘FR’, ‘GB’, ‘GR’, ‘HR’, ‘HU’, ‘IE’, ‘IT’, ‘LT’, ‘LU’, ‘LV’, ‘ME’, ‘MK’, ‘NL’, ‘NO’, ‘PL’, ‘PT’, ‘RO’, ‘RS’, ‘SE’, ‘SI’, ‘SK’} | European countries defined by their Two-letter country codes (ISO 3166-1) which should be included in the energy system model. |
focus_weights | – | Keys should be two-digit country codes (e.g. DE) and values should range between 0 and 1 | Ratio of total clusters for particular countries. the remaining weight is distributed according to mean load. An example: focus_weights: 'DE': 0.6 'FR': 0.2 . |
enable | |||
– prepare_links_p_nom | bool | {true, false} | Switch to retrieve current HVDC projects from Wikipedia |
– retrieve_databundle | bool | {true, false} | Switch to retrieve databundle from zenodo via the rule retrieve_databundle or whether to keep a custom databundle located in the corresponding folder. |
– build_cutout | bool | {true, false} | Switch to enable the building of cutouts via the rule build_cutout . |
– retrieve_cutout | bool | {true, false} | Switch to enable the retrieval of cutouts from zenodo with retrieve_cutout . |
– build_natura_raster | bool | {true, false} | Switch to enable the creation of the raster natura.tiff via the rule build_natura_raster . |
– retrieve_natura_raster | bool | {true, false} | Switch to enable the retrieval of natura.tiff from zenodo with retrieve_natura_raster . |
– custom_busmap | bool | {true, false} | Switch to enable the use of custom busmaps in rule cluster_network . If activated the rule looks for provided busmaps at data/custom_busmap_elec_s{simpl}_{clusters}.csv which should have the same format as resources/busmap_elec_s{simpl}_{clusters}.csv , i.e. the index should contain the buses of networks/elec_s{simpl}.nc . |
run
¶
It is common conduct to analyse energy system optimisation models for multiple scenarios for a variety of reasons, e.g. assessing their sensitivity towards changing the temporal and/or geographical resolution or investigating how investment changes as more ambitious greenhouse-gas emission reduction targets are applied.
The run
section is used for running and storing scenarios with different configurations which are not covered by Wildcards. It determines the path at which resources, networks and results are stored. Therefore the user can run different configurations within the same directory. If a run with a non-empty name should use cutouts shared across runs, set shared_cutouts
to true.
run:
name: "" # use this to keep track of runs with different settings
shared_cutouts: false # set to true to share the default cutout(s) across runs
scenario
¶
The scenario
section is an extraordinary section of the config file
that is strongly connected to the Wildcards and is designed to
facilitate running multiple scenarios through a single command
snakemake -j 1 solve_all_networks
For each wildcard, a list of values is provided. The rule solve_all_networks
will trigger the rules for creating results/networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc
for all combinations of the provided wildcard values as defined by Python’s itertools.product(…) function that snakemake’s expand(…) function uses.
An exemplary dependency graph (starting from the simplification rules) then looks like this:

scenario:
simpl: ['']
ll: ['copt']
clusters: [37, 128, 256, 512, 1024]
opts: [Co2L-3H]
Unit | Values | Description | |
---|---|---|---|
simpl | – | cf. The {simpl} wildcard | List of {simpl} wildcards to run. |
clusters | – | cf. The {clusters} wildcard | List of {clusters} wildcards to run. |
ll | – | cf. The {ll} wildcard | List of {ll} wildcards to run. |
opts | – | cf. The {opts} wildcard | List of {opts} wildcards to run. |
snapshots
¶
Specifies the temporal range to build an energy system model for as arguments to pandas.date_range
snapshots:
start: "2013-01-01"
end: "2014-01-01"
closed: 'left' # end is not inclusive
Unit | Values | Description | |
---|---|---|---|
start | – | str or datetime-like; e.g. YYYY-MM-DD | Left bound of date range |
end | – | str or datetime-like; e.g. YYYY-MM-DD | Right bound of date range |
closed | – | One of {None, ‘left’, ‘right’} | Make the time interval closed to the left , right , or open on both sides None . |
electricity
¶
electricity:
voltages: [220., 300., 380.]
gaslimit: false # global gas usage limit of X MWh_th
co2limit: 7.75e+7 # 0.05 * 3.1e9*0.5
co2base: 1.487e+9
agg_p_nom_limits: data/agg_p_nom_minmax.csv
operational_reserve: # like https://genxproject.github.io/GenX/dev/core/#Reserves
activate: false
epsilon_load: 0.02 # share of total load
epsilon_vres: 0.02 # share of total renewable supply
contingency: 4000 # fixed capacity in MW
max_hours:
battery: 6
H2: 168
extendable_carriers:
Generator: [solar, onwind, offwind-ac, offwind-dc, OCGT]
StorageUnit: [] # battery, H2
Store: [battery, H2]
Link: [] # H2 pipeline
# use pandas query strings here, e.g. Country not in ['Germany']
powerplants_filter: (DateOut >= 2022 or DateOut != DateOut)
# use pandas query strings here, e.g. Country in ['Germany']
custom_powerplants: false
conventional_carriers: [nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass]
renewable_carriers: [solar, onwind, offwind-ac, offwind-dc, hydro]
estimate_renewable_capacities:
enable: true
# Add capacities from OPSD data
from_opsd: true
# Renewable capacities are based on existing capacities reported by IRENA
year: 2020
# Artificially limit maximum capacities to factor * (IRENA capacities),
# i.e. 110% of <years>'s capacities => expansion_limit: 1.1
# false: Use estimated renewable potentials determine by the workflow
expansion_limit: false
technology_mapping:
# Wind is the Fueltype in powerplantmatching, onwind, offwind-{ac,dc} the carrier in PyPSA-Eur
Offshore: [offwind-ac, offwind-dc]
Onshore: [onwind]
PV: [solar]
Unit | Values | Description | |
---|---|---|---|
voltages | kV | Any subset of {220., 300., 380.} | Voltage levels to consider |
gaslimit | MWhth | float or false | Global gas usage limit |
co2limit | \(t_{CO_2-eq}/a\) | float | Cap on total annual system carbon dioxide emissions |
co2base | \(t_{CO_2-eq}/a\) | float | Reference value of total annual system carbon dioxide emissions if relative emission reduction target is specified in {opts} wildcard. |
agg_p_nom_limits | file | path | Reference to .csv file specifying per carrier generator nominal capacity constraints for individual countries if 'CCL' is in {opts} wildcard. Defaults to data/agg_p_nom_minmax.csv . |
operational_reserve | Settings for reserve requirements following like GenX | ||
– activate | bool | true or false | Whether to take operational reserve requirements into account during optimisation |
– epsilon_load | – | float | share of total load |
– epsilon_vres | – | float | share of total renewable supply |
– contingency | MW | float | fixed reserve capacity |
max_hours | |||
– battery | h | float | Maximum state of charge capacity of the battery in terms of hours at full output capacity p_nom . Cf. PyPSA documentation. |
– H2 | h | float | Maximum state of charge capacity of the hydrogen storage in terms of hours at full output capacity p_nom . Cf. PyPSA documentation. |
extendable_carriers | |||
– Generator | – | Any extendable carrier | Defines existing or non-existing conventional and renewable power plants to be extendable during the optimization. Conventional generators can only be built/expanded where already existent today. If a listed conventional carrier is not included in the conventional_carriers list, the lower limit of the capacity expansion is set to 0. |
– StorageUnit | – | Any subset of {‘battery’,’H2’} | Adds extendable storage units (battery and/or hydrogen) at every node/bus after clustering without capacity limits and with zero initial capacity. |
– Store | – | Any subset of {‘battery’,’H2’} | Adds extendable storage units (battery and/or hydrogen) at every node/bus after clustering without capacity limits and with zero initial capacity. |
– Link | – | Any subset of {‘H2 pipeline’} | Adds extendable links (H2 pipelines only) at every connection where there are lines or HVDC links without capacity limits and with zero initial capacity. Hydrogen pipelines require hydrogen storage to be modelled as Store . |
powerplants_filter | – | use pandas.query strings here, e.g. Country not in [‘Germany’] | Filter query for the default powerplant database. |
custom_powerplants | – | use pandas.query strings here, e.g. Country in [‘Germany’] | Filter query for the custom powerplant database. |
conventional_carriers | – | Any subset of {nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass} | List of conventional power plants to include in the model from resources/powerplants.csv . If an included carrier is also listed in extendable_carriers, the capacity is taken as a lower bound. |
renewable_carriers | – | Any subset of {solar, onwind, offwind-ac, offwind-dc, hydro} | List of renewable generators to include in the model. |
estimate_renewable_capacities | |||
– enable | bool | Activate routine to estimate renewable capacities | |
– from_opsd | – | bool | Add capacities from OPSD data |
– year | – | bool | Renewable capacities are based on existing capacities reported by IRENA for the specified year |
– expansion_limit | – | float or false | Artificially limit maximum capacities to factor * (IRENA capacities), i.e. 110% of <years>’s capacities => expansion_limit: 1.1 false: Use estimated renewable potentials determine by the workflow |
– technology_mapping | Mapping between powerplantmatching and PyPSA-Eur technology names |
atlite
¶
Define and specify the atlite.Cutout
used for calculating renewable potentials and time-series. All options except for features
are directly used as cutout parameters.
atlite:
nprocesses: 4
show_progress: false # false saves time
cutouts:
# use 'base' to determine geographical bounds and time span from config
# base:
# module: era5
europe-2013-era5:
module: era5 # in priority order
x: [-12., 35.]
y: [33., 72]
dx: 0.3
dy: 0.3
time: ['2013', '2013']
europe-2013-sarah:
module: [sarah, era5] # in priority order
x: [-12., 45.]
y: [33., 65]
dx: 0.2
dy: 0.2
time: ['2013', '2013']
sarah_interpolate: false
sarah_dir:
features: [influx, temperature]
Unit | Values | Description | |
---|---|---|---|
nprocesses | – | int | Number of parallel processes in cutout preparation |
cutouts | |||
– {name} | – | Convention is to name cutouts like <region>-<year>-<source> (e.g. europe-2013-era5 ). |
Name of the cutout netcdf file. The user may specify multiple cutouts under configuration atlite: cutouts: . Reference is used in configuration renewable: {technology}: cutout: . The cutout base may be used to automatically calculate temporal and spatial bounds of the network. |
– – module | – | Subset of {‘era5’,’sarah’} | Source of the reanalysis weather dataset (e.g. ERA5 or SARAH-2) |
– – x | ° | Float interval within [-180, 180] | Range of longitudes to download weather data for. If not defined, it defaults to the spatial bounds of all bus shapes. |
– – y | ° | Float interval within [-90, 90] | Range of latitudes to download weather data for. If not defined, it defaults to the spatial bounds of all bus shapes. |
– – time | Time interval within [‘1979’, ‘2018’] (with valid pandas date time strings) | Time span to download weather data for. If not defined, it defaults to the time interval spanned by the snapshots. | |
– – features | String or list of strings with valid cutout features (‘inlfux’, ‘wind’). | When freshly building a cutout, retrieve data only for those features. If not defined, it defaults to all available features. |
renewable
¶
onwind
¶
renewable:
onwind:
cutout: europe-2013-era5
resource:
method: wind
turbine: Vestas_V112_3MW
capacity_per_sqkm: 3 # ScholzPhd Tab 4.3.1: 10MW/km^2 and assuming 30% fraction of the already restricted
# area is available for installation of wind generators due to competing land use and likely public
# acceptance issues.
# correction_factor: 0.93
corine:
# Scholz, Y. (2012). Renewable energy based electricity supply at low costs:
# development of the REMix model and application for Europe. ( p.42 / p.28)
grid_codes: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32]
distance: 1000
distance_grid_codes: [1, 2, 3, 4, 5, 6]
natura: true
excluder_resolution: 100
potential: simple # or conservative
clip_p_max_pu: 1.e-2
Unit | Values | Description | |
---|---|---|---|
cutout | – | Should be a folder listed in the configuration atlite: cutouts: (e.g. ‘europe-2013-era5’) or reference an existing folder in the directory cutouts . Source module must be ERA5. |
Specifies the directory where the relevant weather data ist stored. |
resource | |||
– method | – | Must be ‘wind’ | A superordinate technology type. |
– turbine | – | One of turbine types included in atlite | Specifies the turbine type and its characteristic power curve. |
capacity_per_sqkm | \(MW/km^2\) | float | Allowable density of wind turbine placement. |
corine | |||
– grid_codes | – | Any subset of the CORINE Land Cover code list | Specifies areas according to CORINE Land Cover codes which are generally eligible for wind turbine placement. |
– distance | m | float | Distance to keep from areas specified in distance_grid_codes |
– distance_grid_codes | – | Any subset of the CORINE Land Cover code list | Specifies areas according to CORINE Land Cover codes to which wind turbines must maintain a distance specified in the setting distance . |
natura | bool | {true, false} | Switch to exclude Natura 2000 natural protection areas. Area is excluded if true . |
potential | – | One of {‘simple’, ‘conservative’} | Method to compute the maximal installable potential for a node; confer Rule build_renewable_profiles |
clip_p_max_pu | p.u. | float | To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero. |
offwind-ac
¶
offwind-ac:
cutout: europe-2013-era5
resource:
method: wind
turbine: NREL_ReferenceTurbine_5MW_offshore
capacity_per_sqkm: 2 # ScholzPhd Tab 4.3.1: 10MW/km^2 and assuming 20% fraction of the already restricted
# area is available for installation of wind generators due to competing land use and likely public
# acceptance issues.
correction_factor: 0.8855
# proxy for wake losses
# from 10.1016/j.energy.2018.08.153
# until done more rigorously in #153
corine: [44, 255]
natura: true
ship_threshold: 400
max_depth: 50
max_shore_distance: 30000
excluder_resolution: 200
potential: simple # or conservative
clip_p_max_pu: 1.e-2
Unit | Values | Description | |
---|---|---|---|
cutout | – | Should be a folder listed in the configuration atlite: cutouts: (e.g. ‘europe-2013-era5’) or reference an existing folder in the directory cutouts . Source module must be ERA5. |
Specifies the directory where the relevant weather data ist stored. |
resource | |||
– method | – | Must be ‘wind’ | A superordinate technology type. |
– turbine | – | One of turbine types included in atlite | Specifies the turbine type and its characteristic power curve. |
capacity_per_sqkm | \(MW/km^2\) | float | Allowable density of wind turbine placement. |
corine | – | Any realistic subset of the CORINE Land Cover code list | Specifies areas according to CORINE Land Cover codes which are generally eligible for AC-connected offshore wind turbine placement. |
natura | bool | {true, false} | Switch to exclude Natura 2000 natural protection areas. Area is excluded if true . |
ship_threshold | – | float | Ship density threshold from which areas are excluded. |
max_depth | m | float | Maximum sea water depth at which wind turbines can be build. Maritime areas with deeper waters are excluded in the process of calculating the AC-connected offshore wind potential. |
min_shore_distance | m | float | Minimum distance to the shore below which wind turbines cannot be build. Such areas close to the shore are excluded in the process of calculating the AC-connected offshore wind potential. |
potential | – | One of {‘simple’, ‘conservative’} | Method to compute the maximal installable potential for a node; confer Rule build_renewable_profiles |
clip_p_max_pu | p.u. | float | To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero. |
offwind-dc
¶
offwind-dc:
cutout: europe-2013-era5
resource:
method: wind
turbine: NREL_ReferenceTurbine_5MW_offshore
capacity_per_sqkm: 2 # ScholzPhd Tab 4.3.1: 10MW/km^2 and assuming 20% fraction of the already restricted
# area is available for installation of wind generators due to competing land use and likely public
# acceptance issues.
correction_factor: 0.8855
# proxy for wake losses
# from 10.1016/j.energy.2018.08.153
# until done more rigorously in #153
corine: [44, 255]
natura: true
ship_threshold: 400
max_depth: 50
min_shore_distance: 30000
excluder_resolution: 200
potential: simple # or conservative
clip_p_max_pu: 1.e-2
Unit | Values | Description | |
---|---|---|---|
cutout | – | Should be a folder listed in the configuration atlite: cutouts: (e.g. ‘europe-2013-era5’) or reference an existing folder in the directory cutouts . Source module must be ERA5. |
Specifies the directory where the relevant weather data ist stored. |
resource | |||
– method | – | Must be ‘wind’ | A superordinate technology type. |
– turbine | – | One of turbine types included in atlite | Specifies the turbine type and its characteristic power curve. |
capacity_per_sqkm | \(MW/km^2\) | float | Allowable density of wind turbine placement. |
corine | – | Any realistic subset of the CORINE Land Cover code list | Specifies areas according to CORINE Land Cover codes which are generally eligible for AC-connected offshore wind turbine placement. |
natura | bool | {true, false} | Switch to exclude Natura 2000 natural protection areas. Area is excluded if true . |
ship_threshold | – | float | Ship density threshold from which areas are excluded. |
max_depth | m | float | Maximum sea water depth at which wind turbines can be build. Maritime areas with deeper waters are excluded in the process of calculating the AC-connected offshore wind potential. |
min_shore_distance | m | float | Minimum distance to the shore below which wind turbines cannot be build. Such areas close to the shore are excluded in the process of calculating the AC-connected offshore wind potential. |
potential | – | One of {‘simple’, ‘conservative’} | Method to compute the maximal installable potential for a node; confer Rule build_renewable_profiles |
clip_p_max_pu | p.u. | float | To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero. |
solar
¶
solar:
cutout: europe-2013-sarah
resource:
method: pv
panel: CSi
orientation:
slope: 35.
azimuth: 180.
capacity_per_sqkm: 1.7 # ScholzPhd Tab 4.3.1: 170 MW/km^2 and assuming 1% of the area can be used for solar PV panels
# Correction factor determined by comparing uncorrected area-weighted full-load hours to those
# published in Supplementary Data to
# Pietzcker, Robert Carl, et al. "Using the sun to decarbonize the power
# sector: The economic potential of photovoltaics and concentrating solar
# power." Applied Energy 135 (2014): 704-720.
# This correction factor of 0.854337 may be in order if using reanalysis data.
# for discussion refer to https://github.com/PyPSA/pypsa-eur/pull/304
# correction_factor: 0.854337
corine: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 26, 31, 32]
natura: true
excluder_resolution: 100
potential: simple # or conservative
clip_p_max_pu: 1.e-2
Unit | Values | Description | |
---|---|---|---|
cutout | – | Should be a folder listed in the configuration atlite: cutouts: (e.g. ‘europe-2013-era5’) or reference an existing folder in the directory cutouts . Source module can be ERA5 or SARAH-2. |
Specifies the directory where the relevant weather data ist stored that is specified at atlite/cutouts configuration. Both sarah and era5 work. |
resource | |||
– method | – | Must be ‘pv’ | A superordinate technology type. |
– panel | – | One of {‘Csi’, ‘CdTe’, ‘KANENA’} as defined in atlite | Specifies the solar panel technology and its characteristic attributes. |
– orientation | |||
– – slope | ° | Realistically any angle in [0., 90.] | Specifies the tilt angle (or slope) of the solar panel. A slope of zero corresponds to the face of the panel aiming directly overhead. A positive tilt angle steers the panel towards the equator. |
– – azimuth | ° | Any angle in [0., 360.] | Specifies the azimuth orientation of the solar panel. South corresponds to 180.°. |
capacity_per_sqkm | \(MW/km^2\) | float | Allowable density of solar panel placement. |
correction_factor | – | float | A correction factor for the capacity factor (availability) time series. |
corine | – | Any subset of the CORINE Land Cover code list | Specifies areas according to CORINE Land Cover codes which are generally eligible for solar panel placement. |
natura | bool | {true, false} | Switch to exclude Natura 2000 natural protection areas. Area is excluded if true . |
potential | – | One of {‘simple’, ‘conservative’} | Method to compute the maximal installable potential for a node; confer Rule build_renewable_profiles |
clip_p_max_pu | p.u. | float | To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero. |
hydro
¶
hydro:
cutout: europe-2013-era5
carriers: [ror, PHS, hydro]
PHS_max_hours: 6
hydro_max_hours: "energy_capacity_totals_by_country" # one of energy_capacity_totals_by_country, estimate_by_large_installations or a float
clip_min_inflow: 1.0
Unit | Values | Description | |
---|---|---|---|
cutout | – | Must be ‘europe-2013-era5’ | Specifies the directory where the relevant weather data ist stored. |
carriers | – | Any subset of {‘ror’, ‘PHS’, ‘hydro’} | Specifies the types of hydro power plants to build per-unit availability time series for. ‘ror’ stands for run-of-river plants, ‘PHS’ represents pumped-hydro storage, and ‘hydro’ stands for hydroelectric dams. |
PHS_max_hours | h | float | Maximum state of charge capacity of the pumped-hydro storage (PHS) in terms of hours at full output capacity p_nom . Cf. PyPSA documentation. |
hydro_max_hours | h | Any of {float, ‘energy_capacity_totals_by_country’, ‘estimate_by_large_installations’} | Maximum state of charge capacity of the pumped-hydro storage (PHS) in terms of hours at full output capacity p_nom or heuristically determined. Cf. PyPSA documentation. |
clip_min_inflow | MW | float | To avoid too small values in the inflow time series, values below this threshold are set to zero. |
conventional
¶
Define additional generator attribute for conventional carrier types. If a scalar value is given it is applied to all generators. However if a string starting with “data/” is given, the value is interpreted as a path to a csv file with country specific values. Then, the values are read in and applied to all generators of the given carrier in the given country. Note that the value(s) overwrite the existing values in the corresponding section of the generators
dataframe.
conventional:
nuclear:
p_max_pu: "data/nuclear_p_max_pu.csv" # float of file name
lines
¶
lines:
types:
220.: "Al/St 240/40 2-bundle 220.0"
300.: "Al/St 240/40 3-bundle 300.0"
380.: "Al/St 240/40 4-bundle 380.0"
s_max_pu: 0.7
s_nom_max: .inf
length_factor: 1.25
under_construction: 'zero' # 'zero': set capacity to zero, 'remove': remove, 'keep': with full capacity
Unit | Values | Description | |
---|---|---|---|
types | – | Values should specify a line type in PyPSA. Keys should specify the corresponding voltage level (e.g. 220., 300. and 380. kV) | Specifies line types to assume for the different voltage levels of the ENTSO-E grid extraction. Should normally handle voltage levels 220, 300, and 380 kV |
s_max_pu | – | Value in [0.,1.] | Correction factor for line capacities (s_nom ) to approximate \(N-1\) security and reserve capacity for reactive power flows |
s_nom_max | MW | float | Global upper limit for the maximum capacity of each extendable line. |
length_factor | – | float | Correction factor to account for the fact that buses are not connected by lines through air-line distance. |
under_construction | – | One of {‘zero’: set capacity to zero, ‘remove’: remove completely, ‘keep’: keep with full capacity} | Specifies how to handle lines which are currently under construction. |
links
¶
links:
p_max_pu: 1.0
p_nom_max: .inf
include_tyndp: true
under_construction: 'zero' # 'zero': set capacity to zero, 'remove': remove, 'keep': with full capacity
Unit | Values | Description | |
---|---|---|---|
p_max_pu | – | Value in [0.,1.] | Correction factor for link capacities p_nom . |
p_nom_max | MW | float | Global upper limit for the maximum capacity of each extendable DC link. |
include_tyndp | bool | {‘true’, ‘false’} | Specifies whether to add HVDC link projects from the TYNDP 2018 which are at least in permitting. |
under_construction | – | One of {‘zero’: set capacity to zero, ‘remove’: remove completely, ‘keep’: keep with full capacity} | Specifies how to handle lines which are currently under construction. |
transformers
¶
transformers:
x: 0.1
s_nom: 2000.
type: ''
Unit | Values | Description | |
---|---|---|---|
x | p.u. | float | Series reactance (per unit, using s_nom as base power of the transformer. Overwritten if type is specified. |
s_nom | MVA | float | Limit of apparent power which can pass through branch. Overwritten if type is specified. |
type | – | A transformer type in PyPSA. | Specifies transformer types to assume for the transformers of the ENTSO-E grid extraction. |
load
¶
s_nom_max: .inf
length_factor: 1.25
under_construction: 'zero' # 'zero': set capacity to zero, 'remove': remove, 'keep': with full capacity
links:
p_max_pu: 1.0
Unit | Values | Description | |
---|---|---|---|
url | – | string | Link to open power system data time series data. |
power_statistics | bool | {true, false} | Whether to load the electricity consumption data of the ENTSOE power statistics (only for files from 2019 and before) or from the ENTSOE transparency data (only has load data from 2015 onwards). |
interpolate_limit | hours | integer | Maximum gap size (consecutive nans) which interpolated linearly. |
time_shift_for_large_gaps | string | string | Periods which are used for copying time-slices in order to fill large gaps of nans. Have to be valid pandas period strings. |
manual_adjustments | bool | {true, false} | Whether to adjust the load data manually according to the function in manual_adjustment() . |
scaling_factor | – | float | Global correction factor for the load time series. |
costs
¶
costs:
year: 2030
version: v0.4.0
rooftop_share: 0.14 # based on the potentials, assuming (0.1 kW/m2 and 10 m2/person)
fill_values:
FOM: 0
VOM: 0
efficiency: 1
fuel: 0
investment: 0
lifetime: 25
"CO2 intensity": 0
"discount rate": 0.07
marginal_cost:
solar: 0.01
onwind: 0.015
offwind: 0.015
hydro: 0.
H2: 0.
electrolysis: 0.
fuel cell: 0.
battery: 0.
battery inverter: 0.
emission_prices: # in currency per tonne emission, only used with the option Ep
co2: 0.
Unit | Values | Description | |
---|---|---|---|
year | – | YYYY; e.g. ‘2030’ | Year for which to retrieve cost assumptions of resources/costs.csv . |
version | – | vX.X.X; e.g. ‘v0.1.0’ | Version of technology-data repository to use. |
rooftop_share | – | float | Share of rooftop PV when calculating capital cost of solar (joint rooftop and utility-scale PV). |
fill_values | – | float | Default values if not specified for a technology in resources/costs.csv . |
capital_cost | EUR/MW | Keys should be in the ‘technology’ column of resources/costs.csv . Values can be any float. |
For the given technologies, assumptions about their capital investment costs are set to the corresponding value. Optional; overwrites cost assumptions from resources/costs.csv . |
marginal_cost | EUR/MWh | Keys should be in the ‘technology’ column of resources/costs.csv . Values can be any float. |
For the given technologies, assumptions about their marginal operating costs are set to the corresponding value. Optional; overwrites cost assumptions from resources/costs.csv . |
emission_prices | Specify exogenous prices for emission types listed in network.carriers to marginal costs. |
||
– co2 | EUR/t | float | Exogenous price of carbon-dioxide added to the marginal costs of fossil-fuelled generators according to their carbon intensity. Added through the keyword Ep in the {opts} wildcard only in the rule prepare_network` . |
Note
To change cost assumptions in more detail (i.e. other than marginal_cost
and capital_cost
), consider modifying cost assumptions directly in resources/costs.csv
as this is not yet supported through the config file.
You can also build multiple different cost databases. Make a renamed copy of resources/costs.csv
(e.g. data/costs-optimistic.csv
) and set the variable COSTS=data/costs-optimistic.csv
in the Snakefile
.
clustering
¶
clustering:
simplify_network:
to_substations: false # network is simplified to nodes with positive or negative power injection (i.e. substations or offwind connections)
algorithm: kmeans # choose from: [hac, kmeans]
feature: solar+onwind-time # only for hac. choose from: [solar+onwind-time, solar+onwind-cap, solar-time, solar-cap, solar+offwind-cap] etc.
exclude_carriers: []
remove_stubs: true
remove_stubs_across_borders: true
cluster_network:
algorithm: kmeans
feature: solar+onwind-time
exclude_carriers: []
aggregation_strategies:
generators:
p_nom_max: sum # use "min" for more conservative assumptions
p_nom_min: sum
p_min_pu: mean
marginal_cost: mean
committable: any
ramp_limit_up: max
ramp_limit_down: max
efficiency: mean
Unit | Values | Description | |
---|---|---|---|
simplify_network | |||
– to_substations | bool | {‘true’,’false’} | Aggregates all nodes without power injection (positive or negative, i.e. demand or generation) to electrically closest ones |
– algorithm | str | One of {‘kmeans’, ‘hac’, ‘modularity‘} | |
– feature | str | Str in the format ‘carrier1+carrier2+…+carrierN-X’, where CarrierI can be from {‘solar’, ‘onwind’, ‘offwind’, ‘ror’} and X is one of {‘cap’, ‘time’}. | |
– exclude_carriers | list | List of Str like [ ‘solar’, ‘onwind’] or empy list [] | List of carriers which will not be aggregated. If empty, all carriers will be aggregated. |
cluster_network | |||
– algorithm | str | One of {‘kmeans’, ‘hac’} | |
– feature | str | Str in the format ‘carrier1+carrier2+…+carrierN-X’, where CarrierI can be from {‘solar’, ‘onwind’, ‘offwind’, ‘ror’} and X is one of {‘cap’, ‘time’}. | |
– exclude_carriers | list | List of Str like [ ‘solar’, ‘onwind’] or empy list [] | List of carriers which will not be aggregated. If empty, all carriers will be aggregated. |
aggregation_strategies | |||
– generators | |||
– – {key} | str | {key} can be any of the component of the generator (str). It’s value can be any that can be converted to pandas.Series using getattr(). For example one of {min, max, sum}. | Aggregates the component according to the given strategy. For example, if sum, then all values within each cluster are summed to represent the new generator. |
– buses | |||
– – {key} | str | {key} can be any of the component of the bus (str). It’s value can be any that can be converted to pandas.Series using getattr(). For example one of {min, max, sum}. | Aggregates the component according to the given strategy. For example, if sum, then all values within each cluster are summed to represent the new bus. |
solving
¶
options
¶
solving:
options:
formulation: kirchhoff
load_shedding: false
noisy_costs: true
min_iterations: 4
max_iterations: 6
clip_p_max_pu: 0.01
skip_iterations: false
track_iterations: false
#nhours: 10
Unit | Values | Description | |
---|---|---|---|
formulation | – | Any of {‘angles’, ‘kirchhoff’, ‘cycles’, ‘ptdf’} | Specifies which variant of linearized power flow formulations to use in the optimisation problem. Recommended is ‘kirchhoff’. Explained in this article. |
load_shedding | bool | {‘true’,’false’} | Add generators with a prohibitively high marginal cost to simulate load shedding and avoid problem infeasibilities. |
noisy_costs | bool | {‘true’,’false’} | Add random noise to marginal cost of generators by \(\mathcal{U}(0.009,0,011)\) and capital cost of lines and links by \(\mathcal{U}(0.09,0,11)\). |
min_iterations | – | int | Minimum number of solving iterations in between which resistance and reactence (x/r ) are updated for branches according to s_nom_opt of the previous run. |
max_iterations | – | int | Maximum number of solving iterations in between which resistance and reactence (x/r ) are updated for branches according to s_nom_opt of the previous run. |
nhours | – | int | Specifies the \(n\) first snapshots to take into account. Must be less than the total number of snapshots. Rather recommended only for debugging. |
clip_p_max_pu | p.u. | float | To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero. |
skip_iterations | bool | {‘true’,’false’} | Skip iterating, do not update impedances of branches. |
track_iterations | bool | {‘true’,’false’} | Flag whether to store the intermediate branch capacities and objective function values are recorded for each iteration in network.lines['s_nom_opt_X'] (where X labels the iteration) |
solver
¶
solver:
name: gurobi
threads: 4
method: 2 # barrier
crossover: 0
BarConvTol: 1.e-5
FeasibilityTol: 1.e-6
AggFill: 0
PreDual: 0
GURO_PAR_BARDENSETHRESH: 200
# solver:
# name: cplex
# threads: 4
# lpmethod: 4 # barrier
# solutiontype: 2 # non basic solution, ie no crossover
# barrier.convergetol: 1.e-5
# feasopt.tolerance: 1.e-6
Unit | Values | Description | |
---|---|---|---|
name | – | One of {‘gurobi’, ‘cplex’, ‘cbc’, ‘glpk’, ‘ipopt’}; potentially more possible | Solver to use for optimisation problems in the workflow; e.g. clustering and linear optimal power flow. |
opts | – | Parameter list for Gurobi and CPLEX | Solver specific parameter settings. |
plotting
¶
plotting:
map:
figsize: [7, 7]
boundaries: [-10.2, 29, 35, 72]
p_nom:
bus_size_factor: 5.e+4
linewidth_factor: 3.e+3
costs_max: 800
costs_threshold: 1
energy_max: 15000.
energy_min: -10000.
energy_threshold: 50.
vre_techs: ["onwind", "offwind-ac", "offwind-dc", "solar", "ror"]
conv_techs: ["OCGT", "CCGT", "Nuclear", "Coal"]
storage_techs: ["hydro+PHS", "battery", "H2"]
load_carriers: ["AC load"]
AC_carriers: ["AC line", "AC transformer"]
link_carriers: ["DC line", "Converter AC-DC"]
tech_colors:
"onwind": "#235ebc"
"onshore wind": "#235ebc"
'offwind': "#6895dd"
'offwind-ac': "#6895dd"
'offshore wind': "#6895dd"
'offshore wind ac': "#6895dd"
'offwind-dc': "#74c6f2"
'offshore wind dc': "#74c6f2"
"hydro": "#08ad97"
"hydro+PHS": "#08ad97"
"PHS": "#08ad97"
"hydro reservoir": "#08ad97"
'hydroelectricity': '#08ad97'
"ror": "#4adbc8"
"run of river": "#4adbc8"
'solar': "#f9d002"
'solar PV': "#f9d002"
'solar thermal': '#ffef60'
'biomass': '#0c6013'
'solid biomass': '#06540d'
'biogas': '#23932d'
'waste': '#68896b'
'geothermal': '#ba91b1'
"OCGT": "#d35050"
"gas": "#d35050"
"natural gas": "#d35050"
"CCGT": "#b20101"
"nuclear": "#ff9000"
"coal": "#707070"
"lignite": "#9e5a01"
"oil": "#262626"
"H2": "#ea048a"
"hydrogen storage": "#ea048a"
"battery": "#b8ea04"
"Electric load": "#f9d002"
"electricity": "#f9d002"
"lines": "#70af1d"
"transmission lines": "#70af1d"
"AC-AC": "#70af1d"
"AC line": "#70af1d"
"links": "#8a1caf"
"HVDC links": "#8a1caf"
"DC-DC": "#8a1caf"
"DC link": "#8a1caf"
nice_names:
OCGT: "Open-Cycle Gas"
CCGT: "Combined-Cycle Gas"
offwind-ac: "Offshore Wind (AC)"
offwind-dc: "Offshore Wind (DC)"
onwind: "Onshore Wind"
solar: "Solar"
PHS: "Pumped Hydro Storage"
hydro: "Reservoir & Dam"
battery: "Battery Storage"
H2: "Hydrogen Storage"
lines: "Transmission Lines"
ror: "Run of River"
Unit | Values | Description | |
---|---|---|---|
map | |||
– figsize | – | [width, height]; e.g. [7,7] | Figure size in inches. |
– boundaries | ° | [x1,x2,y1,y2] | Boundaries of the map plots in degrees latitude (y) and longitude (x) |
– p_nom | |||
– – bus_size_factor | – | float | Factor by which values determining bus sizes are scaled to fit well in the plot. |
– – linewidth_factor | – | float | Factor by which values determining bus sizes are scaled to fit well in the plot. |
costs_max | bn Euro | float | Upper y-axis limit in cost bar plots. |
costs_threshold | bn Euro | float | Threshold below which technologies will not be shown in cost bar plots. |
energy_max | TWh | float | Upper y-axis limit in energy bar plots. |
energy_min | TWh | float | Lower y-axis limit in energy bar plots. |
energy_threshold | TWh | float | Threshold below which technologies will not be shown in energy bar plots. |
tech_colors | – | carrier -> HEX colour code | Mapping from network carrier to a colour (HEX colour code). |
nice_names | – | str -> str | Mapping from network carrier to a more readable name. |