-
Notifications
You must be signed in to change notification settings - Fork 114
SSC: Add builtin snow depth array, support varying periods for this array. #1335
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…st: only works with hourly simulation
…nputs, so the snow variables might be out of place. consider if this is the ideal way to add these test
…le, up/downsample snow data to match weather file. Else error
Merged
5 tasks
Pull Request Test Coverage Report for Build 16379348263Details
💛 - Coveralls |
…ion with user entered snow depth data. Need to cycle back to beginning of the snow depth data for each year
Collaborator
Author
|
Recent commit fixes the issue where PV + Financial Model simulations led to errors. |
cpaulgilman
approved these changes
Jul 22, 2025
sjanzou
approved these changes
Jul 23, 2025
Collaborator
sjanzou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working and approved if SAM 2089 GitHub actions are working
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The PR enables the builtin snow depth array to which the nohrsc_snow_data branch of SAM writes to. It allows the user to choose which source of snow data they wish to use: weather file provided or builtin array.
If the snow data is provided via the weather file, as before, there was an implicit guarantee that the snow depth data was of the same period as the weather file. This guarantee is lost when using a user-input array.
Thus, this PR also includes code the verify that the snow depth array can be aligned with the weather file data. Periods of 5 minutes and 10 minutes, for example are compatible, whereas periods of 5 and 12 minutes are not because there are timesteps that will not line up. In the case of incompatible periods, the simulation fails. In the case of matching periods, the simulation succeeds without any massaging of the snow depth data. In the case of non-matching but compatible periods, the snow data will be up- or down-sampled to align with the period of the weather file data.
To review, build against the nohrsc_snow_data branch of sam. Verify that snow data input into the array is used and has behavior that aligns with entering snow data into the weather file via the snow macro.
Corresponding branches and PRs:
branch: sam/nohrsc_snow_data
NREL/SAM#2089
https://github.com/NREL/SAM-private/pull/128
Unit Test Impact:
New tests written to exercise the snow array. They check:
Checklist