add_electricity: make adding carriers in attach_wind_and_solar safer
This commit is contained in:
parent
e34cec427b
commit
1c1d45b1f5
@ -358,12 +358,11 @@ def update_transmission_costs(n, costs, length_factor=1.0):
|
||||
def attach_wind_and_solar(
|
||||
n, costs, input_profiles, carriers, extendable_carriers, line_length_factor=1
|
||||
):
|
||||
add_missing_carriers(n, carriers)
|
||||
for car in carriers:
|
||||
if car == "hydro":
|
||||
continue
|
||||
|
||||
n.add("Carrier", car)
|
||||
|
||||
with xr.open_dataset(getattr(input_profiles, "profile_" + car)) as ds:
|
||||
if ds.indexes["bus"].empty:
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user