Skip to content

Commit bd16ac2

Browse files
committed
reorder err eqns
1 parent 250af5a commit bd16ac2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

pvlib/pvsystem.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2960,14 +2960,12 @@ def pvwatts_dc(effective_irradiance, temp_cell, pdc0, gamma_pdc, temp_ref=25.,
29602960

29612961
# apply Marion's correction if k is anything but zero
29622962
if k is not None:
2963-
err_1 = (k * (1 - (1 - effective_irradiance / 200)**4) /
2964-
(effective_irradiance / 1000))
2965-
err_2 = (k * (1000 - effective_irradiance) / (1000 - 200) /
2966-
(effective_irradiance / 1000))
2963+
err_1 = k * (1 - (1 - effective_irradiance / 200)**4)
2964+
err_2 = k * (1000 - effective_irradiance) / (1000 - 200)
29672965

29682966
pdc_marion = np.where(effective_irradiance <= 200,
2969-
pdc * (1 - err_1),
2970-
pdc * (1 - err_2))
2967+
pdc - (pdc0 * err_1),
2968+
pdc - (pdc0 * err_2))
29712969

29722970
# "cap" Marion's correction at 1000 W/m^2
29732971
if cap_adjustment:

0 commit comments

Comments
 (0)