Skip to content

add Biomethanation #257

Open
BertoGBG wants to merge 10 commits into
PyPSA:masterfrom
BertoGBG:biomethanation_PR
Open

add Biomethanation #257
BertoGBG wants to merge 10 commits into
PyPSA:masterfrom
BertoGBG:biomethanation_PR

Conversation

@BertoGBG

Copy link
Copy Markdown
Contributor

Closes # (if applicable).

Changes proposed in this Pull Request

added biomethantion technology (biological methantion of CO2 with electrolytic H2). The technology is part of the DEA catalogue and it was added via compile_cost_assumptions.py

Checklist

  • [ Y] Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in doc.
  • [ Y] Data source for new technologies is clearly stated.
  • Newly introduced dependencies are added to environment.yaml (if applicable).
  • A note for the release notes doc/release_notes.rst of the upcoming release is included.
  • [Y ] I consent to the release of this PR's code under the GPLv3 license.

df.index = df.index.str.replace(" Total Input", "_H2")

# Rename indices and update units
replacements = {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make the renames more consistent with the most commonly used names?

hydrogen-input
co2-input
electricity-input etc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated the names to the most commonly used names (eg. methane-output insect of Methane Output).
for the final DF and csv file.
Note that the index names set in biomethanation_dea (like "El-Input", "H-Output") (the lines you mentioned) are only used as search keys by str.contains() in the filtering at lines 2155–2204 and 2312–2340. They never appear in the final CSV.

@martavp

martavp commented Apr 9, 2026

Copy link
Copy Markdown
Member

I was trying to double-check the saved values for biochar but the output files are removed in this PR, please, add them again @BertoGBG

@BertoGBG

BertoGBG commented Apr 9, 2026

Copy link
Copy Markdown
Contributor Author

the cost files were added

@BertoGBG

Copy link
Copy Markdown
Contributor Author

@martavp this PR is only for the biomethanation technolgies, not biochar. They are alternative technolgies to Sabatier reaction and can substitute the biogas upgrading converting the CO2 in the biogas (and H2) to Methane through a biological process. It does not require CO2 removal and the CO2 in the biogas is retained in the system without the need for CO2 netowrk.

@euronion

euronion commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Hej @BertoGBG , is this PR ready for another round of review?

BertoGBG and others added 3 commits June 15, 2026 17:17
EW input rows belonged to EW_PR (PyPSA#256) and leaked in via shared branch
history. Removed from inputs/manual_input.csv and regenerated outputs so
PyPSA#257 contains biomethanation only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@BertoGBG

BertoGBG commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

I updated the PR and rebased to the latest verision of the master branch.

Heads up: CI on master itself is currently failing — test_get_sheet_location, test_get_data_from_dea, and test_add_carbon_capture fail on a clean master checkout (KeyError: ('cement capture', 'Variable O&M')).
My rebased PR inherits this, so their CI failure isn't from my changes — the snakemake build and output
regeneration pass. They should go green once master's tests are fixed.

@BertoGBG BertoGBG requested a review from fneum June 15, 2026 15:45
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.

4 participants