Configuration#

gb-dispatch-model has several additional configuration options above and beyond those set by PyPSA-Eur, which are documented in this section. For base PyPSA-Eur configuration, see references below.

Configuration Files#

Any gb-dispatch-model configuration can be set in a .yaml file. The default configuration config/config.default.gb.yaml is maintained in the repository and covers all the options that are used / can be set. The configuration config/config.gb.2024.yaml is an opinionated configuration we maintain that uses FES2024 data and is always applied on top of config/config.default.gb.yaml.

To pass your own configuration, you can create a new file, e.g. my_config.yaml, and specify the options you want to change. They will override the default settings and options which are not set, will be inherited from the defaults above.

Another way is to use the config/config.yaml file, which does not exist in the repository and is also not tracked by git. But snakemake will always use this file if it exists. This way you can run snakemake with a custom config without having to specify the config file each time.

Configuration order of precedence is as follows: 1. Command line options specified with --config (optional) 2. Custom configuration file specified with --configfile (optional) 3. The config/config.yaml file (optional) 4. The default configuration files config/config.default.yaml and config/plotting.default.yaml

To use your custom configuration file, you need to pass it to the snakemake command using the --configfile option:

$ snakemake -call --configfile my_config.yaml

fes_costs#

GB-specific cost configuration.

properties

  • sheet-config

FES costing workbook sheet configurations. Any pandas read_excel kwargs can be included for each sheet.

type

object

  • GBP_to_EUR

GBP to EUR exchange rate

type

number

exclusiveMinimum

0

default

1

  • GBP_to_USD

GBP to USD exchange rate

type

number

exclusiveMinimum

0

default

1

  • add_cols

Additional cost columns configuration

type

object

  • carrier_fossil_fuel_type

Mapping from carrier names to fossil fuel types

type

object

  • pypsa_eur_tech_data_columns

List of columns from PyPSA-Eur technology data to pass onto GB dispatch model tech data

type

array

items

type

string

minItems

0

  • pypsa_eur_tech_data_defaults

Default values for columns in PyPSA-Eur technology data

type

object

  • pypsa_eur_tech_data_carrier_set_mapping

Mapping from <carrier>(-<set>) to PyPSA-Eur technology data index names, for filling missing technology data. set names will be added for non-default sets (PP for generators, Store for stores)

type

object

  • fes_VOM_carrier_set_mapping

Mapping from <carrier>(-<set>) to FES costing table <Type>-<Sub Type> column name concatenations, for selecting variable O&M (VOM) data.

type

object

  • fes_fuel_carrier_set_mapping

Mapping from <carrier>(-<set>) to FES costing table <Type>-<Sub Type> column name concatenations, for selecting fuel cost data.

type

object

  • voll

Value of lost load in £/MWh

type

number

minimum

0

default

0

YAML Syntax

fes_costs:
  "sheet-config": {}
  GBP_to_EUR: 1
  GBP_to_USD: 1
  add_cols: {}
  carrier_fossil_fuel_type: {}
  pypsa_eur_tech_data_columns: []
  pypsa_eur_tech_data_defaults: {}
  pypsa_eur_tech_data_carrier_set_mapping: {}
  fes_VOM_carrier_set_mapping: {}
  fes_fuel_carrier_set_mapping: {}
  voll: 0

low_carbon_register#

Low carbon register configuration.

properties

  • carrier_mapping

Mapping from low carbon register carriers to model carriers

type

object

YAML Syntax

low_carbon_register:
  carrier_mapping: {}

chp#

Simplified CHP configuration for GB model.

properties

  • enable

Enable simplified CHP constraints

type

boolean

default

True

  • heat_to_power_ratio

Heat-to-power ratio (c_b coefficient)

type

number

exclusiveMinimum

0

default

1

  • min_operation_level

Minimum operation level when running

type

number

maximum

1

minimum

0

default

0

  • shutdown_threshold

Heat demand threshold below which CHPs can shut down completely

type

number

maximum

1

minimum

0

default

0

YAML Syntax

chp:
  enable: true
  heat_to_power_ratio: 1
  min_operation_level: 0
  shutdown_threshold: 0

urls#

URLs for GB data sources.

properties

  • gb-etys-boundaries

URL for ETYS boundary GIS data

type

string

default

  • transmission-availability-2020

default

null

anyOf

type

string

type

null

  • transmission-availability-2021

default

null

anyOf

type

string

type

null

  • transmission-availability-2022

default

null

anyOf

type

string

type

null

  • transmission-availability-2023

default

null

anyOf

type

string

type

null

  • transmission-availability-2024

default

null

anyOf

type

string

