Skip to content

Commit

Permalink
Fix using the forcing file header error.
Browse files Browse the repository at this point in the history
  • Loading branch information
stcui007 authored and mattw-nws committed Sep 5, 2023
1 parent c317184 commit 2187c68
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/realizations/catchment/Bmi_Multi_Formulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ namespace realization {
for(std::map<std::string,std::shared_ptr<data_access::GenericDataProvider>>::iterator iter = availableData.begin(); iter != availableData.end(); ++iter)
{
var_name = iter->first;
auto it = std::find(forcing->get_available_variable_names().begin(), forcing->get_available_variable_names().end(), var_name);
if (it == forcing->get_available_variable_names().end()) {
var_name = forcing->get_available_variable_names()[0];
}
//TODO: Find a probably more performant way than trial and exception here.
try {
time_t rv = availableData[var_name]->get_data_start_time();
Expand Down

0 comments on commit 2187c68

Please sign in to comment.