Skip to content

Conversation

@berg-michael
Copy link
Collaborator

@berg-michael berg-michael commented Jul 2, 2025

Description

This PR includes the necessary changes to accommodate new snow data functionality in SAM. In particular:

  • This PR includes .cpp code to power a dialog for automatic downloading of snow depth data from NOHRSC
  • This PR includes UI changes to allow users to edit and view (meta)data about downloaded/entered snow depth data.
  • It also includes the requisite changes to the defaults to allow for new fields: snow_array and use_snow_weather_file, which respectively hold potential user entered/downloaded snow depth data, and allow the user to indicate to toggle between this data and the data present in the weather file.
  • It includes the necessary changes to CMakeLists.txt to indicate the presence of new cpp files.

To review:
Build against the ssc branch of the same name.

Test looking up, downloading snow depth data.

Fixes # (issue(s))

Corresponding branches and PRs:

NREL/ssc#1335
https://github.com/NREL/SAM-private/pull/128

Unit Test Impact:

A new SSC test has been written to check the correctness of the snow model when using snow data from the builtin array (as opposed to the original weather file method).

Checklist

  • requires help revision and I added that label
  • adds, removes, modifies, or deletes variables in existing compute modules
  • adds a new compute module
  • changes defaults
  • I've tagged this PR to a milestone

image

…f user wants to use the weather file snow data instead
…this to obscure meaningful changes to defaults, so I ran these files through the parser without making any changes. All diffs should be due to rounding.
@berg-michael berg-michael added pv pvsam1, pvwatts, hcpv requires help revision Requires a Help revision before releasing public version labels Jul 2, 2025
@berg-michael berg-michael requested a review from cpaulgilman July 2, 2025 22:57
@berg-michael
Copy link
Collaborator Author

The recent commits fix an important issue. The original code did not handle time zones correctly. Now, for any station, the time series will start at t=0 local time for that station.

@cpaulgilman
Copy link
Collaborator

@berg-michael The deploy/snow folder seems to be missing...did that get accidentally removed?

@berg-michael
Copy link
Collaborator Author

@cpaulgilman sorry for the issue, I hope to be able to take a look sometime next few days. I was adding TZ data to the file itself, so it might have gotten shuffled around in that process. I'll investigate what happened and try to get a fix in.

@cpaulgilman
Copy link
Collaborator

It looks like we need a version of stations.csv with time zone data to get this to work. I'm investigating further and will follow up.

@cpaulgilman
Copy link
Collaborator

@cpaulgilman sorry for the issue, I hope to be able to take a look sometime next few days. I was adding TZ data to the file itself, so it might have gotten shuffled around in that process. I'll investigate what happened and try to get a fix in.

@berg-michael I fixed this by adding a time zone column to the stations.csv file, so you're off the hook. Thanks so much for your work on this!

@cpaulgilman
Copy link
Collaborator

cpaulgilman commented Jul 21, 2025

Outstanding issues:

  • Check snow depth array length requirement in SSC
  • Make snow depth array length check in UI consistent with SSC
  • Move URLs from code to webapis.conf

@cpaulgilman cpaulgilman requested a review from sjanzou July 22, 2025 17:41
Copy link
Collaborator

@sjanzou sjanzou left a comment

Choose a reason for hiding this comment

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

Need to keep defmgr updates for rapidjson Inf and NaN values

"6par_module_length": 2.277235165721802,
"6par_module_name": "Aptos Solar Technology LLC DNA-144-BF10-530W (from CEC database)",
"6par_module_width": 1.1329528187670655,
"6par_module_width": 1.1329528187670657,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should these be showing up here?

…dates

Test results updates for failing GitHub actions
Copy link
Collaborator

@sjanzou sjanzou left a comment

Choose a reason for hiding this comment

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

resolved with latest commit - will check GitHub actions

@cpaulgilman cpaulgilman merged commit 6ec746f into develop Jul 23, 2025
8 checks passed
@cpaulgilman cpaulgilman deleted the nohrsc_snow_data branch July 23, 2025 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pv pvsam1, pvwatts, hcpv requires help revision Requires a Help revision before releasing public version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants