Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct co2 potentials #1010

Merged
merged 5 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion config/config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,11 @@ sector:
regional_coal_demand: false
regional_co2_sequestration_potential:
enable: false
attribute: 'conservative estimate Mt'
attribute:
- conservative estimate Mt
- conservative estimate GAS Mt
- conservative estimate OIL Mt
- conservative estimate aquifer Mt
include_onshore: false
min_size: 3
max_size: 25
Expand Down
4 changes: 2 additions & 2 deletions doc/configtables/sector.csv
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ regional_methanol_demand,--,"{true, false}",Spatially resolve methanol demand. S
regional_oil_demand,--,"{true, false}",Spatially resolve oil demand. Set to true if regional CO2 constraints needed.
regional_co2 _sequestration_potential,,,
-- enable,--,"{true, false}",Add option for regionally-resolved geological carbon dioxide sequestration potentials based on `CO2StoP <https://setis.ec.europa.eu/european-co2-storage-database_en>`_.
-- attribute,--,string,Name of the attribute for the sequestration potential
-- attribute,--,string or list,Name (or list of names) of the attribute(s) for the sequestration potential
-- include_onshore,--,"{true, false}",Add options for including onshore sequestration potentials
-- min_size,Gt ,float,Any sites with lower potential than this value will be excluded
-- max_size,Gt ,float,The maximum sequestration potential for any one site.
Expand Down Expand Up @@ -143,5 +143,5 @@ limit_max_growth,,,
-- factor,p.u.,float,The maximum growth factor of a carrier (e.g. 1.3 allows 30% larger than max historic growth)
-- max_growth,,,
-- -- {carrier},GW,float,The historic maximum growth of a carrier
-- max_relative_growth,
-- max_relative_growth,,,
-- -- {carrier},p.u.,float,The historic maximum relative growth of a carrier
2 changes: 2 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Release Notes
Upcoming Release
================

* Include gas and oil fields and saline aquifers in estimation of CO2 sequestration potential.

* bugfix: convert Strings to pathlib.Path objects as input to ConfigSettings

* Allow the use of more solvers in clustering (Xpress, COPT, Gurobi, CPLEX, SCIP, MOSEK).
Expand Down
8 changes: 5 additions & 3 deletions scripts/build_sequestration_potentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,23 @@ def area(gdf):
def allocate_sequestration_potential(
gdf, regions, attr="conservative estimate Mt", threshold=3
):
gdf = gdf.loc[gdf[attr] > threshold, [attr, "geometry"]]
if isinstance(attr, str):
attr = [attr]
gdf = gdf.loc[gdf[attr].sum(axis=1) > threshold, attr + ["geometry"]]
gdf["area_sqkm"] = area(gdf)
overlay = gpd.overlay(regions, gdf, keep_geom_type=True)
overlay["share"] = area(overlay) / overlay["area_sqkm"]
adjust_cols = overlay.columns.difference({"name", "area_sqkm", "geometry", "share"})
overlay[adjust_cols] = overlay[adjust_cols].multiply(overlay["share"], axis=0)
return overlay.dissolve("name", aggfunc="sum")[attr]
return overlay.dissolve("name", aggfunc="sum")[attr].sum(axis=1)


if __name__ == "__main__":
if "snakemake" not in globals():
from _helpers import mock_snakemake

snakemake = mock_snakemake(
"build_sequestration_potentials", simpl="", clusters="181"
"build_sequestration_potentials", simpl="", clusters="128"
)

set_scenario_config(snakemake)
Expand Down
Loading