Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModelChain.prepare_inputs fails to pass solar_position and airmass to Location.get_clearsky #481

Closed
wholmgren opened this issue Jun 16, 2018 · 0 comments

Comments

@wholmgren
Copy link
Member

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.

These lines:

        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'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant