Skip to content

Commit

Permalink
Fix header field issue (NOAA-OWP#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
stcui007 committed Aug 30, 2023
1 parent beeb1bf commit 9881ba6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/forcing/AorcForcing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace data_access {
{"TMP_2maboveground", { CSDMS_STD_NAME_SURFACE_TEMP, "K" } },
{"UGRD_10maboveground", { CSDMS_STD_NAME_WIND_U_X, "m s-1" } },
{"VGRD_10maboveground", { CSDMS_STD_NAME_WIND_V_Y, "m s-1" } },
{"RAINRATE", { CSDMS_STD_NAME_LIQUID_EQ_PRECIP_RATE , "mm s^-1" } },
{"RAINRATE", { CSDMS_STD_NAME_LIQUID_EQ_PRECIP_RATE, "mm s^-1" } },
{"T2D", { CSDMS_STD_NAME_SURFACE_TEMP, "K" } },
{"Q2D", { NGEN_STD_NAME_SPECIFIC_HUMIDITY, "kg kg-1" } },
{"U2D", { CSDMS_STD_NAME_WIND_U_X, "m s-1" } },
Expand Down
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 9881ba6

Please sign in to comment.