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

Add resource length warning for easier debugging #457

Merged
merged 5 commits into from
Jun 24, 2024

Conversation

ppinchuk
Copy link
Collaborator

@grantbuster Reid recently ran into a tough-to-debug issue where SAM wasn't setting the output variables correctly, and it came down to the fact that he was using time_index_step=2 on hourly resource data.

Since this was a tough problem to track down, I figured I would add a few warning messages if this case is detected. Any objections? Any reason why someone would want to run less than a full 8760 time series through SAM? Is that even allowed (seems like not based on this experience but I haven't fully tested that)?

@ppinchuk ppinchuk self-assigned this Jun 24, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@e92af3a). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #457   +/-   ##
=======================================
  Coverage        ?   87.57%           
=======================================
  Files           ?      122           
  Lines           ?    18086           
  Branches        ?        0           
=======================================
  Hits            ?    15839           
  Misses          ?     2247           
  Partials        ?        0           
Flag Coverage Δ
unittests 87.57% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

grantbuster
grantbuster previously approved these changes Jun 24, 2024
Copy link
Member

@grantbuster grantbuster left a comment

Choose a reason for hiding this comment

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

Good addition. Maybe note "try setting 'time_index_step: 1' in your SAM config or double check the resource input you're using"

In the future i think there will be value in running monthly data to generate profiles for event analysis. SAM used to not be able to do that but i'm pretty sure now it can just the annual values will not be set (annual CF).

@ppinchuk
Copy link
Collaborator Author

Ah good to know. Interested to see if reV can handle the monthly case out of the box or not. We should probably set up a test for that when it becomes relevant - might be a good time to re-evaluate this message too :)

(Happy to take charge on that whenever it comes around)

@ppinchuk ppinchuk merged commit 75ccf41 into main Jun 24, 2024
11 checks passed
@ppinchuk ppinchuk deleted the pp/resource_len_warnings branch June 24, 2024 19:12
github-actions bot pushed a commit that referenced this pull request Jun 24, 2024
Add resource length warning for easier debugging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants