Skip to content

Commit

Permalink
Merge branch 'pvlib:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
adriesse authored Jan 31, 2024
2 parents 629136b + 6bb149f commit 53048b7
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 52 deletions.
54 changes: 29 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<a href="https://pypi.org/project/pvlib/">
<img src="https://img.shields.io/pypi/v/pvlib.svg" alt="latest release" />
</a>
<a href="https://anaconda.org/conda-forge/pvlib-python">
<img src="https://anaconda.org/conda-forge/pvlib-python/badges/version.svg" />
<a href="https://anaconda.org/conda-forge/pvlib">
<img src="https://anaconda.org/conda-forge/pvlib/badges/version.svg" />
</a>
<a href="https://anaconda.org/conda-forge/pvlib-python">
<img src="https://anaconda.org/conda-forge/pvlib-python/badges/latest_release_date.svg" />
<a href="https://anaconda.org/conda-forge/pvlib">
<img src="https://anaconda.org/conda-forge/pvlib/badges/latest_release_date.svg" />
</a>
</tr>
<tr>
Expand Down Expand Up @@ -50,19 +50,8 @@
<a href="https://doi.org/10.5281/zenodo.593284">
<img src="https://zenodo.org/badge/DOI/10.5281/zenodo.593284.svg" alt="zenodo reference">
</a>
<a href="http://joss.theoj.org/papers/41187535cad22dd4b076c89b72f874b1">
<img src="http://joss.theoj.org/papers/41187535cad22dd4b076c89b72f874b1/status.svg" alt="JOSS reference" />
</a>
</td>
</tr>
<tr>
<td>Downloads</td>
<td>
<a href="https://pypi.org/project/pvlib/">
<img src="https://img.shields.io/pypi/dm/pvlib" alt="PyPI downloads" />
</a>
<a href="https://anaconda.org/conda-forge/pvlib-python">
<img src="https://anaconda.org/conda-forge/pvlib-python/badges/downloads.svg" alt="conda-forge downloads" />
<a style="border-width:0" href="https://doi.org/10.21105/joss.05994">
<img src="https://joss.theoj.org/papers/10.21105/joss.05994/status.svg" alt="DOI badge" >
</a>
</td>
</tr>
Expand Down Expand Up @@ -99,17 +88,32 @@ The long-term success of pvlib-python requires substantial community support.
Citing
======

If you use pvlib-python in a published work, please cite:
Many of the contributors to pvlib python work in institutions where
citation metrics are used in performance or career evaluations. If you
use pvlib python in a published work, please cite:

William F. Holmgren, Clifford W. Hansen, and Mark A. Mikofski.
**Recommended citation for the pvlib python project**

Anderson, K., Hansen, C., Holmgren, W., Jensen, A., Mikofski, M., and Driesse, A.
"pvlib python: 2023 project update."
Journal of Open Source Software, 8(92), 5994, (2023).
https://doi.org/10.21105/joss.05994


**Recommended citation for pvlib iotools**

Jensen, A., Anderson, K., Holmgren, W., Mikofski, M., Hansen, C., Boeman, L., Loonen, R.
"pvlib iotools —- Open-source Python functions for seamless access to solar irradiance data."
Solar Energy, 266, 112092, (2023).
https://doi.org/10.1016/j.solener.2023.112092

**Historical citation for pvlib python**

Holmgren, W., Hansen, C., and Mikofski, M.
"pvlib python: a python package for modeling solar energy systems."
Journal of Open Source Software, 3(29), 884, (2018).
https://doi.org/10.21105/joss.00884

