Skip to content

Commit ec99661

Browse files
wholmgrencwhanse
authored andcommitted
ModelChain.prepare_inputs fails to pass solar_position and airmass to Location.get_clearsky (#482)
* in modelchain, pass solar position and airmass to get_clearsky * update whatsnew
1 parent fea4d08 commit ec99661

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/sphinx/source/whatsnew/v0.6.0.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Bug fixes
2020
* Unset executable bits of irradiance.py and test_irradiance.py (:issue:`460`)
2121
* Fix failing tests due to column order on Python 3.6+ and Pandas 0.23+
2222
(:issue:`464`)
23+
* ModelChain.prepare_inputs failed to pass solar_position and airmass to
24+
Location.get_clearsky. Fixed. (:issue:`481`)
2325

2426

2527
Documentation

pvlib/modelchain.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ class ModelChain(object):
273273
spectral_model: None, str, or function, default None
274274
If None, the model will be inferred from the contents of
275275
system.module_parameters. Valid strings are 'sapm',
276-
'first_solar', 'no_loss'. The ModelChain instance will be passed
276+
'first_solar', 'no_loss'. The ModelChain instance will be passed
277277
as the first argument to a user-defined
278278
function.
279279
@@ -772,8 +772,8 @@ def prepare_inputs(self, times=None, irradiance=None, weather=None):
772772
if not any([x in ['ghi', 'dni', 'dhi'] for x in self.weather.columns]):
773773
self.weather[['ghi', 'dni', 'dhi']] = self.location.get_clearsky(
774774
self.solar_position.index, self.clearsky_model,
775-
zenith_data=self.solar_position['apparent_zenith'],
776-
airmass_data=self.airmass['airmass_absolute'])
775+
solar_position=self.solar_position,
776+
airmass_absolute=self.airmass['airmass_absolute'])
777777

778778
if not {'ghi', 'dni', 'dhi'} <= set(self.weather.columns):
779779
raise ValueError(

0 commit comments

Comments
 (0)