@@ -179,7 +179,7 @@ def basic_chain(times, latitude, longitude,
179179 linke_turbidity ,
180180 altitude = altitude ,
181181 dni_extra = dni_extra
182- )
182+ )
183183
184184 total_irrad = pvlib .irradiance .get_total_irradiance (
185185 surface_tilt ,
@@ -346,24 +346,6 @@ def __init__(self, system, location,
346346 self .ac_model = ac_model
347347 self .aoi_model = aoi_model
348348 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 ))
367349 self .temperature_model = temperature_model
368350
369351 self .losses_model = losses_model
@@ -544,7 +526,7 @@ def __repr__(self):
544526 'transposition_model' , 'solar_position_method' ,
545527 'airmass_model' , 'dc_model' , 'ac_model' , 'aoi_model' ,
546528 'spectral_model' , 'temperature_model' , 'losses_model'
547- ]
529+ ]
548530
549531 def getmcattr (self , attr ):
550532 """needed to avoid recursion in property lookups"""
@@ -588,8 +570,8 @@ def dc_model(self, model):
588570 model = model .lower ()
589571 if model in _DC_MODEL_PARAMS .keys ():
590572 # 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 () ))
593575 if missing_params : # some parameters are not in module.keys()
594576 raise ValueError (model + ' selected for the DC model but '
595577 'one or more required parameters are '
@@ -834,8 +816,8 @@ def infer_spectral_model(self):
834816
835817 def first_solar_spectral_loss (self ):
836818 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' ])
839821 return self
840822
841823 def sapm_spectral_loss (self ):
@@ -878,7 +860,10 @@ def temperature_model(self, model):
878860
879861 def infer_temperature_model (self ):
880862 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 ):
882867 return self .sapm_temp
883868 elif set (['u_c' , 'u_v' ]) <= params :
884869 return self .pvsyst_temp
@@ -945,7 +930,7 @@ def effective_irradiance_model(self):
945930 fd * self .total_irrad ['poa_diffuse' ])
946931 return self
947932
948- def complete_irradiance (self , weather , times = None ):
933+ def complete_irradiance (self , weather ):
949934 """
950935 Determine the missing irradiation columns. Only two of the
951936 following data columns (dni, ghi, dhi) are needed to calculate
@@ -962,10 +947,6 @@ def complete_irradiance(self, weather, times=None):
962947 ``'wind_speed'``, ``'temp_air'``. All irradiance components
963948 are required. Air temperature of 20 C and wind speed
964949 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.
969950
970951 Returns
971952 -------
@@ -994,11 +975,6 @@ def complete_irradiance(self, weather, times=None):
994975 """
995976 self .weather = weather
996977
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-
1002978 self .solar_position = self .location .get_solarposition (
1003979 self .weather .index , method = self .solar_position_method )
1004980
@@ -1029,7 +1005,7 @@ def complete_irradiance(self, weather, times=None):
10291005
10301006 return self
10311007
1032- def prepare_inputs (self , weather , times = None ):
1008+ def prepare_inputs (self , weather ):
10331009 """
10341010 Prepare the solar position, irradiance, and weather inputs to
10351011 the model.
@@ -1041,10 +1017,6 @@ def prepare_inputs(self, weather, times=None):
10411017 ``'wind_speed'``, ``'temp_air'``. All irradiance components
10421018 are required. Air temperature of 20 C and wind speed
10431019 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.
10481020
10491021 Notes
10501022 -----
@@ -1064,11 +1036,6 @@ def prepare_inputs(self, weather, times=None):
10641036
10651037 self .weather = weather
10661038
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-
10721039 self .times = self .weather .index
10731040 try :
10741041 kwargs = _build_kwargs (['pressure' , 'temp_air' ], weather )
@@ -1126,7 +1093,7 @@ def prepare_inputs(self, weather, times=None):
11261093 self .weather ['temp_air' ] = 20
11271094 return self
11281095
1129- def run_model (self , weather , times = None ):
1096+ def run_model (self , weather ):
11301097 """
11311098 Run the model.
11321099
@@ -1137,10 +1104,6 @@ def run_model(self, weather, times=None):
11371104 ``'wind_speed'``, ``'temp_air'``. All irradiance components
11381105 are required. Air temperature of 20 C and wind speed
11391106 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.
11441107
11451108 Returns
11461109 -------
@@ -1152,11 +1115,6 @@ def run_model(self, weather, times=None):
11521115 ``dc``, ``ac``, ``losses``,
11531116 ``diode_params`` (if dc_model is a single diode model)
11541117 """
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-
11601118 self .prepare_inputs (weather )
11611119 self .aoi_model ()
11621120 self .spectral_model ()
0 commit comments