Skip to content

Commit

Permalink
Per #2897, fix typos in 2 log messages. Also fix the bug in storing t…
Browse files Browse the repository at this point in the history
…he valid time strings. The time string in vld_array should exactly correspond to the numeric unixtime values in vld_num_array. Therefore they need to be updated inside the same if block. The bug is that we were storing only the unique unixtime values but storing ALL of the valid time string, not just the unique ones.
  • Loading branch information
JohnHalleyGotway committed May 21, 2024
1 parent 32bd12d commit 95ddb54
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libcode/vx_pointdata_python/python_pointdata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ bool process_point_data_list(PyObject *python_point_data, MetPointDataPython &me
vld_time = obs.getValidTime();
if ( !header_data->vld_num_array.has(vld_time, vld_idx) ) {
header_data->vld_num_array.add(vld_time);
header_data->vld_array.add(obs.getValidTimeString());
header_data->vld_num_array.has(vld_time, vld_idx);
}

Expand All @@ -363,7 +364,6 @@ bool process_point_data_list(PyObject *python_point_data, MetPointDataPython &me
header_data->sid_idx_array.add(sid);
header_data->typ_idx_array.add(typ_idx);
header_data->vld_idx_array.add(vld_idx);
header_data->vld_array.add(obs.getValidTimeString());

prev_lat = lat;
prev_lon = lon;
Expand Down Expand Up @@ -774,7 +774,7 @@ void print_met_data(MetPointObsData *obs_data, MetPointHeader *header_data,

log_count = (header_data->hdr_count > min_count) ? min_count : header_data->hdr_count;
mlog << Debug(debug_level) << method_name
<< "header_data: message_type,station_id,time_time,lat,lon.elv\n";
<< "header_data: message_type,station_id,time_time,lat,lon,elv\n";
for (int idx=0; idx<log_count; idx++) {
mlog << Debug(debug_level)
<< " header_data[" << idx << "] = "
Expand Down Expand Up @@ -869,7 +869,7 @@ void print_met_data(MetPointObsData *obs_data, MetPointHeader *header_data,

log_count = (obs_data->obs_cnt > min_count) ? min_count : obs_data->obs_cnt;
mlog << Debug(debug_level) << "\n" << method_name
<< "obs_data: hid,vid.level,height,value,qty\n";
<< "obs_data: hid,vid,level,height,value,qty\n";
for (int idx=0; idx<log_count; idx++) {
mlog << Debug(debug_level)
<< " obs_data[" << idx << "] = "
Expand Down

0 comments on commit 95ddb54

Please sign in to comment.