Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions pvlib/pvsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1217,11 +1217,12 @@ def get_cell_temperature(self, poa_global, temp_air, wind_speed, model,
Ambient dry bulb temperature [C]

wind_speed : numeric
Wind speed [m/s]
Wind speed [m/s], although can be ``None`` for ``'ross'`` model
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add this to the corresponding PVSystem description too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean within the function below?

@_unwrap_single_value
def get_cell_temperature(...)


model : str
Supported models include ``'sapm'``, ``'pvsyst'``,
``'faiman'``, ``'fuentes'``, and ``'noct_sam'``
``'faiman'``, ``'faiman_rad'``, ``'fuentes'``, ``'noct_sam'``,
and ``'ross'``

effective_irradiance : numeric, optional
The irradiance that is converted to photocurrent in W/m^2.
Expand Down Expand Up @@ -1267,6 +1268,12 @@ def get_cell_temperature(self, poa_global, temp_air, wind_speed, model,
required = tuple()
optional = _build_kwargs(['u0', 'u1'],
self.temperature_model_parameters)
elif model == 'faiman_rad':
func = temperature.faiman_rad
required = ()
optional = _build_kwargs(['ir_down', 'u0', 'u1',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ir_down being a value in temperature_model_parameters seems wrong to me. Shouldn't it be an optional time series input like effective_irradiance is?

Copy link
Contributor Author

@ramaroesilva ramaroesilva Dec 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're totally right. Already handled this in my latest commits. Thanks!

'sky_view', 'emissivity'],
self.temperature_model_parameters)
elif model == 'fuentes':
func = temperature.fuentes
required = _build_tcell_args(['noct_installed'])
Expand All @@ -1283,11 +1290,21 @@ def get_cell_temperature(self, poa_global, temp_air, wind_speed, model,
optional = _build_kwargs(['transmittance_absorptance',
'array_height', 'mount_standoff'],
self.temperature_model_parameters)
elif model == 'ross':
func = temperature.ross
required = ()
# either noct or k must be defined
optional = _build_kwargs(['noct', 'k'],
self.temperature_model_parameters)
else:
raise ValueError(f'{model} is not a valid cell temperature model')

temperature_cell = func(poa_global, temp_air, wind_speed,
*required, **optional)
if model == 'ross':
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although wind speed was kept as an input requested by get_cell_temperature, here such a differentiation is needed since ross is apparently the only model not using wind.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cwhanse @echedey-ls this if ross can be avoided if for the wind-using functions (all except ross), wind_speed is defined as input as below (example for one function):

# func = temperature.sapm_cell # to deprecate
func = functools.partial(temperature.sapm_cell, wind_speed=wind_speed)

and the if ross with two possibilities is replaced by the single line below

temperature_cell = func(poa_global, temp_air, *required, **optional)

temperature_cell = func(poa_global, temp_air,
*required, **optional)
else:
temperature_cell = func(poa_global, temp_air, wind_speed,
*required, **optional)
return temperature_cell

def dc_ohms_from_percent(self):
Expand Down