@@ -179,7 +179,7 @@ def basic_chain(times, latitude, longitude,
179
179
linke_turbidity ,
180
180
altitude = altitude ,
181
181
dni_extra = dni_extra
182
- )
182
+ )
183
183
184
184
total_irrad = pvlib .irradiance .get_total_irradiance (
185
185
surface_tilt ,
@@ -346,24 +346,6 @@ def __init__(self, system, location,
346
346
self .ac_model = ac_model
347
347
self .aoi_model = aoi_model
348
348
self .spectral_model = spectral_model
349
-
350
- # TODO: deprecated kwarg temp_model. Remove use of temp_model in v0.8
351
- temp_model = kwargs .pop ('temp_model' , None )
352
- if temp_model is not None :
353
- if temperature_model is None :
354
- warnings .warn ('The temp_model keyword argument is deprecated.'
355
- ' Use temperature_model instead' ,
356
- pvlibDeprecationWarning )
357
- temperature_model = temp_model
358
- elif temp_model == temperature_model :
359
- warnings .warn ('Provide only one of temperature_model or '
360
- 'temp_model (deprecated).' ,
361
- pvlibDeprecationWarning )
362
- else :
363
- raise ValueError (
364
- 'Conflicting temperature_model {} and temp_model {}. '
365
- 'temp_model is deprecated. Specify only temperature_model.'
366
- .format (temperature_model , temp_model ))
367
349
self .temperature_model = temperature_model
368
350
369
351
self .losses_model = losses_model
@@ -544,7 +526,7 @@ def __repr__(self):
544
526
'transposition_model' , 'solar_position_method' ,
545
527
'airmass_model' , 'dc_model' , 'ac_model' , 'aoi_model' ,
546
528
'spectral_model' , 'temperature_model' , 'losses_model'
547
- ]
529
+ ]
548
530
549
531
def getmcattr (self , attr ):
550
532
"""needed to avoid recursion in property lookups"""
@@ -588,8 +570,8 @@ def dc_model(self, model):
588
570
model = model .lower ()
589
571
if model in _DC_MODEL_PARAMS .keys ():
590
572
# validate module parameters
591
- missing_params = _DC_MODEL_PARAMS [model ] - \
592
- set (self .system .module_parameters .keys ())
573
+ missing_params = ( _DC_MODEL_PARAMS [model ]
574
+ - set (self .system .module_parameters .keys () ))
593
575
if missing_params : # some parameters are not in module.keys()
594
576
raise ValueError (model + ' selected for the DC model but '
595
577
'one or more required parameters are '
@@ -834,8 +816,8 @@ def infer_spectral_model(self):
834
816
835
817
def first_solar_spectral_loss (self ):
836
818
self .spectral_modifier = self .system .first_solar_spectral_loss (
837
- self .weather ['precipitable_water' ],
838
- self .airmass ['airmass_absolute' ])
819
+ self .weather ['precipitable_water' ],
820
+ self .airmass ['airmass_absolute' ])
839
821
return self
840
822
841
823
def sapm_spectral_loss (self ):
@@ -878,7 +860,10 @@ def temperature_model(self, model):
878
860
879
861
def infer_temperature_model (self ):
880
862
params = set (self .system .temperature_model_parameters .keys ())
881
- if set (['a' , 'b' , 'deltaT' ]) <= params :
863
+ # remove or statement in v0.9
864
+ if set (['a' , 'b' , 'deltaT' ]) <= params or (
865
+ not params and self .system .racking_model is None
866
+ and self .system .module_type is None ):
882
867
return self .sapm_temp
883
868
elif set (['u_c' , 'u_v' ]) <= params :
884
869
return self .pvsyst_temp
@@ -945,7 +930,7 @@ def effective_irradiance_model(self):
945
930
fd * self .total_irrad ['poa_diffuse' ])
946
931
return self
947
932
948
- def complete_irradiance (self , weather , times = None ):
933
+ def complete_irradiance (self , weather ):
949
934
"""
950
935
Determine the missing irradiation columns. Only two of the
951
936
following data columns (dni, ghi, dhi) are needed to calculate
@@ -962,10 +947,6 @@ def complete_irradiance(self, weather, times=None):
962
947
``'wind_speed'``, ``'temp_air'``. All irradiance components
963
948
are required. Air temperature of 20 C and wind speed
964
949
of 0 m/s will be added to the DataFrame if not provided.
965
- times : None, deprecated
966
- Deprecated argument included for API compatibility, but not
967
- used internally. The index of the weather DataFrame is used
968
- for times.
969
950
970
951
Returns
971
952
-------
@@ -994,11 +975,6 @@ def complete_irradiance(self, weather, times=None):
994
975
"""
995
976
self .weather = weather
996
977
997
- if times is not None :
998
- warnings .warn ('times keyword argument is deprecated and will be '
999
- 'removed in 0.8. The index of the weather DataFrame '
1000
- 'is used for times.' , pvlibDeprecationWarning )
1001
-
1002
978
self .solar_position = self .location .get_solarposition (
1003
979
self .weather .index , method = self .solar_position_method )
1004
980
@@ -1029,7 +1005,7 @@ def complete_irradiance(self, weather, times=None):
1029
1005
1030
1006
return self
1031
1007
1032
- def prepare_inputs (self , weather , times = None ):
1008
+ def prepare_inputs (self , weather ):
1033
1009
"""
1034
1010
Prepare the solar position, irradiance, and weather inputs to
1035
1011
the model.
@@ -1041,10 +1017,6 @@ def prepare_inputs(self, weather, times=None):
1041
1017
``'wind_speed'``, ``'temp_air'``. All irradiance components
1042
1018
are required. Air temperature of 20 C and wind speed
1043
1019
of 0 m/s will be added to the DataFrame if not provided.
1044
- times : None, deprecated
1045
- Deprecated argument included for API compatibility, but not
1046
- used internally. The index of the weather DataFrame is used
1047
- for times.
1048
1020
1049
1021
Notes
1050
1022
-----
@@ -1064,11 +1036,6 @@ def prepare_inputs(self, weather, times=None):
1064
1036
1065
1037
self .weather = weather
1066
1038
1067
- if times is not None :
1068
- warnings .warn ('times keyword argument is deprecated and will be '
1069
- 'removed in 0.8. The index of the weather DataFrame '
1070
- 'is used for times.' , pvlibDeprecationWarning )
1071
-
1072
1039
self .times = self .weather .index
1073
1040
try :
1074
1041
kwargs = _build_kwargs (['pressure' , 'temp_air' ], weather )
@@ -1126,7 +1093,7 @@ def prepare_inputs(self, weather, times=None):
1126
1093
self .weather ['temp_air' ] = 20
1127
1094
return self
1128
1095
1129
- def run_model (self , weather , times = None ):
1096
+ def run_model (self , weather ):
1130
1097
"""
1131
1098
Run the model.
1132
1099
@@ -1137,10 +1104,6 @@ def run_model(self, weather, times=None):
1137
1104
``'wind_speed'``, ``'temp_air'``. All irradiance components
1138
1105
are required. Air temperature of 20 C and wind speed
1139
1106
of 0 m/s will be added to the DataFrame if not provided.
1140
- times : None, deprecated
1141
- Deprecated argument included for API compatibility, but not
1142
- used internally. The index of the weather DataFrame is used
1143
- for times.
1144
1107
1145
1108
Returns
1146
1109
-------
@@ -1152,11 +1115,6 @@ def run_model(self, weather, times=None):
1152
1115
``dc``, ``ac``, ``losses``,
1153
1116
``diode_params`` (if dc_model is a single diode model)
1154
1117
"""
1155
- if times is not None :
1156
- warnings .warn ('times keyword argument is deprecated and will be '
1157
- 'removed in 0.8. The index of the weather DataFrame '
1158
- 'is used for times.' , pvlibDeprecationWarning )
1159
-
1160
1118
self .prepare_inputs (weather )
1161
1119
self .aoi_model ()
1162
1120
self .spectral_model ()
0 commit comments