Skip to content

Commit

Permalink
Updates for pvlib 0.9.0 (#121)
Browse files Browse the repository at this point in the history
* change pvlib dep from <0.9.0 to <0.10.0

* unrelated typo

* update test expected values

* create 1.5.2 whatsnew

* update deprecated sphinx code

* preserve original test values in comment

* fix typo in comment

* bump min pvlib to 0.9.0

* add explanation to whatsnew
  • Loading branch information
kandersolar authored Oct 12, 2021
1 parent 3c619d3 commit 2da9668
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,4 +335,4 @@


def setup(app):
app.add_stylesheet('css/custom.css')
app.add_css_file('css/custom.css')
2 changes: 1 addition & 1 deletion docs/sphinx/tutorials/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ In the "full mode", ``pvfactors`` calculates the equilibrium of reflections betw
Details on the "fast mode" simulations
======================================

In the "fast mode", ``pvfactors`` assumes that all incident irradiance values for the system are known except for the PV row back surfaces. So since the system to solve is now explicit (no matrix inversion needed), it runs a little bit faster than the full mode, but it is less acurrate.
In the "fast mode", ``pvfactors`` assumes that all incident irradiance values for the system are known except for the PV row back surfaces. So since the system to solve is now explicit (no matrix inversion needed), it runs a little bit faster than the full mode, but it is less accurate.

.. note::
Some tests show that for 8760 hourly simulations, the run time is less than 1 second for the fast mode vs. less than 2 seconds for the full mode.
Expand Down
1 change: 1 addition & 0 deletions docs/sphinx/whatsnew.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ What's New

These are new features and improvements of note in each release.

.. include:: whatsnew/v1.5.2.rst
.. include:: whatsnew/v1.5.1.rst
.. include:: whatsnew/v1.5.0.rst
.. include:: whatsnew/v1.4.1.rst
Expand Down
22 changes: 22 additions & 0 deletions docs/sphinx/whatsnew/v1.5.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. _whatsnew_152:

v1.5.2 (DATE XX, 2021)
======================

Fixes
-----

* A small bug in the pvlib-python implementation of the Perez transposition model was
discovered and fixed in pvlib v0.9.0. To ensure the error does not affect pvfactors
output moving forward, the pvlib dependency is updated from ``pvlib>=0.7.0,<0.9.0`` to
``pvlib>=0.9.0,<0.10.0``. This will likely change the results of irradiance simulations.
According to the
[pvlib release notes](https://pvlib-python.readthedocs.io/en/v0.9.0/whatsnew.html#bug-fixes),
the differences are "expected to be small and primarily occur at low irradiance conditions".
(:ghpull:`121`)


Contributors
------------
* Marc Anoma (:ghuser:`anomam`)
* Kevin Anderson (:ghuser:`kanderso-nrel`)
7 changes: 5 additions & 2 deletions pvfactors/tests/test_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,11 @@ def test_check_direct_shading_continuity():
out = pvarray.ts_pvrows[1].back.get_param_weighted('qinc')

# Check expected outputs: before v1.3.0, expected output is
# [20.4971271991293, 21.389095477613356], which shows discontinuity
expected_out = [20.497127, 20.50229]
# [20.4971271991293, 21.389095477613356], which shows discontinuity.
# Update 2021-10-04 for v1.5.2: for pvlib <0.9.0, expected value
# was [20.497127, 20.50229]. The values changed slightly because
# of a bugfix to the Perez model in pvlib 0.9.0. See pvfactors PR #121.
expected_out = [20.936348, 20.942163]
np.testing.assert_allclose(out, expected_out)


Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pvlib>=0.7.0,<0.9.0
pvlib>=0.9.0,<0.10.0
shapely>=1.6.4.post2
matplotlib
future
Expand Down

0 comments on commit 2da9668

Please sign in to comment.