Skip to content

Commit

Permalink
Merge branch 'marine-error-check' into marine-cost-curve-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mjprilliman committed Dec 4, 2024
2 parents 6fadee0 + 95c01cf commit 8179594
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions ssc/cmod_mhk_tidal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ class cm_mhk_tidal : public compute_module
//Read and store tidal resource and power curve:
util::matrix_t<double> tidal_resource_matrix = as_matrix("tidal_resource");
util::matrix_t<double> tidal_power_curve = as_matrix("tidal_power_curve");
int tidal_resource_model_choice = as_integer("tidal_resource_model_choice");
//Check to ensure size of _power_vect == _speed_vect :
if ( tidal_power_curve.nrows() != tidal_resource_matrix.nrows() )
if ( tidal_resource_model_choice == 0 && tidal_power_curve.nrows() != tidal_resource_matrix.nrows() )
throw exec_error("mhk_tidal", "Size of Power Curve is not equal to Tidal Resource");

//Store the number of rows- this will have to change if resource and power curve can have different stream speeds
Expand Down Expand Up @@ -155,7 +155,6 @@ class cm_mhk_tidal : public compute_module
+ as_double("loss_downtime")
+ as_double("loss_additional");

int tidal_resource_model_choice = as_integer("tidal_resource_model_choice");
double tidal_resource_start_velocity = 0;
double tidal_power_start_velocity = 0;
double tidal_resource_end_velocity = 0;
Expand Down
2 changes: 1 addition & 1 deletion ssc/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ var_info vtab_hybrid_fin_om[] = {
/* VARTYPE DATATYPE NAME LABEL UNITS META GROUP REQUIRED_IF CONSTRAINTS UI_HINTS*/
{ SSC_INPUT, SSC_NUMBER, "is_hybrid", "hybrid configuration", "0/1", "0=singletech,1=hybrid", "HybridFin", "?=0", "", "" },
{ SSC_INPUT, SSC_ARRAY, "cf_hybrid_om_sum", "Hybrid O&M costs", "$", "", "HybridFin", "", "", "" },
{ SSC_INOUT, SSC_ARRAY, "monthly_energy", "Monthly AC energy in Year 1", "kWh", "", "Monthly", "", "LENGTH = 12", "" },
{ SSC_INPUT, SSC_ARRAY, "monthly_energy", "Monthly AC energy in Year 1", "kWh", "", "Monthly", "", "LENGTH = 12", "" },

var_info_invalid };

Expand Down

0 comments on commit 8179594

Please sign in to comment.