-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Calculate the effect of clouds ("cloud opacity factor") on spectral irradiance (spectrl2) #1201
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
827bd61
4819c06
e88d8f4
41f5a56
9387767
68ad5a2
604da6d
f11b407
8a65bc6
80bfe29
d90a8df
19db0b7
4ce600d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -35,42 +35,56 @@ def cloud_opacity_factor(irr_dif_clouds: np.ndarray, | |||||
irr_ghi_clouds: np.ndarray, | ||||||
spectra: dict) -> (np.ndarray, np.ndarray): | ||||||
""" | ||||||
Calculate the effect of "cloud opacity factor" on spectral irradiance under clear sky. | ||||||
|
||||||
First we calculate the rho fraction based on campbell_norman irradiance | ||||||
with clouds converted to POA irradiance. In the paper [1] these | ||||||
values are obtained from observations. The equations used for calculating cloud opacity factor | ||||||
to scale the clear sky spectral estimates using spectrl2. Results can be compared with sun calculator: | ||||||
https://www2.pvlighthouse.com.au/calculators/solar%20spectrum%20calculator/solar%20spectrum%20calculator.aspx | ||||||
Calculate the effect of "cloud opacity factor" on spectral | ||||||
irradiance under clear sky. | ||||||
|
||||||
First we calculate the rho fraction based on campbell_norman | ||||||
irradiance with clouds converted to POA irradiance. In the | ||||||
paper [1] these values are obtained from observations. The equations | ||||||
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.
Suggested change
Adding an underscore like this turns the [1] into a clickable link to the reference text below |
||||||
used for calculating cloud opacity factor to scale the clear sky | ||||||
spectral estimates using spectrl2. Results can be compared | ||||||
with sun calculator: | ||||||
https://www2.pvlighthouse.com.au/calculators/solar%20 | ||||||
spectrum%20calculator/solar%20spectrum%20calculator.aspx | ||||||
|
||||||
Parameters | ||||||
---------- | ||||||
irr_dif_clouds:np.ndarray | ||||||
Total diffuse irradiance (poa_diffuse) estimated using pvlib.irradiance.get_total_irradiance and | ||||||
pvlib.irradiance.campbell_norman irradiance with clouds (transmittance) | ||||||
Total diffuse irradiance (poa_diffuse) estimated using | ||||||
`pvlib.irradiance.get_total_irradiance` and | ||||||
`pvlib.irradiance.campbell_norman` irradiance with clouds | ||||||
(transmittance) | ||||||
|
||||||
irr_dir_clouds:np.ndarray | ||||||
Total direct irradiance (poa_direct) estimated using pvlib.irradiance.get_total_irradiance and | ||||||
pvlib.irradiance.campbell_norman irradiance with clouds (transmittance) | ||||||
Total direct irradiance (poa_direct) estimated using | ||||||
`pvlib.irradiance.get_total_irradiance` and | ||||||
`pvlib.irradiance.campbell_norman` irradiance with | ||||||
clouds (transmittance) | ||||||
|
||||||
irr_ghi_clouds:np.ndarray | ||||||
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 think these three parameters (according to [1]) are horizontal components, not in-plane components. It would be good to use the same parameter names as other functions (i.e. 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. Also is |
||||||
Total direct irradiance (poa_global) estimated using pvlib.irradiance.get_total_irradiance and | ||||||
pvlib.irradiance.campbell_norman irradiance with clouds (transmittance) | ||||||
Total direct irradiance (poa_global) estimated | ||||||
using `pvlib.irradiance.get_total_irradiance` and | ||||||
`pvlib.irradiance.campbell_norman irradiance | ||||||
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. Is campbell-norman actually a requirement? [1] seems to assume the user has measured irradiance components, so maybe the text for these parameters should be as simple as this: https://github.com/pvlib/pvlib-python/blob/master/pvlib/irradiance.py#L823-L830 |
||||||
with clouds (transmittance) | ||||||
|
||||||
spectra:np.ndarray | ||||||
Spectral irradiance output from pvlib.spectrum.spectrl2 under clear-sky conditions | ||||||
Spectral irradiance output from `pvlib.spectrum.spectrl2` | ||||||
under clear-sky conditions | ||||||
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.
|
||||||
|
||||||
|
||||||
Returns | ||||||
------- | ||||||
f_dir, f_diff spectral direct and diffuse irradiance scaled for cloudiness | ||||||
f_dir, f_diff spectral direct and diffuse irradiance | ||||||
scaled for cloudiness | ||||||
|
||||||
References | ||||||
---------- | ||||||
.. [1] Ref: Marco Ernst, Hendrik Holst, Matthias Winter, Pietro P. Altermatt, | ||||||
SunCalculator: A program to calculate the angular and spectral distribution of direct and | ||||||
diffuse solar radiation, Solar Energy Materials and Solar Cells, Volume 157, 2016, | ||||||
Pages 913-922, | ||||||
.. [1] Ref: Marco Ernst, Hendrik Holst, Matthias Winter, | ||||||
Pietro P. Altermatt, | ||||||
SunCalculator: A program to calculate the angular and spectral | ||||||
distribution of direct and diffuse solar radiation, Solar Energy | ||||||
Materials and Solar Cells, Volume 157, 2016, | ||||||
Pages 913-922, | ||||||
""" | ||||||
|
||||||
rho = irr_dif_clouds / irr_ghi_clouds | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although we might add type hints eventually (see e.g. #1146 (comment)), I think for now better to keep the signature unannotated (and see below points about types anyway).
Edit: also we should think about the function name -- seems like the function name should have something to do with spectrum.