Skip to content

Commit 8896da1

Browse files
authored
Merge branch 'master' into diode_params
2 parents 91dfa95 + 5f7e9d6 commit 8896da1

25 files changed

+805
-640
lines changed

ci/requirements-py35-min.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ dependencies:
1313
- pytz
1414
- requests
1515
- pip:
16-
- numpy==1.10.4
16+
- numpy==1.12.0
1717
- pandas==0.18.1

docs/sphinx/source/api.rst

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ PV temperature models
233233
temperature.sapm_cell
234234
temperature.sapm_module
235235
temperature.pvsyst_cell
236+
temperature.faiman
236237

237238
Single diode models
238239
-------------------
@@ -274,6 +275,7 @@ Functions relevant for the SAPM model.
274275
pvsystem.sapm_spectral_loss
275276
pvsystem.sapm_aoi_loss
276277
pvsystem.snlinverter
278+
pvsystem.adrinverter
277279
temperature.sapm_cell
278280

279281
Pvsyst model
@@ -295,7 +297,6 @@ PVWatts model
295297
pvsystem.pvwatts_dc
296298
pvsystem.pvwatts_ac
297299
pvsystem.pvwatts_losses
298-
pvsystem.pvwatts_losses
299300

300301
Functions for fitting PV models
301302
-------------------------------
@@ -376,24 +377,7 @@ in some files.
376377
:toctree: generated/
377378

378379
location.Location.from_tmy
379-
380-
381-
TMY
382-
===
383-
384-
.. warning::
385-
386-
The :py:mod:`pvlib.tmy` module is deprecated; it will be removed
387-
in pvlib 0.7. Please see the :ref:`pvlib.iotools <iotools>` package.
388-
389-
Methods and functions for reading data from TMY files.
390-
391-
.. autosummary::
392-
:toctree: generated/
393-
394-
location.Location.from_tmy
395-
tmy.readtmy2
396-
tmy.readtmy3
380+
location.Location.from_epw
397381

398382

399383
Forecasting

docs/sphinx/source/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,3 +320,7 @@ def setup(app):
320320
nbsphinx_allow_errors = True
321321

322322
ipython_warning_is_error = False
323+
324+
# suppress "WARNING: Footnote [1] is not referenced." messages
325+
# https://github.com/pvlib/pvlib-python/issues/837
326+
suppress_warnings = ['ref.footnote']

docs/sphinx/source/whatsnew/v0.7.0.rst

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ recommend all users of v0.6.3 upgrade to this release after checking API
88
compatibility notes.
99

1010
**Python 2.7 support ended on June 1, 2019.** (:issue:`501`)
11-
**Minimum numpy version is now 1.10.4. Minimum pandas version is now 0.18.1.**
11+
**Minimum numpy version is now 1.12.0. Minimum pandas version is now 0.18.1.** (:issue:`830`, :issue:`748`)
1212

1313
API Breaking Changes
1414
~~~~~~~~~~~~~~~~~~~~
@@ -32,7 +32,7 @@ API Changes with Deprecations
3232
- `temperature.sapm_cell` returns only the cell temperature, whereas the
3333
old `pvsystem.sapm_celltemp` returned a `DataFrame` with both cell and module temperatures.
3434
- Created `temperature.sapm_module` to return module temperature using the SAPM temperature model.
35-
- Changed the order of arguments for`pvsystem.sapm_celltemp`,
35+
- Changed the order of arguments for `pvsystem.sapm_celltemp`,
3636
`pvsystem.pvsyst_celltemp` and `PVSystem.sapm_celltemp` to be consistent
3737
among cell temperature model functions.
3838
- Removed `model` as a kwarg from `temperature.sapm_cell` and
@@ -121,8 +121,12 @@ Other API Changes
121121

