Skip to content

Commit 5e9fb54

Browse files
committed
Merge pull request #100 from wholmgren/fixtypo
fix klucher spelling
2 parents 2314467 + 846bd17 commit 5e9fb54

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

docs/sphinx/source/whatsnew/v0.2.2.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ Enhancements
1717
Bug fixes
1818
~~~~~~~~~
1919

20+
* ``irradiance.total_irrad`` had a typo that required the
21+
Klucher model to be accessed with ``'klutcher'``. Both spellings will work
22+
for the remaining 0.2.* versions of pvlib,
23+
but the misspelled method will be removed in 0.3.
24+
(:issue:`97`)
2025
* Fixes an import and KeyError in the IPython notebook tutorials
2126
(:issue:`94`).
2227
* Uses the ``logging`` module properly by replacing ``format``

pvlib/irradiance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def total_irrad(surface_tilt, surface_azimuth,
376376
model = model.lower()
377377
if model == 'isotropic':
378378
sky = isotropic(surface_tilt, dhi)
379-
elif model == 'klutcher':
379+
elif model in ['klucher', 'klutcher']:
380380
sky = klucher(surface_tilt, surface_azimuth, dhi, ghi,
381381
solar_zenith, solar_azimuth)
382382
elif model == 'haydavies':

pvlib/test/test_irradiance.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,18 @@ def test_perez():
137137
dni_et, ephem_data['apparent_zenith'],
138138
ephem_data['apparent_azimuth'], AM)
139139

140-
140+
# klutcher (misspelling) will be removed in 0.3
141141
def test_total_irrad():
142-
models = ['isotropic', 'klutcher', 'haydavies', 'reindl', 'king', 'perez']
142+
models = ['isotropic', 'klutcher', 'klucher',
143+
'haydavies', 'reindl', 'king', 'perez']
143144
AM = atmosphere.relativeairmass(ephem_data['apparent_zenith'])
144145

145146
for model in models:
146147
total = irradiance.total_irrad(
147148
32, 180,
148149
ephem_data['apparent_zenith'], ephem_data['azimuth'],
149-
dni=irrad_data['dni'], ghi=irrad_data['ghi'], dhi=irrad_data['dhi'],
150+
dni=irrad_data['dni'], ghi=irrad_data['ghi'],
151+
dhi=irrad_data['dhi'],
150152
dni_extra=dni_et, airmass=AM,
151153
model=model,
152154
surface_type='urban')

0 commit comments

Comments
 (0)