Closed
Description
ModelChain.prepare_inputs calculates results for clear sky condition if no irradiance data is provided. The ModelChain is supposed to pass solar position and airmass data to Location.get_clearsky to speed up calculations and keep them consistent. #199 changed the ineichen
API and this ModelChain code was not updated to reflect the new arguments.
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'])
should read
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,
solar_position=self.solar_position, # fixed here and below
airmass_absolute=self.airmass['airmass_absolute'])