-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add model='gueymard2003'
to get_relative_airmass
#1655
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
Changes from 3 commits
7310306
625eeb6
8a3f63f
cee7e41
29a534f
bc04a91
2eb7e95
d9aeb53
621d0b5
86aca9e
2686a54
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,9 +158,11 @@ def get_relative_airmass(zenith, model='kastenyoung1989'): | |
* 'gueymard1993' - See reference [4] - | ||
requires apparent sun zenith | ||
* 'young1994' - See reference [5] - | ||
requries true sun zenith | ||
requires true sun zenith | ||
* 'pickering2002' - See reference [6] - | ||
requires apparent sun zenith | ||
* 'gueymard2003' - See reference [7] - | ||
requires true sun zenith | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've put "true sun zenith" here because I found no mention of refraction correction, "apparent" etc in the reference, but it would be good if a reviewer could determine this with more confidence. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From Chris Gueymard: "My formulas all use the apparent position--Chris" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Chris also commented that the default should be a more modern model. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Does he have specific recommendations? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Implicitly, Gueymard 2003. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @adriesse for checking! Updated default: no objection from me, but I think it will have to wait for 0.10.0. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In a separate issue. I think there could be some general discussion about defaults actually. |
||
|
||
Returns | ||
------- | ||
|
@@ -196,7 +198,12 @@ def get_relative_airmass(zenith, model='kastenyoung1989'): | |
|
||
.. [6] Keith A. Pickering. "The Ancient Star Catalog". DIO 12:1, 20, | ||
|
||
.. [7] Matthew J. Reno, Clifford W. Hansen and Joshua S. Stein, "Global | ||
.. [7] C. Gueymard, "Direct solar transmittance and irradiance | ||
predictions with broadband models. Part I: detailed theoretical | ||
performance assessment". Solar Energy, vol 74, pp. 355-379, 2003. | ||
:doi:`10.1016/S0038-092X(03)00195-6` | ||
|
||
.. [8] Matthew J. Reno, Clifford W. Hansen and Joshua S. Stein, "Global | ||
Horizontal Irradiance Clear Sky Models: Implementation and Analysis" | ||
Sandia Report, (2012). | ||
AdamRJensen marked this conversation as resolved.
Show resolved
Hide resolved
kandersolar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
''' | ||
|
@@ -229,6 +236,9 @@ def get_relative_airmass(zenith, model='kastenyoung1989'): | |
elif 'gueymard1993' == model: | ||
am = (1.0 / (np.cos(zenith_rad) + | ||
0.00176759*(z)*((94.37515 - z) ** - 1.21563))) | ||
elif 'gueymard2003' == model: | ||
am = (1.0 / (np.cos(zenith_rad) + | ||
0.48353*(z**0.095846)/(96.741 - z)**1.754)) | ||
else: | ||
raise ValueError('%s is not a valid model for relativeairmass', model) | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.