type

null

  • transmission-availability-2025

default

null

anyOf

type

string

type

null

  • fes-workbook

URL for FES workbook for the given FES year

type

string

default

  • fes-costing-workbook

URL for FES costing workbook

type

string

default

  • dukes-5.11

URL for DUKES 5.11 data

type

string

default

  • gsp-coordinates

URL for GSP coordinates

type

string

default

  • gsp-shapes

URL for GSP shapes

type

string

default

  • etys

URL for ETYS report

type

string

default

  • etys-chart-data

URL for future boundary capabilities (from ETYS chart data). Only used if ‘etys.use_future_capacities’ is True

type

string

default

  • low-carbon-contracts

URL for low carbon contracts actual CfD Generation data

type

string

default

  • eur_H2_demand_today

URL for European hydrogen demand data from the Clean Hydrogen Observatory

type

string

default

  • dukes_fuel_prices

URL for historical gas prices in the UK from Dukes

type

string

default

YAML Syntax

urls:
  "gb-etys-boundaries": ""
  "transmission-availability-2020":
  "transmission-availability-2021":
  "transmission-availability-2022":
  "transmission-availability-2023":
  "transmission-availability-2024":
  "transmission-availability-2025":
  "fes-workbook": ""
  "fes-costing-workbook": ""
  "dukes-5.11": ""
  "gsp-coordinates": ""
  "gsp-shapes": ""
  etys: ""
  "etys-chart-data": ""
  "low-carbon-contracts": ""
  eur_H2_demand_today: ""
  dukes_fuel_prices: ""

target_crs#

Target coordinate reference system (e.g., EPSG:27700)

type

string

default

EPSG:27700

YAML Syntax

target_crs: "EPSG:27700"

region_operations#

Manual region merging and splitting configuration.

properties

  • area_loss_tolerance_percent

Percentage of area loss tolerated when splitting

type

number

maximum

100

minimum

0

default

0.01

  • min_region_area

Minimum area of a region in square meters

type

number

minimum

0

default

100000.0

  • filter_boundaries_using_capabilities

Filter boundaries using capabilities

type

boolean

default

False

  • splits

Region split configurations

type

array

items

Configuration for splitting regions.

properties

  • region

Region ID to split

type

integer

  • type

Type of split

type

string

enum

vertical, horizontal

  • coordinate

Coordinate for the split

type

number

  • merge_groups

Region merge group configurations

type

array

items

Configuration for merging region groups.

properties

  • id

Merged region ID

anyOf

type

integer

type

string

  • merge

List of regions to merge

type

array

items

anyOf

type

integer

type

string

minItems

1

  • TO

Transmission owner

type

string

enum

NGET, SPTL, SHETL, N-IRL

minItems

1

  • add_group_to_neighbour

Map regions to neighbouring countries

type

object

YAML Syntax

region_operations:
  area_loss_tolerance_percent: 0.01
  min_region_area: 100000.0
  filter_boundaries_using_capabilities: false
  splits: []
  merge_groups: []
  add_group_to_neighbour: {}

etys#

Configuration for ETYS boundaries.

properties

  • future_capacities_sheet_name

Name of the sheet to use in the downloaded ETYS future capacities workbook

type

string

default

ETYS 2022 Chart Data

  • use_future_capacities

Whether to use future boundary capacities (a.k.a. capabilities) from ETYS chart data, instead of today’s capacities.

type

boolean

default

True

  • manual_future_capacities

Manual future boundary capacities, to fill gaps in the ETYS chart data, if necessary. Top-level key is the boundary name, then key-value pairs of year and capacity in MW.

type

object

YAML Syntax

etys:
  future_capacities_sheet_name: ETYS 2022 Chart Data
  use_future_capacities: true
  manual_future_capacities: {}

entsoe_unavailability#

ENTSO-E unavailability data configuration.

properties

  • start_date

Start date for data retrieval

type

string

default

2020-01-01

  • end_date

End date for data retrieval

type

string

default

2025-12-31

  • bidding_zones

List of bidding zones to consider

type

array

items

type

string

minItems

1

  • business_types

Business types to retrieve

type

array

items

type

string

enum

planned, forced

minItems

1

  • max_request_days

Maximum days per API request

type

integer

exclusiveMinimum

0

default

365

  • max_unavailable_days

Maximum days to consider an outage

type

integer

exclusiveMinimum

0

default

365

  • carrier_mapping

Carrier mapping from ENTSO-E to model carriers

type

object

  • extend_to_eur_regions

Whether to extend the unavailability data to European regions. This is done by applying the GB availability fraction to all generators in European regions, which is a simplification in lieu of actually processing European unavailability data.

