Skip to content

Commit

Permalink
Move check_output_var_names() function to create_multi_formulation
Browse files Browse the repository at this point in the history
  • Loading branch information
stcui007 committed Aug 17, 2023
1 parent f96f53d commit 29bfcdd
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/realizations/catchment/Bmi_Multi_Formulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ void Bmi_Multi_Formulation::create_multi_formulation(geojson::PropertyMap proper
if (out_precision_it != properties.end()) {
set_output_precision(properties.at(BMI_REALIZATION_CFG_PARAM_OPT__OUTPUT_PRECISION).as_natural_number());
}

// check if a requested output variable name is valid, if not, stop the execution
check_output_var_names();
}

/**
Expand Down Expand Up @@ -292,11 +295,6 @@ string Bmi_Multi_Formulation::get_output_line_for_timestep(int timestep, std::st
throw std::invalid_argument("Only current time step valid when getting multi-module BMI formulation output");
}

// check if a requested output variable name is valid, if not, stop the execution
if (timestep == 0) {
check_output_var_names();
}

// Start by first checking whether we are NOT just using the last module's values
if (!is_out_vars_from_last_mod) {

Expand Down

0 comments on commit 29bfcdd

Please sign in to comment.