Skip to content

add Biochar as carbon removal technology - #2231

Open
BertoGBG wants to merge 11 commits into
PyPSA:masterfrom
BertoGBG:biochar_PR
Open

add Biochar as carbon removal technology#2231
BertoGBG wants to merge 11 commits into
PyPSA:masterfrom
BertoGBG:biochar_PR

Conversation

@BertoGBG

Copy link
Copy Markdown

Closes # (if applicable).

Changes proposed in this Pull Request

This PR introduces Biochar as a Carbon Dioxide Removal (CDR) technology, based on #2141.
Biochar is a land-based CDR technology and its technical potential is related to land availability. As with enhanced rock weathering, the land available is calculated from the CORINE Land Cover dataset using the shared build_available_land.py script, which aggregates a per-bus land-eligibility availability matrix into eligible land area pernetwork node (in km²). That availability matrix is itself produced by a new determine_carbon_dioxide_removal_availability_matrix rule, which reuses the existing scripts/determine_availability_matrix.py unchanged (the same script already used for onwind/offwind/solar). Eligibility is governed by CORINE codes for non-irrigated arable land (potential biochar feedstock land).

#NOTE: biochar's land-eligibility settings (corine, natura, cutout, excluder_resolution) live under renewable: rather than a CDR-specific namespace, for the same reason discussed in the enhanced rock weathering CDR PR: build_available_land.py/determine_availability_matrix.py reuse the same atlite ExclusionContainer machinery and config shape already used for onwind/offwind/solar, read generically via config_provider("renewable", w.technology,
...). It's a pragmatic reuse of existing land-eligibility infrastructure, not a claim that biochar is a power-generation technology. Open to moving it to a separate namespace if preferred — worth deciding consistently across all land-based CDR technologies (rock weathering, biochar, and afforestation to follow) rather than per-PR.

The actual implementation of the CDR technology is part of scripts/prepare_sector_network.py (add_biochar()), which adds biochar as Bus/Store/Link components sharing a single co2 biochar carrier, the Link converts solid biomass
and electricity into squestered biochar-carbon (drawn from the atmosphere), and optionally exports pyrolysis waste heat to the urban central heating system (config by sector.biochar.heat_output).
The config.default.yaml contains the main parameters for calculating the CDR potential (application_per_sqkm, max_land_usage, number_years, under a top-level biochar: block), and sets sector.biochar.enable (and sector.biochar.heat_output) to false by default.

NOTE on Technology-data version

Data dependency note (technology-data)

add_biochar() requires a "biochar pyrolysis" cost entry with biomass-input, electricity-input, heat-output, capital_cost, and VOM parameters. Unlike enhanced rock weathering's data (already released in technology-data v0.15.0), biochar's cost data is not yet part of any released technology-data version, not v0.14.0 (currently pinned as "latest supported" in data/versions.csv), nor v0.15.0. It is currently only available in the PR PyPSA/technology-data#258.

Hence, running with sector.biochar.enable: true today will raise a KeyError.

Checklist

Required:

  • [ OK] Changes are tested locally and behave as expected.
  • [ OK] Code and workflow changes are documented.
  • [ OK] A release note entry is added to doc/release_notes.md.
  • [OK ] The description is human-written and any AI-generated content is marked.

If applicable:

  • [OK ] Changes in configuration options are reflected in scripts/lib/validation.
  • For new data sources or versions, these instructions have been followed.
  • [ OK] New rules are documented in the appropriate doc/*.md files.

BertoGBG and others added 4 commits June 23, 2026 09:15
Ported from the a_CDRs development branch. Adds biochar production
(biomass pyrolysis with stable-carbon soil storage) as an optional CDR
technology: a single pyrolysis Link per node converting biomass and
electricity into stored biochar-carbon, with optional district-heat
export. Land potential comes from the shared CORINE-based availability-
matrix machinery (determine_carbon_dioxide_removal_availability_matrix +
build_available_land), reused here for biochar only.

Off by default (sector.biochar.enable: false).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@BertoGBG

Copy link
Copy Markdown
Author

@martavp @fneum

@martavp
martavp requested review from fneum and martavp August 12, 2026 11:21

@martavp martavp left a comment

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.

Thanks @BertoGBG , I reviewed and left a few suggestions that you can include

I also tested the code locally and it worked.

Some elements that are missing:

[ ] Comments in config file should be moved to config/schema.default.json

[ ] Move all parameters on biochar under the same section in the config file

[ ] Add release notes

I added @fneum as a suggested reviewer.

Comment thread config/config.default.yaml Outdated
Comment thread config/config.default.yaml Outdated
Comment thread scripts/prepare_sector_network.py Outdated
carrier="co2 biochar",
e_nom_extendable=True,
e_nom_max=(
biochar_potentials["potential [sqkm]"].values

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.

similarly to rock weathering, this can be named biochar_land so that we reserve the name "potentials " to the mutiplication

https://github.com/PyPSA/pypsa-eur/pull/2229/changes#r3764341512

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

solved in commit 9442c2b

Comment thread config/config.default.yaml Outdated
Comment thread rules/build_sector.smk Outdated
w, config_provider("renewable", w.technology, "cutout")(w)
),
output:
resources(

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.

Suggested change
resources(
nc=resources(

@BertoGBG BertoGBG Aug 18, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

solved in commit 9442c2b

Comment thread scripts/prepare_sector_network.py Outdated
carrier="biochar heat",
)
biochar_heat_bus_waste = node + " biochar heat waste"
n.add("Bus", biochar_heat_bus_waste, carrier="biochar heat")

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.

Suggested change
n.add("Bus", biochar_heat_bus_waste, carrier="biochar heat")
n.add("Bus", biochar_heat_waste, carrier="biochar heat")

@BertoGBG BertoGBG Aug 18, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

solved in commit 9442c2b

Comment thread scripts/prepare_sector_network.py Outdated
Comment thread scripts/prepare_sector_network.py Outdated
Comment thread config/config.default.yaml Outdated
BertoGBG and others added 5 commits August 17, 2026 22:57
Co-authored-by: martavp <30744159+martavp@users.noreply.github.com>
Co-authored-by: martavp <30744159+martavp@users.noreply.github.com>
Co-authored-by: martavp <30744159+martavp@users.noreply.github.com>
@BertoGBG
BertoGBG requested a review from martavp August 18, 2026 12:51
@BertoGBG

Copy link
Copy Markdown
Author

@martavp @fneum the comment have been adressed, ready for a new review

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.

3 participants