Skip to content

Commit

Permalink
Per #2880, tweak log messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway committed Oct 1, 2024
1 parent 6dea58e commit 6ad7d73
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/libcode/vx_statistics/apply_mask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@ Grid parse_vx_grid(const RegridInfo info, const Grid *fgrid, const Grid *ogrid)

// Verify on the forecast grid
if(info.field == FieldType::Fcst) {
mlog << Debug(2) << "Using the forecast grid as the verification grid\n";
mlog << Debug(2) << "Using the forecast grid as the verification grid.\n";
vx_grid = *fgrid;
}
// Verify on the observation grid
else if(info.field == FieldType::Obs) {
mlog << Debug(2) << "Using the observation grid as the verification grid\n";
mlog << Debug(2) << "Using the observation grid as the verification grid.\n";
vx_grid = *ogrid;
}
// Parse a named grid, grid specification string,
// or gridded data file
else {
mlog << Debug(2) << "Using named grid as the verification grid. "
<< "Name=" << info.name << "\n";
mlog << Debug(2) << "Using named grid (" << info.name
<< ") as the verification grid.\n";
parse_grid_mask(info.name, vx_grid);
}
}
Expand Down
18 changes: 10 additions & 8 deletions src/tools/other/point2grid/point2grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1130,11 +1130,13 @@ void process_point_met_data(MetPointData *met_point_obs, MetConfig &config, VarI
<< ", obs_count_non_zero_to: " << obs_count_non_zero_to << "\n";

ConcatString log_msg;
log_msg << "Filtered by time: " << filtered_by_time;
int filtered_count = filtered_by_msg_type + filtered_by_qc + (int)requested_valid_time;
log_msg << "Filtered " << filtered_count << " of " << var_count2
<< " observations by time: " << filtered_by_time;
if (0 < requested_valid_time) {
log_msg << " [" << unix_to_yyyymmdd_hhmmss(requested_valid_time) << "]";
}
log_msg << ", by msg_type: " << filtered_by_msg_type;
log_msg << ", by message type: " << filtered_by_msg_type;
if (0 < filtered_by_msg_type) {
log_msg << " [" << write_css(conf_info.message_type) << "]";
}
Expand All @@ -1156,8 +1158,7 @@ void process_point_met_data(MetPointData *met_point_obs, MetConfig &config, VarI
<< "]";
}
}
log_msg << ", out of " << var_count2;
int filtered_count = filtered_by_msg_type + filtered_by_qc + (int)requested_valid_time;
log_msg << ".";
if (0 == var_count) {
if (0 == filtered_count) {
mlog << Warning << "\n" << method_name
Expand All @@ -1171,9 +1172,10 @@ void process_point_met_data(MetPointData *met_point_obs, MetConfig &config, VarI
}
}
else {
mlog << Debug(2) << method_name << "var_count=" << var_count
<< ", grid: " << to_count << " out of " << (nx * ny) << " "
<< (0 < filtered_count ? log_msg.c_str() : " ") << "\n";
mlog << Debug(3) << "Using " << var_count << " "
<< vinfo->name() << " observations to populate " << to_count
<< " of " << to_grid.nxy() << " grid points.\n";
if (0 < filtered_count ) mlog << Debug(3) << log_msg << "\n";
}
} // end for i

Expand Down Expand Up @@ -1518,7 +1520,7 @@ static void process_point_nccf_file(NcFile *nc_in, MetConfig &config,
delete [] cellMapping;
cellMapping = (IntArray *) nullptr;
if( 0 < filtered_by_time ) {
mlog << Debug(2) << method_name << "Filtered by time: " << filtered_by_time
mlog << Debug(3) << method_name << "Filtered by time: " << filtered_by_time
<< " out of " << time_from_size
<< " [" << unix_to_yyyymmdd_hhmmss(valid_beg_ut) << " to "
<< unix_to_yyyymmdd_hhmmss(valid_end_ut) << "]\n";
Expand Down

0 comments on commit 6ad7d73

Please sign in to comment.