Skip to content
Merged
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
3 changes: 3 additions & 0 deletions docs/sphinx/source/whatsnew/v0.9.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Bug fixes
(:issue:`1311`, :pull:`1315`)
* Fixed a bug in :py:func:`pvlib.spectrum.spectrl2` where negative spectral irradiance
values were returned when the sun is behind the plane of array (:issue:`1348`, :pull:`1349`)
* Fixed bug in :py:func:`pvlib.iotools.get_pvgis_hourly` where the `optimal_surface_tilt`
argument was not being passed to the `optimaltilt` request parameter (:pull:`1356`)
Comment thread
AdamRJensen marked this conversation as resolved.
Outdated


Testing
Expand All @@ -36,3 +38,4 @@ Contributors
* :ghuser:`Carlosbogo`
* Christian Weickhmann (:ghuser:`cweickhmann`)
* Kevin Anderson (:ghuser:`kanderso-nrel`)
* Adam R. Jensen (:ghuser:`AdamRJensen`)
2 changes: 1 addition & 1 deletion pvlib/iotools/pvgis.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def get_pvgis_hourly(latitude, longitude, start=None, end=None,
'trackingtype': trackingtype, 'components': int(components),
'usehorizon': int(usehorizon),
'optimalangles': int(optimalangles),
'optimalinclination': int(optimalangles), 'loss': loss}
'optimalinclination': int(optimal_surface_tilt), 'loss': loss}
# pvgis only takes 0 for False, and 1 for True, not strings
if userhorizon is not None:
params['userhorizon'] = ','.join(str(x) for x in userhorizon)
Expand Down
2 changes: 1 addition & 1 deletion pvlib/tests/iotools/test_pvgis.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def test_get_pvgis_hourly_bad_outputformat(requests_mock):
get_pvgis_hourly(latitude=45, longitude=8, outputformat='basic')


url_additional_inputs = 'https://re.jrc.ec.europa.eu/api/seriescalc?lat=55.6814&lon=12.5758&outputformat=csv&angle=0&aspect=0&pvcalculation=1&pvtechchoice=crystSi&mountingplace=free&trackingtype=0&components=1&usehorizon=1&optimalangles=1&optimalinclination=1&loss=2&userhorizon=10%2C15%2C20%2C10&peakpower=5' # noqa: E501
url_additional_inputs = 'https://re.jrc.ec.europa.eu/api/seriescalc?lat=55.6814&lon=12.5758&outputformat=csv&angle=0&aspect=0&pvcalculation=1&pvtechchoice=crystSi&mountingplace=free&trackingtype=0&components=1&usehorizon=1&optimalangles=1&optimalinclination=0&loss=2&userhorizon=10%2C15%2C20%2C10&peakpower=5' # noqa: E501


def test_get_pvgis_hourly_additional_inputs(requests_mock):
Expand Down