Skip to content

Updated method of modelchain.ModelChain.prepare_inputs in modelchain.py #893

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

Closed
wants to merge 11 commits into from
Closed

Updated method of modelchain.ModelChain.prepare_inputs in modelchain.py #893

wants to merge 11 commits into from

Conversation

Ahanmr
Copy link
Contributor

@Ahanmr Ahanmr commented Feb 17, 2020

#523
Added weather data arguments in get_solarpostion method of modelchain.ModelChain.prepare_inputs as part of the Pull request.

#523
Added weather data in get_solarpostion method of modelchain.ModelChain.prepare_inputs
#523 
Added weather arguments in get_solarposition of method modelchain.ModelChain.prepare_inputs
#523
Added weather arguments in get_solarpostion method of modelchain.ModelChain.prepare_input
#523
Added weather data arguments in get_solarpostion method of modelchain.ModelChain.prepare_inputs as part of the Pull request.
Added weather inputs to get_solarpostion method in modelchain.ModelChain.prepare_inputs
Added weather data in get_solarpostion method in modelchain.ModelChain.prepare_inputs
Added weather data in get_solarpostion method in modelchain.ModelChain.prepare_inputs
Added weather data in get_solarpostion method in modelchain.ModelChain.prepare_inputs
Added weather data in get_solarpostion method in modelchain.ModelChain.prepare_inputs
@Ahanmr
Copy link
Contributor Author

Ahanmr commented Feb 17, 2020

This issue closes #523

@Ahanmr Ahanmr closed this Feb 17, 2020
@Ahanmr Ahanmr reopened this Feb 17, 2020
@cwhanse
Copy link
Member

cwhanse commented Feb 17, 2020

@Ahanmr thanks for the contribution. Looking at the test failures, the code needs to handle the case where pressure or temp_air is not in weather. @wholmgren suggested using pvlib.tools._build_kwargs here, which I think would work nicely. There's an example here.

In this context, the code would be like:

    kwargs = _build_kwargs(['pressure', 'temp_air'], weather)
    kwargs['temperature'] = kwargs.pop('temp_air')
    self.solar_position = self.location.get_solarposition(self.times,
        method=self.solar_position_method, **kwargs)

@wholmgren note the unfortunate need to rename.

 This handles the case where pressure or temp_air is not in weather, using the pvlib.tools._build_kwargs logic for keyword arguments.
#523
This PR handles, the case where pressure or temp_air is not in weather, using the pvlib.tools._build_kwargs method, as keyword arguments.
@Ahanmr
Copy link
Contributor Author

Ahanmr commented Feb 17, 2020

@cwhanse I've made the necessary changes. Thank you for letting me know about the pvlib.tools._build_kwargs which help me pass keyword arguments in case some are missing. But I still feel I missed something, I'll try fixing it meanwhile.

Ahanmr added a commit to Ahanmr/pvlib-python that referenced this pull request Mar 18, 2020
This PR handles, the case where pressure or temp_air is not in weather, using the pvlib.tools._build_kwargs method, as keyword arguments. pvlib#893
@CameronTStark CameronTStark modified the milestones: 0.7.2, 0.7.3 Apr 7, 2020
CameronTStark pushed a commit that referenced this pull request Apr 17, 2020
This PR handles, the case where pressure or temp_air is not in weather, using the pvlib.tools._build_kwargs method, as keyword arguments. #893
@wholmgren wholmgren modified the milestones: 0.7.3, 0.8.0 Jul 17, 2020
@wholmgren wholmgren removed this from the 0.8.0 milestone Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

get_solarpostion in modelchain.prepare_inputs does not use weather data.
4 participants