Skip to content

Commit a018525

Browse files
committed
another fix
1 parent 17f7213 commit a018525

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pvlib/pvsystem.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2968,8 +2968,12 @@ def pvwatts_dc(effective_irradiance, temp_cell, pdc0, gamma_pdc, temp_ref=25.,
29682968
err_2 = k * (1000 - effective_irradiance) / (1000 - 200)
29692969

29702970
if hasattr(effective_irradiance, '__len__'):
2971-
pdc_marion[effective_irradiance <= 200] = pdc - (pdc0 * err_1)
2972-
pdc_marion[effective_irradiance > 200] = pdc - (pdc0 * err_2)
2971+
pdc_marion[effective_irradiance <= 200] = (
2972+
pdc[effective_irradiance <= 200] -
2973+
(pdc0 * err_1[effective_irradiance <= 200]))
2974+
pdc_marion[effective_irradiance > 200] = (
2975+
pdc[effective_irradiance > 200] -
2976+
(pdc0 * err_2[effective_irradiance > 200]))
29732977
else:
29742978
if effective_irradiance <= 200:
29752979
pdc_marion = pdc - (pdc0 * err_1)
@@ -2979,7 +2983,8 @@ def pvwatts_dc(effective_irradiance, temp_cell, pdc0, gamma_pdc, temp_ref=25.,
29792983
# "cap" Marion's correction at 1000 W/m^2
29802984
if cap_adjustment:
29812985
if hasattr(effective_irradiance, '__len__'):
2982-
pdc_marion[effective_irradiance >= 1000] = pdc
2986+
pdc_marion[effective_irradiance >= 1000] = (
2987+
pdc[effective_irradiance >= 1000])
29832988
else:
29842989
if effective_irradiance >= 1000:
29852990
pdc_marion = pdc

0 commit comments

Comments
 (0)