Skip to content

OPSD EU: use energy_source_level_3 for Fueltype classification#288

Open
MaykThewessen wants to merge 2 commits into
PyPSA:masterfrom
MaykThewessen:fix/opsd-efficiency-and-biomass
Open

OPSD EU: use energy_source_level_3 for Fueltype classification#288
MaykThewessen wants to merge 2 commits into
PyPSA:masterfrom
MaykThewessen:fix/opsd-efficiency-and-biomass

Conversation

@MaykThewessen

Copy link
Copy Markdown

Summary

  • Use the most specific energy source from OPSD's three-level hierarchy for Fueltype
  • When energy_source_level_3 is set (e.g. "Biomass and biogas" for coal plants with biomass co-firing), prefer it over the top-level energy_source
  • Falls back through level_3energy_sourcelevel_1

This is a 3-line defensive change in the OPSD EU loader. Currently energy_source_level_3 is loaded from the CSV but silently dropped by .reindex(columns=target_columns) before it can influence Fueltype.

Context

The OPSD EU dataset uses a three-level energy source hierarchy. While level_3 currently only contains "Biomass and biogas" entries (156 plants across EU), this change ensures that if future OPSD releases or enriched data add co-firing flags for coal/waste plants, the information flows through to Fueltype correctly.

See also:

Test plan

  • OPSD() loader runs without errors
  • NL plants load correctly with expected fueltypes
  • Full powerplantmatching.powerplants() pipeline produces valid output

🤖 Generated with Claude Code

@MaykThewessen MaykThewessen force-pushed the fix/opsd-efficiency-and-biomass branch from 198a2ca to fbec1d0 Compare April 18, 2026 00:46
@MaykThewessen

Copy link
Copy Markdown
Author

Follow-up data point found while cross-checking the NL slice of the matched output against operator data:

Borssele 1 (nuclear) comes through at 515 MW, sourced from GEM (G100000500496). That figure appears to be gross capacity — IAEA PRIS lists 482 MWe net / 512 MWe gross, and operator EPZ states ~485 MW. Since the matched dataset otherwise reflects net capacities, this overstates NL nuclear by ~6%.

Smallest fix would be one manual_corrections.csv row:

projectID=G100000500496, Source=GEM, Capacity=485

Happy to push that row onto this branch as part of this PR, or open a separate one-line follow-up — whichever you prefer.

Use the most specific energy source classification from OPSD's
three-level hierarchy. When energy_source_level_3 is set (e.g.
"Biomass and biogas" for coal plants with biomass co-firing),
use it instead of the top-level energy_source. Falls back through
level_3 → energy_source → level_1.

Closes PyPSA#286

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MaykThewessen MaykThewessen force-pushed the fix/opsd-efficiency-and-biomass branch from 6a6095b to d81c7e0 Compare June 12, 2026 22:15
@MaykThewessen

Copy link
Copy Markdown
Author

Gentle nudge: still mergeable; addresses the energy_source_level_3 half of #286. Could a maintainer review when convenient? (The efficiency-column-drop half of #286 is separate and still open.)

GEM (projectID G100000500496) reports Borssele 1 at 515 MW, which is the
gross figure; IAEA PRIS lists 482 MWe net / 512 MWe gross and operator EPZ
states ~485 MW. The matched dataset otherwise reports net capacities, so the
GEM value overstated NL nuclear by ~6%. Add a capacity-only manual correction.
@MaykThewessen

Copy link
Copy Markdown
Author

Added the Borssele 1 capacity correction I mentioned above as a single manual_corrections.csv row (ea84536): GEM reports it at 515 MW (gross), corrected to net 485 MW (IAEA PRIS 482 MWe net / EPZ ~485 MW), consistent with the dataset's net-capacity convention. It's a capacity-only override, so it leaves all other Borssele 1 fields untouched.

Happy to split this into its own one-line PR if you'd rather keep this one scoped purely to the energy_source_level_3 change, just say the word.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant