Description
Is your feature request related to a problem? Please describe.
recently a question was posed, given backside module temperature, how to include them in the model chain? Looking at the temperature models available, there isn't one that takes module temperature as input and returns cell temperature. SAPM has a formula for adjusting module temperature to obtain cell temperature based on irradiance and constant "delta-T" parameter that is characteristic of the module. However this formula is bundled into pvlib.temperature.sapm_cell
as Eq (2) and the function doesn't take module temperature as input
Describe the solution you'd like
add an optional kwarg to pvlib.temperature.sapm_cell
that allows it to bypass the module temperature calculation.
pvlib-python/pvlib/temperature.py
Line 117 in ae98bf9
option 1:
add module_temperature
as kwarg
def sapm_cell(poa_global, temp_air, wind_speed, a, b, deltaT,
irrad_ref=1000, module_temperature=None):
if module_temperature is None:
module_temperature = sapm_module(poa_global, temp_air, wind_speed,
else:
warning.warn('air temp and wind speed parameters ignored, overridden by module temp')
return module_temperature + (poa_global / irrad_ref) * deltaT
option 2:
add new pvlib.temperature.sapm_module_to_cell
func
def sapm_module_to_cell(module_temperature, poa_global, deltaT, irrad_ref=1000):
return module_temperature + (poa_global / irrad_ref) * deltaT
note: if option 2, then pvlib.temperature.sapm_cell
could be updated to call pvlib.temperature.sapm_module_to_cell
Describe alternatives you've considered
- We could explain to users that they can back out the conditions to the use
pvlib.temperature.sapm_cell
- we could encourage users to formulate the equation themselves from the literature
- we could implement a 3rd SAPM function to perform this task seperately, call it
pvlib.temperature.sapm_module_to_cell
?
Additional context
related to this post on the Google group