122122
Enhancements
123123
~~~~~~~~~~~~
124+
* Created one new temperature model function:
125+
:py:func:`pvlib.temperature.faiman`. (:issue:`750`)
124126
* Created two new incidence angle modifier (IAM) functions:
125127
:py:func:`pvlib.iam.martin_ruiz` and :py:func:`pvlib.iam.interp`. (:issue:`751`)
128+
* Created one new incidence angle modifier (IAM) function for diffuse irradiance:
129+
:py:func:`pvlib.iam.martin_ruiz_diffuse`. (:issue:`751`)
126130
* Add the `martin_ruiz` IAM function as an option for `ModelChain.aoi_model`.
127131
* Updated the file for module parameters for the CEC model, from the SAM file
128132
dated 2017-6-5 to the SAM file dated 2019-03-05. (:issue:`761`)
@@ -140,8 +144,8 @@ Enhancements
140144
* Add `timeout` to :py:func:`pvlib.iotools.get_psm3`.
141145
* Add :py:func:`~pvlib.scaling.wvm`, a port of the wavelet variability model for
142146
computing reductions in variability due to a spatially distributed plant.
143-
* Created one new incidence angle modifier (IAM) function for diffuse irradiance:
144-
:py:func:`pvlib.iam.martin_ruiz_diffuse`. (:issue:`751`)
147+
* Add :py:meth:`~pvlib.location.Location.from_epw`, a method to create a Location
148+
object from epw metadata, typically coming from `pvlib.iotools.epw.read_epw`.
145149

146150
Bug fixes
147151
~~~~~~~~~
@@ -175,6 +179,11 @@ Documentation
175179
used. (:issue:`785`)
176180
* Note warning about _TMY3.epw files retrieved from energyplus.net in docstring
177181
of `epw.read_epw`
182+
* Improved sphinx rendering of API reference entries for `clearsky.ineichen`,
183+
`clearsky.haurwitz`, `tracking.singleaxis`, `iotools.read_midc`,
184+
`Location.from_tmy`, `ModelChain.run_model`, `ModelChain.complete_irradiance`,
185+
and `ModelChain.prepare_inputs`
186+
* Removed duplicate `pvwatts_losses` entry in `api.rst`
178187

179188
Removal of prior version deprecations
180189
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -189,6 +198,11 @@ Removal of prior version deprecations
189198
* Removed `ModelChain.singlediode` method.
190199
* Removed `ModelChain.prepare_inputs` clearsky assumption when no irradiance
191200
data was provided.
201+
202+
Requirements
203+
~~~~~~~~~~~~
204+
* numpy minimum increased to v1.12.0, released in 2017. (:issue:`830`)
205+
* pandas minimum increased to v1.18.1, released in 2016. (:issue:`748`)
192206

193207
Contributors
194208
~~~~~~~~~~~~
@@ -204,3 +218,5 @@ Contributors
204218
* Joseph Ranalli (:ghuser:`jranalli`)
205219
* Tony Lorenzo (:ghuser:`alorenzo175`)
206220
* Todd Karin (:ghuser:`toddkarin`)
221+
* Mark Mikofski (:ghuser:`mikofski`)
222+
* Kevin Anderson (:ghuser:`kevinsa5`)

pvlib/atmosphere.py

Lines changed: 65 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def pres2alt(pressure):
4646
4747
References
4848
-----------
49-
[1] "A Quick Derivation relating altitude to air pressure" from
50-
Portland State Aerospace Society, Version 1.03, 12/22/2004.
49+
.. [1] "A Quick Derivation relating altitude to air pressure" from
50+
Portland State Aerospace Society, Version 1.03, 12/22/2004.
5151
'''
5252

5353
alt = 44331.5 - 4946.62 * pressure ** (0.190263)
@@ -86,8 +86,8 @@ def alt2pres(altitude):
8686
8787
References
8888
-----------
89-
[1] "A Quick Derivation relating altitude to air pressure" from
90-
Portland State Aerospace Society, Version 1.03, 12/22/2004.
89+
.. [1] "A Quick Derivation relating altitude to air pressure" from
90+
Portland State Aerospace Society, Version 1.03, 12/22/2004.
9191
'''
9292

