Skip to content

Commit 7233d27

Browse files
authored
Update Solar Resource UI forms for solar techs (#2120)
* Initial changes for solar resource UI form updates Break Solar Resource Download form into three separate forms to simplify troubleshooting of UI callbacks: * Solar Resource Download * Solar Resource Information * Solar Resource Library Initial testing for PVWatts only. * Initial implementation of lat/lon parse in GeoTools * Support coordinates in different formats * Use shorter double in string for lat/lon zip code search * Remove lat/lon inputs * test wchar_t for location inputs * adapted for new geocode/time zone API -- in progress * Fix inconsistent string declarations * Clean up code * Improve solar resource download UI form * Add show log button (instead of automatically showing it after file downloads) * Realign widgets and edit labels * Remove `n_location` "Type a location name, street address, or lat,lon in decimal degrees" default * Make divider object respond to show/hide * Remove test solar resource file * Update solar resource UI forms * Separate geocode and time zone functions * Initial implementation of solar resource UI redesign for PVWatts / None configuration * NSRDB advanced download fixes * Improve identification of lat/lon pair as input * Remove location string from file name to avoid wfcheck failure when string contains some unicode characters, e.g., cyrillic. * Fix function declaration * Update UI for Mac * Adjust UI for Mac * Improve messaging when NSRDB Data Query fails * Fix Solar Resource Download caption * Revise weather file on disk UI messages * clean up code comments * Implement solar resource UI for all techs * Delete Solar Resource Data.json Solar Resource Data broken down into three forms: * Solar Resource Download * Solar Resource Library * Solar Resource Information * Remove `solar_data_file_name_load` from defaults No longer needed now that `use_specific_weather_file` is available to user on Solar Resource Library form. * api_autogen updates for solar resource UI form name change Note `solar_data_file_name_load` variable removed from defaults in commit bd9fda4. * Fix defaults for `solar_data_filename_load` and `prop_tax_cost_assessed_percent` * Fix labels and text for Solar Resource options Remove commented-out code.
1 parent 2396db6 commit 7233d27

File tree

166 files changed

+7845
-16371
lines changed

Some content is hidden

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

166 files changed

+7845
-16371
lines changed

api/api_autogen/library/defaults/Hcpv_HighXConcentratingPVAllEquityPartnershipFlip.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"defaults": {
3-
"SolarResourceData": {
3+
"SolarResourceInformation": {
44
},
55
"PVWatts": {
66
"system_capacity": 1126.66

api/api_autogen/library/defaults/Hcpv_HighXConcentratingPVLCOECalculator.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"defaults": {
3-
"SolarResourceData": {
3+
"SolarResourceInformation": {
44
},
55
"PVWatts": {
66
"system_capacity": 1126.66

api/api_autogen/library/defaults/Hcpv_HighXConcentratingPVLeveragedPartnershipFlip.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"defaults": {
3-
"SolarResourceData": {
3+
"SolarResourceInformation": {
44
},
55
"PVWatts": {
66
"system_capacity": 1126.66

api/api_autogen/library/defaults/Hcpv_HighXConcentratingPVMerchantPlant.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"defaults": {
3-
"SolarResourceData": {
3+
"SolarResourceInformation": {
44
},
55
"PVWatts": {
66
"system_capacity": 1126.66

api/api_autogen/library/defaults/Hcpv_HighXConcentratingPVNone.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"defaults": {
3-
"SolarResourceData": {
3+
"SolarResourceInformation": {
44
},
55
"PVWatts": {
66
"system_capacity": 1126.66

api/api_autogen/library/defaults/Hcpv_HighXConcentratingPVSaleLeaseback.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"defaults": {
3-
"SolarResourceData": {
3+
"SolarResourceInformation": {
44
},
55
"PVWatts": {
66
"system_capacity": 1126.66

api/api_autogen/library/defaults/Hcpv_HighXConcentratingPVSingleOwner.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"defaults": {
3-
"SolarResourceData": {
3+
"SolarResourceInformation": {
44
},
55
"PVWatts": {
66
"system_capacity": 1126.66

api/include/SAM_Hcpv.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ extern "C"
2828

2929

3030
//
31-
// SolarResourceData parameters
31+
// SolarResourceInformation parameters
3232
//
3333

3434
/**
@@ -37,7 +37,7 @@ extern "C"
3737
* constraints: LOCAL_FILE
3838
* required if: *
3939
*/
40-
SAM_EXPORT void SAM_Hcpv_SolarResourceData_file_name_sset(SAM_table ptr, const char* str, SAM_error *err);
40+
SAM_EXPORT void SAM_Hcpv_SolarResourceInformation_file_name_sset(SAM_table ptr, const char* str, SAM_error *err);
4141

4242

4343
//
@@ -474,10 +474,10 @@ extern "C"
474474

475475

476476
/**
477-
* SolarResourceData Getters
477+
* SolarResourceInformation Getters
478478
*/
479479

480-
SAM_EXPORT const char* SAM_Hcpv_SolarResourceData_file_name_sget(SAM_table ptr, SAM_error *err);
480+
SAM_EXPORT const char* SAM_Hcpv_SolarResourceInformation_file_name_sget(SAM_table ptr, SAM_error *err);
481481

482482

483483
/**

api/modules/SAM_Hcpv.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ SAM_EXPORT int SAM_Hcpv_execute(SAM_table data, int verbosity, SAM_error* err){
1414
return SAM_module_exec("hcpv", data, verbosity, err);
1515
}
1616

17-
SAM_EXPORT void SAM_Hcpv_SolarResourceData_file_name_sset(SAM_table ptr, const char* str, SAM_error *err){
17+
SAM_EXPORT void SAM_Hcpv_SolarResourceInformation_file_name_sset(SAM_table ptr, const char* str, SAM_error *err){
1818
translateExceptions(err, [&]{
1919
ssc_data_set_string(ptr, "file_name", str);
2020
});
@@ -326,7 +326,7 @@ SAM_EXPORT void SAM_Hcpv_AdjustmentFactors_adjust_timeindex_aset(SAM_table ptr,
326326
});
327327
}
328328

329-
SAM_EXPORT const char* SAM_Hcpv_SolarResourceData_file_name_sget(SAM_table ptr, SAM_error *err){
329+
SAM_EXPORT const char* SAM_Hcpv_SolarResourceInformation_file_name_sget(SAM_table ptr, SAM_error *err){
330330
const char* result = nullptr;
331331
translateExceptions(err, [&]{
332332
result = ssc_data_get_string(ptr, "file_name");

deploy/runtime/defaults/Biopower_All Equity Partnership Flip.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"biopwr.feedstock.bagasse_c": 0.4695,
8686
"biopwr.feedstock.bagasse_frac": 0.0,
8787
"biopwr.feedstock.bagasse_h": 0.0547,
88-
"biopwr.feedstock.bagasse_hhv": 8146.6050000000009,
88+
"biopwr.feedstock.bagasse_hhv": 8146.605000000001,
8989
"biopwr.feedstock.bagasse_lhv": 7894.760730000001,
9090
"biopwr.feedstock.bagasse_moisture": 100.0,
9191
"biopwr.feedstock.bagasse_moisture_wet": 50.0,
@@ -256,7 +256,7 @@
256256
"biopwr.feedstock.total_h": 0.05368872073764044,
257257
"biopwr.feedstock.total_hhv": 7668.698347232303,
258258
"biopwr.feedstock.total_lhv": 7194.0304069514299,
259-
"biopwr.feedstock.total_moisture": 0.36564341449200718,
259+
"biopwr.feedstock.total_moisture": 0.3656434144920072,
260260
"biopwr.feedstock.total_nameplate": 48535.59310191071,
261261
"biopwr.feedstock.total_o": 0.5115152836845535,
262262
"biopwr.feedstock.urban_ash": 0.0125,
@@ -266,7 +266,7 @@
266266
"biopwr.feedstock.urban_h": 0.05988,
267267
"biopwr.feedstock.urban_hhv": 7791.0,
268268
"biopwr.feedstock.urban_lhv": 7399.0,
269-
"biopwr.feedstock.urban_moisture": 13.636363636363635,
269+
"biopwr.feedstock.urban_moisture": 13.636363636363637,
270270
"biopwr.feedstock.urban_moisture_wet": 12.0,
271271
"biopwr.feedstock.urban_o": 0.4449,
272272
"biopwr.feedstock.urban_obtainable": 10.0,
@@ -279,7 +279,7 @@
279279
"biopwr.feedstock.wheat_h": 0.0532,
280280
"biopwr.feedstock.wheat_hhv": 7661.2479,
281281
"biopwr.feedstock.wheat_lhv": 7107.9666,
282-
"biopwr.feedstock.wheat_moisture": 13.636363636363635,
282+
"biopwr.feedstock.wheat_moisture": 13.636363636363637,
283283
"biopwr.feedstock.wheat_moisture_wet": 12.0,
284284
"biopwr.feedstock.wheat_o": 0.4914,
285285
"biopwr.feedstock.wheat_obtainable": 10.0,
@@ -482,7 +482,7 @@
482482
"const_per_upfront_rate5": 0.0,
483483
"construction_financing_cost": 5254747.836993514,
484484
"cost_dev_fee_percent": 3.0,
485-
"cost_dev_fee_tax_liability": 1593239.5441764335,
485+
"cost_dev_fee_tax_liability": 1593239.5441764338,
486486
"cost_dev_fee_value": 6005426.099421159,
487487
"cost_equity_closing": 300000.0,
488488
"cost_other_financing": 0.0,
@@ -18765,7 +18765,7 @@
1876518765
"ibi_uti_percent_maxvalue": 1e38,
1876618766
"ibi_uti_percent_tax_fed": 1.0,
1876718767
"ibi_uti_percent_tax_sta": 1.0,
18768-
"in_location": "Type a location name, street address, or lat,lon in decimal degrees",
18768+
"in_location": "",
1876918769
"in_location_list": "|||",
1877018770
"in_location_options": 0.0,
1877118771
"in_nsrdb_options": 0.0,
@@ -19449,7 +19449,7 @@
1944919449
"mera_name3": "Replacement Reserve 3",
1945019450
"months_receivables_reserve": 0.0,
1945119451
"months_working_reserve": 6.0,
19452-
"nominal_discount_rate": 9.060000000000003,
19452+
"nominal_discount_rate": 9.060000000000004,
1945319453
"om_capacity": [
1945419454
110.0
1945519455
],
@@ -19536,7 +19536,6 @@
1953619536
"show_ReserveAccounts": 1.0,
1953719537
"show_construction_period": 1.0,
1953819538
"solar_data_file_name": "fargo_nd_46.9_-96.8_mts1_60_tmy.csv",
19539-
"solar_data_file_name_load": "fargo_nd_46.9_-96.8_mts1_60_tmy.csv",
1954019539
"solar_data_source": "TMY2",
1954119540
"solar_resource": "fargo_nd_46.9_-96.8_mts1_60_tmy",
1954219541
"solar_resource_file": "fargo_nd_46.9_-96.8_mts1_60_tmy.csv",

0 commit comments

Comments
 (0)