From 157fa659d9257e56a3f61b3a0c12469aa0c24199 Mon Sep 17 00:00:00 2001 From: RDaxini Date: Thu, 10 Apr 2025 16:40:34 -0600 Subject: [PATCH 1/9] Update pvsystem.py --- pvlib/pvsystem.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index 896791d86f..b3e9be4b4f 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -2230,12 +2230,12 @@ def sapm(effective_irradiance, temp_cell, module): Notes ----- - The SAPM parameters which are required in ``module`` are - listed in the following table. - The Sandia module database contains parameter values for a limited set of modules. The CEC module database does not contain these parameters. - Both databases can be accessed using :py:func:`retrieve_sam`. + Both databases can be accessed using :py:func:`retrieve_sam`. The full list + of SAPM parameters is presented in the table below. Those that are required + in ``module`` are: `Bvmpo`, `Mbvmp`, `Bvoco`, `Mbvoc`, `N`, + `Cells_in_Series` ================ ======================================================== Key Description From e9c1156cc5ccd7f3f300957cbc308bf557ee595a Mon Sep 17 00:00:00 2001 From: RDaxini Date: Thu, 10 Apr 2025 16:46:32 -0600 Subject: [PATCH 2/9] Update v0.12.1.rst --- docs/sphinx/source/whatsnew/v0.12.1.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/sphinx/source/whatsnew/v0.12.1.rst b/docs/sphinx/source/whatsnew/v0.12.1.rst index 927cf1ede7..a4333b3f33 100644 --- a/docs/sphinx/source/whatsnew/v0.12.1.rst +++ b/docs/sphinx/source/whatsnew/v0.12.1.rst @@ -22,6 +22,8 @@ Documentation * Add a supporting reference to :py:func:`pvlib.atmosphere.get_relative_airmass` (:issue:`2390`, :pull:`2424`) * Documented how `np.nan` values are handled by :py:func:`~pvlib.spectrum.average_photon_energy` (:issue:`2423`, :pull:`2426`) +* Clarify which SAPM coefficients are required by the `module` parameter in + `:py:func:`~pvlib.pvsystem.sapm` (:issue:`2392`, :pull:`2435`) Testing ~~~~~~~ From 8422e27d538780e399cac05e0414813261c84ff9 Mon Sep 17 00:00:00 2001 From: RDaxini Date: Thu, 10 Apr 2025 16:47:11 -0600 Subject: [PATCH 3/9] Update pvsystem.py --- pvlib/pvsystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index b3e9be4b4f..785cee291a 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -2234,7 +2234,7 @@ def sapm(effective_irradiance, temp_cell, module): of modules. The CEC module database does not contain these parameters. Both databases can be accessed using :py:func:`retrieve_sam`. The full list of SAPM parameters is presented in the table below. Those that are required - in ``module`` are: `Bvmpo`, `Mbvmp`, `Bvoco`, `Mbvoc`, `N`, + in ``module`` are: `Bvmpo`, `Mbvmp`, `Bvoco`, `Mbvoc`, `N`, and `Cells_in_Series` ================ ======================================================== From 25e06cf1443f7dba1c3606c6dbfd74ad9df70ac3 Mon Sep 17 00:00:00 2001 From: RDaxini Date: Thu, 10 Apr 2025 16:47:45 -0600 Subject: [PATCH 4/9] Update pvsystem.py --- pvlib/pvsystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index 785cee291a..09c0152a1c 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -2235,7 +2235,7 @@ def sapm(effective_irradiance, temp_cell, module): Both databases can be accessed using :py:func:`retrieve_sam`. The full list of SAPM parameters is presented in the table below. Those that are required in ``module`` are: `Bvmpo`, `Mbvmp`, `Bvoco`, `Mbvoc`, `N`, and - `Cells_in_Series` + `Cells_in_Series`. ================ ======================================================== Key Description From 041f5f0a242e3d3241fb7b027c76b112e0c541a3 Mon Sep 17 00:00:00 2001 From: RDaxini Date: Wed, 16 Apr 2025 14:02:44 -0600 Subject: [PATCH 5/9] list non-required param instead, units, formatting --- docs/sphinx/source/whatsnew/v0.12.1.rst | 6 +++--- pvlib/pvsystem.py | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/sphinx/source/whatsnew/v0.12.1.rst b/docs/sphinx/source/whatsnew/v0.12.1.rst index a4333b3f33..8e61940ad1 100644 --- a/docs/sphinx/source/whatsnew/v0.12.1.rst +++ b/docs/sphinx/source/whatsnew/v0.12.1.rst @@ -20,10 +20,10 @@ Enhancements Documentation ~~~~~~~~~~~~~ * Add a supporting reference to :py:func:`pvlib.atmosphere.get_relative_airmass` (:issue:`2390`, :pull:`2424`) -* Documented how `np.nan` values are handled by :py:func:`~pvlib.spectrum.average_photon_energy` +* Document how ``np.nan`` values are handled by :py:func:`~pvlib.spectrum.average_photon_energy` (:issue:`2423`, :pull:`2426`) -* Clarify which SAPM coefficients are required by the `module` parameter in - `:py:func:`~pvlib.pvsystem.sapm` (:issue:`2392`, :pull:`2435`) +* Clarify which SAPM coefficients are required by the ``module`` parameter in + :py:func:`~pvlib.pvsystem.sapm` (:issue:`2392`, :pull:`2435`) Testing ~~~~~~~ diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index 09c0152a1c..1258fffb15 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -2199,16 +2199,16 @@ def sapm(effective_irradiance, temp_cell, module): ''' The Sandia PV Array Performance Model (SAPM) generates 5 points on a PV module's I-V curve (Voc, Isc, Ix, Ixx, Vmp/Imp) according to - SAND2004-3535. Assumes a reference cell temperature of 25 C. + SAND2004-3535. Assumes a reference cell temperature of 25°C. Parameters ---------- effective_irradiance : numeric Irradiance reaching the module's cells, after reflections and - adjustment for spectrum. [W/m2] + adjustment for spectrum. [Wm⁻²] temp_cell : numeric - Cell temperature [C]. + Cell temperature [°C]. module : dict-like A dict or Series defining the SAPM parameters. See the notes section @@ -2233,9 +2233,9 @@ def sapm(effective_irradiance, temp_cell, module): The Sandia module database contains parameter values for a limited set of modules. The CEC module database does not contain these parameters. Both databases can be accessed using :py:func:`retrieve_sam`. The full list - of SAPM parameters is presented in the table below. Those that are required - in ``module`` are: `Bvmpo`, `Mbvmp`, `Bvoco`, `Mbvoc`, `N`, and - `Cells_in_Series`. + of SAPM parameters is presented in the table below. All but ``A0`` to + ``A4``, ``B0`` to ``B5``, ``C4`` to ``C7``, ``IX0``, and ``IXX0`` are + required in the ``module`` parameter. ================ ======================================================== Key Description @@ -2251,19 +2251,19 @@ def sapm(effective_irradiance, temp_cell, module): Voco Open circuit voltage at reference condition (amps) Vmpo Maximum power voltage at reference condition (amps) Aisc Short circuit current temperature coefficient at - reference condition (1/C) + reference condition (1/°C) Aimp Maximum power current temperature coefficient at - reference condition (1/C) + reference condition (1/°C) Bvoco Open circuit voltage temperature coefficient at - reference condition (V/C) + reference condition (V/°C) Mbvoc Coefficient providing the irradiance dependence for the BetaVoc temperature coefficient at reference irradiance - (V/C) + (V/°C) Bvmpo Maximum power voltage temperature coefficient at reference condition Mbvmp Coefficient providing the irradiance dependence for the BetaVmp temperature coefficient at reference irradiance - (V/C) + (V/°C) N Empirically determined "diode factor" (dimensionless) Cells_in_Series Number of cells in series in a module's cell string(s) IXO Ix at reference conditions From daf1fec49bfff38c8fb78e556dfd6c6d66de1b8f Mon Sep 17 00:00:00 2001 From: RDaxini <143435106+RDaxini@users.noreply.github.com> Date: Wed, 16 Apr 2025 14:29:08 -0600 Subject: [PATCH 6/9] Update pvlib/pvsystem.py 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 1258fffb15..a1a2572e5d 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -2234,7 +2234,7 @@ def sapm(effective_irradiance, temp_cell, module): of modules. The CEC module database does not contain these parameters. Both databases can be accessed using :py:func:`retrieve_sam`. The full list of SAPM parameters is presented in the table below. All but ``A0`` to - ``A4``, ``B0`` to ``B5``, ``C4`` to ``C7``, ``IX0``, and ``IXX0`` are + ``A4``, ``B0`` to ``B5``, ``C4`` to ``C7``, ``IXO``, and ``IXXO`` are required in the ``module`` parameter. ================ ======================================================== From 2f6722c22863fe07bc0b11e47c8e744f2c8a5824 Mon Sep 17 00:00:00 2001 From: RDaxini Date: Tue, 22 Apr 2025 16:45:40 -0600 Subject: [PATCH 7/9] update param list (excl. param removed by #2433) --- pvlib/pvsystem.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index 79435bc5e6..0cc2777c75 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -2238,9 +2238,21 @@ def sapm(effective_irradiance, temp_cell, module, *, temperature_ref=25, The Sandia module database contains parameter values for a limited set of modules. The CEC module database does not contain these parameters. Both databases can be accessed using :py:func:`retrieve_sam`. The full list - of SAPM parameters is presented in the table below. All but ``A0`` to - ``A4``, ``B0`` to ``B5``, ``C4`` to ``C7``, ``IXO``, and ``IXXO`` are - required in the ``module`` parameter. + of SAPM parameters is presented in the table below. Those that are required + in the ``module`` parameter to run this model are as follows: + * ``C0–C3`` + * ``Isco`` + * ``Impo`` + * ``Voco`` + * ``Vmpo`` + * ``Aisc`` + * ``Aimp`` + * ``Bvoco`` + * ``Mbvoc`` + * ``Bvmpo`` + * ``Mbvmp`` + * ``N`` + * ``Cells_in_series`` ================ ======================================================== Key Description From c99eae1072a41bff76531c7bef5809e0a8d323bc Mon Sep 17 00:00:00 2001 From: RDaxini Date: Tue, 22 Apr 2025 16:51:14 -0600 Subject: [PATCH 8/9] add blank line for bullet list rendering --- pvlib/pvsystem.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index 0cc2777c75..42ada5d280 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -2240,6 +2240,7 @@ def sapm(effective_irradiance, temp_cell, module, *, temperature_ref=25, Both databases can be accessed using :py:func:`retrieve_sam`. The full list of SAPM parameters is presented in the table below. Those that are required in the ``module`` parameter to run this model are as follows: + * ``C0–C3`` * ``Isco`` * ``Impo`` From 3d81b77c78860251dcb4f45feca4f8da3e89ba78 Mon Sep 17 00:00:00 2001 From: RDaxini Date: Tue, 22 Apr 2025 16:56:46 -0600 Subject: [PATCH 9/9] separate C param --- pvlib/pvsystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvlib/pvsystem.py b/pvlib/pvsystem.py index 42ada5d280..0549d475fe 100644 --- a/pvlib/pvsystem.py +++ b/pvlib/pvsystem.py @@ -2241,7 +2241,7 @@ def sapm(effective_irradiance, temp_cell, module, *, temperature_ref=25, of SAPM parameters is presented in the table below. Those that are required in the ``module`` parameter to run this model are as follows: - * ``C0–C3`` + * ``C0``, ``C1``, ``C2``, ``C3`` * ``Isco`` * ``Impo`` * ``Voco``