-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
The temperature_model_parameters
handling code below suggests to me that in 0.8 we're going to
- set default values
module_type=None
andracking_model=None
. - require user to specify either
temperature_model_parameters
or bothmodule_type
andracking_model
.
pvlib-python/pvlib/pvsystem.py
Lines 208 to 221 in 27872b8
# TODO: deprecated behavior if PVSystem.temperature_model_parameters | |
# are not specified. Remove in v0.8 | |
if not any(self.temperature_model_parameters): | |
warnings.warn( | |
'Required temperature_model_parameters is not specified ' | |
'and parameters are not inferred from racking_model and ' | |
'module_type. Reverting to deprecated default: SAPM cell ' | |
'temperature model parameters for a glass/glass module in ' | |
'open racking. In the future ' | |
'PVSystem.temperature_model_parameters will be required', | |
pvlibDeprecationWarning) | |
params = temperature._temperature_model_params( | |
'sapm', 'open_rack_glass_glass') | |
self.temperature_model_parameters = params |
@cwhanse is that correct?
The problem is that the only way to see this warning is to supply an invalid module_type
or racking_model
. That's because PVSystem._infer_temperature_model
is called before the code above, and it looks up the default module_type
and racking_model
and successfully finds temperature coefficients.
pvlib-python/pvlib/pvsystem.py
Lines 201 to 203 in 27872b8
if temperature_model_parameters is None: | |
self.temperature_model_parameters = \ | |
self._infer_temperature_model_params() |
So I'm guessing that this warning has been seen by only a small fraction of people that need to see it. I'm ok moving forward with the removal in 0.8 or pushing to 0.9.