Skip to content

Commit

Permalink
Per #1950, small tweak in ascii2nc to make it slightly more efficient…
Browse files Browse the repository at this point in the history
…. After adding the new obs varable name to the end of the list, we can compute var_index direclty without needing to call StringArray::has() a second time.
  • Loading branch information
JohnHalleyGotway committed Apr 5, 2022
1 parent c78f894 commit debac07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion met/src/tools/other/ascii2nc/met_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ bool MetHandler::_readObservations(LineDataFile &ascii_file)
use_var_id = true;
if (!obs_names.has(data_line[6], var_index)) {
obs_names.add(data_line[6]);
obs_names.has(data_line[6], var_index);
var_index = obs_names.n() - 1;
}
grib_code = var_index;
break;
Expand Down

0 comments on commit debac07

Please sign in to comment.