Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
93b0944
Initial commit of updated pypsa-eur-mrel
Oct 16, 2025
ef68650
working environment, update config, and git
Oct 22, 2025
ec35396
name and color corrections
Oct 22, 2025
a61a41b
Fix minor issues
Nov 5, 2025
d0f2d44
fix space
Nov 5, 2025
1d44f5e
Merge pull request #2 from lmezilis/wave-updates
lmezilis Nov 5, 2025
6ffd548
Merge pull request #3 from lmezilis/main
lmezilis Nov 5, 2025
bc7f291
Merge branch 'master' into wave-updates
lmezilis Nov 5, 2025
18dfe63
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 5, 2025
c5efabe
Merge branch 'master' into wave-updates
lkstrp Nov 7, 2025
37f4a49
Merge remote-tracking branch 'upstream/master' into wave-updates
Nov 10, 2025
2edb89e
Merge branch 'wave-updates' of https://github.com/lmezilis/pypsa-eur-…
Nov 10, 2025
fa64f72
fix add_electricity costs
Nov 10, 2025
51160e7
update branch
Nov 10, 2025
81ddb01
doc: Automatically update DAGs in documentation (#1880)
euronion Nov 7, 2025
bc13c09
Merge remote-tracking branch 'origin/wave-updates' into wave-updates
Nov 10, 2025
2e68c83
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 10, 2025
afcfe5d
fix imports
Nov 10, 2025
a1d9014
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 10, 2025
f4e8369
swich to 'converter'
Nov 25, 2025
9780427
Merge branch 'wave-updates' of https://github.com/lmezilis/pypsa-eur …
Nov 25, 2025
5dddb45
Merge branch 'master' into wave-updates
lmezilis Nov 25, 2025
eaedc28
Merge remote-tracking branch 'upstream/master' into wave-updates
Jan 13, 2026
a8f31eb
Merge branch 'wave-updates' of https://github.com/lmezilis/pypsa-eur …
Jan 13, 2026
8476a69
integrate generators electricity
Jan 13, 2026
e0b6848
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 13, 2026
501f3e4
Merge branch 'master' into wave-updates
lmezilis Mar 20, 2026
d18d835
envs correction
Apr 21, 2026
332a8d7
Merge branch 'wave-updates' of https://github.com/lmezilis/pypsa-eur …
Apr 21, 2026
a01c944
correcting config.electricitty
Apr 21, 2026
3837d2c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 21, 2026
29e86e5
update pixi
Apr 21, 2026
6c651da
Merge branch 'wave-updates' of https://github.com/lmezilis/pypsa-eur …
Apr 21, 2026
98ebd44
update sector_network
Apr 21, 2026
300b896
Merge branch 'master' into wave-updates
lmezilis Apr 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions config/plotting.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ plotting:
- offwind-dc
- offwind-ac
- offwind-float
- wave-shallow
- wave-nearshore
- wave-farshore
- offsolar
- ror
- hydro
- PHS
Expand Down Expand Up @@ -374,6 +378,10 @@ plotting:
offwind-dc: "Offshore Wind (DC)"
offwind-float: "Offshore Wind (Floating)"
onwind: "Onshore Wind"
wave-shallow: "WEC Shallow"
wave-nearshore: "WEC Nearshore"
wave-farshore: "WEC Farshore"
offsolar: "Offshore Solar (Floating)"
solar: "Solar"
PHS: "Pumped Hydro Storage"
hydro: "Reservoir & Dam"
Expand Down Expand Up @@ -406,6 +414,10 @@ plotting:
offwind-float: "#b5e2fa"
offshore wind (Float): "#b5e2fa"
offshore wind float: "#b5e2fa"
# wave
wave-shallow: "#216406"
wave-nearshore: "#24961a"
wave-farshore: "#4ce766"
# water
hydro: '#298c81'
hydro reservoir: '#298c81'
Expand All @@ -418,6 +430,7 @@ plotting:
solar: "#f9d002"
solar PV: "#f9d002"
solar-hsat: "#fdb915"
offsolar: "#f2620f"
solar thermal: '#ffbf2b'
residential rural solar thermal: '#f1c069'
services rural solar thermal: '#eabf61'
Expand Down
15 changes: 13 additions & 2 deletions config/test/config.electricity.yaml
Comment thread
lmezilis marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ electricity:
co2limit: 100.e+6

extendable_carriers:
Generator: [solar, solar-hsat, onwind, offwind-ac, offwind-dc, offwind-float, OCGT, CCGT, nuclear]
Generator: [solar, solar-hsat, onwind, offwind-ac, offwind-dc, offwind-float, OCGT, CCGT, nuclear, wave-farshore, wave-nearshore, wave-shallow, offsolar]
StorageUnit: [battery]
Store: [H2]
Link: [H2 pipeline]

renewable_carriers: [solar, solar-hsat, onwind, offwind-ac, offwind-dc, offwind-float]
renewable_carriers: [solar, solar-hsat, onwind, offwind-ac, offwind-dc, offwind-float, wave-farshore, wave-nearshore, wave-shallow, offsolar]
estimate_renewable_capacities:
enable: true
from_powerplantmatching: true
Expand Down Expand Up @@ -62,6 +62,17 @@ renewable:
offwind-float:
max_depth: false
min_depth: false
wave-farshore:
max_depth: false
min_depth: false
wave-nearshore:
max_depth: false
min_depth: false
wave-shallow:
max_depth: false
offsolar:
max_depth: false
min_depth: false

clustering:
exclude_carriers: ["OCGT", "offwind-ac", "coal"]
Expand Down
2 changes: 1 addition & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ pytest = ">=8.4.2"

[environments]
doc = { features = ["doc"], no-default-feature = true }
test = ["test"]
test = ["test"]
9 changes: 5 additions & 4 deletions scripts/add_electricity.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def attach_wind_and_solar(
ds = ds.stack(bus_bin=["bus", "bin"])

supcar = car.split("-", 2)[0]
if supcar == "offwind":
if supcar == {"offwind", "wave", "offsolar"}:
distance = ds["average_distance"].to_pandas()
distance.index = distance.index.map(flatten)
submarine_cost = costs.at[car + "-connection-submarine", "capital_cost"]
Expand All @@ -528,21 +528,22 @@ def attach_wind_and_solar(

# Take 'offwind-float' capital cost for 'float', and 'offwind' capital cost for the rest ('ac' and 'dc')
midcar = car.split("-", 2)[1]
if midcar == "float":
if supcar == "offwind" and midcar != "float":
Comment thread
lmezilis marked this conversation as resolved.
capital_cost = (
costs.at[car, "capital_cost"]
costs.at["offwind", "capital_cost"]
+ costs.at[car + "-station", "capital_cost"]
+ connection_cost
)
else:
capital_cost = (
costs.at["offwind", "capital_cost"]
costs.at[car, "capital_cost"]
+ costs.at[car + "-station", "capital_cost"]
+ connection_cost
)
logger.info(
f"Added connection cost of {connection_cost.min():0.0f}-{connection_cost.max():0.0f} Eur/MW/a to {car}"
)

else:
capital_cost = costs.at[car, "capital_cost"]

Expand Down
8 changes: 6 additions & 2 deletions scripts/build_renewable_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
resource = params["resource"] # pv panel params / wind turbine params
resource["show_progress"] = not noprogress

tech = next(t for t in ["panel", "turbine"] if t in resource)
tech = next(t for t in ["panel", "turbine", "converter"] if t in resource)
models = resource[tech]
if not isinstance(models, dict):
models = {0: models}
Expand All @@ -151,7 +151,11 @@
regions = gpd.read_file(snakemake.input.distance_regions)
# do not pull up, set_index does not work if geo dataframe is empty
regions = regions.set_index("name").rename_axis("bus")
if snakemake.wildcards.technology.startswith("offwind"):
if (
snakemake.wildcards.technology.startswith("offwind")
or snakemake.wildcards.technology.startswith("wave")
or snakemake.wildcards.technology.startswith("offsolar")
):
# for offshore regions, the shortest distance to the shoreline is used
offshore_regions = availability.coords["bus"].values
regions = regions.loc[offshore_regions]
Expand Down
6 changes: 5 additions & 1 deletion scripts/plot_summary.py
Comment thread
lmezilis marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


# consolidate and rename

preferred_order = pd.Index(
[
"transmission lines",
Expand All @@ -33,10 +32,15 @@
"offshore wind",
"offshore wind (AC)",
"offshore wind (DC)",
"offshore floating wind",
"wave farshore",
"wave nearshore",
"wave shallow",
"solar PV",
"solar thermal",
"solar rooftop",
"solar",
"floating solar",
"building retrofitting",
"ground heat pump",
"air heat pump",
Expand Down
8 changes: 4 additions & 4 deletions scripts/prepare_sector_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def add_lifetime_wind_solar(n, costs):
"""
Add lifetime for solar and wind generators.
"""
for carrier in ["solar", "onwind", "offwind"]:
for carrier in ["solar", "onwind", "offwind", "wave", "offsolar"]:
gen_i = n.generators.index.str.contains(carrier)
n.generators.loc[gen_i, "lifetime"] = costs.at[carrier, "lifetime"]

Expand Down Expand Up @@ -492,15 +492,15 @@ def update_wind_solar_costs(

# Take 'offwind-float' capital cost for 'float', and 'offwind' capital cost for the rest ('ac' and 'dc')
midtech = tech.split("-", 2)[1]
if midtech == "float":
if tech == "offwind" and midtech != "float":
capital_cost = (
costs.at[tech, "capital_cost"]
costs.at["offwind", "capital_cost"]
+ costs.at[tech + "-station", "capital_cost"]
+ connection_cost
)
else:
capital_cost = (
costs.at["offwind", "capital_cost"]
costs.at[tech, "capital_cost"]
+ costs.at[tech + "-station", "capital_cost"]
+ connection_cost
)
Expand Down
9 changes: 7 additions & 2 deletions scripts/solve_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ def add_land_use_constraint(n: pypsa.Network, planning_horizons: str) -> None:
"offwind-ac",
"offwind-dc",
"offwind-float",
"offsolar",
"wave-shallow",
"wave-nearshore",
"wave-farshore",
]:
ext_i = (n.generators.carrier == carrier) & ~n.generators.p_nom_extendable
grouper = n.generators.loc[ext_i].index.str.replace(
Expand Down Expand Up @@ -1244,6 +1248,7 @@ def extra_functionality(
"""
config = n.config
constraints = config["solving"].get("constraints", {})

if constraints["BAU"] and n.generators.p_nom_extendable.any():
add_BAU_constraints(n, config)
if constraints["SAFE"] and n.generators.p_nom_extendable.any():
Expand All @@ -1258,9 +1263,9 @@ def extra_functionality(
if EQ_o := constraints["EQ"]:
add_EQ_constraints(n, EQ_o.replace("EQ", ""))

if {"solar-hsat", "solar"}.issubset(
if {"solar-hsat", "solar", "offsolar"}.issubset(
config["electricity"]["renewable_carriers"]
) and {"solar-hsat", "solar"}.issubset(
) and {"solar-hsat", "solar", "offsolar"}.issubset(
config["electricity"]["extendable_carriers"]["Generator"]
):
add_solar_potential_constraints(n, config)
Expand Down
Loading