From fa3896d191f3adc0a027fcf0ded14a1bfaecd119 Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Wed, 9 Feb 2022 17:31:14 -0700 Subject: [PATCH] #2044 Corrected config key for obs_prefbufr_map and give a warning for using the old key --- met/src/basic/vx_config/config_util.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/met/src/basic/vx_config/config_util.cc b/met/src/basic/vx_config/config_util.cc index bfdeef07b2..1b655034ac 100644 --- a/met/src/basic/vx_config/config_util.cc +++ b/met/src/basic/vx_config/config_util.cc @@ -24,6 +24,7 @@ using namespace std; /////////////////////////////////////////////////////////////////////////////// static const double default_vld_thresh = 1.0; +static const char conf_key_prepbufr_map_typo[] = "obs_prefbufr_map"; // for backward compatibility /////////////////////////////////////////////////////////////////////////////// @@ -1089,7 +1090,13 @@ map parse_conf_metadata_map(Dictionary *dict) { /////////////////////////////////////////////////////////////////////////////// map parse_conf_obs_bufr_map(Dictionary *dict) { - map m = parse_conf_key_value_map(dict, conf_key_obs_prefbufr_map); + map m = parse_conf_key_value_map(dict, conf_key_obs_prepbufr_map); + if (m.empty()) { + //kludge: there was a typo in the config name + m = parse_conf_key_value_map(dict, conf_key_prepbufr_map_typo); + mlog << Warning << "\nPlease rename the configuration name \"" << conf_key_prepbufr_map_typo + << "\" to \"" << conf_key_obs_prepbufr_map << "\" at the customized PB2NC config file\n\n"; + } parse_add_conf_key_value_map(dict, conf_key_obs_bufr_map, &m); return m; }