From 0582846f4511578939e84b2c8bbb7511ad2a1cbf Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Mon, 21 Oct 2024 19:45:23 +0000 Subject: [PATCH] Per #3000, change 9 warning messages to Debug(2) log messages to minimize the number of warning messages Point2Grid writes. However, do retain the warnings about problems writing the grid mapping output file. --- src/tools/other/point2grid/point2grid.cc | 37 ++++++++++++------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/tools/other/point2grid/point2grid.cc b/src/tools/other/point2grid/point2grid.cc index e527b6dd33..47d7c726ef 100644 --- a/src/tools/other/point2grid/point2grid.cc +++ b/src/tools/other/point2grid/point2grid.cc @@ -22,7 +22,8 @@ // 002 07-06-22 Howard Soh METplus-Internal #19 Rename main to met_main // 003 10-03-23 Prestopnik MET #2227 Remove namespace std and netCDF from header files // 004 05-20-24 Howard Soh MET #2867 Fix -qc ADP bug. -// 004 06-24-24 Halley Gotway MET #2880 Filter obs_quality. +// 005 06-24-24 Halley Gotway MET #2880 Filter obs_quality. +// 006 10-21-24 Halley Gotway MET #3000 Reduce warnings. // //////////////////////////////////////////////////////////////////////// @@ -864,8 +865,8 @@ void process_point_met_data(MetPointData *met_point_obs, MetConfig &config, VarI } } if (empty_input) { - mlog << Warning << "\n" << method_name - << error_msg << "\tBut ignored because of empty input\n\n"; + mlog << Debug(2) << method_name + << error_msg << "\tBut ignored because of empty input\n"; } else { mlog << Error << "\n" << method_name @@ -1159,14 +1160,14 @@ void process_point_met_data(MetPointData *met_point_obs, MetConfig &config, VarI log_msg << "."; if (0 == var_count) { if (0 == filtered_count) { - mlog << Warning << "\n" << method_name + mlog << Debug(2) << method_name << "No valid data for the variable [" - << vinfo->name() << "]\n\n"; + << vinfo->name() << "]\n"; } else { - mlog << Warning << "\n" << method_name + mlog << Debug(2) << method_name << "No valid data after filtering.\n\t" - << log_msg << "\n\n"; + << log_msg << "\n"; } } else { @@ -1644,8 +1645,8 @@ static void regrid_nc_variable(NcFile *nc_in, Met2dDataFile *fr_mtddf, << "]\n"; if (to_cell_cnt == 0) { - mlog << Warning << "\n" << method_name - << " There are no matching cells between input and the target grid.\n\n"; + mlog << Debug(2) << method_name + << " There are no matching cells between input and the target grid.\n"; } mlog << Debug(LEVEL_FOR_PERFORMANCE) << method_name << "took " @@ -2025,8 +2026,8 @@ static bool get_grid_mapping(const Grid &to_grid, IntArray *cellMapping, int obs_count = obs_index_array.n(); if (0 == obs_count) { - mlog << Warning << "\n" << method_name - << "no valid point observation data!\n\n"; + mlog << Debug(2) << method_name + << "no valid point observation data!\n"; return status; } @@ -2054,8 +2055,8 @@ static bool get_grid_mapping(const Grid &to_grid, IntArray *cellMapping, } if (0 == count_in_grid) - mlog << Warning << "\n" << method_name - << "no valid point observation data within to grid\n\n"; + mlog << Debug(2) << method_name + << "no valid point observation data within to grid\n"; else { status = true; mlog << Debug(3) << method_name << "count in grid: " << count_in_grid @@ -2622,10 +2623,10 @@ static void regrid_goes_variable(NcFile *nc_in, const VarInfo *vinfo, } } else { - mlog << Warning << "\n" << method_name + mlog << Debug(2) << method_name << "QC var name (" << qc_var_name << " for " << GET_NC_NAME(var_adp) - << ") does not exist.\n\n"; + << ") does not exist.\n"; } } } @@ -2641,7 +2642,7 @@ static void regrid_goes_variable(NcFile *nc_in, const VarInfo *vinfo, mlog << Debug(3) << method_name << "found QC var: " << qc_var_name << ".\n"; } else { - mlog << Warning << "\n" << method_name + mlog << Debug(2) << method_name << "QC var name (" << qc_var_name << ") does not exist.\n"; } @@ -2839,8 +2840,8 @@ static void regrid_goes_variable(NcFile *nc_in, const VarInfo *vinfo, } if (to_cell_count == 0) { - mlog << Warning << "\n" << method_name - << "No valid data!\n\n"; + mlog << Debug(2) << method_name + << "No valid data!\n"; } mlog << Debug(LEVEL_FOR_PERFORMANCE) << method_name << "took "