8000 Add noct_sam cell temperature model to PVSystem, ModelChain by cwhanse · Pull Request #1195 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Add noct_sam cell temperature model to PVSystem, ModelChain #1195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Mar 15, 2021
Merged
Prev Previous commit
Next Next commit
complete test coverage, whatsnew
  • Loading branch information
cwhanse committed Mar 13, 2021
commit 3b50f1af78392de8ac59b1faff23fc59201d4666
2 changes: 1 addition & 1 deletion docs/sphinx/source/whatsnew/v0.9.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Enhancements
from DC power. Use parameter ``model`` to specify which inverter model to use.
(:pull:`1147`, :issue:`998`, :pull:`1150`)
* Added :py:func:`~pvlib.temperature.noct_sam`, a cell temperature model
implemented in SAM (:pull:`1177`)
implemented in SAM (:pull:`1177`, :pull:`1195`)

Bug fixes
~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion pvlib/modelchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ def _set_celltemp(self, model):
temp_air = _tuple_from_dfs(self.weather, 'temp_air')
wind_speed = _tuple_from_dfs(self.weather, 'wind_speed')
arg_list = [poa, temp_air, wind_speed]
if model == 'noct_sam':
if model == self.system.noct_sam_celltemp:
arg_list += [self.results.effective_irradiance]
self.results.cell_temperature = model(*tuple(arg_list))
return self
Expand Down
4 changes: 2 additions & 2 deletions pvlib/tests/test_modelchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,8 @@ def test_run_model_with_weather_fuentes_temp(sapm_dc_snl_ac_system, location,
assert not mc.results.ac.empty


def test_run_model_with_weather_noct_temp_temp(sapm_dc_snl_ac_system, location,
weather, mocker):
def test_run_model_with_weather_noct_sam_temp(sapm_dc_snl_ac_system, location,
weather, mocker):
weather['wind_speed'] = 5
weather['temp_air'] = 10
sapm_dc_snl_ac_system.temperature_model_parameters = {
Copy link
Member

Choose a reason for hiding this comment

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

#1196 will need to update for this one too

Expand Down
0