Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A problem about calculating DLS_irradiance, a bug? #19

Closed
qiyang77 opened this issue Sep 8, 2018 · 5 comments
Closed

A problem about calculating DLS_irradiance, a bug? #19

qiyang77 opened this issue Sep 8, 2018 · 5 comments

Comments

@qiyang77
Copy link

qiyang77 commented Sep 8, 2018

As the introduction in tutorial3.ipynb , in Cell 3,
# compute irradiance on the ground using the solar altitude angle
dls_irr = untilted_direct_irr * (percent_diffuse + np.sin(solar_elevation))
The DLS_irr was calculated by "sin" of solar_elevation.
However, in capture.py , line 162
# compute irradiance on the ground using the solar altitude angle
ground_irr = untiltied_direct_irr * (percent_diffuse + np.cos (self.solar_elevation))
The same var was calculated by "cos" of solar_elevation.

This is a bug and which one is correct? Anyone can help me?

@qiyang77
Copy link
Author

qiyang77 commented Sep 8, 2018

The results came from running the code in tutorial 3 and “Capture.dls_irradiance()” function in capture.py are totally different.

@poynting
Copy link
Contributor

poynting commented Sep 8, 2018 via email

@qiyang77
Copy link
Author

qiyang77 commented Sep 9, 2018

Thank you @poynting ,I saw an issue that had been shut down (#11 ).
It is seem like we should use sin(solar_elevation) to correct the direct irradiance
Therefore, the tutorial code should be the correct but the library code maybe wrong.

@ComteDeLooz
Copy link

Hi,
The solar elevation is the altitude of the sun above the horizon (= 90° - sun zenith angle). Therefore, I think we should indeed use np.sin(solar_elevation). If not, this means if the sun is just at the horizon (elevation of 0°), it contributes more to the irradiance on the ground (np.cos(0°) = 1) than if the sun is at zenith (np.cos(90°) = 0) which does not seem logic to me. But maybe I am missing something...

@poynting
Copy link
Contributor

Fixed in c1483c4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants