diff --git a/ssc/cmod_equpartflip.cpp b/ssc/cmod_equpartflip.cpp index 147cbd344..a43fe0896 100644 --- a/ssc/cmod_equpartflip.cpp +++ b/ssc/cmod_equpartflip.cpp @@ -893,9 +893,10 @@ class cm_equpartflip : public compute_module { int i = 0; - if (is_assigned("en_electricity_rates") && as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0) - throw exec_error("equpartflip", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases."); - + if (is_assigned("en_electricity_rates")) { + if (as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0) + throw exec_error("singleowner", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases."); + } // cash flow initialization int nyears = as_integer("analysis_period"); cf.resize_fill( CF_max, nyears+1, 0.0 ); diff --git a/ssc/cmod_levpartflip.cpp b/ssc/cmod_levpartflip.cpp index 69f087289..7f4502446 100644 --- a/ssc/cmod_levpartflip.cpp +++ b/ssc/cmod_levpartflip.cpp @@ -912,9 +912,10 @@ class cm_levpartflip : public compute_module { int i = 0; - if (is_assigned("en_electricity_rates") && as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0) - throw exec_error("levpartflip", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases."); - + if (is_assigned("en_electricity_rates")) { + if (as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0) + throw exec_error("singleowner", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases."); + } // cash flow initialization int nyears = as_integer("analysis_period"); cf.resize_fill( CF_max, nyears+1, 0.0 ); diff --git a/ssc/cmod_saleleaseback.cpp b/ssc/cmod_saleleaseback.cpp index 9482d07ad..bd5a00f76 100644 --- a/ssc/cmod_saleleaseback.cpp +++ b/ssc/cmod_saleleaseback.cpp @@ -929,9 +929,10 @@ class cm_saleleaseback : public compute_module { int i = 0; - if (is_assigned("en_electricity_rates") && as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0) - throw exec_error("saleleaseback", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases."); - + if (is_assigned("en_electricity_rates")) { + if (as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0) + throw exec_error("singleowner", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases."); + } // cash flow initialization int nyears = as_integer("analysis_period"); cf.resize_fill( CF_max, nyears+1, 0.0 ); diff --git a/ssc/cmod_singleowner.cpp b/ssc/cmod_singleowner.cpp index 6c09af323..d7ca754cb 100644 --- a/ssc/cmod_singleowner.cpp +++ b/ssc/cmod_singleowner.cpp @@ -895,9 +895,10 @@ class cm_singleowner : public compute_module { int i = 0; - if (is_assigned("en_electricity_rates") && as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0) + if (is_assigned("en_electricity_rates")) { + if (as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0) throw exec_error("singleowner", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases."); - + } // cash flow initialization int nyears = as_integer("analysis_period"); diff --git a/ssc/cmod_singleowner_heat.cpp b/ssc/cmod_singleowner_heat.cpp index 708e82a76..2752a330f 100644 --- a/ssc/cmod_singleowner_heat.cpp +++ b/ssc/cmod_singleowner_heat.cpp @@ -910,9 +910,10 @@ class cm_singleowner_heat : public compute_module { int i = 0; - if (is_assigned("en_electricity_rates") && as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0) - throw exec_error("singleowner_heat", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases."); - + if (is_assigned("en_electricity_rates")) { + if (as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0) + throw exec_error("singleowner", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases."); + } // cash flow initialization int nyears = as_integer("analysis_period"); diff --git a/ssc/cmod_wavefile.cpp b/ssc/cmod_wavefile.cpp index c37919c00..8a9ab9f55 100644 --- a/ssc/cmod_wavefile.cpp +++ b/ssc/cmod_wavefile.cpp @@ -353,7 +353,11 @@ class cm_wave_file_reader : public compute_module p_minute[r] = (ssc_number_t)std::stod(values[minute_index]); p_month[r] = (ssc_number_t)std::stod(values[month_index]); wave_heights[r] = (ssc_number_t)std::stod(values[height_index]); + if (wave_heights[r] < 0 || wave_heights[r] > 999) + throw exec_error("wave_file_reader", "Wave height data is outside of numerical bounds at row " + std::to_string(r)); wave_periods[r] = (ssc_number_t)std::stod(values[period_index]); + if (wave_periods[r] < 0 || wave_periods[r] > 999) + throw exec_error("wave_file_reader", "Wave period data is outside of numerical bounds at row " + std::to_string(r)); //Make JPD from time series data