Skip to content

Commit 9d8c374

Browse files
committed
fix pd import, default am model, ValueError text
1 parent 63da5e6 commit 9d8c374

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pvlib/location.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import datetime
1111

12+
import pandas as pd
1213
import pytz
1314

1415
from pvlib import solarposition
@@ -188,13 +189,13 @@ def get_clearsky(self, times, model='ineichen', **kwargs):
188189
solpos = self.get_solarposition(times, **kwargs)
189190
cs = clearsky.haurwitz(solpos['apparent_zenith'])
190191
else:
191-
raise ValueError('%s is not a valid clear sky model', model)
192+
raise ValueError('{} is not a valid clear sky model'.format(model))
192193

193194
return cs
194195

195196

196197
def get_airmass(self, times=None, solar_position=None,
197-
model='kastenyoung1998'):
198+
model='kastenyoung1989'):
198199
"""
199200
Calculate the relative and absolute airmass.
200201
@@ -229,7 +230,7 @@ def get_airmass(self, times=None, solar_position=None,
229230
elif model in trues:
230231
zenith = solar_position['zenith']
231232
else:
232-
raise ValueError('invalid model %s', model)
233+
raise ValueError('{} is not a valid airmass model'.format(model))
233234

234235
airmass_relative = atmosphere.relativeairmass(zenith, model)
235236

0 commit comments

Comments
 (0)