changed config name to egs_performant, added saturation check
This commit is contained in:
parent
de605e2b6b
commit
a7376f542c
@ -493,7 +493,7 @@ sector:
|
||||
biosng: false
|
||||
enhanced_geothermal: true
|
||||
enhanced_geothermal_optimism: false # if true, egs costs are reducing towards 2050 according to Aghahosseini et al., (2020)
|
||||
enhanced_geothermal_best_only: true # if true, adds only the cheapest patch of EGS potential to each region
|
||||
enhanced_geothermal_performant: true # if true, adds only the cheapest patch of EGS potential to each region
|
||||
|
||||
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#industry
|
||||
industry:
|
||||
|
@ -643,6 +643,24 @@ def solve_network(n, config, solving, opts="", **kwargs):
|
||||
if "infeasible" in condition:
|
||||
raise RuntimeError("Solving status 'infeasible'")
|
||||
|
||||
# check if enhanced_geothermal_performant might have changed model results
|
||||
if (
|
||||
snakemake.config["sector"]["enhanced_geothermal"] and
|
||||
snakemake.config["sector"]["enhanced_geothermal_performant"]
|
||||
):
|
||||
mask = (
|
||||
(mask := n.links.carrier == "geothermal heat") &
|
||||
(n.links.loc[mask, "p_nom_max"] > 0.)
|
||||
)
|
||||
|
||||
saturated = n.links.loc[mask, "p_nom_max"] == n.links.loc[mask, "p_nom_opt"]
|
||||
|
||||
if len(satbus := n.links.loc[saturated, "location"].unique()) > 0:
|
||||
logger.warning((
|
||||
f"Potential for enhanced geothermal heat is saturated at bus(es): {satbus}\n"
|
||||
"Consider setting config['sector']['enhanced_geothermal_performant'] to False."
|
||||
))
|
||||
|
||||
return n
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user