type

boolean

default

False

YAML Syntax

entsoe_unavailability:
  start_date: "2020-01-01"
  end_date: "2025-12-31"
  bidding_zones: []
  business_types: []
  max_request_days: 365
  max_unavailable_days: 365
  carrier_mapping: {}
  extend_to_eur_regions: false

transmission_availability#

Transmission availability configuration.

properties

  • years

Years to process

type

array

items

type

integer

minItems

1

  • intra_gb

Transmission availability zone configuration.

properties

  • zones

List of zones

type

array

items

type

string

minItems

1

  • sample_hourly

Whether to construct an hourly availability profile using random sampling

type

boolean

default

True

  • inter_gb

Transmission availability zone configuration.

properties

  • zones

List of zones

type

array

items

type

string

minItems

1

  • sample_hourly

Whether to construct an hourly availability profile using random sampling

type

boolean

default

True

  • random_seeds

Random seeds for each zone

type

object

YAML Syntax

transmission_availability:
  years: []
  intra_gb:
    zones: []
    sample_hourly: true
  inter_gb:
    zones: []
    sample_hourly: true
  random_seeds: {}

dukes-5.11#

DUKES configuration.

properties

  • sheet-config

DUKES sheet configuration.

properties

  • sheet_name

Name of the Excel sheet

type

string

default

  • usecols

Columns to use

type

string

default

  • skiprows

Number of rows to skip

type

integer

minimum

0

default

0

  • index_col

Index columns

type

array

items

type

integer

  • header

Header row

type

integer

minimum

0

default

0

  • carrier_mapping

Carrier mapping configuration. Top level keys are column names, second level maps from column values to carrier names.

type

object

  • set_mapping

Set mapping configuration. Top level keys are column names, second level maps from column values to set names.

type

object

YAML Syntax

"dukes-5.11":
  "sheet-config":
    sheet_name: ""
    usecols: ""
    skiprows: 0
    index_col: []
    header: 0
  carrier_mapping: {}
  set_mapping: {}

grid_supply_points#

Grid supply points configuration.

properties

  • manual_mapping

Manual GSP name mappings, from FES workbook names to GSP GIS file names.

type

object

  • fill-lat-lons

Manual GSP coordinate assignments, to add latitudes and longitudes for GSPs missing from the GIS data. Keys are FES workbook GSP names.

type

object

  • combine_gsps

Groups of GSPs to combine. Key is the name of the resulting combined GSP, value is a list of FES workbook GSP names to combine . This is used to combine GSPs which are split in the FES workbook but represented as a single GSP in the GIS data.

type

object

YAML Syntax

grid_supply_points:
  manual_mapping: {}
  "fill-lat-lons": {}
  combine_gsps: {}

fes#

Future Energy Scenarios (FES) configuration.

properties

  • fes_year

FES data year

type

integer

default

2024

  • scenarios

FES scenarios to process

type

array

items

type

string

  • scenario_mapping

Mapping from FES scenario shorthand (key) to FES scenario long name (value). The shorthand will be used in the output data directories and may be referred to when shorthand is used in data files (e.g. ETYS chart data).

type

object

  • default_set

Default PyPSA network set identifier

type

string

enum

PP, CHP, Store

default

PP

  • sheet-config

FES workbook sheet configurations. Any pandas read_excel kwargs can be included for each sheet.

type

object

  • gb

FES GB-specific configuration.

properties

  • generators_and_storage

FES generator and storage configuration

properties

  • carrier_mapping

Carrier mappings based on values in SubType column. Maps from FES European data SubType column values to PyPSA carrier names.

type

object

  • set_mapping

Set mapping configuration. Top level keys are column names, second level maps from column values to set names. A regular expression can be used.

type

object

  • building_block_mapping

Mapping FES building block IDs (see sheet BB2 ‘Building Block ID’ column) to FES technology names (see sheet ES1 SubType). Where multiple building block IDs map to the same technology, the total capacity of the technology will be split proportionally across the building blocks. Where multiple technology names map to the same building block ID, the regional capacity of the building block will be split proportionally across those technologies.

type

object

  • building_block_mapping_tolerance

Allowed mismatch between regional building block capacity (sheet BB1) and total national technology capacity (sheet ES1). Value given as a fraction and is reciprocal, so sum(technologies) * (1 - tolerance) <= sum(building blocks) <= sum(technologies) * (1 + tolerance) and`sum(building blocks) * (1 - tolerance) <= sum(technology) <= sum(building blocks) * (1 + tolerance)`

type

number

maximum

1

minimum

0

  • demand

FES demand configuration.

