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
2 changes: 2 additions & 0 deletions docs/sphinx/source/whatsnew/v0.6.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Bug fixes
* Unset executable bits of irradiance.py and test_irradiance.py (:issue:`460`)
* Fix failing tests due to column order on Python 3.6+ and Pandas 0.23+
(:issue:`464`)
* ModelChain.prepare_inputs failed to pass solar_position and airmass to
Location.get_clearsky. Fixed. (:issue:`481`)


Documentation
Expand Down
6 changes: 3 additions & 3 deletions pvlib/modelchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class ModelChain(object):
spectral_model: None, str, or function, default None
If None, the model will be inferred from the contents of
system.module_parameters. Valid strings are 'sapm',
'first_solar', 'no_loss'. The ModelChain instance will be passed
'first_solar', 'no_loss'. The ModelChain instance will be passed
as the first argument to a user-defined
function.

Expand Down Expand Up @@ -772,8 +772,8 @@ def prepare_inputs(self, times=None, irradiance=None, weather=None):
if not any([x in ['ghi', 'dni', 'dhi'] for x in self.weather.columns]):
self.weather[['ghi', 'dni', 'dhi']] = self.location.get_clearsky(
self.solar_position.index, self.clearsky_model,
zenith_data=self.solar_position['apparent_zenith'],
airmass_data=self.airmass['airmass_absolute'])
solar_position=self.solar_position,
airmass_absolute=self.airmass['airmass_absolute'])

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