From 5a70881d71cf6e599e5dfb58dee0af649c94d8bd Mon Sep 17 00:00:00 2001 From: Johann Loux Date: Fri, 7 Jan 2022 13:06:37 +0100 Subject: [PATCH 1/7] Modify cloud_cover_to_transmittance_linear documentation replacing ghi with transmittance --- pvlib/forecast.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pvlib/forecast.py b/pvlib/forecast.py index 4b90ca3e05..021db19dcc 100644 --- a/pvlib/forecast.py +++ b/pvlib/forecast.py @@ -512,8 +512,8 @@ def cloud_cover_to_irradiance_clearsky_scaling(self, cloud_cover, def cloud_cover_to_transmittance_linear(self, cloud_cover, offset=0.75, **kwargs): """ - Convert cloud cover to atmospheric transmittance using a linear - model. + Convert cloud cover percentage to atmospheric transmittance ratio using a + linear model. 0% cloud cover returns offset. @@ -530,8 +530,8 @@ def cloud_cover_to_transmittance_linear(self, cloud_cover, offset=0.75, Returns ------- - ghi : numeric - Estimated GHI. + transmittance : numeric + Estimated transmittance ratio. """ transmittance = ((100.0 - cloud_cover) / 100.0) * offset From a8602edc6ea8f72d768b46ecd4a8e2dde8c568c0 Mon Sep 17 00:00:00 2001 From: Johann Loux Date: Fri, 7 Jan 2022 13:39:29 +0100 Subject: [PATCH 2/7] Add documentation lines into v0.9.1.rst --- docs/sphinx/source/whatsnew/v0.9.1.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/sphinx/source/whatsnew/v0.9.1.rst b/docs/sphinx/source/whatsnew/v0.9.1.rst index 64fc94cfa1..ebafbacac0 100644 --- a/docs/sphinx/source/whatsnew/v0.9.1.rst +++ b/docs/sphinx/source/whatsnew/v0.9.1.rst @@ -29,6 +29,9 @@ Testing Documentation ~~~~~~~~~~~~~ +* Fix documentation return error in :py:meth:`pvlib.forecast.ForecastModel.cloud_cover_to_transmittance_linear` + (:issue:`1367`) + Requirements ~~~~~~~~~~~~ @@ -41,3 +44,4 @@ Contributors * Christian Weickhmann (:ghuser:`cweickhmann`) * Kevin Anderson (:ghuser:`kanderso-nrel`) * Adam R. Jensen (:ghuser:`AdamRJensen`) +* Johann Loux (:ghuser:`JoLo90`) From 6b6e1a23b7f7b94ab0385392537594fdf55587e6 Mon Sep 17 00:00:00 2001 From: Johann Loux Date: Fri, 7 Jan 2022 13:42:50 +0100 Subject: [PATCH 3/7] Modify line length in documentation --- pvlib/forecast.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pvlib/forecast.py b/pvlib/forecast.py index 021db19dcc..0950490e87 100644 --- a/pvlib/forecast.py +++ b/pvlib/forecast.py @@ -512,8 +512,8 @@ def cloud_cover_to_irradiance_clearsky_scaling(self, cloud_cover, def cloud_cover_to_transmittance_linear(self, cloud_cover, offset=0.75, **kwargs): """ - Convert cloud cover percentage to atmospheric transmittance ratio using a - linear model. + Convert cloud cover percentage to atmospheric transmittance ratio + using a linear model. 0% cloud cover returns offset. From 4034f5a7c2a95d51f77aed2ec405bb8d181b93df Mon Sep 17 00:00:00 2001 From: Johann Loux Date: Fri, 7 Jan 2022 14:00:39 +0100 Subject: [PATCH 4/7] Small modifs doc forecast.py --- pvlib/forecast.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pvlib/forecast.py b/pvlib/forecast.py index 0950490e87..6a91058b88 100644 --- a/pvlib/forecast.py +++ b/pvlib/forecast.py @@ -512,7 +512,7 @@ def cloud_cover_to_irradiance_clearsky_scaling(self, cloud_cover, def cloud_cover_to_transmittance_linear(self, cloud_cover, offset=0.75, **kwargs): """ - Convert cloud cover percentage to atmospheric transmittance ratio + Convert cloud cover (percentage) to atmospheric transmittance (ratio) using a linear model. 0% cloud cover returns offset. @@ -524,14 +524,14 @@ def cloud_cover_to_transmittance_linear(self, cloud_cover, offset=0.75, cloud_cover : numeric Cloud cover in %. offset : numeric, default 0.75 - Determines the maximum transmittance. + Determines the maximum transmittance (ratio). kwargs Not used. Returns ------- transmittance : numeric - Estimated transmittance ratio. + Estimated transmittance (ratio). """ transmittance = ((100.0 - cloud_cover) / 100.0) * offset From d6e0feb75b8de8518dc6450259ef69c690b55d76 Mon Sep 17 00:00:00 2001 From: Johann Loux Date: Fri, 7 Jan 2022 14:02:10 +0100 Subject: [PATCH 5/7] Small modifs doc forecast.py --- docs/sphinx/source/whatsnew/v0.9.1.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sphinx/source/whatsnew/v0.9.1.rst b/docs/sphinx/source/whatsnew/v0.9.1.rst index ebafbacac0..1d8862d67f 100644 --- a/docs/sphinx/source/whatsnew/v0.9.1.rst +++ b/docs/sphinx/source/whatsnew/v0.9.1.rst @@ -30,7 +30,7 @@ Testing Documentation ~~~~~~~~~~~~~ * Fix documentation return error in :py:meth:`pvlib.forecast.ForecastModel.cloud_cover_to_transmittance_linear` - (:issue:`1367`) + (:issue:`1367`, :pull:`1370`) Requirements From 6d4f967712f52a6dc581f5d9b92699afb774540e Mon Sep 17 00:00:00 2001 From: Johann Lo <65318981+JoLo90@users.noreply.github.com> Date: Fri, 7 Jan 2022 18:12:19 +0100 Subject: [PATCH 6/7] Update pvlib/forecast.py Co-authored-by: Cliff Hansen --- pvlib/forecast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvlib/forecast.py b/pvlib/forecast.py index 6a91058b88..776333c8a1 100644 --- a/pvlib/forecast.py +++ b/pvlib/forecast.py @@ -531,7 +531,7 @@ def cloud_cover_to_transmittance_linear(self, cloud_cover, offset=0.75, Returns ------- transmittance : numeric - Estimated transmittance (ratio). + The fraction of extraterrestrial irradiance that reaches the ground. [unitless] """ transmittance = ((100.0 - cloud_cover) / 100.0) * offset From 3beecc4132efdc4722b96f18748a8f6145dbe747 Mon Sep 17 00:00:00 2001 From: Johann Loux Date: Fri, 7 Jan 2022 18:18:39 +0100 Subject: [PATCH 7/7] Rewording documentation forecast.py --- pvlib/forecast.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pvlib/forecast.py b/pvlib/forecast.py index 776333c8a1..634ae75ab2 100644 --- a/pvlib/forecast.py +++ b/pvlib/forecast.py @@ -512,10 +512,10 @@ def cloud_cover_to_irradiance_clearsky_scaling(self, cloud_cover, def cloud_cover_to_transmittance_linear(self, cloud_cover, offset=0.75, **kwargs): """ - Convert cloud cover (percentage) to atmospheric transmittance (ratio) + Convert cloud cover (percentage) to atmospheric transmittance using a linear model. - 0% cloud cover returns offset. + 0% cloud cover returns "offset". 100% cloud cover returns 0. @@ -524,14 +524,15 @@ def cloud_cover_to_transmittance_linear(self, cloud_cover, offset=0.75, cloud_cover : numeric Cloud cover in %. offset : numeric, default 0.75 - Determines the maximum transmittance (ratio). + Determines the maximum transmittance. [unitless] kwargs Not used. Returns ------- transmittance : numeric - The fraction of extraterrestrial irradiance that reaches the ground. [unitless] + The fraction of extraterrestrial irradiance that reaches + the ground. [unitless] """ transmittance = ((100.0 - cloud_cover) / 100.0) * offset