Skip to content

Commit

Permalink
Whitespace edits and removing commented out code. Replace "Not set" w…
Browse files Browse the repository at this point in the history
…ith `na_str`
  • Loading branch information
JohnHalleyGotway authored Nov 17, 2023
1 parent 9dd475c commit b064df5
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 29 deletions.
23 changes: 10 additions & 13 deletions src/libcode/vx_shapedata/mode_conf_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -418,12 +418,9 @@ void ModeConfInfo::process_config_both(GrdFileType ftype, GrdFileType otype)
{
int j, k, n;

// VarInfoFactory info_factory;

Dictionary * fcst_dict = (Dictionary *) 0;
Dictionary * obs_dict = (Dictionary *) 0;
//Dictionary * dict = (Dictionary *) 0;
//PlotInfo plot_info;

// Conf: fcst and obs

Expand Down Expand Up @@ -1143,7 +1140,7 @@ void ModeConfInfo::set_fcst_merge_thresh_by_index(int k)
{
mlog << Error
<< "\nModeConfInfo::set_fcst_merge_thresh_by_index(int) -> "
<< "software is set for obs data not fcst\n\n";
<< "software is set for obs data not fcst\n\n";
exit (1);
}
Fcst->set_merge_thresh_by_index(k);
Expand Down Expand Up @@ -1177,7 +1174,7 @@ void ModeConfInfo::set_fcst_conv_thresh_by_merge_index(int k)
{
mlog << Error
<< "\nModeConfInfo::set_fcst_conv_thresh_by_merge_index(int) -> "
<< "software is set for obs data not fcst\n\n";
<< "software is set for obs data not fcst\n\n";
exit (1);
}
Fcst->set_conv_thresh_by_merge_index(k);
Expand All @@ -1197,7 +1194,7 @@ void ModeConfInfo::set_obs_conv_thresh_by_merge_index(int k)
{
mlog << Error
<< "\nModeConfInfo::set_obs_conv_thresh_by_merge_index(int) -> "
<< "software is set for fcst data not obs\n\n";
<< "software is set for fcst data not obs\n\n";
exit (1);
}
Obs->set_conv_thresh_by_merge_index(k);
Expand All @@ -1214,7 +1211,7 @@ void ModeConfInfo::set_fcst_merge_flag(MergeType t)
{
mlog << Error
<< "\nModeConfInfo::set_fcst_merge_flag(int) -> "
<< "software is set for obs data not fcst\n\n";
<< "software is set for obs data not fcst\n\n";
exit (1);
}
Fcst->merge_flag = t;
Expand All @@ -1228,7 +1225,7 @@ void ModeConfInfo::set_obs_merge_flag(MergeType t)
{
mlog << Error
<< "\nModeConfInfo::set_obs_merge_flag(int) -> "
<< "software is set for fcst data not obs\n\n";
<< "software is set for fcst data not obs\n\n";
exit (1);
}
Obs->merge_flag = t;
Expand All @@ -1242,7 +1239,7 @@ void ModeConfInfo::set_fcst_merge_thresh(SingleThresh s)
{
mlog << Error
<< "\nModeConfInfo::set_fcst_merge_thresh(int) -> "
<< "software is set for obs data not fcst\n\n";
<< "software is set for obs data not fcst\n\n";
exit (1);
}
Fcst->merge_thresh = s;
Expand All @@ -1256,7 +1253,7 @@ void ModeConfInfo::set_obs_merge_thresh(SingleThresh s)
{
mlog << Error
<< "\nModeConfInfo::set_obs_merge_thresh(int) -> "
<< "software is set for fcst data not obs\n\n";
<< "software is set for fcst data not obs\n\n";
exit (1);
}
Obs->merge_thresh = s;
Expand All @@ -1272,7 +1269,7 @@ void ModeConfInfo::set_obs_merge_thresh_by_index(int k)
{
mlog << Error
<< "\nModeConfInfo::set_obs_merge_thresh_by_index(int) -> "
<< "software is set for fcst data not obs\n\n";
<< "software is set for fcst data not obs\n\n";
exit (1);
}

Expand Down Expand Up @@ -1428,7 +1425,7 @@ void ModeConfInfo::check_multivar_not_implemented()
if (status) {
mlog << Error
<< "\nModeConfInfo::check_multivar_not_implemented:\n"
<< "\nSome features not yet implemented in multivar mode\n\n";
<< " Some features not yet implemented in multivar mode\n\n";
exit ( 1 );
}
}
Expand Down Expand Up @@ -1483,7 +1480,7 @@ void ModeConfInfo::check_multivar_perc_thresh(bool isSimple, bool isSimpleMerge)
}
}

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


