Skip to content

Commit

Permalink
Per #2168, change the default tc-diag config file and code to only re…
Browse files Browse the repository at this point in the history
…quest the NetCDF range/azimuth output files since that's all that's supported in this version.
  • Loading branch information
JohnHalleyGotway committed Jun 2, 2023
1 parent dfa8ae1 commit 1cacf84
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/config/TCDiagConfig_default
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ vortex_removal = FALSE;
// Flags to control output files
//
nc_rng_azi_flag = TRUE;
nc_diag_flag = TRUE;
cira_diag_flag = TRUE;
nc_diag_flag = FALSE;
cira_diag_flag = FALSE;

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

Expand Down
21 changes: 21 additions & 0 deletions src/tools/tc_utils/tc_diag/tc_diag_conf_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,22 @@ void TCDiagConfInfo::process_config(GrdFileType file_type,
// Conf: nc_rng_azi_flag
nc_rng_azi_flag = conf.lookup_bool(conf_key_nc_rng_azi_flag);

// TODO: Remove this check for MET version 12.0.0
if(!nc_rng_azi_flag) {
mlog << Warning << "\nResetting the \"" << conf_key_nc_rng_azi_flag
<< "\" configuration option to true since it is the only "
<< "TC-Diag output for MET " << met_version << ".\n"
<< "Additional outputs will be added in future MET versions.\n\n";
nc_rng_azi_flag = true;
}

// Conf: nc_diag_flag
nc_diag_flag = conf.lookup_bool(conf_key_nc_diag_flag);

// Conf: cira_diag_flag
cira_diag_flag = conf.lookup_bool(conf_key_cira_diag_flag);

/* TODO: Uncomment this check for MET version 12.0.0
// At least one should be true
if(!nc_diag_flag && !cira_diag_flag) {
mlog << Error << "\nTCDiagConfInfo::process_config() -> "
Expand All @@ -344,6 +354,17 @@ void TCDiagConfInfo::process_config(GrdFileType file_type,
<< "\" config entries cannot both be false.\n\n";
exit(1);
}
*/

// TODO: Remove this check for MET version 12.0.0
if(nc_diag_flag || cira_diag_flag) {
mlog << Warning << "\nResetting the \""
<< conf_key_nc_diag_flag << "\" and \"" << conf_key_cira_diag_flag
<< "\" configuration options to false since they are not supported"
<< " for MET " << met_version << ".\n"
<< "Additional outputs will be added in future MET versions.\n\n";
nc_diag_flag = cira_diag_flag = false;
}

// Conf: tmp_dir
tmp_dir = parse_conf_tmp_dir(&conf);
Expand Down

0 comments on commit 1cacf84

Please sign in to comment.