10000 fixes issue with cloud_cover_to_transmittance_linear ignoring offset … · adarga-Polytech/pvlib-python@2d08caa · GitHub
[go: up one dir, main page]

Skip to content

Commit 2d08caa

Browse files
KonstantinTrwholmgren
authored andcommitted
fixes issue with cloud_cover_to_transmittance_linear ignoring offset kw arg
* fix for issue pvlib#343 Now, passed 'offset' parameter are used instead of it's default value. * test for issue pvlib#343
1 parent bf3ff8e commit 2d08caa

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pvlib/forecast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def cloud_cover_to_transmittance_linear(self, cloud_cover, offset=0.75,
473473
ghi : numeric
474474
Estimated GHI.
475475
"""
476-
transmittance = ((100.0 - cloud_cover) / 100.0) * 0.75
476+
transmittance = ((100.0 - cloud_cover) / 100.0) * offset
477477

478478
return transmittance
479479

pvlib/test/test_forecast.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ def test_cloud_cover_to_transmittance_linear():
129129
amodel = GFS()
130130
assert_allclose(amodel.cloud_cover_to_transmittance_linear(0), 0.75)
131131
assert_allclose(amodel.cloud_cover_to_transmittance_linear(100), 0.0)
132+
assert_allclose(amodel.cloud_cover_to_transmittance_linear(0, 0.5), 0.5)
132133

133134

134135
def test_cloud_cover_to_ghi_linear():

0 commit comments

Comments
 (0)
0