From 008539d635c1da9fff3d4852bd0ac0444e9cd52c Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Fri, 8 Mar 2024 19:29:25 +0100 Subject: [PATCH] add_electricity: fill max_hours also for nan values --- scripts/add_electricity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/add_electricity.py b/scripts/add_electricity.py index a799caec..06f6348d 100755 --- a/scripts/add_electricity.py +++ b/scripts/add_electricity.py @@ -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,