add_electricity: fill max_hours also for nan values

This commit is contained in:
Fabian Neumann 2024-03-08 19:29:25 +01:00
parent d7ebeb3843
commit 008539d635

View File

@ -586,7 +586,7 @@ def attach_hydro(n, costs, ppl, profile_hydro, hydro_capacities, carriers, **par
# fill missing max hours to params value and
# assume no natural inflow due to lack of data
max_hours = params.get("PHS_max_hours", 6)
phs = phs.replace({"max_hours": {0: max_hours}})
phs = phs.replace({"max_hours": {0: max_hours, np.nan: max_hours}})
n.madd(
"StorageUnit",
phs.index,