9393
press = 100 * ((44331.514 - altitude) / 11880.516) ** (1 / 0.1902632)
@@ -124,9 +124,9 @@ def get_absolute_airmass(airmass_relative, pressure=101325.):
124124
125125
References
126126
----------
127-
[1] C. Gueymard, "Critical analysis and performance assessment of
128-
clear sky solar irradiance models using theoretical and measured
129-
data," Solar Energy, vol. 51, pp. 121-138, 1993.
127+
.. [1] C. Gueymard, "Critical analysis and performance assessment of
128+
clear sky solar irradiance models using theoretical and measured
129+
data," Solar Energy, vol. 51, pp. 121-138, 1993.
130130
'''
131131

132132
airmass_absolute = airmass_relative * pressure / 101325.
@@ -178,29 +178,29 @@ def get_relative_airmass(zenith, model='kastenyoung1989'):
178178
179179
References
180180
----------
181-
[1] Fritz Kasten. "A New Table and Approximation Formula for the
182-
Relative Optical Air Mass". Technical Report 136, Hanover, N.H.:
183-
U.S. Army Material Command, CRREL.
181+
.. [1] Fritz Kasten. "A New Table and Approximation Formula for the
182+
Relative Optical Air Mass". Technical Report 136, Hanover, N.H.:
183+
U.S. Army Material Command, CRREL.
184184
185-
[2] A. T. Young and W. M. Irvine, "Multicolor Photoelectric
186-
Photometry of the Brighter Planets," The Astronomical Journal, vol.
187-
72, pp. 945-950, 1967.
185+
.. [2] A. T. Young and W. M. Irvine, "Multicolor Photoelectric
186+
Photometry of the Brighter Planets," The Astronomical Journal, vol.
187+
72, pp. 945-950, 1967.
188188
189-
[3] Fritz Kasten and Andrew Young. "Revised optical air mass tables
190-
and approximation formula". Applied Optics 28:4735-4738
189+
.. [3] Fritz Kasten and Andrew Young. "Revised optical air mass tables
190+
and approximation formula". Applied Optics 28:4735-4738
191191
192-
[4] C. Gueymard, "Critical analysis and performance assessment of
193-
clear sky solar irradiance models using theoretical and measured
194-
data," Solar Energy, vol. 51, pp. 121-138, 1993.
192+
.. [4] C. Gueymard, "Critical analysis and performance assessment of
193+
clear sky solar irradiance models using theoretical and measured
194+
data," Solar Energy, vol. 51, pp. 121-138, 1993.
195195
196-
[5] A. T. Young, "AIR-MASS AND REFRACTION," Applied Optics, vol. 33,
197-
pp. 1108-1110, Feb 1994.
196+
.. [5] A. T. Young, "AIR-MASS AND REFRACTION," Applied Optics, vol. 33,
197+
pp. 1108-1110, Feb 1994.
198198
199-
[6] Keith A. Pickering. "The Ancient Star Catalog". DIO 12:1, 20,
199+
.. [6] Keith A. Pickering. "The Ancient Star Catalog". DIO 12:1, 20,
200200
201-
[7] Matthew J. Reno, Clifford W. Hansen and Joshua S. Stein, "Global
202-
Horizontal Irradiance Clear Sky Models: Implementation and Analysis"
203-
Sandia Report, (2012).
201+
.. [7] Matthew J. Reno, Clifford W. Hansen and Joshua S. Stein, "Global
202+
Horizontal Irradiance Clear Sky Models: Implementation and Analysis"
203+
Sandia Report, (2012).
204204
'''
205205

