Skip to content

Commit

Permalink
Per #2123, added debug code to make this error that was unrepoducible…
Browse files Browse the repository at this point in the history
…, reproducible on seneca. Just initialize the newly allocated time_values array with values of -10. PLEASE REMOVE THAT TEST CODE PRIOR TO SUBMITTING A PR TO FIX THIS ISSUE.
  • Loading branch information
JohnHalleyGotway committed Apr 5, 2022
1 parent 71f3d42 commit 3b7d39f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions met/src/libcode/vx_data2d_nccf/nccf_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@ bool NcCfFile::open(const char * filepath)
int tim_buf_size = n_times;
if (use_bounds_var) tim_buf_size *= 2;
double *time_values = new double[tim_buf_size];

// TODO: Howard Soh, please remove this block of code I added
// only for debugging dtcenter/MET#2123
for(int i=0;i<tim_buf_size;i++) time_values[i] = -10;

if( get_nc_data(nc_time_var, time_values) ) {
bool no_leap_year = get_att_no_leap_year(valid_time_var);
if( time_dim_count > 1 ) {
Expand Down

0 comments on commit 3b7d39f

Please sign in to comment.