simplify if statement
This commit is contained in:
parent
541e267a83
commit
6723191031
@ -199,13 +199,10 @@ def adjust_renewable_profiles(n, input_profiles, params, year):
|
|||||||
)
|
)
|
||||||
|
|
||||||
for carrier in params["carriers"]:
|
for carrier in params["carriers"]:
|
||||||
if carrier == "hydro":
|
if carrier == "hydro" or (carrier == "solar-hsat" and
|
||||||
continue
|
not snakemake.config["sector"]["solar_utility_singla_axis_tracking"]
|
||||||
if (
|
): continue
|
||||||
carrier == "solar-hsat"
|
|
||||||
and not snakemake.config["sector"]["solar_utility_singla_axis_tracking"]
|
|
||||||
):
|
|
||||||
continue
|
|
||||||
with xr.open_dataset(getattr(input_profiles, "profile_" + carrier)) as ds:
|
with xr.open_dataset(getattr(input_profiles, "profile_" + carrier)) as ds:
|
||||||
if ds.indexes["bus"].empty or "year" not in ds.indexes:
|
if ds.indexes["bus"].empty or "year" not in ds.indexes:
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user