16
16
from dataclasses import dataclass
17
17
from abc import ABC , abstractmethod
18
18
from typing import Optional , Union
19
-
19
+ from pvlib . _deprecation import renamed_kwarg_warning
20
20
import pvlib # used to avoid albedo name collision in the Array class
21
21
from pvlib import (atmosphere , iam , inverter , irradiance ,
22
22
singlediode as _singlediode , spectrum , temperature )
@@ -843,24 +843,26 @@ def scale_voltage_current_power(self, data):
843
843
for array , data in zip (self .arrays , data )
844
844
)
845
845
846
+ @renamed_kwarg_warning (
847
+ "0.13.0" , "g_poa_effective" , "effective_irradiance" )
846
848
@_unwrap_single_value
847
- def pvwatts_dc (self , g_poa_effective , temp_cell ):
849
+ def pvwatts_dc (self , effective_irradiance , temp_cell ):
848
850
"""
849
851
Calculates DC power according to the PVWatts model using
850
852
:py:func:`pvlib.pvsystem.pvwatts_dc`, `self.module_parameters['pdc0']`,
851
853
and `self.module_parameters['gamma_pdc']`.
852
854
853
855
See :py:func:`pvlib.pvsystem.pvwatts_dc` for details.
854
856
"""
855
- g_poa_effective = self ._validate_per_array (g_poa_effective )
857
+ effective_irradiance = self ._validate_per_array (effective_irradiance )
856
858
temp_cell = self ._validate_per_array (temp_cell )
857
859
return tuple (
858
- pvwatts_dc (g_poa_effective , temp_cell ,
860
+ pvwatts_dc (effective_irradiance , temp_cell ,
859
861
array .module_parameters ['pdc0' ],
860
862
array .module_parameters ['gamma_pdc' ],
861
863
** _build_kwargs (['temp_ref' ], array .module_parameters ))
862
- for array , g_poa_effective , temp_cell
863
- in zip (self .arrays , g_poa_effective , temp_cell )
864
+ for array , effective_irradiance , temp_cell
865
+ in zip (self .arrays , effective_irradiance , temp_cell )
864
866
)
865
867
866
868
def pvwatts_losses (self ):
@@ -2856,7 +2858,9 @@ def scale_voltage_current_power(data, voltage=1, current=1):
2856
2858
return df_sorted
2857
2859
2858
2860
2859
- def pvwatts_dc (g_poa_effective , temp_cell , pdc0 , gamma_pdc , temp_ref = 25. ):
2861
+ @renamed_kwarg_warning (
2862
+ "0.13.0" , "g_poa_effective" , "effective_irradiance" )
2863
+ def pvwatts_dc (effective_irradiance , temp_cell , pdc0 , gamma_pdc , temp_ref = 25. ):
2860
2864
r"""
2861
2865
Implements NREL's PVWatts DC power model. The PVWatts DC model [1]_ is:
2862
2866
@@ -2872,7 +2876,7 @@ def pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.):
2872
2876
2873
2877
Parameters
2874
2878
----------
2875
- g_poa_effective : numeric
2879
+ effective_irradiance : numeric
2876
2880
Irradiance transmitted to the PV cells. To be
2877
2881
fully consistent with PVWatts, the user must have already
2878
2882
applied angle of incidence losses, but not soiling, spectral,
@@ -2900,7 +2904,7 @@ def pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.):
2900
2904
(2014).
2901
2905
""" # noqa: E501
2902
2906
2903
- pdc = (g_poa_effective * 0.001 * pdc0 *
2907
+ pdc = (effective_irradiance * 0.001 * pdc0 *
2904
2908
(1 + gamma_pdc * (temp_cell - temp_ref )))
2905
2909
2906
2910
return pdc
0 commit comments