Skip to content

Commit

Permalink
#1755 Support time string for slicing at MetNcCFDataFile::collect_tim…
Browse files Browse the repository at this point in the history
…e_offsets
  • Loading branch information
Howard Soh committed Apr 15, 2021
1 parent aa02a0e commit 800bfa1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions met/src/libcode/vx_data2d_nccf/data2d_nccf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,12 @@ LongArray MetNcCFDataFile::collect_time_offsets(VarInfo &vinfo) {
}
}
}
else if (time_as_value) {
idx = convert_time_to_offset(dim_offset);
if (0 <= idx && idx < time_dim_size) time_offsets.add(idx);
else {
if (time_as_value) dim_offset = convert_time_to_offset(dim_offset);
if (0 <= time_dim_slot && dim_offset < time_dim_size)
time_offsets.add(dim_offset);
else error_code = error_code_unknown;
}
else if (0 <= time_dim_slot && dim_offset < time_dim_size)
time_offsets.add(dim_offset);
else error_code = error_code_unknown;

int time_count = time_offsets.n_elements();
if (0 < time_count)
Expand Down

0 comments on commit 800bfa1

Please sign in to comment.