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

List of available resources #169

Merged
merged 1 commit into from
Sep 17, 2020
Merged

List of available resources #169

merged 1 commit into from
Sep 17, 2020

Conversation

rouille
Copy link
Collaborator

@rouille rouille commented Sep 17, 2020

Purpose

Fix a bug where the list of resources to plot is not correctly derived.

What is the code doing?

The get_resources_in_grid function in postreise.analyze.helpers will never have biomass and storage in the return list. It follows that they won't be deleted from the t2l dictionary and an error will be raised afterwards

Time estimate

3 min

Test

the following script will fail before the fix:

from powersimdata.scenario.scenario import Scenario
from postreise.plot.analyze_pg import AnalyzePG as apg

start_date = '2016-02-12-00'
end_date = '2016-02-27-23'
interconnect = 'USA'
selected_resources = ['solar', 'wind']
zonelist = ['Chicago North Illinois']
s = Scenario('1242')
stack = apg(s,
            (start_date, end_date, 'utc', 'H'),
            zonelist,
            selected_resources,
            'stacked', normalize=False)
stack.get_plot(save=False)

Figure_1

@rouille rouille added the bug Something isn't working label Sep 17, 2020
@rouille rouille added this to the Airpocalypse milestone Sep 17, 2020
Copy link
Contributor

@danielolsen danielolsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that.

@rouille
Copy link
Collaborator Author

rouille commented Sep 17, 2020

Sorry about that.

No worries. We refactor it because it got way too complex to make any changes.

@rouille rouille merged commit f92338a into develop Sep 17, 2020
@rouille rouille deleted the ben/fix branch September 17, 2020 03:35
@ahurli ahurli mentioned this pull request Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants