Skip to content

Commit 6ec746f

Browse files
berg-michaelcpaulgilmansjanzou
authored
Add UI elements and dialog for snow depth data downloading, access, and editing (#2089)
* Add toggle for user entered snow data, array to enter snow data * Only display missing snow nag if user is trying to use weather data * Add preliminary default to snow array, toggle for snow data source * Make sure nag is also trigged if user toggles use of weather file vs array * only enable detailed snow loss model toggles if snow loss model enabled * add nag if weather data not hourly (force hourly input of snow data for now) * update ui for pulling nohrsc data * working first pass at snow data ui integration * Add file save dialog * tidy save file mode * add functionality to download, read, and save snow data directly into a snow data array * add an NOHRSC downloader button, disable detailed snow data options if user wants to use the weather file snow data instead * more revisions to nohrsc downloader * add some additional checks in the snow depth interface * Some checks on the integrity on the depth data - check for negative, all zero * run integrity checks upon download * Add NOHRSC URL * Add NOHRSC data property fields * fix defaults for nohrsc values * add methods to pass metadata about NOHRSC data to UI * Don't populate url, it doesn't seem to work * Remove extraneous parameter from RefreshList * Undo hijacking of NSRDB calls with NOHRSC calls for testing * Restore original defaults for snow file * JSON parser seems to introduct floating point rounding. I don't want 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. * Update five variables for Flat Plat PV, PV Battery * remove local file path. add station db * Use a unique_ptr to hold the nohrsc database * Cleanup commented out relics * Push a url back to the UI to let the user click through to the NOHRSC website for their station and time period * Read the URL upon callback * If nothing returned by callback, don't update things * feed forward non-assimilated data. This is too avoid cases where spurious changes in snow depth occur as a result of the linear interpolation performed by NOHRSC over the course of several hours * allow user-adjustable snow array lengths. Warn if the period of the snow array cannot align with that of the weather file * rearrange ui elements to add space for long coordinates, station names * Revert "Merge branch 'SAM_2085' into nohrsc_snow_data" This reverts commit afce7db, reversing changes made to 9652f25. * include memory header, was building fine on windows but macOS/Linux failure * macOS/Ubuntu builders seem to be on cpp11, so no make_unique. use new instead * fix utc behavior for snow depth data * fix path of snow data * restore snow stations CSV file * Add time zone to snow station database file * Snow input layout and label adjustments * Tweak snow UI * Move snow urls to webapis.conf * defmgr changes for rapidjson and pv hydrid default updates and api updates Test results updates for failing GitHub actions --------- Co-authored-by: Paul Gilman <cpaulgilman@gmail.com> Co-authored-by: Steven Janzou <steven@janzouconsulting.com>
1 parent f4affeb commit 6ec746f

60 files changed

Lines changed: 279896 additions & 549 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ set(SAM_SRC src/private.h
4242
src/s3view.cpp src/s3view.h
4343
src/stochastic.cpp src/stochastic.h
4444
src/urdb.cpp src/urdb.h
45+
src/nohrsc.cpp src/nohrsc.h
4546
src/nsrdb.cpp src/nsrdb.h
4647
src/windtoolkit.cpp src/windtoolkit.h
4748
src/wavetoolkit.cpp src/wavetoolkit.h

api/api_autogen/library/defaults/Pvsamv1_FlatPlatePVAllEquityPartnershipFlip.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"calculate_rack_shading": 0,
2828
"dcoptimizer_loss": 0,
2929
"en_snow_model": 0,
30+
"snow_array": [0.000000],
3031
"subarray1_dcwiring_loss": 2,
3132
"subarray1_diodeconn_loss": 0.5,
3233
"subarray1_electrical_mismatch": 0,

api/api_autogen/library/defaults/Pvsamv1_FlatPlatePVCommercial.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"calculate_rack_shading": 0,
2828
"dcoptimizer_loss": 0,
2929
"en_snow_model": 0,
30+
"snow_array": [0.000000],
3031
"subarray1_dcwiring_loss": 2,
3132
"subarray1_diodeconn_loss": 0.5,
3233
"subarray1_electrical_mismatch": 0,

api/api_autogen/library/defaults/Pvsamv1_FlatPlatePVHostDeveloper.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"calculate_rack_shading": 0,
2828
"dcoptimizer_loss": 0,
2929
"en_snow_model": 0,
30+
"snow_array": [0.000000],
3031
"subarray1_dcwiring_loss": 2,
3132
"subarray1_diodeconn_loss": 0.5,
3233
"subarray1_electrical_mismatch": 0,

api/api_autogen/library/defaults/Pvsamv1_FlatPlatePVLCOECalculator.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"calculate_rack_shading": 0,
2828
"dcoptimizer_loss": 0,
2929
"en_snow_model": 0,
30+
"snow_array": [0.000000],
3031
"subarray1_dcwiring_loss": 2,
3132
"subarray1_diodeconn_loss": 0.5,
3233
"subarray1_electrical_mismatch": 0,

api/api_autogen/library/defaults/Pvsamv1_FlatPlatePVLeveragedPartnershipFlip.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"calculate_rack_shading": 0,
2828
"dcoptimizer_loss": 0,
2929
"en_snow_model": 0,
30+
"snow_array": [0.000000],
3031
"subarray1_dcwiring_loss": 2,
3132
"subarray1_diodeconn_loss": 0.5,
3233
"subarray1_electrical_mismatch": 0,

api/api_autogen/library/defaults/Pvsamv1_FlatPlatePVMerchantPlant.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"calculate_rack_shading": 0,
2828
"dcoptimizer_loss": 0,
2929
"en_snow_model": 0,
30+
"snow_array": [0.000000],
3031
"subarray1_dcwiring_loss": 2,
3132
"subarray1_diodeconn_loss": 0.5,
3233
"subarray1_electrical_mismatch": 0,

api/api_autogen/library/defaults/Pvsamv1_FlatPlatePVNone.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"calculate_rack_shading": 0,
2828
"dcoptimizer_loss": 0,
2929
"en_snow_model": 0,
30+
"snow_array": [0.000000],
3031
"subarray1_dcwiring_loss": 2,
3132
"subarray1_diodeconn_loss": 0.5,
3233
"subarray1_electrical_mismatch": 0,

api/api_autogen/library/defaults/Pvsamv1_FlatPlatePVResidential.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"calculate_rack_shading": 0,
2828
"dcoptimizer_loss": 1,
2929
"en_snow_model": 0,
30+
"snow_array": [0.000000],
3031
"subarray1_dcwiring_loss": 2,
3132
"subarray1_diodeconn_loss": 0.5,
3233
"subarray1_electrical_mismatch": 0,

api/api_autogen/library/defaults/Pvsamv1_FlatPlatePVSaleLeaseback.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"calculate_rack_shading": 0,
2828
"dcoptimizer_loss": 0,
2929
"en_snow_model": 0,
30+
"snow_array": [0.000000],
3031
"subarray1_dcwiring_loss": 2,
3132
"subarray1_diodeconn_loss": 0.5,
3233
"subarray1_electrical_mismatch": 0,

0 commit comments

Comments
 (0)