Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
5 changes: 4 additions & 1 deletion docs/sphinx/source/whatsnew/v0.15.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ Deprecations

Bug fixes
~~~~~~~~~

* Corrects a bug in :py:func:`pvlib.temperature.fuentes`. Users can expect
modeled cell temperature values to increase slightly.
(:issue:`2608`, :pull:``)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
* Corrects a bug in :py:func:`pvlib.temperature.fuentes`. Users can expect
modeled cell temperature values to increase slightly.
(:issue:`2608`, :pull:``)
* Correct a bug in :py:func:`pvlib.temperature.fuentes`. Users can expect
modeled cell temperature values to increase slightly when using integer inputs.
(:issue:`2608`, :pull:`2745`)

Enhancements
~~~~~~~~~~~~
Expand Down Expand Up @@ -46,3 +48,4 @@ Maintenance
Contributors
~~~~~~~~~~~~
* :ghuser:`Omesh37`
* Cliff Hansen :ghuser:`cwhanse`
Comment thread
cwhanse marked this conversation as resolved.
Outdated
3 changes: 1 addition & 2 deletions pvlib/temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import numpy as np
import pandas as pd
from pvlib.tools import sind
from pvlib._deprecation import warn_deprecated
from pvlib.tools import _get_sample_intervals
import scipy
import scipy.constants
Expand Down Expand Up @@ -883,7 +882,7 @@ def fuentes(poa_global, temp_air, wind_speed, noct_installed, module_height=5,
windmod_array = wind_speed * (module_height/wind_height)**0.2 + 1e-4

tmod0 = 293.15
tmod_array = np.zeros_like(poa_global)
tmod_array = np.zeros_like(poa_global, dtype=float)

iterator = zip(tamb_array, sun_array, windmod_array, tsky_array,
timedelta_hours)
Expand Down
11 changes: 10 additions & 1 deletion tests/test_temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,16 @@
out = temperature.fuentes(df['poa_global'], df['temp_air'],
df['wind_speed'], noct_installed=45)

assert_series_equal(out, pd.Series([47.85, 50.85, 50.85], index=index,
assert_series_equal(out, pd.Series([48.042, 51.845, 51.846], index=index,
name='tmod'))
# GH 2608
df = pd.DataFrame({'poa_global': 1000., 'temp_air': 20., 'wind_speed': 1.},
index)

Check failure on line 278 in tests/test_temperature.py

View workflow job for this annotation

GitHub Actions / flake8-linter

E127 continuation line over-indented for visual indent
Comment thread
cwhanse marked this conversation as resolved.
Outdated

out = temperature.fuentes(df['poa_global'], df['temp_air'],
df['wind_speed'], noct_installed=45)

assert_series_equal(out, pd.Series([48.042, 51.845, 51.846], index=index,
name='tmod'))


Expand Down
Loading