Skip to content

Commit

Permalink
Remove unnecessary **kwargs from spa_python and get_total_irradiance (p…
Browse files Browse the repository at this point in the history
…vlib#1437)

* Update Solarposition.py

Removed **kwargs from pvlib.solarposition.spa_python

* Added v0.9.2.rst, changes in pvlib/irradiance.py and pvlib/location.py

Made new v0.9.2.rst and removed **kwargs from pvlib/irradiance.py (Line 309) and pvlib/location.py (Line 234-235)

* Update docs/sphinx/source/whatsnew/v0.9.2.rst

* Update docs/sphinx/source/whatsnew/v0.9.2.rst

Co-authored-by: Kevin Anderson <57452607+kanderso-nrel@users.noreply.github.com>
  • Loading branch information
Naman-Priyadarshi and kandersolar authored Apr 6, 2022
1 parent 8460b36 commit 5cb695d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
29 changes: 29 additions & 0 deletions docs/sphinx/source/whatsnew/v0.9.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.. _whatsnew_0920:

v0.9.2 (TBD)
-----------------------

Deprecations
~~~~~~~~~~~~

Enhancements
~~~~~~~~~~~~

Bug fixes
~~~~~~~~~
* :py:func:`pvlib.irradiance.get_total_irradiance` and
:py:func:`pvlib.solarposition.spa_python` now raise an error instead
of silently ignoring unknown parameters (:ghpull:`1437`)

Testing
~~~~~~~

Documentation
~~~~~~~~~~~~~

Requirements
~~~~~~~~~~~~

Contributors
~~~~~~~~~~~~
* Naman Priyadarshi (:ghuser:`Naman-Priyadarshi`)
2 changes: 1 addition & 1 deletion pvlib/irradiance.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def get_total_irradiance(surface_tilt, surface_azimuth,
dni, ghi, dhi, dni_extra=None, airmass=None,
albedo=.25, surface_type=None,
model='isotropic',
model_perez='allsitescomposite1990', **kwargs):
model_perez='allsitescomposite1990'):
r"""
Determine total in-plane irradiance and its beam, sky diffuse and ground
reflected components, using the specified sky diffuse irradiance model.
Expand Down
3 changes: 1 addition & 2 deletions pvlib/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,7 @@ def get_clearsky(self, times, model='ineichen', solar_position=None,
pressure = atmosphere.alt2pres(self.altitude)

if solar_position is None:
solar_position = self.get_solarposition(times, pressure=pressure,
**kwargs)
solar_position = self.get_solarposition(times, pressure=pressure)

apparent_zenith = solar_position['apparent_zenith']
apparent_elevation = solar_position['apparent_elevation']
Expand Down
2 changes: 1 addition & 1 deletion pvlib/solarposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def _spa_python_import(how):

def spa_python(time, latitude, longitude,
altitude=0, pressure=101325, temperature=12, delta_t=67.0,
atmos_refract=None, how='numpy', numthreads=4, **kwargs):
atmos_refract=None, how='numpy', numthreads=4):
"""
Calculate the solar position using a python implementation of the
NREL SPA algorithm.
Expand Down

0 comments on commit 5cb695d

Please sign in to comment.