Skip to content

Interpolating biomass and cost data between usual 5-year increments for yearly myopic optimisation#1986

Open
LRydin wants to merge 1 commit intoPyPSA:masterfrom
LRydin:year_by_year_myopic
Open

Interpolating biomass and cost data between usual 5-year increments for yearly myopic optimisation#1986
LRydin wants to merge 1 commit intoPyPSA:masterfrom
LRydin:year_by_year_myopic

Conversation

@LRydin
Copy link
Copy Markdown

@LRydin LRydin commented Jan 16, 2026

This is my first PR. I've been toying around with the possibility of running year-by-year miopic optimisation. Shortly, I found that the only two extant obstacles were:

  • Missing yearly biomass potentials
  • Missing yearly technology costs

Thus, I've changed two things in this PR. First, I've created an elementary script that linearly interpolates the biomass potentials. Secondly, I've changed the retrieve.smk rule for the costs data from technology-data's `output'.

Closes # (if applicable).

Changes proposed in this Pull Request

Created:

  • scripts/retrieve_cost_data_interpolated.py

Edited:

  • rules/retrieve.smk
  • scripts/build_biomass_potentials.py

Doubt

I don't think my approach to linear interpolation could be improved, since it fundamentally just shifts the work that technology-data does to pypsa-eur. So this is a bit patchy

Note

  • I had some issues with plot_balance_map_interactive, but this could be an issue with upper bounds/limits, not to do with the optimisation.
  • I have not complete all the checklist stuff (new to this)

Checklist

  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to pixi.toml (using pixi add <dependency-name>).
  • Changes in configuration options are added in config/config.default.yaml.
  • Changes in configuration options are documented in doc/configtables/*.csv.
  • For new data sources or versions, these instructions have been followed.
  • A release note doc/release_notes.rst is added.

@LRydin
Copy link
Copy Markdown
Author

LRydin commented Jan 16, 2026

There is a lot I still need to do, but first, I'd welcome all input. Then I can get to fixing all the issues and stuff I have missed.

@fneum
Copy link
Copy Markdown
Member

fneum commented Feb 11, 2026

In principle, a good idea to support arbitrary years, even if linearly interpolated.

  1. I think the biomass interpolation already exists: build_biomass_potentials: link to planning_horizons wildcard, interpo… #744

  2. technology-data is going to be refactored into a Python package, which I guess will simplify passing your own configurations regarding cost assumptions. You're also right that the interpolation should be a task of technology-data repository and perhaps provide CSV files for each year.

@LRydin
Copy link
Copy Markdown
Author

LRydin commented Mar 3, 2026

I missed your comment, @fneum, sorry. I think, maybe the best approach is to open an issue/PR in the technology-data repo pertaining to yearly CSVs. Should we instead close this PR and tackle this via technology-data?

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.

2 participants