[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
a7376f542c
commit
5502568901
@ -645,21 +645,22 @@ def solve_network(n, config, solving, opts="", **kwargs):
|
|||||||
|
|
||||||
# check if enhanced_geothermal_performant might have changed model results
|
# check if enhanced_geothermal_performant might have changed model results
|
||||||
if (
|
if (
|
||||||
snakemake.config["sector"]["enhanced_geothermal"] and
|
snakemake.config["sector"]["enhanced_geothermal"]
|
||||||
snakemake.config["sector"]["enhanced_geothermal_performant"]
|
and snakemake.config["sector"]["enhanced_geothermal_performant"]
|
||||||
):
|
):
|
||||||
mask = (
|
mask = (mask := n.links.carrier == "geothermal heat") & (
|
||||||
(mask := n.links.carrier == "geothermal heat") &
|
n.links.loc[mask, "p_nom_max"] > 0.0
|
||||||
(n.links.loc[mask, "p_nom_max"] > 0.)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
saturated = n.links.loc[mask, "p_nom_max"] == n.links.loc[mask, "p_nom_opt"]
|
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:
|
if len(satbus := n.links.loc[saturated, "location"].unique()) > 0:
|
||||||
logger.warning((
|
logger.warning(
|
||||||
f"Potential for enhanced geothermal heat is saturated at bus(es): {satbus}\n"
|
(
|
||||||
"Consider setting config['sector']['enhanced_geothermal_performant'] to False."
|
f"Potential for enhanced geothermal heat is saturated at bus(es): {satbus}\n"
|
||||||
))
|
"Consider setting config['sector']['enhanced_geothermal_performant'] to False."
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
return n
|
return n
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user