diff --git a/.gitignore b/.gitignore index 27a2fb182..98cff7eaf 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ doc/_build config/config.yaml config/scenarios.yaml +config/plotting.yaml config.yaml config/config.yaml diff --git a/Snakefile b/Snakefile index 90a44c9d9..d71b160f9 100644 --- a/Snakefile +++ b/Snakefile @@ -17,7 +17,9 @@ copy_default_files(workflow) configfile: "config/config.default.yaml" +configfile: "config/plotting.default.yaml" configfile: "config/config.yaml" +configfile: "config/plotting.yaml" run = config["run"] diff --git a/config/config.default.yaml b/config/config.default.yaml index a475c6fdf..a8727fb59 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -997,344 +997,3 @@ solving: mem_mb: 30000 #memory in MB; 20 GB enough for 50+B+I+H2; 100 GB for 181+B+I+H2 runtime: 6h #runtime in humanfriendly style https://humanfriendly.readthedocs.io/en/latest/ - - -# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#plotting -plotting: - map: - boundaries: [-11, 30, 34, 71] - color_geomap: - ocean: white - land: white - projection: - name: "EqualEarth" - # See https://scitools.org.uk/cartopy/docs/latest/reference/projections.html for alternatives, for example: - # name: "LambertConformal" - # central_longitude: 10. - # central_latitude: 50. - # standard_parallels: [35, 65] - eu_node_location: - x: -5.5 - y: 46. - costs_max: 1000 - costs_threshold: 1 - energy_max: 20000 - energy_min: -20000 - energy_threshold: 50. - - nice_names: - OCGT: "Open-Cycle Gas" - CCGT: "Combined-Cycle Gas" - offwind-ac: "Offshore Wind (AC)" - offwind-dc: "Offshore Wind (DC)" - offwind-float: "Offshore Wind (Floating)" - 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" - load: "Load Shedding" - ac: "AC" - dc: "DC" - - tech_colors: - # wind - onwind: "#235ebc" - onshore wind: "#235ebc" - offwind: "#6895dd" - offshore wind: "#6895dd" - offwind-ac: "#6895dd" - offshore wind (AC): "#6895dd" - offshore wind ac: "#6895dd" - offwind-dc: "#74c6f2" - offshore wind (DC): "#74c6f2" - offshore wind dc: "#74c6f2" - offwind-float: "#b5e2fa" - offshore wind (Float): "#b5e2fa" - offshore wind float: "#b5e2fa" - # water - hydro: '#298c81' - hydro reservoir: '#298c81' - ror: '#3dbfb0' - run of river: '#3dbfb0' - hydroelectricity: '#298c81' - PHS: '#51dbcc' - hydro+PHS: "#08ad97" - # solar - solar: "#f9d002" - solar PV: "#f9d002" - solar-hsat: "#fdb915" - solar thermal: '#ffbf2b' - residential rural solar thermal: '#f1c069' - services rural solar thermal: '#eabf61' - residential urban decentral solar thermal: '#e5bc5a' - services urban decentral solar thermal: '#dfb953' - urban central solar thermal: '#d7b24c' - solar rooftop: '#ffea80' - # gas - OCGT: '#e0986c' - OCGT marginal: '#e0986c' - OCGT-heat: '#e0986c' - gas boiler: '#db6a25' - gas boilers: '#db6a25' - gas boiler marginal: '#db6a25' - residential rural gas boiler: '#d4722e' - residential urban decentral gas boiler: '#cb7a36' - services rural gas boiler: '#c4813f' - services urban decentral gas boiler: '#ba8947' - urban central gas boiler: '#b0904f' - gas: '#e05b09' - fossil gas: '#e05b09' - natural gas: '#e05b09' - biogas to gas: '#e36311' - biogas to gas CC: '#e51245' - CCGT: '#a85522' - CCGT marginal: '#a85522' - allam: '#B98F76' - gas for industry co2 to atmosphere: '#692e0a' - gas for industry co2 to stored: '#8a3400' - gas for industry: '#853403' - gas for industry CC: '#692e0a' - gas pipeline: '#ebbca0' - gas pipeline new: '#a87c62' - # oil - oil: '#c9c9c9' - oil primary: '#d2d2d2' - oil refining: '#e6e6e6' - imported oil: '#a3a3a3' - oil boiler: '#adadad' - residential rural oil boiler: '#a9a9a9' - services rural oil boiler: '#a5a5a5' - residential urban decentral oil boiler: '#a1a1a1' - urban central oil boiler: '#9d9d9d' - services urban decentral oil boiler: '#999999' - agriculture machinery oil: '#949494' - shipping oil: "#808080" - land transport oil: '#afafaf' - # nuclear - Nuclear: '#ff8c00' - Nuclear marginal: '#ff8c00' - nuclear: '#ff8c00' - uranium: '#ff8c00' - # coal - Coal: '#545454' - coal: '#545454' - Coal marginal: '#545454' - coal for industry: '#343434' - solid: '#545454' - Lignite: '#826837' - lignite: '#826837' - Lignite marginal: '#826837' - # biomass - biogas: '#e3d37d' - biomass: '#baa741' - solid biomass: '#baa741' - municipal solid waste: '#91ba41' - solid biomass import: '#d5ca8d' - solid biomass transport: '#baa741' - solid biomass for industry: '#7a6d26' - solid biomass for industry CC: '#47411c' - solid biomass for industry co2 from atmosphere: '#736412' - solid biomass for industry co2 to stored: '#47411c' - urban central solid biomass CHP: '#9d9042' - urban central solid biomass CHP CC: '#6c5d28' - biomass boiler: '#8A9A5B' - residential rural biomass boiler: '#a1a066' - residential urban decentral biomass boiler: '#b0b87b' - services rural biomass boiler: '#c6cf98' - services urban decentral biomass boiler: '#dde5b5' - biomass to liquid: '#32CD32' - unsustainable solid biomass: '#998622' - unsustainable bioliquids: '#32CD32' - electrobiofuels: 'red' - BioSNG: '#123456' - solid biomass to hydrogen: '#654321' - # power transmission - lines: '#6c9459' - transmission lines: '#6c9459' - electricity distribution grid: '#97ad8c' - low voltage: '#97ad8c' - # electricity demand - Electric load: '#110d63' - electric demand: '#110d63' - electricity: '#110d63' - industry electricity: '#2d2a66' - industry new electricity: '#2d2a66' - agriculture electricity: '#494778' - # battery + EVs - battery: '#ace37f' - battery storage: '#ace37f' - battery charger: '#88a75b' - battery discharger: '#5d4e29' - home battery: '#80c944' - home battery storage: '#80c944' - home battery charger: '#5e8032' - home battery discharger: '#3c5221' - BEV charger: '#baf238' - V2G: '#e5ffa8' - land transport EV: '#baf238' - land transport demand: '#38baf2' - EV battery: '#baf238' - # hot water storage - water tanks: '#e69487' - residential rural water tanks: '#f7b7a3' - services rural water tanks: '#f3afa3' - residential urban decentral water tanks: '#f2b2a3' - services urban decentral water tanks: '#f1b4a4' - urban central water tanks: '#e9977d' - hot water storage: '#e69487' - hot water charging: '#e8998b' - urban central water tanks charger: '#b57a67' - residential rural water tanks charger: '#b4887c' - residential urban decentral water tanks charger: '#b39995' - services rural water tanks charger: '#b3abb0' - services urban decentral water tanks charger: '#b3becc' - hot water discharging: '#e99c8e' - urban central water tanks discharger: '#b9816e' - residential rural water tanks discharger: '#ba9685' - residential urban decentral water tanks discharger: '#baac9e' - services rural water tanks discharger: '#bbc2b8' - services urban decentral water tanks discharger: '#bdd8d3' - # heat demand - Heat load: '#cc1f1f' - heat: '#cc1f1f' - heat vent: '#aa3344' - heat demand: '#cc1f1f' - rural heat: '#ff5c5c' - residential rural heat: '#ff7c7c' - services rural heat: '#ff9c9c' - central heat: '#cc1f1f' - urban central heat: '#d15959' - urban central heat vent: '#a74747' - decentral heat: '#750606' - residential urban decentral heat: '#a33c3c' - services urban decentral heat: '#cc1f1f' - low-temperature heat for industry: '#8f2727' - process heat: '#ff0000' - agriculture heat: '#d9a5a5' - # heat supply - heat pumps: '#2fb537' - heat pump: '#2fb537' - air heat pump: '#36eb41' - residential urban decentral air heat pump: '#48f74f' - services urban decentral air heat pump: '#5af95d' - services rural air heat pump: '#5af95d' - urban central air heat pump: '#6cfb6b' - ground heat pump: '#2fb537' - residential rural ground heat pump: '#48f74f' - residential rural air heat pump: '#48f74f' - services rural ground heat pump: '#5af95d' - Ambient: '#98eb9d' - CHP: '#8a5751' - urban central gas CHP: '#8d5e56' - CHP CC: '#634643' - urban central gas CHP CC: '#6e4e4c' - CHP heat: '#8a5751' - CHP electric: '#8a5751' - district heating: '#e8beac' - resistive heater: '#d8f9b8' - residential rural resistive heater: '#bef5b5' - residential urban decentral resistive heater: '#b2f1a9' - services rural resistive heater: '#a5ed9d' - services urban decentral resistive heater: '#98e991' - urban central resistive heater: '#8cdf85' - retrofitting: '#8487e8' - building retrofitting: '#8487e8' - # hydrogen - H2 for industry: "#f073da" - H2 for shipping: "#ebaee0" - H2: '#bf13a0' - hydrogen: '#bf13a0' - retrofitted H2 boiler: '#e5a0d9' - SMR: '#870c71' - SMR CC: '#4f1745' - H2 liquefaction: '#d647bd' - hydrogen storage: '#bf13a0' - H2 Store: '#bf13a0' - H2 storage: '#bf13a0' - land transport fuel cell: '#6b3161' - H2 pipeline: '#f081dc' - H2 pipeline retrofitted: '#ba99b5' - H2 Fuel Cell: '#c251ae' - H2 fuel cell: '#c251ae' - H2 turbine: '#991f83' - H2 Electrolysis: '#ff29d9' - H2 electrolysis: '#ff29d9' - # ammonia - NH3: '#46caf0' - ammonia: '#46caf0' - ammonia store: '#00ace0' - ammonia cracker: '#87d0e6' - Haber-Bosch: '#076987' - # syngas - Sabatier: '#9850ad' - methanation: '#c44ce6' - methane: '#c44ce6' - # synfuels - Fischer-Tropsch: '#25c49a' - liquid: '#25c49a' - kerosene for aviation: '#a1ffe6' - naphtha for industry: '#57ebc4' - methanol-to-kerosene: '#C98468' - methanol-to-olefins/aromatics: '#FFA07A' - Methanol steam reforming: '#FFBF00' - Methanol steam reforming CC: '#A2EA8A' - methanolisation: '#00FFBF' - biomass-to-methanol: '#EAD28A' - biomass-to-methanol CC: '#EADBAD' - allam methanol: '#B98F76' - CCGT methanol: '#B98F76' - CCGT methanol CC: '#B98F76' - OCGT methanol: '#B98F76' - methanol: '#FF7B00' - methanol transport: '#FF7B00' - shipping methanol: '#468c8b' - industry methanol: '#468c8b' - # co2 - CC: '#f29dae' - CCS: '#f29dae' - CO2 sequestration: '#f29dae' - DAC: '#ff5270' - co2 stored: '#f2385a' - co2 sequestered: '#f2682f' - co2: '#f29dae' - co2 vent: '#ffd4dc' - CO2 pipeline: '#f5627f' - # emissions - process emissions CC: '#000000' - process emissions: '#222222' - process emissions to stored: '#444444' - process emissions to atmosphere: '#888888' - oil emissions: '#aaaaaa' - shipping oil emissions: "#555555" - shipping methanol emissions: '#666666' - land transport oil emissions: '#777777' - agriculture machinery oil emissions: '#333333' - # other - shipping: '#03a2ff' - power-to-heat: '#2fb537' - power-to-gas: '#c44ce6' - power-to-H2: '#ff29d9' - power-to-liquid: '#25c49a' - gas-to-power/heat: '#ee8340' - waste: '#e3d37d' - other: '#000000' - geothermal: '#ba91b1' - geothermal heat: '#ba91b1' - geothermal district heat: '#d19D00' - geothermal organic rankine cycle: '#ffbf00' - AC: "#70af1d" - AC-AC: "#70af1d" - AC line: "#70af1d" - links: "#8a1caf" - HVDC links: "#8a1caf" - DC: "#8a1caf" - DC-DC: "#8a1caf" - DC link: "#8a1caf" - load: "#dd2e23" - waste CHP: '#e3d37d' - waste CHP CC: '#e3d3ff' - HVC to air: 'k' diff --git a/config/plotting.default.yaml b/config/plotting.default.yaml new file mode 100644 index 000000000..b4647e61c --- /dev/null +++ b/config/plotting.default.yaml @@ -0,0 +1,499 @@ +# SPDX-FileCopyrightText: : 2017-2024 The PyPSA-Eur Authors +# +# SPDX-License-Identifier: CC0-1.0 +# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#plotting +plotting: + theme: + style: white + context: paper + font: sans-serif + rc: + patch.linewidth: 0.1 + savefig.bbox: "tight" + savefig.dpi: 350 + ytick.left: true + ytick.major.width: 0.4 + ytick.major.size: 2.5 + xtick.major.pad: 0 + map: + boundaries: [-11, 30, 34, 71] + color_geomap: + ocean: white + land: white + projection: + name: "EqualEarth" + # See https://scitools.org.uk/cartopy/docs/latest/reference/projections.html for alternatives, for example: + # name: "LambertConformal" + # central_longitude: 10. + # central_latitude: 50. + # standard_parallels: [35, 65] + eu_node_location: + x: -5.5 + y: 46. + costs_max: 1000 + costs_threshold: 1 + energy_max: 20000 + energy_min: -20000 + energy_threshold: 50. + # settings for energy balance maps + balance_map: + ext: pdf + carriers_to_plot: ["AC", "H2", "gas", "co2_stored", "urban_central_heat"] + alpha: 1 + region_alpha: 0.6 + figsize: [5, 6.5] + boundaries: [-11, 30, 34, 71] + AC: + unit: TWh$_{el}$ + unit_conversion: 1e6 + region_cmap: Greens + vmin: + vmax: + region_unit: €/MWh$_{el}$ + bus_factor: 2e-3 + branch_factor: 1e-2 + flow_factor: 1e+2 + bus_sizes: + - 200 + - 100 + branch_sizes: + - 100 + - 20 + gas: + unit: TWh$_{th}$ + unit_conversion: 1e6 + region_cmap: Purples + vmin: + vmax: + region_unit: €/MWh$_{th}$ + bus_factor: 2e-3 + branch_factor: 5e-2 + flow_factor: 6e+1 + bus_sizes: + - 200 + - 100 + branch_sizes: + - 100 + - 50 + H2: + unit: TWh$_{H_2}$ + unit_conversion: 1e6 + region_cmap: Blues + vmin: + vmax: + region_unit: €/MWh$_{H_2}$ + bus_factor: 2e-3 + branch_factor: 7e-2 + flow_factor: 5e+1 + bus_sizes: + - 200 + - 100 + branch_sizes: + - 40 + - 20 + co2_stored: + bus_carrier: co2 stored + unit: Mt + unit_conversion: 1e6 + region_cmap: Purples + vmin: + vmax: + region_unit: €/t_${CO_2}$ + bus_factor: 3e-2 + branch_factor: 1 + flow_factor: 2e+3 + bus_sizes: + - 50 + - 10 + branch_sizes: + - 5 + - 2 + urban_central_heat: + bus_carrier: urban central heat + unit: TW$_{th}$ + unit_conversion: 1e6 + region_cmap: Oranges + vmin: + vmax: + region_unit: €/MWh_{th}$ + bus_factor: 5e-3 + branch_factor: 1e-1 + flow_factor: 1e+2 + bus_sizes: + - 300 + - 100 + branch_sizes: + methanol: + unit: TWh$_{MeOH}$ + unit_conversion: 1e6 + region_cmap: Greens + vmin: + vmax: + region_unit: €/MWh$_{MeOH}$ + bus_factor: 5e-3 + branch_factor: 1e-1 + flow_factor: 1e+2 + bus_sizes: + - 20 + - 10 + branch_sizes: + biogas: + unit: TWh$_{th}$ + unit_conversion: 1e6 + region_cmap: Greens + vmin: + vmax: + region_unit: €/MWh + bus_factor: 1e-1 + branch_factor: 1e-1 + flow_factor: 1e+2 + bus_sizes: + - 100 + - 50 + branch_sizes: + solid_biomass: + bus_carrier: solid biomass + unit: TWh$_{th}$ + unit_conversion: 1e6 + region_cmap: Greens + vmin: + vmax: + region_unit: €/MWh + bus_factor: 1e-2 + branch_factor: 1e-1 + flow_factor: 1e+2 + bus_sizes: + - 100 + - 50 + branch_sizes: + oil: + unit: TWh$_{th}$ + unit_conversion: 1e6 + region_cmap: Greys + vmin: + vmax: + region_unit: €/MWh + bus_factor: 2e-3 + branch_factor: 1e-1 + flow_factor: 1e+2 + bus_sizes: + - 200 + - 100 + branch_sizes: + + nice_names: + OCGT: "Open-Cycle Gas" + CCGT: "Combined-Cycle Gas" + offwind-ac: "Offshore Wind (AC)" + offwind-dc: "Offshore Wind (DC)" + offwind-float: "Offshore Wind (Floating)" + 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" + load: "Load Shedding" + ac: "AC" + dc: "DC" + + tech_colors: + # wind + onwind: "#235ebc" + onshore wind: "#235ebc" + offwind: "#6895dd" + offshore wind: "#6895dd" + offwind-ac: "#6895dd" + offshore wind (AC): "#6895dd" + offshore wind ac: "#6895dd" + offwind-dc: "#74c6f2" + offshore wind (DC): "#74c6f2" + offshore wind dc: "#74c6f2" + offwind-float: "#b5e2fa" + offshore wind (Float): "#b5e2fa" + offshore wind float: "#b5e2fa" + # water + hydro: '#298c81' + hydro reservoir: '#298c81' + ror: '#3dbfb0' + run of river: '#3dbfb0' + hydroelectricity: '#298c81' + PHS: '#51dbcc' + hydro+PHS: "#08ad97" + # solar + solar: "#f9d002" + solar PV: "#f9d002" + solar-hsat: "#fdb915" + solar thermal: '#ffbf2b' + residential rural solar thermal: '#f1c069' + services rural solar thermal: '#eabf61' + residential urban decentral solar thermal: '#e5bc5a' + services urban decentral solar thermal: '#dfb953' + urban central solar thermal: '#d7b24c' + solar rooftop: '#ffea80' + # gas + OCGT: '#e0986c' + OCGT marginal: '#e0986c' + OCGT-heat: '#e0986c' + gas boiler: '#db6a25' + gas boilers: '#db6a25' + gas boiler marginal: '#db6a25' + residential rural gas boiler: '#d4722e' + residential urban decentral gas boiler: '#cb7a36' + services rural gas boiler: '#c4813f' + services urban decentral gas boiler: '#ba8947' + urban central gas boiler: '#b0904f' + gas: '#e05b09' + fossil gas: '#e05b09' + natural gas: '#e05b09' + biogas to gas: '#e36311' + biogas to gas CC: '#e51245' + CCGT: '#a85522' + CCGT marginal: '#a85522' + allam: '#B98F76' + gas for industry co2 to atmosphere: '#692e0a' + gas for industry co2 to stored: '#8a3400' + gas for industry: '#853403' + gas for industry CC: '#692e0a' + gas pipeline: '#ebbca0' + gas pipeline new: '#a87c62' + # oil + oil: '#c9c9c9' + oil primary: '#d2d2d2' + oil refining: '#e6e6e6' + imported oil: '#a3a3a3' + oil boiler: '#adadad' + residential rural oil boiler: '#a9a9a9' + services rural oil boiler: '#a5a5a5' + residential urban decentral oil boiler: '#a1a1a1' + urban central oil boiler: '#9d9d9d' + services urban decentral oil boiler: '#999999' + agriculture machinery oil: '#949494' + shipping oil: "#808080" + land transport oil: '#afafaf' + # nuclear + Nuclear: '#ff8c00' + Nuclear marginal: '#ff8c00' + nuclear: '#ff8c00' + uranium: '#ff8c00' + # coal + Coal: '#545454' + coal: '#545454' + Coal marginal: '#545454' + coal for industry: '#343434' + solid: '#545454' + Lignite: '#826837' + lignite: '#826837' + Lignite marginal: '#826837' + # biomass + biogas: '#e3d37d' + biomass: '#baa741' + solid biomass: '#baa741' + municipal solid waste: '#91ba41' + solid biomass import: '#d5ca8d' + solid biomass transport: '#baa741' + solid biomass for industry: '#7a6d26' + solid biomass for industry CC: '#47411c' + solid biomass for industry co2 from atmosphere: '#736412' + solid biomass for industry co2 to stored: '#47411c' + urban central solid biomass CHP: '#9d9042' + urban central solid biomass CHP CC: '#6c5d28' + biomass boiler: '#8A9A5B' + residential rural biomass boiler: '#a1a066' + residential urban decentral biomass boiler: '#b0b87b' + services rural biomass boiler: '#c6cf98' + services urban decentral biomass boiler: '#dde5b5' + biomass to liquid: '#32CD32' + unsustainable solid biomass: '#998622' + unsustainable bioliquids: '#32CD32' + electrobiofuels: 'red' + BioSNG: '#123456' + solid biomass to hydrogen: '#654321' + # power transmission + lines: '#6c9459' + transmission lines: '#6c9459' + electricity distribution grid: '#97ad8c' + low voltage: '#97ad8c' + # electricity demand + Electric load: '#110d63' + electric demand: '#110d63' + electricity: '#110d63' + industry electricity: '#2d2a66' + industry new electricity: '#2d2a66' + agriculture electricity: '#494778' + # battery + EVs + battery: '#ace37f' + battery storage: '#ace37f' + battery charger: '#88a75b' + battery discharger: '#5d4e29' + home battery: '#80c944' + home battery storage: '#80c944' + home battery charger: '#5e8032' + home battery discharger: '#3c5221' + BEV charger: '#baf238' + V2G: '#e5ffa8' + land transport EV: '#baf238' + land transport demand: '#38baf2' + EV battery: '#baf238' + # hot water storage + water tanks: '#e69487' + residential rural water tanks: '#f7b7a3' + services rural water tanks: '#f3afa3' + residential urban decentral water tanks: '#f2b2a3' + services urban decentral water tanks: '#f1b4a4' + urban central water tanks: '#e9977d' + hot water storage: '#e69487' + hot water charging: '#e8998b' + urban central water tanks charger: '#b57a67' + residential rural water tanks charger: '#b4887c' + residential urban decentral water tanks charger: '#b39995' + services rural water tanks charger: '#b3abb0' + services urban decentral water tanks charger: '#b3becc' + hot water discharging: '#e99c8e' + urban central water tanks discharger: '#b9816e' + residential rural water tanks discharger: '#ba9685' + residential urban decentral water tanks discharger: '#baac9e' + services rural water tanks discharger: '#bbc2b8' + services urban decentral water tanks discharger: '#bdd8d3' + # heat demand + Heat load: '#cc1f1f' + heat: '#cc1f1f' + heat vent: '#aa3344' + heat demand: '#cc1f1f' + rural heat: '#ff5c5c' + residential rural heat: '#ff7c7c' + services rural heat: '#ff9c9c' + central heat: '#cc1f1f' + urban central heat: '#d15959' + urban central heat vent: '#a74747' + decentral heat: '#750606' + residential urban decentral heat: '#a33c3c' + services urban decentral heat: '#cc1f1f' + low-temperature heat for industry: '#8f2727' + process heat: '#ff0000' + agriculture heat: '#d9a5a5' + # heat supply + heat pumps: '#2fb537' + heat pump: '#2fb537' + air heat pump: '#36eb41' + residential urban decentral air heat pump: '#48f74f' + services urban decentral air heat pump: '#5af95d' + services rural air heat pump: '#5af95d' + urban central air heat pump: '#6cfb6b' + ground heat pump: '#2fb537' + residential rural ground heat pump: '#48f74f' + residential rural air heat pump: '#48f74f' + services rural ground heat pump: '#5af95d' + Ambient: '#98eb9d' + CHP: '#8a5751' + urban central gas CHP: '#8d5e56' + CHP CC: '#634643' + urban central gas CHP CC: '#6e4e4c' + CHP heat: '#8a5751' + CHP electric: '#8a5751' + district heating: '#e8beac' + resistive heater: '#d8f9b8' + residential rural resistive heater: '#bef5b5' + residential urban decentral resistive heater: '#b2f1a9' + services rural resistive heater: '#a5ed9d' + services urban decentral resistive heater: '#98e991' + urban central resistive heater: '#8cdf85' + retrofitting: '#8487e8' + building retrofitting: '#8487e8' + # hydrogen + H2 for industry: "#f073da" + H2 for shipping: "#ebaee0" + H2: '#bf13a0' + hydrogen: '#bf13a0' + retrofitted H2 boiler: '#e5a0d9' + SMR: '#870c71' + SMR CC: '#4f1745' + H2 liquefaction: '#d647bd' + hydrogen storage: '#bf13a0' + H2 Store: '#bf13a0' + H2 storage: '#bf13a0' + land transport fuel cell: '#6b3161' + H2 pipeline: '#f081dc' + H2 pipeline retrofitted: '#ba99b5' + H2 Fuel Cell: '#c251ae' + H2 fuel cell: '#c251ae' + H2 turbine: '#991f83' + H2 Electrolysis: '#ff29d9' + H2 electrolysis: '#ff29d9' + # ammonia + NH3: '#46caf0' + ammonia: '#46caf0' + ammonia store: '#00ace0' + ammonia cracker: '#87d0e6' + Haber-Bosch: '#076987' + # syngas + Sabatier: '#9850ad' + methanation: '#c44ce6' + methane: '#c44ce6' + # synfuels + Fischer-Tropsch: '#25c49a' + liquid: '#25c49a' + kerosene for aviation: '#a1ffe6' + naphtha for industry: '#57ebc4' + methanol-to-kerosene: '#C98468' + methanol-to-olefins/aromatics: '#FFA07A' + Methanol steam reforming: '#FFBF00' + Methanol steam reforming CC: '#A2EA8A' + methanolisation: '#00FFBF' + biomass-to-methanol: '#EAD28A' + biomass-to-methanol CC: '#EADBAD' + allam methanol: '#B98F76' + CCGT methanol: '#B98F76' + CCGT methanol CC: '#B98F76' + OCGT methanol: '#B98F76' + methanol: '#FF7B00' + methanol transport: '#FF7B00' + shipping methanol: '#468c8b' + industry methanol: '#468c8b' + # co2 + CC: '#f29dae' + CCS: '#f29dae' + CO2 sequestration: '#f29dae' + DAC: '#ff5270' + co2 stored: '#f2385a' + co2 sequestered: '#f2682f' + co2: '#f29dae' + co2 vent: '#ffd4dc' + CO2 pipeline: '#f5627f' + # emissions + process emissions CC: '#000000' + process emissions: '#222222' + process emissions to stored: '#444444' + process emissions to atmosphere: '#888888' + oil emissions: '#aaaaaa' + shipping oil emissions: "#555555" + shipping methanol emissions: '#666666' + land transport oil emissions: '#777777' + agriculture machinery oil emissions: '#333333' + # other + shipping: '#03a2ff' + power-to-heat: '#2fb537' + power-to-gas: '#c44ce6' + power-to-H2: '#ff29d9' + power-to-liquid: '#25c49a' + gas-to-power/heat: '#ee8340' + waste: '#e3d37d' + other: '#000000' + geothermal: '#ba91b1' + geothermal heat: '#ba91b1' + geothermal district heat: '#d19D00' + geothermal organic rankine cycle: '#ffbf00' + AC: "#70af1d" + AC-AC: "#70af1d" + AC line: "#70af1d" + links: "#8a1caf" + HVDC links: "#8a1caf" + DC: "#8a1caf" + DC-DC: "#8a1caf" + DC link: "#8a1caf" + load: "#dd2e23" + waste CHP: '#e3d37d' + waste CHP CC: '#e3d3ff' + HVC to air: 'k' diff --git a/doc/configtables/plotting.csv b/doc/configtables/plotting.csv index 82fc203c0..9a9b3ab0a 100644 --- a/doc/configtables/plotting.csv +++ b/doc/configtables/plotting.csv @@ -1,13 +1,50 @@ ,Unit,Values,Description +theme,,,currently themes are just applied for balance_maps +-- style,--,str,"Matplotlib style like `darkgrid`, `whitegrid`, `dark`, `white`" +-- context,--,str,"Seaborn context like `paper`, `notebook`" +-- font,--,str,Font family for all text in plots. +-- rc:,,, +-- -- patch.linewidth,pt,float,Width for the lines of the map. +-- -- savefig.bbox,--,str,Bounding box for saving the figure. +-- -- savefig.dpi,dpi,float,DPI for saving the figure. +-- -- ytick.left,--,bool,Whether to draw ticks on the left side of the y-axis. +-- -- ytick.major.width,pt,float,Width of the major ticks on the y-axis. +-- -- ytick.major.size,pt,float,Size of the major ticks on the y-axis. +-- -- xtick.major.pad,pt,float,Padding between the major ticks on the x-axis and their labels. map,,, -- boundaries,°,"[x1,x2,y1,y2]",Boundaries of the map plots in degrees latitude (y) and longitude (x) -projection,,,, --- name,--,"Valid Cartopy projection name","See https://scitools.org.uk/cartopy/docs/latest/reference/projections.html for list of available projections." +-- color_geomap,,, +-- -- ocean,--,str,Color of the ocean in the geomap. +-- -- land,--,str,Color of the land in the geomap. +projection,,, +-- name,--,Valid Cartopy projection name,See https://scitools.org.uk/cartopy/docs/latest/reference/projections.html for list of available projections. -- args,--,--,"Other entries under 'projection' are passed as keyword arguments to the projection constructor, e.g. ``central_longitude: 10.``." +eu_node_location,,, +-- x,°,float,Longitude of the EU node location. +-- y,°,float,Latitude of the EU node location. 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. +balance_map,,, +-- ext,--,str,File extension for the balance map plots. +-- carriers_to_plot,--,[str],List of carriers to plot. +-- alpha,--,float,Alpha value for the balance map plots. +-- region_alpha,--,float,Alpha value for the shading of the regions in the balance map plots. +-- figsize,--,"[float, float]",Figure size for the balance map plots. +-- boundaries,°,"[x1,x2,y1,y2]",Boundaries of the balance map plots in degrees latitude (y) and longitude (x). +-- energy_carrier,,, +-- -- unit,--,str,Unit of the energy carrier like MWh$_{el}$ for electricity with conversion factor of one. +-- -- unit_conversion,--,float,Conversion factor for the energy carrier unit. +-- -- region_cmap,--,str,Colormap for the price of the regions. +-- -- vmin,--,float,Minimum value for the colormap. +-- -- vmax,--,float,Maximum value for the colormap. +-- -- region_unit,--,str,Unit for the price like €/MWh$_{el}$ for electricitys. +-- -- bus_factor,--,float,Factor for the bus sizes by which they are multiplied. +-- -- branch_factor,--,float,Factor for the branch sizes by which they are multiplied. +-- -- flow_factor,--,float,Factor for the flow sizes by which they are multiplied. +-- -- bus_sizes,--,[float],Sizes for the buses in the legend. +-- -- branch_sizes,--,[float],Sizes for the branches in the legend. 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. diff --git a/doc/configtables/solving.csv b/doc/configtables/solving.csv index ec1080d23..c3b99233a 100644 --- a/doc/configtables/solving.csv +++ b/doc/configtables/solving.csv @@ -2,7 +2,7 @@ options,,, -- 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. -- load_shedding,bool/float,"{'true','false', float}","Add generators with very high marginal cost to simulate load shedding and avoid problem infeasibilities. If load shedding is a float, it denotes the marginal cost in EUR/kWh." --- curtailment_mode,bool/float,"{'true','false'}","Fixes the dispatch profiles of generators with time-varying p_max_pu by setting ``p_min_pu = p_max_pu`` and adds an auxiliary curtailment generator (with negative sign to absorb excess power) at every AC bus. This can speed up the solving process as the curtailment decision is aggregated into a single generator per region. Defaults to ``false``." +-- curtailment_mode,bool/float,"{'true','false'}",Fixes the dispatch profiles of generators with time-varying p_max_pu by setting ``p_min_pu = p_max_pu`` and adds an auxiliary curtailment generator (with negative sign to absorb excess power) at every AC bus. This can speed up the solving process as the curtailment decision is aggregated into a single generator per region. Defaults to ``false``. -- noisy_costs,bool,"{'true','false'}","Add random noise to marginal cost of generators by :math:`\mathcal{U}(0.009,0,011)` and capital cost of lines and links by :math:`\mathcal{U}(0.09,0,11)`." -- skip_iterations,bool,"{'true','false'}","Skip iterating, do not update impedances of branches. Defaults to true." -- rolling_horizon,bool,"{'true','false'}","Switch for rule :mod:`solve_operations_network` whether to optimize the network in a rolling horizon manner, where the snapshot range is split into slices of size `horizon` which are solved consecutively. This setting has currently no effect on sector-coupled networks." @@ -23,12 +23,12 @@ options,,, -- -- -- {carrier},,, -- -- link_threshold,,float,The threshold relative to the discrete link unit size beyond which to round up to the next unit by carrier (given in dictionary style). -- -- -- {carrier},,, --- -- fractional_last_unit_size,bool,"{'true','false'}",When true, links and lines can be built up to p_nom_max. When false, they can only be built up to a multiple of the unit size. +-- -- fractional_last_unit_size,bool,"{'true','false'}",When true links and lines can be built up to p_nom_max. When false they can only be built up to a multiple of the unit size. agg_p_nom_limits,,,Configure per carrier generator nominal capacity constraints for individual countries if ``'CCL'`` is in ``{opts}`` wildcard. -- agg_offwind,bool,"{'true','false'}",Aggregate together all the types of offwind when writing the constraint. Default is false. -- include_existing,bool,"{'true','false'}",Take existing capacities into account when writing the constraint. Default is false. -- file,file,path,Reference to ``.csv`` file specifying per carrier generator nominal capacity constraints for individual countries and planning horizons. Defaults to ``data/agg_p_nom_minmax.csv``. -constraints ,,, +"constraints ",,, -- CCL,bool,"{'true','false'}",Add minimum and maximum levels of generator nominal capacity per carrier for individual countries. These can be specified in the file linked at ``electricity: agg_p_nom_limits`` in the configuration. File defaults to ``data/agg_p_nom_minmax.csv``. -- EQ,bool/string,"{'false',`n(c| )``; i.e. ``0.5``-``0.7c``}",Require each country or node to on average produce a minimal share of its total consumption itself. Example: ``EQ0.5c`` demands each country to produce on average at least 50% of its consumption; ``EQ0.5`` demands each node to produce on average at least 50% of its consumption. -- BAU,bool,"{'true','false'}",Add a per-``carrier`` minimal overall capacity; i.e. at least ``40GW`` of ``OCGT`` in Europe; configured in ``electricity: BAU_mincapacities`` diff --git a/doc/configuration.rst b/doc/configuration.rst index 0449d354d..0b9498ed9 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -9,7 +9,7 @@ Configuration ########################################## -PyPSA-Eur has several configuration options which are documented in this section and are collected in a ``config/config.yaml`` file. This file defines deviations from the default configuration (``config/config.default.yaml``); confer installation instructions at :ref:`defaultconfig`. +PyPSA-Eur has several configuration options which are documented in this section and are collected in a ``config/config.yaml`` and the ``config/plotting.yaml`` file. This file defines deviations from the default configuration (``config/config.default.yaml`` and ``config/plotting.default.yaml``); confer installation instructions at :ref:`defaultconfig`. .. _toplevel_cf: @@ -614,7 +614,6 @@ The list of available biomass is given by the category in `ENSPRESO_BIOMASS 0].index.unique("carrier").sort_values() + cons_carriers = ( + bus_sizes[bus_sizes < 0] + .index.unique("carrier") + .difference(prod_carriers) + .sort_values() + ) + + # Add production carriers + add_legend_patches( + ax, + carriers.color[prod_carriers], + prod_carriers, + patch_kw={"alpha": alpha}, + legend_kw={ + "bbox_to_anchor": (0, -pad), + "ncol": 1, + "title": "Production", + **legend_kwargs, + }, + ) + + # Add consumption carriers + add_legend_patches( + ax, + carriers.color[cons_carriers], + cons_carriers, + patch_kw={"alpha": alpha}, + legend_kw={ + "bbox_to_anchor": (0.5, -pad), + "ncol": 1, + "title": "Consumption", + **legend_kwargs, + }, + ) + + # Add bus legend + legend_bus_sizes = np.array(carrier_plotting.get("bus_sizes", [10, 50])) + carrier_unit = carrier_plotting.get("unit", "TWh") + if legend_bus_sizes is not None: + add_legend_circles( + ax, + [s * bus_size_factor for s in legend_bus_sizes], + [f"{s} {carrier_unit}" for s in legend_bus_sizes], + legend_kw={ + "bbox_to_anchor": (0, 1), + "title": "Supply/Demand", + **legend_kwargs, + }, + ) + + legend_branch_sizes = carrier_plotting.get("branch_sizes", [1, 10]) + if legend_branch_sizes: + # Add branch legend + if legend_branch_sizes is not None: + add_legend_lines( + ax, + [s * branch_width_factor for s in legend_branch_sizes], + [f"{s} {carrier_unit}" for s in legend_branch_sizes], + legend_kw={"bbox_to_anchor": (0, 0.85), **legend_kwargs}, + ) + + fig.savefig( + snakemake.output.map, + dpi=300, + bbox_inches="tight", + )