//
Expand Down
4 changes: 2 additions & 2 deletions src/libcode/vx_shapedata/mode_conf_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ class ModeConfInfo {
void init_from_scratch();

int Field_Index_f; // for traditional mode expect Field_index_f/_o to be the same
int Field_Index_o;
int Field_Index_o;
int N_fields_f; // for traditional mode expect N_fields_f/_o to be the same
int N_fields_o;
int N_fields_o;

public:

Expand Down
4 changes: 2 additions & 2 deletions src/libcode/vx_statistics/apply_mask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ Grid parse_vx_grid(const RegridInfo info, const Grid *fgrid, const Grid *ogrid)
}
// Verify on the observation grid
else if(info.field == FieldType_Obs) {
mlog << Debug(2) << "Using the forecast grid as the verification grid\n";
mlog << Debug(2) << "Using the observation grid as the verification grid\n";
vx_grid = *ogrid;
}
// Parse a named grid, grid specification string,
// or gridded data file
else {
mlog << Debug(2) << "Using named grid as verification grid. "
mlog << Debug(2) << "Using named grid as the verification grid. "
<< "Name=" << info.name << "\n";
parse_grid_mask(info.name, vx_grid);
}
Expand Down
3 changes: 1 addition & 2 deletions src/tools/core/mode/mode_frontend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ int ModeFrontEnd::run_traditional(const StringArray & Argv)
}

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

int ModeFrontEnd::multivar_intensity_comparisons(const StringArray & Argv, const MultiVarData &mvdf,
const MultiVarData &mvdo, bool has_union_f,
bool has_union_o, ShapeData &merge_f,
Expand All @@ -279,7 +280,6 @@ int ModeFrontEnd::multivar_intensity_comparisons(const StringArray & Argv, const

ModeConfInfo & conf = mode_exec->engine.conf_info;
if (compress_level >= 0) conf.nc_info.set_compress_level(compress_level);
//if ( field_index >= 0 )
conf.set_field_index(field_index_f, field_index_o);

// for multivar intensities, explicity set the level and units using stored values
Expand Down Expand Up @@ -545,7 +545,6 @@ void ModeFrontEnd::init(ModeExecutive::Processing_t p)
{
ptype = p;
mlog << Debug(1) << "Running multivar front end for " << ModeExecutive::stype(ptype) << "\n";
//Argv.dump(cout, 0);

if ( mode_exec ) { delete mode_exec; mode_exec = 0; }

Expand Down
4 changes: 2 additions & 2 deletions src/tools/core/mode/mode_frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

class ModeFrontEnd {

private:
private:

public:
public:

ModeFrontEnd();
~ModeFrontEnd();
Expand Down
13 changes: 5 additions & 8 deletions src/tools/core/mode/multivar_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,11 @@ void MultiVarData1::objects_from_arrays(bool do_clusters,
{
string name = _name + "_" + sprintModeDataType(_dataType);
populate_bool_plane(name, _obj_data, _nx, _ny, out);
// name = _name + "_Obs";
// populate_bool_plane(name, _obs_obj_data, _nx, _ny, obs_out);
}

void MultiVarData1::print(const string &name) const
{
string n;
// might want a _Fcst_Obj kind of thing
n = name + "_" + _name + "_" + sprintModeDataType(_dataType) + "_Obj";
if (_obj_data) {
_print_summary(n, _obj_data, *_obj_sd);
Expand Down Expand Up @@ -169,11 +166,11 @@ void MultiVarData::checkFileTypeConsistency(const MultiVarData &mvdi, int j)
}

void MultiVarData::init(ModeDataType dataType,
const string &name,
const Grid &grid, GrdFileType type,
const string &units,
const string &level,
double data_min, double data_max)
const string &name,
const Grid &grid, GrdFileType type,
const string &units,
const string &level,
double data_min, double data_max)
{
_clear();

Expand Down

0 comments on commit b064df5

Please sign in to comment.