Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions docs/sphinx/source/whatsnew/v0.2.2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ Enhancements
Bug fixes
~~~~~~~~~

* ``irradiance.total_irrad`` had a typo that required the
Klucher model to be accessed with ``'klutcher'``. Both spellings will work
for the remaining 0.2.* versions of pvlib,
but the misspelled method will be removed in 0.3.
(:issue:`97`)
* Fixes an import and KeyError in the IPython notebook tutorials
(:issue:`94`).
* Uses the ``logging`` module properly by replacing ``format``
Expand Down
2 changes: 1 addition & 1 deletion pvlib/irradiance.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def total_irrad(surface_tilt, surface_azimuth,
model = model.lower()
if model == 'isotropic':
sky = isotropic(surface_tilt, dhi)
elif model == 'klutcher':
elif model in ['klucher', 'klutcher']:
sky = klucher(surface_tilt, surface_azimuth, dhi, ghi,
solar_zenith, solar_azimuth)
elif model == 'haydavies':
Expand Down
8 changes: 5 additions & 3 deletions pvlib/test/test_irradiance.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,18 @@ def test_perez():
dni_et, ephem_data['apparent_zenith'],
ephem_data['apparent_azimuth'], AM)


# klutcher (misspelling) will be removed in 0.3
def test_total_irrad():
models = ['isotropic', 'klutcher', 'haydavies', 'reindl', 'king', 'perez']
models = ['isotropic', 'klutcher', 'klucher',
'haydavies', 'reindl', 'king', 'perez']
AM = atmosphere.relativeairmass(ephem_data['apparent_zenith'])

for model in models:
total = irradiance.total_irrad(
32, 180,
ephem_data['apparent_zenith'], ephem_data['azimuth'],
dni=irrad_data['dni'], ghi=irrad_data['ghi'], dhi=irrad_data['dhi'],
dni=irrad_data['dni'], ghi=irrad_data['ghi'],
dhi=irrad_data['dhi'],
dni_extra=dni_et, airmass=AM,
model=model,
surface_type='urban')
Expand Down