Skip to content

Commit

Permalink
Per issue #1858: added code to read in obs_qty_inc instead of obs_qty…
Browse files Browse the repository at this point in the history
…. Also added in code for backwards compatibility to check for obs_qty (obs_quality) and use that for obs_qty_inc. SL
  • Loading branch information
Seth Linden committed Aug 31, 2021
1 parent 3256a2c commit 1abc2ef
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion met/src/tools/core/point_stat/point_stat_conf_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -917,8 +917,31 @@ void PointStatVxOpt::process_config(GrdFileType ftype,
vx_pd.set_sid_exc_filt(parse_conf_sid_list(&odict, conf_key_sid_exc));

// Conf: obs_qty_inc
vx_pd.set_obs_qty_filt(parse_conf_obs_qty_inc(&odict));
// Check for old "obs_quality" field
StringArray obs_qty_sa = odict.lookup_string_array(conf_key_obs_qty);
//cout << "obs_qty_sa = " << write_css(obs_qty_sa) << "\n";
cout << "obs_qty_sa.n() = " << obs_qty_sa.n() << "\n";

// Send warning if "obs_quality" is still being used
// Use it instead of "obs_quality_inc" if it is in config file
if(obs_qty_sa.n() > 0){
mlog << Warning << "\nPointStatVxOpt::process_config() -> "
<< "The field \""
<< conf_key_obs_qty
<< "\" is deprecated "
<< "use \"" << conf_key_obs_qty_inc << "\" instead.\n\n";

vx_pd.set_obs_qty_filt(parse_conf_obs_qty(&odict));

} else {
cout << "Using " << conf_key_obs_qty_inc << "\n";
vx_pd.set_obs_qty_filt(parse_conf_obs_qty_inc(&odict));
}


// Conf: obs_qty_exc


return;
}

Expand Down

0 comments on commit 1abc2ef

Please sign in to comment.