From 10db5ad858666776280232422a45ec3295a0fbe8 Mon Sep 17 00:00:00 2001 From: Max Jackson Date: Mon, 10 Mar 2025 22:52:08 -0400 Subject: [PATCH 1/6] DOC: Clarify output variable mapping in calcparams_desoto, calcparams_cec, and calcparams_pvsyst --- pvlib/pvsystem.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index 662ea6befa..06590eabe7 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -1709,6 +1709,8 @@ def calcparams_desoto(effective_irradiance, temp_cell, Rs = R_s numeric_args = (effective_irradiance, temp_cell) + # IL: photocurrent, I0: saturation_current, Rs: resistance_series, + # Rsh: resistance_shunt, nNsVth: product of thermal voltage, diode ideality factor and cells in series out = (IL, I0, Rs, Rsh, nNsVth) if all(map(np.isscalar, numeric_args)): @@ -1830,6 +1832,10 @@ def calcparams_cec(effective_irradiance, temp_cell, ''' # pass adjusted temperature coefficient to desoto + # Returns the following: + # IL: photocurrent, I0: saturation_current, Rs: resistance_series, + # Rsh: resistance_shunt, nNsVth: product of thermal voltage, diode ideality factor and cells in series + return calcparams_desoto(effective_irradiance, temp_cell, alpha_sc*(1.0 - Adjust/100), a_ref, I_L_ref, I_o_ref, @@ -1975,6 +1981,8 @@ def calcparams_pvsyst(effective_irradiance, temp_cell, Rs = R_s numeric_args = (effective_irradiance, temp_cell) + # IL: photocurrent, I0: saturation_current, Rs: resistance_series, + # Rsh: resistance_shunt, nNsVth: product of thermal voltage, diode ideality factor and cells in series out = (IL, I0, Rs, Rsh, nNsVth) if all(map(np.isscalar, numeric_args)): From 67d429e2043c2f3c0699646937165ac3a3ff3510 Mon Sep 17 00:00:00 2001 From: Max Jackson Date: Tue, 11 Mar 2025 11:39:37 -0400 Subject: [PATCH 2/6] Clean up unhelpful comment Co-authored-by: Cliff Hansen --- pvlib/pvsystem.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index 06590eabe7..790ae3b12a 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -1832,10 +1832,6 @@ def calcparams_cec(effective_irradiance, temp_cell, ''' # pass adjusted temperature coefficient to desoto - # Returns the following: - # IL: photocurrent, I0: saturation_current, Rs: resistance_series, - # Rsh: resistance_shunt, nNsVth: product of thermal voltage, diode ideality factor and cells in series - return calcparams_desoto(effective_irradiance, temp_cell, alpha_sc*(1.0 - Adjust/100), a_ref, I_L_ref, I_o_ref, From 4e4b3e681086aebc1d652fdefdbb036fa6484ac3 Mon Sep 17 00:00:00 2001 From: Max Jackson Date: Tue, 11 Mar 2025 11:40:40 -0400 Subject: [PATCH 3/6] Resolve nNsVth Naming Co-authored-by: Cliff Hansen --- pvlib/pvsystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index 790ae3b12a..7cafaa997e 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -1710,7 +1710,7 @@ def calcparams_desoto(effective_irradiance, temp_cell, numeric_args = (effective_irradiance, temp_cell) # IL: photocurrent, I0: saturation_current, Rs: resistance_series, - # Rsh: resistance_shunt, nNsVth: product of thermal voltage, diode ideality factor and cells in series + # Rsh: resistance_shunt out = (IL, I0, Rs, Rsh, nNsVth) if all(map(np.isscalar, numeric_args)): From 13d0a5d1a3bc81c52a27c3b2a896c5b3683d06d5 Mon Sep 17 00:00:00 2001 From: Max Jackson Date: Tue, 11 Mar 2025 11:41:06 -0400 Subject: [PATCH 4/6] Clean up var naming comment Co-authored-by: Cliff Hansen --- pvlib/pvsystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index 7cafaa997e..029bae073d 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -1978,7 +1978,7 @@ def calcparams_pvsyst(effective_irradiance, temp_cell, numeric_args = (effective_irradiance, temp_cell) # IL: photocurrent, I0: saturation_current, Rs: resistance_series, - # Rsh: resistance_shunt, nNsVth: product of thermal voltage, diode ideality factor and cells in series + # Rsh: resistance_shunt out = (IL, I0, Rs, Rsh, nNsVth) if all(map(np.isscalar, numeric_args)): From 35bafce7f9edc2b1b72945228915c35b80055d95 Mon Sep 17 00:00:00 2001 From: Max Jackson Date: Tue, 11 Mar 2025 12:11:41 -0400 Subject: [PATCH 5/6] fix: Address linting issues --- pvlib/pvsystem.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index 029bae073d..b15cfe4c45 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -1709,7 +1709,7 @@ def calcparams_desoto(effective_irradiance, temp_cell, Rs = R_s numeric_args = (effective_irradiance, temp_cell) - # IL: photocurrent, I0: saturation_current, Rs: resistance_series, + # IL: photocurrent, I0: saturation_current, Rs: resistance_series, # Rsh: resistance_shunt out = (IL, I0, Rs, Rsh, nNsVth) @@ -1977,7 +1977,7 @@ def calcparams_pvsyst(effective_irradiance, temp_cell, Rs = R_s numeric_args = (effective_irradiance, temp_cell) - # IL: photocurrent, I0: saturation_current, Rs: resistance_series, + # IL: photocurrent, I0: saturation_current, Rs: resistance_series, # Rsh: resistance_shunt out = (IL, I0, Rs, Rsh, nNsVth) From d7928bbda36076820f6231099929f51acb5376c3 Mon Sep 17 00:00:00 2001 From: Max Jackson Date: Tue, 11 Mar 2025 12:25:39 -0400 Subject: [PATCH 6/6] docs: Add contributor/contribution to whatsnew --- docs/sphinx/source/whatsnew/v0.11.3.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/sphinx/source/whatsnew/v0.11.3.rst b/docs/sphinx/source/whatsnew/v0.11.3.rst index 035c17962e..b431cda364 100644 --- a/docs/sphinx/source/whatsnew/v0.11.3.rst +++ b/docs/sphinx/source/whatsnew/v0.11.3.rst @@ -38,7 +38,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`) * Add references for :py:func:`pvlib.snow.loss_townsend`. (:issue:`2383`, :pull:`2384`) -* Add :term:`ghi_clear` to the :ref:`nomenclature` page (:issue:`2272`, :pull`2397`) +* Add :term:`ghi_clear` to the :ref:`nomenclature` page (:issue:`2272`, :pull:`2397`) +* Add output variable naming clarifaction to :py:func:`pvlib.pvsystem.calcparams_desoto` and :py:func:`pvlib.pvsystem.calcparams_pvsyst` (:issue:`716`, :pull:`2405`) Testing ~~~~~~~ @@ -78,3 +79,4 @@ Contributors * Kevin Anderson (:ghuser:`kandersolar`) * Echedey Luis (:ghuser:`echedey-ls`) * Mark Campanelli (:ghuser:`markcampanelli`) +* Max Jackson (:ghuser:`MaxJackson`)