8000 [WIP] Adopt `ghi_clear` variable name for clearsky GHI by RDaxini · Pull Request #2273 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

[WIP] Adopt ghi_clear variable name for clearsky GHI #2273

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

Closed
wants to merge 24 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
bf1c0d8
irradiance.py: ghi_from_poa() and clearsky_index()
RDaxini Oct 21, 2024
37d17b8
clearsky.py: haurwitz(), detect_clearsky
RDaxini Oct 21, 2024
9fa9fdc
clearsky.py: detect_clearsky
RDaxini Oct 21, 2024
00ffbd9
irradiance.py: dirindex()
RDaxini Oct 21, 2024
b21e1eb
modify tests
RDaxini Oct 25, 2024
57288e7
add deprecation warning
RDaxini Nov 21, 2024
00d7b70
Update clearsky.py
RDaxini Nov 25, 2024
6c78cb8
Merge remote-tracking branch 'upstream/main' into ghi_clear
RDaxini Nov 25, 2024
5b273df
fix unrelated linting issues
RDaxini Nov 25, 2024
38a409d
fix unrelated linting issue
RDaxini Nov 25, 2024
263ad4e
Update test_clearsky.py
RDaxini Nov 25, 2024
ba5ffaa
Revert "Update test_clearsky.py"
RDaxini Nov 25, 2024
f45cf19
Reapply "Update test_clearsky.py"
RDaxini Nov 25, 2024
d7a6f83
Revert "Update test_clearsky.py"
RDaxini Nov 25, 2024
fbd49e9
Revert "fix unrelated linting issue"
RDaxini Nov 25, 2024
84987b0
Revert "fix unrelated linting issues"
RDaxini Nov 25, 2024
1622571
Revert "Merge remote-tracking branch 'upstream/main' into ghi_clear"
RDaxini Nov 25, 2024
5879282
Revert "Update clearsky.py"
RDaxini Nov 25, 2024
bbe9d4f
Revert "add deprecation warning"
RDaxini Nov 25, 2024
aeab5cc
Revert "modify tests"
RDaxini Nov 25, 2024
9be20a6
Revert "irradiance.py: dirindex()"
RDaxini Nov 25, 2024
efdbbd8
Revert "clearsky.py: detect_clearsky"
RDaxini Nov 25, 2024
feab85c
Revert "clearsky.py: haurwitz(), detect_clearsky"
RDaxini Nov 25, 2024
c9c6900
Revert "irradiance.py: ghi_from_poa() and clearsky_index()"
RDaxini Nov 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
irradiance.py: ghi_from_poa() and clearsky_index()
also added units to ghi_clear in clearsky_index()
  • Loading branch information
RDaxini committed Oct 21, 2024
commit bf1c0d80df69207f4e848b4ca4b9356efefdfcb5
10 changes: 5 additions & 5 deletions pvlib/irradiance.py
71F2
Original file line number Diff line number Diff line change
Expand Up @@ -1603,7 +1603,7 @@ def ghi_from_poa_driesse_2023(surface_tilt, surface_azimuth,
return ghi


def clearsky_index(ghi, clearsky_ghi, max_clearsky_index=2.0):
def clearsky_index(ghi, ghi_clear, max_clearsky_index=2.0):
"""
Calculate the clearsky index.

Expand All @@ -1615,8 +1615,8 @@ def clearsky_index(ghi, clearsky_ghi, max_clearsky_index=2.0):
ghi : numeric
Global horizontal irradiance. [Wm⁻²]

clearsky_ghi : numeric
Modeled clearsky GHI
ghi_clear : numeric
Modeled clearsky GHI. [Wm⁻²]

max_clearsky_index : numeric, default 2.0
Maximum value of the clearsky index. The default, 2.0, allows
Expand All @@ -1627,12 +1627,12 @@ def clearsky_index(ghi, clearsky_ghi, max_clearsky_index=2.0):
clearsky_index : numeric
Clearsky index
"""
clearsky_index = ghi / clearsky_ghi
clearsky_index = ghi / ghi_clear
# set +inf, -inf, and nans to zero
clearsky_index = np.where(~np.isfinite(clearsky_index), 0,
clearsky_index)
# but preserve nans in the input arrays
input_is_nan = ~np.isfinite(ghi) | ~np.isfinite(clearsky_ghi)
input_is_nan = ~np.isfinite(ghi) | ~np.isfinite(ghi_clear)
clearsky_index = np.where(input_is_nan, np.nan, clearsky_index)

clearsky_index = np.maximum(clearsky_index, 0)
Expand Down
0