Skip to content

Commit f61d72e

Browse files
committed
negative beam radiation is now set to zero
1 parent 5e146ad commit f61d72e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pvlib/irradiance.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ def globalinplane(AOI, DNI, In_Plane_SkyDiffuse, GR):
411411
AOI : float or Series
412412
Angle of incidence of solar rays with respect
413413
to the module surface, from :func:`aoi`.
414-
414+
415415
DNI : float or Series
416416
Direct normal irradiance (W/m^2), as measured
417417
from a TMY file or calculated with a clearsky model.
@@ -430,9 +430,14 @@ def globalinplane(AOI, DNI, In_Plane_SkyDiffuse, GR):
430430
* ``E`` : Total in-plane irradiance (W/m^2)
431431
* ``Eb`` : Total in-plane beam irradiance (W/m^2)
432432
* ``Ediff`` : Total in-plane diffuse irradiance (W/m^2)
433+
434+
Notes
435+
------
436+
Negative beam irradiation due to aoi :math:`> 90^{\circ}` or aoi
437+
:math:`< 0^{\circ}` is set to zero.
433438
'''
434439

435-
Eb = DNI * np.cos(np.radians(AOI))
440+
Eb = pd.Series(DNI * np.cos(np.radians(AOI))).clip_lower(0)
436441
E = Eb + In_Plane_SkyDiffuse + GR
437442
Ediff = In_Plane_SkyDiffuse + GR
438443

0 commit comments

Comments
 (0)