From 4ca58a5cd67d5a6d986908f2bfb2c1e8caf9b18a Mon Sep 17 00:00:00 2001 From: ayushjariyal Date: Sun, 9 Feb 2025 17:27:54 +0530 Subject: [PATCH 1/8] Updating Townsends snow model references --- pvlib/snow.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pvlib/snow.py b/pvlib/snow.py index 190fe7baae..857e8f74be 100644 --- a/pvlib/snow.py +++ b/pvlib/snow.py @@ -278,9 +278,8 @@ def loss_townsend(snow_total, snow_events, surface_tilt, relative_humidity, axis to the module edge. The parameter `string_factor` is an enhancement added to the model after - publication of [1]_ per private communication with the model's author. The - definition for snow events documented above is also based on private - communication with the model's author. + publication of [1]_, as described in [2]_, + The defination for snow events documented above is based on [3]_. References ---------- @@ -288,6 +287,10 @@ def loss_townsend(snow_total, snow_events, surface_tilt, relative_humidity, update from two winters of measurements in the SIERRA. 37th IEEE Photovoltaic Specialists Conference, Seattle, WA, USA. :doi:`10.1109/PVSC.2011.6186627` + .. [2] Townsend, T. (2025). Snow Loss Model Enhancements. + Available at: https://www.nrel.gov/docs/fy25osti/90585.pdf + .. [3] Townsend, T. (2025). Snow Events Definition. + DOI: 10.13140/RG.2.2.14299.68647 ''' # unit conversions from cm and m to in, from C to K, and from % to fraction From 47c9d1850c7e5eff283f681da5460fa812597a74 Mon Sep 17 00:00:00 2001 From: ayushjariyal Date: Sun, 9 Feb 2025 23:15:08 +0530 Subject: [PATCH 2/8] Applying reviews --- pvlib/snow.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pvlib/snow.py b/pvlib/snow.py index 857e8f74be..d3cc256825 100644 --- a/pvlib/snow.py +++ b/pvlib/snow.py @@ -278,8 +278,8 @@ def loss_townsend(snow_total, snow_events, surface_tilt, relative_humidity, axis to the module edge. The parameter `string_factor` is an enhancement added to the model after - publication of [1]_, as described in [2]_, - The defination for snow events documented above is based on [3]_. + publication of [1]_, as described in [2]_. + The definition for snow events documented above is based on [3]_. References ---------- @@ -290,7 +290,7 @@ def loss_townsend(snow_total, snow_events, surface_tilt, relative_humidity, .. [2] Townsend, T. (2025). Snow Loss Model Enhancements. Available at: https://www.nrel.gov/docs/fy25osti/90585.pdf .. [3] Townsend, T. (2025). Snow Events Definition. - DOI: 10.13140/RG.2.2.14299.68647 + :doi:`10.13140/RG.2.2.14299.68647` ''' # unit conversions from cm and m to in, from C to K, and from % to fraction From 57bca5eef9a7c9da2d7fe2c5afd888cca4bdd90c Mon Sep 17 00:00:00 2001 From: ayushjariyal Date: Mon, 10 Feb 2025 07:04:21 +0530 Subject: [PATCH 3/8] Adding a note to the whatsnew file for v0.11.3 --- docs/sphinx/source/whatsnew/v0.11.3.rst | 2 ++ pvlib/snow.py | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/sphinx/source/whatsnew/v0.11.3.rst b/docs/sphinx/source/whatsnew/v0.11.3.rst index 5a847c01de..ccb39a6af5 100644 --- a/docs/sphinx/source/whatsnew/v0.11.3.rst +++ b/docs/sphinx/source/whatsnew/v0.11.3.rst @@ -17,6 +17,8 @@ Documentation ~~~~~~~~~~~~~ * Fix Procedural and Object Oriented simulation examples having slightly different results, in :ref:`introtutorial`. (:issue:`2366`, :pull:`2367`) * Restructure the user guide with subsections (:issue:`2302`, :pull:`2310`) +* Fix fornatting in the References section to ensure proper line length and indentation, + specifically for reference [2] in the documentation.(:issue:`2383`, :pull:`2384`) Testing ~~~~~~~ diff --git a/pvlib/snow.py b/pvlib/snow.py index d3cc256825..0ea161a4fd 100644 --- a/pvlib/snow.py +++ b/pvlib/snow.py @@ -287,8 +287,10 @@ def loss_townsend(snow_total, snow_events, surface_tilt, relative_humidity, update from two winters of measurements in the SIERRA. 37th IEEE Photovoltaic Specialists Conference, Seattle, WA, USA. :doi:`10.1109/PVSC.2011.6186627` - .. [2] Townsend, T. (2025). Snow Loss Model Enhancements. - Available at: https://www.nrel.gov/docs/fy25osti/90585.pdf + .. [2] Townsend, T. and Previtali, J. (2023). A Fresh Dusting: Current Uses of the Townsend + Snow Model. In "Photovoltaic Reliability Workshop (PVRW) 2023 Proceedings: Posters.", + ed. Silverman, T. J. Dec. 2023. NREL/CP-5900-87918. + Available at: https://www.nrel.gov/docs/fy25osti/90585.pdf .. [3] Townsend, T. (2025). Snow Events Definition. :doi:`10.13140/RG.2.2.14299.68647` ''' From 95e7b08e49128ad212307b57c90c997f1ba5463d Mon Sep 17 00:00:00 2001 From: ayushjariyal Date: Mon, 10 Feb 2025 14:40:27 +0530 Subject: [PATCH 4/8] Applying review --- docs/sphinx/source/whatsnew/v0.11.3.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/sphinx/source/whatsnew/v0.11.3.rst b/docs/sphinx/source/whatsnew/v0.11.3.rst index ccb39a6af5..25b15222b5 100644 --- a/docs/sphinx/source/whatsnew/v0.11.3.rst +++ b/docs/sphinx/source/whatsnew/v0.11.3.rst @@ -17,8 +17,7 @@ Documentation ~~~~~~~~~~~~~ * Fix Procedural and Object Oriented simulation examples having slightly different results, in :ref:`introtutorial`. (:issue:`2366`, :pull:`2367`) * Restructure the user guide with subsections (:issue:`2302`, :pull:`2310`) -* Fix fornatting in the References section to ensure proper line length and indentation, - specifically for reference [2] in the documentation.(:issue:`2383`, :pull:`2384`) +* Add references for :py:func:`pvlib.snow.loss_townsend`. (:issue:`2383`, :pull:`2384`) Testing ~~~~~~~ From b80892bec596602ef88745702f108d387971936a Mon Sep 17 00:00:00 2001 From: ayushjariyal Date: Mon, 10 Feb 2025 21:59:44 +0530 Subject: [PATCH 5/8] Add myself as contributor and apply reviews --- docs/sphinx/source/whatsnew/v0.11.3.rst | 1 + pvlib/snow.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/sphinx/source/whatsnew/v0.11.3.rst b/docs/sphinx/source/whatsnew/v0.11.3.rst index 25b15222b5..1d04ecc535 100644 --- a/docs/sphinx/source/whatsnew/v0.11.3.rst +++ b/docs/sphinx/source/whatsnew/v0.11.3.rst @@ -41,3 +41,4 @@ Contributors * Mark Campanelli (:ghuser:`markcampanelli`) * Jason Lun Leung (:ghuser:`jason-rpkt`) * Manoj K S (:ghuser:`manojks1999`) +* Ayush jariyal (:ghuser:`ayushjariyal`) diff --git a/pvlib/snow.py b/pvlib/snow.py index 0ea161a4fd..883ca2c203 100644 --- a/pvlib/snow.py +++ b/pvlib/snow.py @@ -287,9 +287,9 @@ def loss_townsend(snow_total, snow_events, surface_tilt, relative_humidity, update from two winters of measurements in the SIERRA. 37th IEEE Photovoltaic Specialists Conference, Seattle, WA, USA. :doi:`10.1109/PVSC.2011.6186627` - .. [2] Townsend, T. and Previtali, J. (2023). A Fresh Dusting: Current Uses of the Townsend - Snow Model. In "Photovoltaic Reliability Workshop (PVRW) 2023 Proceedings: Posters.", - ed. Silverman, T. J. Dec. 2023. NREL/CP-5900-87918. + .. [2] Townsend, T. and Previtali, J. (2023). A Fresh Dusting: Current Uses of the + Townsend Snow Model. In "Photovoltaic Reliability Workshop (PVRW) 2023 + Proceedings: Posters.", ed. Silverman, T. J. Dec. 2023. NREL/CP-5900-87918. Available at: https://www.nrel.gov/docs/fy25osti/90585.pdf .. [3] Townsend, T. (2025). Snow Events Definition. :doi:`10.13140/RG.2.2.14299.68647` From 7d699c8bcd9fb8d1f3de5747d1d5aa863be7e155 Mon Sep 17 00:00:00 2001 From: ayushjariyal Date: Mon, 10 Feb 2025 22:56:13 +0530 Subject: [PATCH 6/8] Fix the line length issue --- pvlib/snow.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pvlib/snow.py b/pvlib/snow.py index 883ca2c203..3d0fc5a94d 100644 --- a/pvlib/snow.py +++ b/pvlib/snow.py @@ -287,9 +287,10 @@ def loss_townsend(snow_total, snow_events, surface_tilt, relative_humidity, update from two winters of measurements in the SIERRA. 37th IEEE Photovoltaic Specialists Conference, Seattle, WA, USA. :doi:`10.1109/PVSC.2011.6186627` - .. [2] Townsend, T. and Previtali, J. (2023). A Fresh Dusting: Current Uses of the - Townsend Snow Model. In "Photovoltaic Reliability Workshop (PVRW) 2023 - Proceedings: Posters.", ed. Silverman, T. J. Dec. 2023. NREL/CP-5900-87918. + .. [2] Townsend, T. and Previtali, J. (2023). A Fresh Dusting: Current + Uses of the Townsend Snow Model. In "Photovoltaic Reliability + Workshop (PVRW) 2023 Proceedings: Posters.", ed. Silverman, + T. J. Dec. 2023. NREL/CP-5900-87918. Available at: https://www.nrel.gov/docs/fy25osti/90585.pdf .. [3] Townsend, T. (2025). Snow Events Definition. :doi:`10.13140/RG.2.2.14299.68647` From 1e845f0b93c70965deef5f31097d63aad1ebea1e Mon Sep 17 00:00:00 2001 From: ayushjariyal Date: Wed, 12 Feb 2025 00:01:21 +0530 Subject: [PATCH 7/8] Adding actual title of the poster --- pvlib/snow.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pvlib/snow.py b/pvlib/snow.py index 3d0fc5a94d..0bc122ac1f 100644 --- a/pvlib/snow.py +++ b/pvlib/snow.py @@ -292,8 +292,9 @@ def loss_townsend(snow_total, snow_events, surface_tilt, relative_humidity, Workshop (PVRW) 2023 Proceedings: Posters.", ed. Silverman, T. J. Dec. 2023. NREL/CP-5900-87918. Available at: https://www.nrel.gov/docs/fy25osti/90585.pdf - .. [3] Townsend, T. (2025). Snow Events Definition. - :doi:`10.13140/RG.2.2.14299.68647` + .. [3] Townsend, T. (2013). Predicting PV Energy Loss Caused by Snow. + Solar Power International, Chicago IL. + doi:`10.13140/RG.2.2.14299.68647` ''' # unit conversions from cm and m to in, from C to K, and from % to fraction From 953653b00bba42550002dcff4c7eece726c7e76d Mon Sep 17 00:00:00 2001 From: ayushjariyal Date: Wed, 12 Feb 2025 21:24:56 +0530 Subject: [PATCH 8/8] correct doi syntax --- pvlib/snow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvlib/snow.py b/pvlib/snow.py index 0bc122ac1f..bc2cccb3a9 100644 --- a/pvlib/snow.py +++ b/pvlib/snow.py @@ -294,7 +294,7 @@ def loss_townsend(snow_total, snow_events, surface_tilt, relative_humidity, Available at: https://www.nrel.gov/docs/fy25osti/90585.pdf .. [3] Townsend, T. (2013). Predicting PV Energy Loss Caused by Snow. Solar Power International, Chicago IL. - doi:`10.13140/RG.2.2.14299.68647` + :doi:`10.13140/RG.2.2.14299.68647` ''' # unit conversions from cm and m to in, from C to K, and from % to fraction