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"]:
|
||||
if carrier == "hydro":
|
||||
continue
|
||||
if (
|
||||
carrier == "solar-hsat"
|
||||
and not snakemake.config["sector"]["solar_utility_singla_axis_tracking"]
|
||||
):
|
||||
continue
|
||||
if carrier == "hydro" or (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:
|
||||
if ds.indexes["bus"].empty or "year" not in ds.indexes:
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user