properties

  • Technology Detail

Grouping from FES workbook BB2 Technology Detail column to model carriers

type

object

  • heat

Mapping from FES workbook heating technologies to intermediate model carriers.

type

object

  • bus_suffix

Bus suffixes to apply in the PyPSA network for different demand types

type

object

  • expected_total_data_item

FES ED1 worksheet data item name(s) to use for total demand

type

array

items

type

string

  • losses_data_item

FES ED1 worksheet data item name(s) to use for transmisison & distribution losses

type

array

items

type

string

  • flexibility

FES flexibility configuration.

properties

  • carrier_mapping

Carrier mapping for flexibility. Top level keys are GB model DSR carriers, second level maps from column names to column value(s).

type

object

  • dsr_hours

Demand side response hours for each carrier

type

object

  • carrier_suffix

Carrier suffix mappings

type

object

  • v2g_storage_to_capacity_ratio

V2G storage to capacity ratio

type

number

exclusiveMinimum

0

default

1

  • regional_distribution_reference

Regional distribution reference configuration

type

object

  • eur

FES European configuration.

properties

  • generators_and_storage

FES carrier mapping configuration.

properties

  • carrier_mapping

Carrier mappings based on values in SubType column. Maps from FES European data SubType column values to PyPSA carrier names.

type

object

  • set_mapping

Set mapping configuration. Top level keys are column names, second level maps from column values to set names. A regular expression can be used.

type

object

  • totals_to_demand_groups

Keys are gb-model demand carriers, values are energy total column names.

type

object

  • add_data_reference

Reference data to use to synthesise datasets for which we have no European data.

type

object

  • load_shedding_cost_above_marginal

Marginal cost to apply to European load shedding above the marginal cost of the most expensive European generation technology. This is used to ensure that load shedding only occurs after all generation technologies have been fully utilised, but to stop the resulting marginal prices from being excessively high.

default

null

anyOf

type

number

type

null

  • hydrogen

FES hydrogen configuration.

properties

  • data_selection

FES hydrogen data selection filter.

properties

  • networked_h2_supply

Filter to get all relevant sources of hydrogen supply data from the FES workbook. Keys are column names, values are column value(s) to select.

type

object

  • networked_electricity_demand

Filter to get all input electricity required to generate the hydrogen defined by networked_h2_supply . Keys are column names, values are column value(s) to select.

type

object

  • non_networked_electricity_demand

Filter to get all input electricity required for non-networked hydrogen supply. Keys are column names, values are column value(s) to select.

type

object

  • storage

Filter to get all hydrogen storage data. Keys are column names, values are column value(s) to select.

type

object

  • enable_eur_h2_bus

Whether to enable the H2 bus (incl. electrolysis to generate H2, H2 demand, and storage) for European countries. This is optional as the necessary data is not available in the FES and it is unclear whether modelled generation capacity is designed to meet electrolysis demands or not.

type

boolean

default

False

YAML Syntax

fes_costs:
  "sheet-config": {}
  GBP_to_EUR: 1
  GBP_to_USD: 1
  add_cols: {}
  carrier_fossil_fuel_type: {}
  pypsa_eur_tech_data_columns: []
  pypsa_eur_tech_data_defaults: {}
  pypsa_eur_tech_data_carrier_set_mapping: {}
  fes_VOM_carrier_set_mapping: {}
  fes_fuel_carrier_set_mapping: {}
  voll: 0

ev#

Electric vehicle configuration.

properties

  • plug_in_offset

Hours after traffic peak when EVs are assumed to plug in

type

integer

minimum

0

default

0

  • charging_duration

Charging duration in hours

type

integer

exclusiveMinimum

0

default

1

  • ev_demand_profile_transformation

EV demand profile transformation parameters.

properties

  • lower_optimization_bound

Lower bound for gamma optimization

type

number

exclusiveMinimum

0

default

0

  • upper_optimization_bound

Upper bound for gamma optimization

type

number

exclusiveMinimum

0

default

null

  • relative_peak_tolerance

Relative peak tolerance (fraction)

type

number

maximum

1

minimum

0

default

0.0

  • relative_energy_tolerance

Relative energy tolerance (fraction)

type

number

maximum

1

minimum

0

default

0.0

YAML Syntax

ev:
  plug_in_offset: 0
  charging_duration: 1
  ev_demand_profile_transformation:
    lower_optimization_bound: 0
    upper_optimization_bound: .inf
    relative_peak_tolerance: 0.0
    relative_energy_tolerance: 0.0

interconnectors#

Interconnectors configuration.

properties

  • options

List of interconnector configurations

type

array

items

Individual interconnector configuration.

