Skip to content

Commit

Permalink
#2044 Corrected config key for obs_prefbufr_map and give a warning fo…
Browse files Browse the repository at this point in the history
…r using the old key
  • Loading branch information
Howard Soh committed Feb 10, 2022
1 parent b4ec7b8 commit fa3896d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion met/src/basic/vx_config/config_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

Expand Down Expand Up @@ -1089,7 +1090,13 @@ map<ConcatString,StringArray> parse_conf_metadata_map(Dictionary *dict) {
///////////////////////////////////////////////////////////////////////////////

map<ConcatString,ConcatString> parse_conf_obs_bufr_map(Dictionary *dict) {
map<ConcatString,ConcatString> m = parse_conf_key_value_map(dict, conf_key_obs_prefbufr_map);
map<ConcatString,ConcatString> 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;
}
Expand Down

0 comments on commit fa3896d

Please sign in to comment.