From 281b0456c0075e0e28ad5e0d286bd629b5cee7e1 Mon Sep 17 00:00:00 2001 From: echedey-ls <80125792+echedey-ls@users.noreply.github.com> Date: Wed, 1 May 2024 15:42:46 +0200 Subject: [PATCH 01/10] broken references in old whatsnews --- docs/sphinx/source/whatsnew/v0.3.0.txt | 2 +- docs/sphinx/source/whatsnew/v0.9.1.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sphinx/source/whatsnew/v0.3.0.txt b/docs/sphinx/source/whatsnew/v0.3.0.txt index 0768c5dea4..62cc9839f7 100644 --- a/docs/sphinx/source/whatsnew/v0.3.0.txt +++ b/docs/sphinx/source/whatsnew/v0.3.0.txt @@ -69,7 +69,7 @@ Enhancements * Modify ``sapm`` documentation to clarify that it does not work with the CEC database. (:issue:`122`) * Adds citation information to the documentation. (:issue:`73`) -* Updates the :ref:`comparison_pvlib_matlab` documentation. (:issue:`116`) +* Updates the ``comparison_pvlib_matlab`` documentation. (:issue:`116`) Bug fixes diff --git a/docs/sphinx/source/whatsnew/v0.9.1.rst b/docs/sphinx/source/whatsnew/v0.9.1.rst index 2440f215c7..225602a40e 100644 --- a/docs/sphinx/source/whatsnew/v0.9.1.rst +++ b/docs/sphinx/source/whatsnew/v0.9.1.rst @@ -14,7 +14,7 @@ Deprecations :py:class:`~pvlib.modelchain.ModelChain` interfaces, although note that the inputs do not directly translate. (:pull:`1401`) * All functionality in the ``pvlib.forecast`` module is deprecated. - For details, see :ref:`forecasts`. (:issue:`1057`, :pull:`1426`) + For details, see ``forecasts``. (:issue:`1057`, :pull:`1426`) Enhancements ~~~~~~~~~~~~ From 0618913353ad76970e4211a51f705e15432ea4ce Mon Sep 17 00:00:00 2001 From: echedey-ls <80125792+echedey-ls@users.noreply.github.com> Date: Wed, 1 May 2024 15:43:06 +0200 Subject: [PATCH 02/10] add missing ref to bishop88_* funcs --- pvlib/singlediode.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pvlib/singlediode.py b/pvlib/singlediode.py index fcaa61c240..6ee3593aa6 100644 --- a/pvlib/singlediode.py +++ b/pvlib/singlediode.py @@ -285,6 +285,12 @@ def bishop88_i_from_v(voltage, photocurrent, saturation_current, >>> i, method_output = bishop88_i_from_v(0.0, **args, method='newton', ... method_kwargs={'full_output': True}) + + References + ---------- + .. [1] "Computer simulation of the effects of electrical mismatches in + photovoltaic cell interconnection circuits" JW Bishop, Solar Cell (1988) + :doi:`10.1016/0379-6787(88)90059-2` """ # collect args args = (photocurrent, saturation_current, @@ -417,6 +423,12 @@ def bishop88_v_from_i(current, photocurrent, saturation_current, >>> v, method_output = bishop88_v_from_i(0.0, **args, method='newton', ... method_kwargs={'full_output': True}) + + References + ---------- + .. [1] "Computer simulation of the effects of electrical mismatches in + photovoltaic cell interconnection circuits" JW Bishop, Solar Cell (1988) + :doi:`10.1016/0379-6787(88)90059-2` """ # collect args args = (photocurrent, saturation_current, @@ -547,6 +559,12 @@ def bishop88_mpp(photocurrent, saturation_current, resistance_series, >>> (i_mp, v_mp, p_mp), method_output = bishop88_mpp(**args, ... method='newton', method_kwargs={'full_output': True}) + + References + ---------- + .. [1] "Computer simulation of the effects of electrical mismatches in + photovoltaic cell interconnection circuits" JW Bishop, Solar Cell (1988) + :doi:`10.1016/0379-6787(88)90059-2` """ # collect args args = (photocurrent, saturation_current, From 1af5f6a1ebdd48028b7c3f2156a8af8d04089cff Mon Sep 17 00:00:00 2001 From: echedey-ls <80125792+echedey-ls@users.noreply.github.com> Date: Wed, 1 May 2024 15:43:23 +0200 Subject: [PATCH 03/10] this was interpreted as code (?) --- pvlib/pvarray.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pvlib/pvarray.py b/pvlib/pvarray.py index a8bbd36eb3..3c0f96dff1 100644 --- a/pvlib/pvarray.py +++ b/pvlib/pvarray.py @@ -311,11 +311,11 @@ def huld(effective_irradiance, temp_mod, pdc0, k=None, cell_type=None): :py:func:`huld` is a component of the PV performance model implemented in PVGIS. Among other components, the full PVGIS model includes: - - the Faiman model for module temperature - :py:func:`pvlib.temperature.faiman` - - the Martin and Ruiz model for the incidence angle modifier (IAM) - :py:func:`pvlib.iam.martin_ruiz` - - a custom model for a spectral adjustment factor + - the Faiman model for module temperature + :py:func:`pvlib.temperature.faiman` + - the Martin and Ruiz model for the incidence angle modifier (IAM) + :py:func:`pvlib.iam.martin_ruiz` + - a custom model for a spectral adjustment factor The PVGIS API (see :py:func:`pvlib.iotools.get_pvgis_hourly`) returns broadband plane-of-array irradiance (``poa_global``) and DC power (``P``). ``poa_global`` is irradiance before applying the IAM and spectral From a70438fcbe70a0d8f7947f807b3679f67ca685fb Mon Sep 17 00:00:00 2001 From: echedey-ls <80125792+echedey-ls@users.noreply.github.com> Date: Wed, 1 May 2024 15:43:34 +0200 Subject: [PATCH 04/10] I think this messes up the indentation --- pvlib/iotools/srml.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pvlib/iotools/srml.py b/pvlib/iotools/srml.py index 7d6a18bc9d..204107cd29 100644 --- a/pvlib/iotools/srml.py +++ b/pvlib/iotools/srml.py @@ -175,7 +175,8 @@ def _format_index(df): @deprecated('0.10.0', alternative='pvlib.iotools.get_srml', removal='0.11.0') def read_srml_month_from_solardat(station, year, month, filetype='PO', map_variables=True): - """Request a month of SRML data and read it into a Dataframe. + """ + Request a month of SRML data and read it into a Dataframe. The SRML is described in [1]_. From 087bc8d94c0ec9e1b213706470af4708203fdb98 Mon Sep 17 00:00:00 2001 From: echedey-ls <80125792+echedey-ls@users.noreply.github.com> Date: Wed, 1 May 2024 16:00:18 +0200 Subject: [PATCH 05/10] Fix unknown references in autosummaries --- pvlib/pvsystem.py | 4 +++- pvlib/scaling.py | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index e0037f30fc..c5151f9ac9 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -1698,7 +1698,9 @@ def calcparams_cec(effective_irradiance, temp_cell, ''' Calculates five parameter values for the single diode equation at effective irradiance and cell temperature using the CEC - model. The CEC model [1]_ differs from the De soto et al. + model. + + The CEC model [1]_ differs from the De soto et al. model [3]_ by the parameter Adjust. The five values returned by calcparams_cec can be used by singlediode to calculate an IV curve. diff --git a/pvlib/scaling.py b/pvlib/scaling.py index 207b60571e..9047f437ba 100644 --- a/pvlib/scaling.py +++ b/pvlib/scaling.py @@ -13,8 +13,10 @@ def wvm(clearsky_index, positions, cloud_speed, dt=None): """ Compute spatial aggregation time series smoothing on clear sky index based - on the Wavelet Variability model of Lave et al. [1]_, [2]_. Implementation - is basically a port of the Matlab version of the code [3]_. + on the Wavelet Variability model. + + This model is described in Lave et al. [1]_, [2]_. + Implementation is basically a port of the Matlab version of the code [3]_. Parameters ---------- From 11745ba368607fda495f0a205a6b6a391453fa97 Mon Sep 17 00:00:00 2001 From: echedey-ls <80125792+echedey-ls@users.noreply.github.com> Date: Wed, 1 May 2024 16:02:44 +0200 Subject: [PATCH 06/10] This one too --- pvlib/snow.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pvlib/snow.py b/pvlib/snow.py index 1f8704fe5e..190fe7baae 100644 --- a/pvlib/snow.py +++ b/pvlib/snow.py @@ -222,7 +222,9 @@ def loss_townsend(snow_total, snow_events, surface_tilt, relative_humidity, string_factor=1.0, angle_of_repose=40): ''' Calculates monthly snow loss based on the Townsend monthly snow loss - model [1]_. + model. + + This model is described in [1]_. Parameters ---------- From 8180bc10a94f321ce33c2a8615b2fca013a16584 Mon Sep 17 00:00:00 2001 From: echedey-ls <80125792+echedey-ls@users.noreply.github.com> Date: Wed, 1 May 2024 16:19:30 +0200 Subject: [PATCH 07/10] :rocket: --- pvlib/pvarray.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pvlib/pvarray.py b/pvlib/pvarray.py index 3c0f96dff1..e45f2f8d84 100644 --- a/pvlib/pvarray.py +++ b/pvlib/pvarray.py @@ -311,11 +311,13 @@ def huld(effective_irradiance, temp_mod, pdc0, k=None, cell_type=None): :py:func:`huld` is a component of the PV performance model implemented in PVGIS. Among other components, the full PVGIS model includes: + - the Faiman model for module temperature :py:func:`pvlib.temperature.faiman` - the Martin and Ruiz model for the incidence angle modifier (IAM) :py:func:`pvlib.iam.martin_ruiz` - a custom model for a spectral adjustment factor + The PVGIS API (see :py:func:`pvlib.iotools.get_pvgis_hourly`) returns broadband plane-of-array irradiance (``poa_global``) and DC power (``P``). ``poa_global`` is irradiance before applying the IAM and spectral From dc72c917b8f7c6b5fbcfe0cc372347f5e2617ae2 Mon Sep 17 00:00:00 2001 From: echedey-ls <80125792+echedey-ls@users.noreply.github.com> Date: Wed, 1 May 2024 16:49:23 +0200 Subject: [PATCH 08/10] Undo calcparams_cec, I misread --- pvlib/pvsystem.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index c5151f9ac9..e0037f30fc 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -1698,9 +1698,7 @@ def calcparams_cec(effective_irradiance, temp_cell, ''' Calculates five parameter values for the single diode equation at effective irradiance and cell temperature using the CEC - model. - - The CEC model [1]_ differs from the De soto et al. + model. The CEC model [1]_ differs from the De soto et al. model [3]_ by the parameter Adjust. The five values returned by calcparams_cec can be used by singlediode to calculate an IV curve. From 4ddb76092296dc41c0985d469368230ec71b8491 Mon Sep 17 00:00:00 2001 From: echedey-ls <80125792+echedey-ls@users.noreply.github.com> Date: Wed, 1 May 2024 16:51:07 +0200 Subject: [PATCH 09/10] Aha, this is the right calcparams_ function --- pvlib/pvsystem.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index e0037f30fc..dad2e9677b 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -1487,8 +1487,10 @@ def calcparams_desoto(effective_irradiance, temp_cell, ''' Calculates five parameter values for the single diode equation at effective irradiance and cell temperature using the De Soto et al. - model described in [1]_. The five values returned by calcparams_desoto - can be used by singlediode to calculate an IV curve. + model. The five values returned by ``calcparams_desoto`` can be used by + singlediode to calculate an IV curve. + + The model is described in [1]_. Parameters ---------- From 60f92449ec6b9d8a74631d7ab427c187465ec98c Mon Sep 17 00:00:00 2001 From: echedey-ls <80125792+echedey-ls@users.noreply.github.com> Date: Wed, 1 May 2024 17:03:17 +0200 Subject: [PATCH 10/10] Dammit, it's always the linter --- pvlib/pvarray.py | 2 +- pvlib/scaling.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pvlib/pvarray.py b/pvlib/pvarray.py index e45f2f8d84..ab7530f3e5 100644 --- a/pvlib/pvarray.py +++ b/pvlib/pvarray.py @@ -311,7 +311,7 @@ def huld(effective_irradiance, temp_mod, pdc0, k=None, cell_type=None): :py:func:`huld` is a component of the PV performance model implemented in PVGIS. Among other components, the full PVGIS model includes: - + - the Faiman model for module temperature :py:func:`pvlib.temperature.faiman` - the Martin and Ruiz model for the incidence angle modifier (IAM) diff --git a/pvlib/scaling.py b/pvlib/scaling.py index 9047f437ba..2f9e0df594 100644 --- a/pvlib/scaling.py +++ b/pvlib/scaling.py @@ -14,7 +14,7 @@ def wvm(clearsky_index, positions, cloud_speed, dt=None): """ Compute spatial aggregation time series smoothing on clear sky index based on the Wavelet Variability model. - + This model is described in Lave et al. [1]_, [2]_. Implementation is basically a port of the Matlab version of the code [3]_.