206206
# set zenith values greater than 90 to nans
@@ -518,13 +518,13 @@ def bird_hulstrom80_aod_bb(aod380, aod500):
518518
519519
References
520520
----------
521-
[1] Bird and Hulstrom, "Direct Insolation Models" (1980)
522-
`SERI/TR-335-344 <http://www.nrel.gov/docs/legosti/old/344.pdf>`_
521+
.. [1] Bird and Hulstrom, "Direct Insolation Models" (1980)
522+
`SERI/TR-335-344 <http://www.nrel.gov/docs/legosti/old/344.pdf>`_
523523
524-
[2] R. E. Bird and R. L. Hulstrom, "Review, Evaluation, and Improvement of
525-
Direct Irradiance Models", Journal of Solar Energy Engineering 103(3),
526-
pp. 182-192 (1981)
527-
:doi:`10.1115/1.3266239`
524+
.. [2] R. E. Bird and R. L. Hulstrom, "Review, Evaluation, and Improvement
525+
of Direct Irradiance Models", Journal of Solar Energy Engineering
526+
103(3), pp. 182-192 (1981)
527+
:doi:`10.1115/1.3266239`
528528
"""
529529
# approximate broadband AOD using (Bird-Hulstrom 1980)
530530
return 0.27583 * aod380 + 0.35 * aod500
@@ -565,32 +565,32 @@ def kasten96_lt(airmass_absolute, precipitable_water, aod_bb):
565565
566566
References
567567
----------
568-
[1] F. Linke, "Transmissions-Koeffizient und Trubungsfaktor", Beitrage
569-
zur Physik der Atmosphare, Vol 10, pp. 91-103 (1922)
570-
571-
[2] F. Kasten, "A simple parameterization of the pyrheliometric formula for
572-
determining the Linke turbidity factor", Meteorologische Rundschau 33,
573-
pp. 124-127 (1980)
574-
575-
[3] Kasten, "The Linke turbidity factor based on improved values of the
576-
integral Rayleigh optical thickness", Solar Energy, Vol. 56, No. 3,
577-
pp. 239-244 (1996)
578-
:doi:`10.1016/0038-092X(95)00114-7`
579-
580-
[4] B. Molineaux, P. Ineichen, N. O'Neill, "Equivalence of pyrheliometric
581-
and monochromatic aerosol optical depths at a single key wavelength",
582-
Applied Optics Vol. 37, issue 10, 7008-7018 (1998)
583-
:doi:`10.1364/AO.37.007008`
584-
585-
[5] P. Ineichen, "Conversion function between the Linke turbidity and the
586-
atmospheric water vapor and aerosol content", Solar Energy 82,
587-
pp. 1095-1097 (2008)
588-
:doi:`10.1016/j.solener.2008.04.010`
589-
590-
[6] P. Ineichen and R. Perez, "A new airmass independent formulation for
591-
the Linke Turbidity coefficient", Solar Energy, Vol. 73, no. 3, pp. 151-157
592-
(2002)
593-
:doi:`10.1016/S0038-092X(02)00045-2`
568+
.. [1] F. Linke, "Transmissions-Koeffizient und Trubungsfaktor", Beitrage
569+
zur Physik der Atmosphare, Vol 10, pp. 91-103 (1922)
570+
571+
.. [2] F. Kasten, "A simple parameterization of the pyrheliometric formula
572+
for determining the Linke turbidity factor", Meteorologische Rundschau
573+
33, pp. 124-127 (1980)
574+
575+
.. [3] Kasten, "The Linke turbidity factor based on improved values of the
576+
integral Rayleigh optical thickness", Solar Energy, Vol. 56, No. 3,
577+
pp. 239-244 (1996)
578+
:doi:`10.1016/0038-092X(95)00114-7`
579+
580+
.. [4] B. Molineaux, P. Ineichen, N. O'Neill, "Equivalence of
581+
pyrheliometric and monochromatic aerosol optical depths at a single key
582+
wavelength", Applied Optics Vol. 37, issue 10, 7008-7018 (1998)
583+
:doi:`10.1364/AO.37.007008`
584+
585+
.. [5] P. Ineichen, "Conversion function between the Linke turbidity and
586+
the atmospheric water vapor and aerosol content", Solar Energy 82,
587+
pp. 1095-1097 (2008)
588+
:doi:`10.1016/j.solener.2008.04.010`
589+
590+
.. [6] P. Ineichen and R. Perez, "A new airmass independent formulation for
591+
the Linke Turbidity coefficient", Solar Energy, Vol. 73, no. 3,
592+
pp. 151-157 (2002)
593+
:doi:`10.1016/S0038-092X(02)00045-2`
594594
"""
595595
# "From numerically integrated spectral simulations done with Modtran
596596
# (Berk, 1989), Molineaux (1998) obtained for the broadband optical depth
@@ -644,14 +644,15 @@ def angstrom_aod_at_lambda(aod0, lambda0, alpha=1.14, lambda1=700.0):
644644
645645
References
646646
----------
647-
[1] Anders Angstrom, "On the Atmospheric Transmission of Sun Radiation and
648-
On Dust in the Air", Geografiska Annaler Vol. 11, pp. 156-166 (1929) JSTOR
649-
:doi:`10.2307/519399`
650-
651-
[2] Anders Angstrom, "Techniques of Determining the Turbidity of the
652-
Atmosphere", Tellus 13:2, pp. 214-223 (1961) Taylor & Francis
653-
:doi:`10.3402/tellusa.v13i2.9493` and Co-Action Publishing
654-
:doi:`10.1111/j.2153-3490.1961.tb00078.x`
647+
.. [1] Anders Angstrom, "On the Atmospheric Transmission of Sun Radiation
648+
and On Dust in the Air", Geografiska Annaler Vol. 11, pp. 156-166 (1929)
649+
JSTOR
650+
:doi:`10.2307/519399`
651+
652+
.. [2] Anders Angstrom, "Techniques of Determining the Turbidity of the
653+
Atmosphere", Tellus 13:2, pp. 214-223 (1961) Taylor & Francis
654+
:doi:`10.3402/tellusa.v13i2.9493` and Co-Action Publishing
655+
:doi:`10.1111/j.2153-3490.1961.tb00078.x`
655656
"""
656657
return aod0 * ((lambda1 / lambda0) ** (-alpha))
657658

0 commit comments

Comments
 (0)