Skip to content

Commit ad7c990

Browse files
committed
make test_irradiance work with new ineichen sig
1 parent 66b3603 commit ad7c990

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

pvlib/test/test_irradiance.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@
2323

2424
times_localized = times.tz_localize(tus.tz)
2525

26-
ephem_data = solarposition.get_solarposition(times, tus, method='pyephem')
26+
ephem_data = solarposition.get_solarposition(times, tus.latitude,
27+
tus.longitude, method='pyephem')
2728

28-
irrad_data = clearsky.ineichen(times, tus, linke_turbidity=3,
29+
irrad_data = clearsky.ineichen(times, tus.latitude, tus.longitude,
30+
altitude=tus.altitude, linke_turbidity=3,
2931
solarposition_method='pyephem')
3032

3133
dni_et = irradiance.extraradiation(times.dayofyear)
@@ -168,9 +170,10 @@ def test_globalinplane():
168170

169171

170172
def test_disc_keys():
171-
clearsky_data = clearsky.ineichen(times, tus, linke_turbidity=3)
173+
clearsky_data = clearsky.ineichen(times, tus.latitude, tus.longitude,
174+
linke_turbidity=3)
172175
disc_data = irradiance.disc(clearsky_data['ghi'], ephem_data['zenith'],
173-
ephem_data.index)
176+
ephem_data.index)
174177
assert 'dni' in disc_data.columns
175178
assert 'kt' in disc_data.columns
176179
assert 'airmass' in disc_data.columns
@@ -187,7 +190,8 @@ def test_disc_value():
187190

188191

189192
def test_dirint():
190-
clearsky_data = clearsky.ineichen(times, tus, linke_turbidity=3)
193+
clearsky_data = clearsky.ineichen(times, tus.latitude, tus.longitude,
194+
linke_turbidity=3)
191195
pressure = 93193.
192196
dirint_data = irradiance.dirint(clearsky_data['ghi'], ephem_data['zenith'],
193197
ephem_data.index, pressure=pressure)

0 commit comments

Comments
 (0)