properties

  • name

Interconnector name

type

string

  • neighbour

Neighbouring country to which the interconnector connects

type

string

  • capacity_mw

Capacity in MW

type

number

exclusiveMinimum

0

  • tyndp

TYNDP project information.

properties

  • id

TYNDP ID, if known

default

null

anyOf

type

integer

type

null

  • year

TYNDP years in which the option appears

type

array

items

type

integer

  • lat

Latitude of GB substation where the interconnector onshores

type

number

maximum

90

minimum

-90

  • lon

Longitude of GB substation where the interconnector onshores

type

number

maximum

180

minimum

-180

  • plan

Interconnector deployment plan by FES scenario/pathway and year

type

object

YAML Syntax

interconnectors:
  options: []
  plan: {}

redispatch#

Redispatch config.

properties

  • year_range_incl

Inclusive year range [start, end]

type

array

items

type

integer

maxItems

2

minItems

2

  • constraint_cost_extra_years

number of years to extend the constraint cost calculation beyond the final year (using the data from the final year)

type

integer

exclusiveMinimum

0

default

20

  • unconstrain_lines_and_links

Whether to unconstrain lines and links in the redispatch model. This will Set s_nom (p_nom) to infinity for lines (links) between GB regions to ensure only boundary capabilities are bounding, not physical line limits.

type

boolean

default

True

  • monthly_boundary_capability_scaling

Monthly scaling factors for boundary capabilities, by month number (1-12). This allows us to capture the impact of thermal constraints on boundary capabilities.

type

object

  • redispatch_profit_mitigation_penalty

penalty (per MWh) applied to redispatch actions in order to mitigate against unrealistic levels of redispatch profit that can occur due to favourable differences in bid/offer costs of different technologies.

type

number

minimum

0

default

0

  • elexon

Elexon API configuration.

properties

  • technology_mapping

Mapping from Elexon BMU technology names to model carrier names

type

object

  • years

Years to retrieve data for

type

array

items

type

integer

  • api_bmu_fuel_map

Boolean to decide source of Elexon BMU unit -> fuel mapping. If True, data is fetched using API; otherwise, it uses data/gb-model/BMUFuelType.xlsx.

type

boolean

default

False

  • max_concurrent_requests

Maximum number of concurrent requests to Elexon API. May require adjustment if API rate limits are hit.

type

integer

default

4

  • no_redispatch_carriers

List of carriers to exclude from being redispatched.

type

array

items

type

string

  • boundary_flow_mainland_buffer_m

Buffer distance in meters to apply to mainland GB when identifying flow directions for boundary crossings. This ensures we correctly identify flows on island boundaries (e.g. Anglesey).

type

number

minimum

0

default

1000

  • bid_offer_multiplier_mapping

Mapping from carriers that have received a bid/offer multipliers from processing the Elexon API to other carriers in the model. Keys are other carriers, values are carriers with Elexon bid/offer multipliers.

type

object

YAML Syntax

redispatch:
  year_range_incl: []
  constraint_cost_extra_years: 20
  unconstrain_lines_and_links: true
  monthly_boundary_capability_scaling:
    1: 1.0
    2: 1.0
    3: 1.0
    4: 1.0
    5: 1.0
    6: 1.0
    7: 1.0
    8: 1.0
    9: 1.0
    10: 1.0
    11: 1.0
    12: 1.0
  redispatch_profit_mitigation_penalty: 0
  elexon:
    technology_mapping: {}
    years: []
    api_bmu_fuel_map: false
    max_concurrent_requests: 4
  no_redispatch_carriers: []
  boundary_flow_mainland_buffer_m: 1000
  bid_offer_multiplier_mapping: {}

time_aggregation#

List of time aggregation configurations to apply sequentially. If multiple configurations are provided, they will be applied in the order they appear in the list. See PyPSA documentation for details on the available time aggregation methods and their parameters.

type

array

items

Time aggregation configuration.

properties

  • method

Time aggregation method to use, of those available in PyPSA.

type

string

enum

segment, downsample, resample

  • parameters

Parameters for given PyPSA time aggregation method.

type

object

YAML Syntax

Base PyPSA-Eur config#

Follow the links below to get more information about the base PyPSA-Eur configuration.

version#

tutorial#

logging#

remote#

run#

foresight#

snapshots#

enable#

CO2_budget#

electricity#

atlite#

renewable#

conventional#

lines#

transmission_projects#

transformers#

load#

energy#

biomass#

solar_thermal#

existing_capacities#

sector#

industry#

costs#

clustering#

adjustments#

solving#

data#

overpass_api#

secrets#

plotting#