Skip to content

Commit

Permalink
Per #2880, remove quality_mark_thresh and add obs_quality_inc and obs…
Browse files Browse the repository at this point in the history
…_quality_exc.
  • Loading branch information
JohnHalleyGotway committed Jun 24, 2024
1 parent 2ac2448 commit c789a22
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
3 changes: 1 addition & 2 deletions src/tools/other/point2grid/point2grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
// 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.
//
////////////////////////////////////////////////////////////////////////


#include <cstdio>
#include <cstdlib>
#include <dirent.h>
Expand Down Expand Up @@ -54,7 +54,6 @@
using namespace std;
using namespace netCDF;


////////////////////////////////////////////////////////////////////////

static ConcatString program_name;
Expand Down
18 changes: 6 additions & 12 deletions src/tools/other/point2grid/point2grid_conf_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@

////////////////////////////////////////////////////////////////////////


#include "point2grid_conf_info.h"
#include "vx_log.h"

using namespace std;


////////////////////////////////////////////////////////////////////////
//
// Code for class PointToGridConfInfo
Expand Down Expand Up @@ -49,7 +47,8 @@ void PointToGridConfInfo::clear() {
// Initialize values
message_type.clear();
beg_ds = end_ds = bad_data_int;
quality_mark_thresh = bad_data_int;
obs_qty_inc.clear();
obs_qty_exc.clear();
version.clear();
valid_time = 0;
def_var_name_map.clear();
Expand Down Expand Up @@ -110,16 +109,11 @@ void PointToGridConfInfo::process_config() {
// Conf: var_name_map
var_name_map = parse_conf_key_value_map(&conf, conf_key_var_name_map);

// Conf: quality_mark_thresh
quality_mark_thresh = conf.lookup_int(conf_key_quality_mark_thresh);
// Conf: obs_quality_inc
obs_quality_inc = parse_conf_obs_qty_inc(&conf);

// Check the value
if(quality_mark_thresh < 0 || quality_mark_thresh > 15) {
mlog << Warning << "\nPointToGridConfInfo::process_config() -> "
<< "the \"" << conf_key_quality_mark_thresh
<< "\" entry (" << quality_mark_thresh
<< ") should be set between 0 and 15.\n\n";
}
// Conf: obs_quality_exc
obs_quality_exc = parse_conf_obs_qty_exc(&conf);

return;
}
Expand Down
3 changes: 2 additions & 1 deletion src/tools/other/point2grid/point2grid_conf_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ class PointToGridConfInfo {
unixtime valid_time; // valid time
int beg_ds; // Time range of observations to be retained,
int end_ds; // Defined relative to the PrepBufr center time (seconds)
int quality_mark_thresh; // Quality marks to be retained
StringArray obs_qty_inc; // Quality mark strings to be included
StringArray obs_qty_exc; // Quality mark strings to be excluded
ConcatString version; // Config file version

PointToGridConfInfo();
Expand Down

0 comments on commit c789a22

Please sign in to comment.