Please also cite the DOI corresponding to the specific version of
pvlib-python that you used. pvlib-python DOIs are listed at
[Zenodo.org](https://zenodo.org/search?page=1&size=20&q=conceptrecid:593284&all_versions&sort=-version)

If you use pvlib-python in a commercial or publicly-available application, please
consider displaying one of the "powered by pvlib" logos:

Expand Down Expand Up @@ -142,10 +146,10 @@ History and acknowledgement
===========================

pvlib python started out as a Python translation of the PVLIB MATLAB
toolbox (developed by the `PVPMC <https://pvpmc.sandia.gov/>`_ at
toolbox (developed by the [PVPMC](https://pvpmc.sandia.gov/) at
Sandia National Laboratories) in 2013 and has grown substantially since then.
Today it contains code contributions from over a hundred individuals worldwide
and is maintained by a core group of PV modelers from a variety institutions.
and is maintained by a core group of PV modelers from a variety of institutions.

pvlib has been supported directly and indirectly by DOE, NumFOCUS, and
Google Summer of Code funding, university research projects,
Expand Down
55 changes: 34 additions & 21 deletions docs/sphinx/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,37 @@ companies that allow their employees to contribute, and from personal time.
Citing pvlib python
===================

Many of the contributors to pvlib-python work in institutions where
Many of the contributors to pvlib python work in institutions where
citation metrics are used in performance or career evaluations. If you
use pvlib python in a published work, please cite:

William F. Holmgren, Clifford W. Hansen, and Mark A. Mikofski.
**Recommended citation for the pvlib python project**

Anderson, K., Hansen, C., Holmgren, W., Jensen, A., Mikofski, M., and Driesse, A.
"pvlib python: 2023 project update."
Journal of Open Source Software, 8(92), 5994, (2023).
https://doi.org/10.21105/joss.05994


**Recommended citation for pvlib iotools**

Jensen, A., Anderson, K., Holmgren, W., Mikofski, M., Hansen, C., Boeman, L., Loonen, R.
"pvlib iotools — Open-source Python functions for seamless access to solar irradiance data."
Solar Energy, 266, 112092, (2023).
https://doi.org/10.1016/j.solener.2023.112092

**Historical citation for pvlib python**

Holmgren, W., Hansen, C., and Mikofski, M.
"pvlib python: a python package for modeling solar energy systems."
Journal of Open Source Software, 3(29), 884, (2018).
https://doi.org/10.21105/joss.00884

**Version specific citation**
Please also cite the DOI corresponding to the specific version of
pvlib python that you used. pvlib python DOIs are listed at
`Zenodo.org <https://zenodo.org/search?page=1&size=20&q=conceptrecid:593284&all_versions&sort=-version>`_

If you use pvlib-python in a commercial or publicly-available
application, please consider displaying one of the "powered by pvlib"
logos:

.. image:: _images/pvlib_powered_logo_horiz.png
:width: 300

.. image:: _images/pvlib_powered_logo_vert.png
:width: 300

Additional pvlib python publications include:

Expand All @@ -94,6 +103,19 @@ Additional pvlib python publications include:
"An Open Source Solar Power Forecasting Tool Using PVLIB-Python,"
in 43rd Photovoltaic Specialists Conference, 2016.


Logo
====
If you use pvlib python in a commercial or publicly-available
application, please consider displaying one of the "powered by pvlib"
logos:

.. image:: _images/pvlib_powered_logo_horiz.png
:width: 300

.. image:: _images/pvlib_powered_logo_vert.png
:width: 300

License
=======

Expand All @@ -108,21 +130,12 @@ pvlib python is a `NumFOCUS Affiliated Project <https://numfocus.org/sponsored-p
:target: https://numfocus.org/sponsored-projects/affiliated-projects
:alt: NumFocus Affliated Projects

Contents
========

.. toctree::
:maxdepth: 1
:hidden:

user_guide/index
gallery/index
reference/index
whatsnew
contributing


Indices and tables
==================

* :ref:`genindex`
* :ref:`search`
5 changes: 3 additions & 2 deletions docs/sphinx/source/whatsnew/v0.10.4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ Enhancements

Bug fixes
~~~~~~~~~

* :py:class:`~pvlib.modelchain.ModelChain` now raises a more useful error when
``temperature_model_parameters`` are specified on the passed ``system`` instead of on its ``arrays``. (:issue:`1759`).

Testing
~~~~~~~
Expand All @@ -27,4 +28,4 @@ Requirements

Contributors
~~~~~~~~~~~~

* :ghuser:`matsuobasho`
1 change: 1 addition & 0 deletions pvlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
ivtools,
location,
modelchain,
pvarray,
pvsystem,
scaling,
shading,
Expand Down
5 changes: 1 addition & 4 deletions pvlib/modelchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,10 +1117,7 @@ def infer_temperature_model(self):
temperature_model_parameters = tuple(
array.temperature_model_parameters for array in self.system.arrays)
params = _common_keys(temperature_model_parameters)
# remove or statement in v0.9
if {'a', 'b', 'deltaT'} <= params or (
not params and self.system.racking_model is None
and self.system.module_type is None):
if {'a', 'b', 'deltaT'} <= params:
return self.sapm_temp
elif {'u_c', 'u_v'} <= params:
return self.pvsyst_temp
Expand Down
16 changes: 16 additions & 0 deletions pvlib/tests/test_modelchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,22 @@ def test_temperature_model_inconsistent(location, sapm_dc_snl_ac_system):
spectral_model='no_loss', temperature_model='pvsyst')


def test_temperature_model_not_specified():
# GH 1759 -- ensure correct error is raised when temperature model params
# are specified on the PVSystem instead of the Arrays
location = Location(latitude=32.2, longitude=-110.9)
arrays = [pvsystem.Array(pvsystem.FixedMount(),
module_parameters={'pdc0': 1, 'gamma_pdc': 0})]
system = pvsystem.PVSystem(arrays,
temperature_model_parameters={'u0': 1, 'u1': 1},
inverter_parameters={'pdc0': 1})
with pytest.raises(ValueError,
match='could not infer temperature model '
'from system.temperature_model_parameters'):
_ = ModelChain(system, location,
aoi_model='no_loss', spectral_model='no_loss')


def test_dc_model_user_func(pvwatts_dc_pvwatts_ac_system, location, weather,
mocker):
m = mocker.spy(sys.modules[__name__], 'poadc')
Expand Down

0 comments on commit 53048b7

Please sign in to comment.