From 1abc2efd789e58a69e10e92cc0c355e7c99e3b54 Mon Sep 17 00:00:00 2001 From: Seth Linden Date: Tue, 31 Aug 2021 15:48:17 -0600 Subject: [PATCH] Per issue #1858: added code to read in obs_qty_inc instead of obs_qty. Also added in code for backwards compatibility to check for obs_qty (obs_quality) and use that for obs_qty_inc. SL --- .../core/point_stat/point_stat_conf_info.cc | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/met/src/tools/core/point_stat/point_stat_conf_info.cc b/met/src/tools/core/point_stat/point_stat_conf_info.cc index 57d52ddb92..9ebf0a6899 100644 --- a/met/src/tools/core/point_stat/point_stat_conf_info.cc +++ b/met/src/tools/core/point_stat/point_stat_conf_info.cc @@ -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; }