Permalink
Browse files

trigon.py: clip negative direct irradiance

  • Loading branch information...
sjpfenninger committed Nov 23, 2017
1 parent a1cb93c commit 2a56320982e65a79750d420969ddc1ebb0774ef1
Showing with 3 additions and 1 deletion.
  1. +3 −1 gsee/trigon.py
@@ -207,7 +207,9 @@ def aperture_irradiance(direct, diffuse, coords,
else:
raise ValueError('Invalid setting for tracking: {}'.format(tracking))
# 4. Compute direct and diffuse irradiance on plane
plane_direct = (dni * np.cos(incidence)).fillna(0)
# clip_lower(0) ensures that very low panel to sun altitude angles do not
# result in negative direct irradiance (reflection)
plane_direct = (dni * np.cos(incidence)).fillna(0).clip_lower(0)
plane_diffuse = (diffuse * ((1 + np.cos(panel_tilt)) / 2)
+ albedo * (direct + diffuse)
* ((1 - np.cos(panel_tilt)) / 2)).fillna(0)

0 comments on commit 2a56320

Please sign in to comment.