Repository navigation
Conversation
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>
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
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.
| carrier="co2 biochar", | ||
| e_nom_extendable=True, | ||
| e_nom_max=( | ||
| biochar_potentials["potential [sqkm]"].values |
There was a problem hiding this comment.
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
| w, config_provider("renewable", w.technology, "cutout")(w) | ||
| ), | ||
| output: | ||
| resources( |
There was a problem hiding this comment.
| resources( | |
| nc=resources( |
| carrier="biochar heat", | ||
| ) | ||
| biochar_heat_bus_waste = node + " biochar heat waste" | ||
| n.add("Bus", biochar_heat_bus_waste, carrier="biochar heat") |
There was a problem hiding this comment.
| n.add("Bus", biochar_heat_bus_waste, carrier="biochar heat") | |
| n.add("Bus", biochar_heat_waste, carrier="biochar heat") |
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>
Follows the rename in technology-data PR PyPSA#258. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The comment have been adressed and the code runs based on PR #258 from technology-data |
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:
doc/release_notes.md.If applicable:
scripts/lib/validation.doc/*.mdfiles.