Skip to content

Commit

Permalink
#2123 Initialize ValidTime if failed to read time variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Soh committed Apr 6, 2022
1 parent e4cbc31 commit 0bf1baa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion met/src/libcode/vx_data2d_nccf/nccf_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ bool NcCfFile::open(const char * filepath)

NcVar bounds_time_var;
NcVar *nc_time_var = (NcVar *)0;
nc_time_var = valid_time_var;
bool use_bounds_var = false;
ConcatString bounds_var_name;
nc_time_var = valid_time_var;
Expand Down Expand Up @@ -375,6 +374,8 @@ bool NcCfFile::open(const char * filepath)
}
}
}
else ValidTime.add(0); //Initialize
delete [] time_values;
}

NcVar init_time_var = get_var(_ncFile, "forecast_reference_time");
Expand Down

0 comments on commit 0bf1baa

Please sign in to comment.