From 0a66ca115f8e219d8862e36c25b0cc0e250920bf Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Fri, 23 Jul 2021 17:44:33 -0600 Subject: [PATCH 01/27] #1855 Removed break after return (SobarQube) --- met/src/basic/vx_config/my_config_scanner.cc | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/met/src/basic/vx_config/my_config_scanner.cc b/met/src/basic/vx_config/my_config_scanner.cc index 1acae0582b..a9d8ac7fda 100644 --- a/met/src/basic/vx_config/my_config_scanner.cc +++ b/met/src/basic/vx_config/my_config_scanner.cc @@ -253,27 +253,27 @@ switch ( c ) { // single character tokens // - case '[': { do_single_char_token(lexeme[0]); is_lhs = false; dict_stack->push_array(); return ( token(lexeme[0]) ); } break; - case '{': { do_single_char_token(lexeme[0]); is_lhs = true; dict_stack->push(); return ( token(lexeme[0]) ); } break; + case '[': { do_single_char_token(lexeme[0]); is_lhs = false; dict_stack->push_array(); return ( token(lexeme[0]) ); } + case '{': { do_single_char_token(lexeme[0]); is_lhs = true; dict_stack->push(); return ( token(lexeme[0]) ); } - case ']': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } break; - case '}': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } break; + case ']': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } + case '}': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } - case '(': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } break; - case ')': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } break; + case '(': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } + case ')': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } - case '+': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } break; + case '+': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } - case '-': { if ( ! need_number ) { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } } break; + case '-': { if ( ! need_number ) { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } } - case '*': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } break; - case '^': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } break; + case '*': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } + case '^': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } - // case '=': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } break; + // case '=': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } - case ';': { do_single_char_token(lexeme[0]); is_lhs = true; return ( token( ';' ) ); } break; - case ',': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } break; + case ';': { do_single_char_token(lexeme[0]); is_lhs = true; return ( token( ';' ) ); } + case ',': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } case '\"': { do_quoted_string(); return ( token ( QUOTED_STRING ) ); } From f1a2d3fc7ca5d9704298c63e242b0a7f9a55d8ef Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Fri, 23 Jul 2021 17:45:32 -0600 Subject: [PATCH 02/27] #1855 Removed break after exit --- met/src/basic/vx_config/calculator.cc | 1 - met/src/basic/vx_config/config_util.cc | 12 ------------ met/src/basic/vx_config/icode.cc | 3 --- met/src/basic/vx_config/threshold.cc | 2 -- met/src/basic/vx_math/affine.cc | 2 -- met/src/basic/vx_math/so3.cc | 1 - .../core/wavelet_stat/wavelet_stat_conf_info.cc | 3 --- 7 files changed, 24 deletions(-) diff --git a/met/src/basic/vx_config/calculator.cc b/met/src/basic/vx_config/calculator.cc index bd7813f48f..0ce9d6cb6b 100644 --- a/met/src/basic/vx_config/calculator.cc +++ b/met/src/basic/vx_config/calculator.cc @@ -671,7 +671,6 @@ while ( pos < (v.length()) ) { << celltype_to_string(cell.type) << "\"\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/basic/vx_config/config_util.cc b/met/src/basic/vx_config/config_util.cc index c55fd819ae..64720d41de 100644 --- a/met/src/basic/vx_config/config_util.cc +++ b/met/src/basic/vx_config/config_util.cc @@ -2450,7 +2450,6 @@ ConcatString fieldtype_to_string(FieldType type) { mlog << Error << "\nfieldtype_to_string() -> " << "Unexpected FieldType value of " << type << ".\n\n"; exit(1); - break; } return(s); @@ -2520,7 +2519,6 @@ ConcatString setlogic_to_string(SetLogic type) { mlog << Error << "\nsetlogic_to_string() -> " << "Unexpected SetLogic value of " << type << ".\n\n"; exit(1); - break; } return(s); @@ -2541,7 +2539,6 @@ ConcatString setlogic_to_abbr(SetLogic type) { mlog << Error << "\nsetlogic_to_abbr() -> " << "Unexpected SetLogic value of " << type << ".\n\n"; exit(1); - break; } return(s); @@ -2562,7 +2559,6 @@ ConcatString setlogic_to_symbol(SetLogic type) { mlog << Error << "\nsetlogic_to_symbol() -> " << "Unexpected SetLogic value of " << type << ".\n\n"; exit(1); - break; } return(s); @@ -2642,7 +2638,6 @@ ConcatString tracktype_to_string(TrackType type) { mlog << Error << "\ntracktype_to_string() -> " << "Unexpected TrackType value of " << type << ".\n\n"; exit(1); - break; } return(s); @@ -2698,7 +2693,6 @@ ConcatString interp12type_to_string(Interp12Type type) { mlog << Error << "\ninterp12type_to_string() -> " << "Unexpected Interp12Type value of " << type << ".\n\n"; exit(1); - break; } return(s); @@ -2738,7 +2732,6 @@ ConcatString mergetype_to_string(MergeType type) { mlog << Error << "\nmergetype_to_string() -> " << "Unexpected MergeType value of " << type << ".\n\n"; exit(1); - break; } return(s); @@ -2765,7 +2758,6 @@ ConcatString obssummary_to_string(ObsSummary type, int perc_val) { mlog << Error << "\nobssummary_to_string() -> " << "Unexpected ObsSummary value of " << type << ".\n\n"; exit(1); - break; } return(s); @@ -2805,7 +2797,6 @@ ConcatString matchtype_to_string(MatchType type) { mlog << Error << "\nmatchtype_to_string() -> " << "Unexpected MatchType value of " << type << ".\n\n"; exit(1); - break; } return(s); @@ -2873,7 +2864,6 @@ ConcatString disttype_to_string(DistType type) { mlog << Error << "\ndisttype_to_string() -> " << "Unexpected DistType value of " << type << ".\n\n"; exit(1); - break; } return(s); @@ -2915,7 +2905,6 @@ ConcatString griddecomptype_to_string(GridDecompType type) { mlog << Error << "\ngriddecomptype_to_string() -> " << "Unexpected GridDecompType value of " << type << ".\n\n"; exit(1); - break; } return(s); @@ -2939,7 +2928,6 @@ ConcatString wavelettype_to_string(WaveletType type) { mlog << Error << "\nwavlettype_to_string() -> " << "Unexpected WaveletType value of " << type << ".\n\n"; exit(1); - break; } return(s); diff --git a/met/src/basic/vx_config/icode.cc b/met/src/basic/vx_config/icode.cc index a45736daf1..fda6db8f01 100644 --- a/met/src/basic/vx_config/icode.cc +++ b/met/src/basic/vx_config/icode.cc @@ -262,7 +262,6 @@ switch ( type ) { default: cerr << "\n\n IcodeCell::as_double() const -> bad type ... \"" << celltype_to_string(type) << "\"\n\n"; exit ( 1 ); - break; } // switch @@ -289,7 +288,6 @@ switch ( type ) { default: cerr << "\n\n IcodeCell::as_int() const -> bad type ... \"" << celltype_to_string(type) << "\"\n\n"; exit ( 1 ); - break; } // switch @@ -392,7 +390,6 @@ switch ( type ) { default: cerr << "\n\n IcodeCell::dump() -> unrecognized type ... \"" << celltype_to_string(type) << "\"\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/basic/vx_config/threshold.cc b/met/src/basic/vx_config/threshold.cc index bb1dfaa49a..cf3e9dd26a 100644 --- a/met/src/basic/vx_config/threshold.cc +++ b/met/src/basic/vx_config/threshold.cc @@ -857,7 +857,6 @@ switch ( op ) { mlog << Error << "\nSimple_Node::check(double, double, double) const -> " << "bad op ... " << op << "\n\n"; exit ( 1 ); - break; } // switch @@ -1202,7 +1201,6 @@ if ( Ptype == perc_thresh_climo_dist ) { << "threshold to a probability!\n\n"; exit ( 1 ); - break; } // switch } diff --git a/met/src/basic/vx_math/affine.cc b/met/src/basic/vx_math/affine.cc index b7094024e1..974eb32aa4 100644 --- a/met/src/basic/vx_math/affine.cc +++ b/met/src/basic/vx_math/affine.cc @@ -1144,7 +1144,6 @@ switch ( g ) { mlog << Error << "\nConformalAffine::set() -> " << "bad gravity ... " << viewgravity_to_string(g) << "\n\n"; exit ( 1 ); - break; } // switch @@ -1421,7 +1420,6 @@ switch ( g ) { << "\n\n viewgravity_to_uv() -> bad gravity ... " << viewgravity_to_string(g) << "\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/basic/vx_math/so3.cc b/met/src/basic/vx_math/so3.cc index 41e3dbc82b..3f3c93ab73 100644 --- a/met/src/basic/vx_math/so3.cc +++ b/met/src/basic/vx_math/so3.cc @@ -780,7 +780,6 @@ switch ( k ) { default: cerr << "\n\n SO3::operator()(int, int) const -> range check error (2)\n\n"; exit ( 1 ); - break; } diff --git a/met/src/tools/core/wavelet_stat/wavelet_stat_conf_info.cc b/met/src/tools/core/wavelet_stat/wavelet_stat_conf_info.cc index 103f203280..b8a8a8c774 100644 --- a/met/src/tools/core/wavelet_stat/wavelet_stat_conf_info.cc +++ b/met/src/tools/core/wavelet_stat/wavelet_stat_conf_info.cc @@ -342,7 +342,6 @@ void WaveletStatConfInfo::process_config(GrdFileType ftype, mlog << Error << "\nWaveletStatConfInfo::process_config() -> " << "Unsupported wavelet type value of " << wvlt_type << ".\n\n"; exit(1); - break; } // Conf: wavelet.member @@ -389,7 +388,6 @@ void WaveletStatConfInfo::process_config(GrdFileType ftype, mlog << Error << "\nWaveletStatConfInfo::process_config() -> " << "Unsupported wavelet type value of " << wvlt_type << ".\n\n"; exit(1); - break; } // Initialize the requested wavelet @@ -569,7 +567,6 @@ void WaveletStatConfInfo::process_tiles(const Grid &grid) { << "Unsupported grid decomposition type of " << grid_decomp_flag << ".\n\n"; exit(1); - break; } // end switch // Compute n_scale based on tile_dim From f60c0527ac2ebef71206585c700a7f6799657204 Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Fri, 23 Jul 2021 17:47:04 -0600 Subject: [PATCH 03/27] 1855 Added return at MetNcPointObsOut::write_to_netcdf --- met/src/libcode/vx_nc_obs/nc_point_obs_out.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/met/src/libcode/vx_nc_obs/nc_point_obs_out.cc b/met/src/libcode/vx_nc_obs/nc_point_obs_out.cc index b758df0093..29e204672f 100644 --- a/met/src/libcode/vx_nc_obs/nc_point_obs_out.cc +++ b/met/src/libcode/vx_nc_obs/nc_point_obs_out.cc @@ -602,6 +602,7 @@ bool MetNcPointObsOut::write_to_netcdf(StringArray obs_names, StringArray obs_un << "variable names are not added because of empty names\n\n"; } else mlog << Debug(7) << method_name << "use_var_id is false\n"; + return true; } //////////////////////////////////////////////////////////////////////// From c5b1610c09d585174b2da32d417a8fe07aaa5cb9 Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Fri, 23 Jul 2021 17:48:09 -0600 Subject: [PATCH 04/27] #1855 Avoid releasing memory twice --- met/src/tools/dev_utils/insitu_nc_file.cc | 48 +++++++++++------------ 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/met/src/tools/dev_utils/insitu_nc_file.cc b/met/src/tools/dev_utils/insitu_nc_file.cc index 753f44204c..bdb88f5813 100644 --- a/met/src/tools/dev_utils/insitu_nc_file.cc +++ b/met/src/tools/dev_utils/insitu_nc_file.cc @@ -1,5 +1,3 @@ - - // *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* // ** Copyright UCAR (c) 1992 - 2021 // ** University Corporation for Atmospheric Research (UCAR) @@ -100,7 +98,7 @@ void InsituNcFile::close() // Reclaim the space used for the variables - delete [] _aircraftId; + if (_aircraftId) delete [] _aircraftId; delete [] _timeObs; delete [] _latitude; delete [] _longitude; @@ -150,7 +148,7 @@ bool InsituNcFile::open(const char * filename) if (IS_INVALID_NC(num_recs_dim)) { mlog << Error << "\n" << method_name << " -> " - << "recNum dimension not found in file\n"; + << "recNum dimension not found in file\n"; return false; } @@ -166,7 +164,7 @@ bool InsituNcFile::open(const char * filename) if (IS_INVALID_NC(aircraft_id_len_dim)) { mlog << Error << "\n" << method_name << " -> " - << "aircraftIdLen dimension not found in file\n"; + << "aircraftIdLen dimension not found in file\n"; return false; } @@ -177,7 +175,7 @@ bool InsituNcFile::open(const char * filename) if (IS_INVALID_NC(aircraft_id_var)) { mlog << Error << "\n" << method_name << " -> " - << "aircraftId variable not found in file\n"; + << "aircraftId variable not found in file\n"; return false; } @@ -187,7 +185,7 @@ bool InsituNcFile::open(const char * filename) if (!get_nc_data(&aircraft_id_var, aircraft_id)) { mlog << Error << "\n" << method_name << " -> " - << "error retrieving aircraftId values from file\n"; + << "error retrieving aircraftId values from file\n"; if(aircraft_id) delete[] aircraft_id; return false; } @@ -197,7 +195,7 @@ bool InsituNcFile::open(const char * filename) for (int i = 0; i < _numRecords; ++i) _aircraftId[i] = &aircraft_id[i * aircraft_id_len]; - if(aircraft_id) delete[] aircraft_id; + if(aircraft_id) { delete[] aircraft_id; aircraft_id = 0; } // timeObs @@ -205,7 +203,7 @@ bool InsituNcFile::open(const char * filename) if (IS_INVALID_NC(time_obs_var)) { mlog << Error << "\n" << method_name << " -> " - << "timeObs variable not found in file\n"; + << "timeObs variable not found in file\n"; return false; } @@ -216,7 +214,7 @@ bool InsituNcFile::open(const char * filename) if (!get_nc_data(&time_obs_var, _timeObs)) { mlog << Error << "\n" << method_name << " -> " - << "error retrieving timeObs variable from file\n"; + << "error retrieving timeObs variable from file\n"; return false; } @@ -227,7 +225,7 @@ bool InsituNcFile::open(const char * filename) if (IS_INVALID_NC(latitude_var)) { mlog << Error << "\n" << method_name << " -> " - << "latitude variable not found in file\n"; + << "latitude variable not found in file\n"; return false; } @@ -237,7 +235,7 @@ bool InsituNcFile::open(const char * filename) if (!get_nc_data(&latitude_var, _latitude, _numRecords)) { mlog << Error << "\n" << method_name << " -> " - << "error retrieving latitude values from file\n"; + << "error retrieving latitude values from file\n"; return false; } @@ -248,7 +246,7 @@ bool InsituNcFile::open(const char * filename) if (IS_INVALID_NC(longitude_var)) { mlog << Error << "\n" << method_name << " -> " - << "longitude variable not found in file\n"; + << "longitude variable not found in file\n"; return false; } @@ -258,7 +256,7 @@ bool InsituNcFile::open(const char * filename) if (!get_nc_data(&longitude_var, _longitude, _numRecords)) { mlog << Error << "\n" << method_name << " -> " - << "error retrieving longitude values from file\n"; + << "error retrieving longitude values from file\n"; return false; } @@ -269,7 +267,7 @@ bool InsituNcFile::open(const char * filename) if (IS_INVALID_NC(altitude_var)) { mlog << Error << "\n" << method_name << " -> " - << "altitude variable not found in file\n"; + << "altitude variable not found in file\n"; return false; } @@ -279,7 +277,7 @@ bool InsituNcFile::open(const char * filename) if (!get_nc_data(&altitude_var, _altitude, _numRecords)) { mlog << Error << "\n" << method_name << " -> " - << "retrieving altitude values from file\n"; + << "retrieving altitude values from file\n"; return false; } @@ -290,7 +288,7 @@ bool InsituNcFile::open(const char * filename) if (IS_INVALID_NC(qc_confidence_var)) { mlog << Error << "\n" << method_name << " -> " - << "QCconfidence variable not found in file\n"; + << "QCconfidence variable not found in file\n"; return false; } @@ -300,7 +298,7 @@ bool InsituNcFile::open(const char * filename) if (!get_nc_data(&qc_confidence_var, _QCconfidence, _numRecords)) { mlog << Error << "\n" << method_name << " -> " - << "error retrieving QCconfidence values from file\n"; + << "error retrieving QCconfidence values from file\n"; return false; } @@ -311,7 +309,7 @@ bool InsituNcFile::open(const char * filename) if (IS_INVALID_NC(med_edr_var)) { mlog << Error << "\n" << method_name << " -> " - << "medEDR variable not found in file\n"; + << "medEDR variable not found in file\n"; return false; } @@ -321,7 +319,7 @@ bool InsituNcFile::open(const char * filename) if (!get_nc_data(&med_edr_var, _medEDR, _numRecords)) { mlog << Error << "\n" << method_name << " -> " - << "error retrieving medEDR values from file\n"; + << "error retrieving medEDR values from file\n"; return false; } @@ -332,7 +330,7 @@ bool InsituNcFile::open(const char * filename) if (IS_INVALID_NC(max_edr_var)) { mlog << Error << "\n" << method_name << " -> " - << "maxEDR variable not found in file\n"; + << "maxEDR variable not found in file\n"; return false; } @@ -342,7 +340,7 @@ bool InsituNcFile::open(const char * filename) if (!get_nc_data(&max_edr_var, _maxEDR, _numRecords)) { mlog << Error << "\n" << method_name << " -> " - << "error retrieving maxEDR values from file\n"; + << "error retrieving maxEDR values from file\n"; return false; } @@ -355,9 +353,9 @@ bool InsituNcFile::open(const char * filename) bool InsituNcFile::getNextRecord(string &aircraftId, time_t &timeObs, - double &latitude, double &longitude, - double &altitude, double &QCconfidence, - double &medEDR, double &maxEDR) + double &latitude, double &longitude, + double &altitude, double &QCconfidence, + double &medEDR, double &maxEDR) { // If we don't have any more records, return From 52e697e17ce7b90a824b5290ea8047a0af867e0c Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Fri, 23 Jul 2021 17:48:48 -0600 Subject: [PATCH 05/27] #1855 Removed unused code --- met/src/tools/dev_utils/met_nc_file.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/met/src/tools/dev_utils/met_nc_file.cc b/met/src/tools/dev_utils/met_nc_file.cc index 664ee7fea4..b1e35a2ab6 100644 --- a/met/src/tools/dev_utils/met_nc_file.cc +++ b/met/src/tools/dev_utils/met_nc_file.cc @@ -184,7 +184,6 @@ bool MetNcFile::readFile(const int desired_grib_code, long lengths[2] = { 1, 1 }; lengths[0] = hdr_buf_size; - lengths[1] = strl_count; // // Get the corresponding header message type From 471467c35b875039731c8313088adce77a6bc415 Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Fri, 23 Jul 2021 17:49:20 -0600 Subject: [PATCH 06/27] #1855 Corrected syntax error --- met/src/tools/tc_utils/tc_dland/tc_dland.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/met/src/tools/tc_utils/tc_dland/tc_dland.cc b/met/src/tools/tc_utils/tc_dland/tc_dland.cc index e7c378549c..92195d7af1 100644 --- a/met/src/tools/tc_utils/tc_dland/tc_dland.cc +++ b/met/src/tools/tc_utils/tc_dland/tc_dland.cc @@ -290,7 +290,7 @@ void process_distances() { // Write the computed distances to the output file mlog << Debug(3) << "Writing distance to land variable.\n"; if(!put_nc_data_with_dims(&dland_var, &dland[0], grid.ny(), grid.nx())) { - if(dland) { delete dland; dland = (float *) 0; } + if(dland) { delete [] dland; dland = (float *) 0; } mlog << Error << "\nprocess_distances() -> " << "error with dland_var->put\n\n"; exit(1); From 69b5530d88cef6cd59b5cd11f45873424dd6a136 Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Tue, 27 Jul 2021 10:18:31 -0600 Subject: [PATCH 07/27] #1855 Changed the second call of close() to release _ncFile --- met/src/tools/dev_utils/insitu_nc_file.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/met/src/tools/dev_utils/insitu_nc_file.cc b/met/src/tools/dev_utils/insitu_nc_file.cc index bdb88f5813..82e0d255ea 100644 --- a/met/src/tools/dev_utils/insitu_nc_file.cc +++ b/met/src/tools/dev_utils/insitu_nc_file.cc @@ -98,7 +98,7 @@ void InsituNcFile::close() // Reclaim the space used for the variables - if (_aircraftId) delete [] _aircraftId; + delete [] _aircraftId; delete [] _timeObs; delete [] _latitude; delete [] _longitude; @@ -138,7 +138,11 @@ bool InsituNcFile::open(const char * filename) if (!(IS_INVALID_NC_P(_ncFile))) { - close(); + if (_ncFile) // close() is called already + { + delete _ncFile; + _ncFile = (NcFile *)0; + } return false; } From 1b977e4ed40bcc6f59f027b092296e2c3befc275 Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Tue, 27 Jul 2021 11:37:28 -0600 Subject: [PATCH 08/27] #1855 Deleted break after exit --- met/src/libcode/vx_nc_util/nc_utils.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/met/src/libcode/vx_nc_util/nc_utils.cc b/met/src/libcode/vx_nc_util/nc_utils.cc index 14c473702c..50c3ff778e 100644 --- a/met/src/libcode/vx_nc_util/nc_utils.cc +++ b/met/src/libcode/vx_nc_util/nc_utils.cc @@ -2855,7 +2855,6 @@ void copy_nc_att(NcFile *nc_from, NcVar *var_to, const ConcatString attr_name) { mlog << Error << "\ncopy_nc_att(NcFile, NcVar, attr_name) -> " << "Does not copy this type \"" << dataType << "\" global NetCDF attribute.\n\n"; exit(1); - break; } } if(from_att) delete from_att; @@ -2891,7 +2890,6 @@ void copy_nc_att(NcVar *var_from, NcVar *var_to, const ConcatString attr_name) { << "Does not copy this type \"" << dataType << "\" NetCDF attributes from \"" << GET_NC_TYPE_NAME_P(var_from) << "\".\n\n"; exit(1); - break; } } if(from_att) delete from_att; @@ -2931,7 +2929,6 @@ void copy_nc_atts(NcFile *nc_from, NcFile *nc_to, const bool all_attrs) { mlog << Error << "\ncopy_nc_atts(NcFile) -> " << "Does not copy this type \"" << dataType << "\" global NetCDF attributes.\n\n"; exit(1); - break; } } } @@ -2983,7 +2980,6 @@ void copy_nc_atts(NcVar *var_from, NcVar *var_to, const bool all_attrs) { << "Does not copy this type \"" << dataType << "\" NetCDF attributes from \"" << GET_NC_TYPE_NAME_P(var_from) << "\".\n\n"; exit(1); - break; } } } @@ -3083,7 +3079,6 @@ void copy_nc_var_data(NcVar *var_from, NcVar *var_to) { << "Does not copy this type \"" << dataType << "\" NetCDF data from \"" << GET_NC_TYPE_NAME_P(var_from) << "\".\n\n"; exit(1); - break; } } From 658e45e7a22fd7c43f3bdc79fbd259f2cad94fc5 Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Tue, 27 Jul 2021 11:40:13 -0600 Subject: [PATCH 09/27] #1855 Chamnged while to if --- met/src/basic/vx_util/GridTemplate.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/met/src/basic/vx_util/GridTemplate.cc b/met/src/basic/vx_util/GridTemplate.cc index 85926d8ae5..f3b83b3252 100644 --- a/met/src/basic/vx_util/GridTemplate.cc +++ b/met/src/basic/vx_util/GridTemplate.cc @@ -182,7 +182,8 @@ GridPoint *GridTemplate::getFirst(const int &base_x, const int &base_y, GridPoint *GridTemplate::getNext(void) const { - while (_pointInGridIterator != _offsetList.end()) + GridPoint *next_point = (GridPoint *)NULL; + if (_pointInGridIterator != _offsetList.end()) { GridOffset *offset = *_pointInGridIterator; @@ -191,11 +192,11 @@ GridPoint *GridTemplate::getNext(void) const _pointInGridReturn.x = _pointInGridBase.x + offset->x_offset; _pointInGridReturn.y = _pointInGridBase.y + offset->y_offset; - return &_pointInGridReturn; + next_point = &_pointInGridReturn; } - return (GridPoint *)NULL; + return next_point; } /********************************************************************** From e6b343bfe86f359f634dd655f271f813131194e1 Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Wed, 28 Jul 2021 10:13:11 -0600 Subject: [PATCH 10/27] #1855 Added constructor TCLineCounts and initialized the members --- met/src/tools/tc_utils/tc_stat/tc_stat_job.cc | 51 +++++++++++++++++-- met/src/tools/tc_utils/tc_stat/tc_stat_job.h | 2 + 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/met/src/tools/tc_utils/tc_stat/tc_stat_job.cc b/met/src/tools/tc_utils/tc_stat/tc_stat_job.cc index 59e4dd9616..ed0e22757c 100644 --- a/met/src/tools/tc_utils/tc_stat/tc_stat_job.cc +++ b/met/src/tools/tc_utils/tc_stat/tc_stat_job.cc @@ -84,7 +84,6 @@ TCStatJob *TCStatJobFactory::new_tc_stat_job_type(const char *type_str) { mlog << Error << "\nTCStatJobFactory::new_tc_stat_job_type() -> " << "unsupported job type \"" << type_str << "\"\n\n"; exit(1); - break; } // end switch return(job); @@ -3614,6 +3613,7 @@ StringArray TCStatJobProbRIRW::parse_job_command(const char *jobstring) { //////////////////////////////////////////////////////////////////////// void TCStatJobProbRIRW::close_dump_file() { + const char *method_name = "TCStatJobProbRIRW::do_job() -> "; // Close the current output dump file stream if(DumpOut) { @@ -3644,7 +3644,7 @@ void TCStatJobProbRIRW::close_dump_file() { // Open the dump file back up for reading if(!f.open(DumpFile.c_str())) { - mlog << Error << "\nTCStatJobProbRIRW::close_dump_file() -> " + mlog << Error << "\n" << method_name << "can't open the dump file \"" << DumpFile << "\" for reading!\n\n"; exit(1); @@ -3666,7 +3666,10 @@ void TCStatJobProbRIRW::close_dump_file() { TCStatJob::open_dump_file(); // Write the reformatted AsciiTable - *DumpOut << out_at; + + if(DumpOut) *DumpOut << out_at; + else mlog << Warning << "\n" << method_name + << "can't write the reformatted AsciiTable because DumpOut is null\n\n"; // Call parent to close the dump file TCStatJob::close_dump_file(); @@ -3958,6 +3961,48 @@ void TCStatJobProbRIRW::do_output(ostream &out) { //////////////////////////////////////////////////////////////////////// +TCLineCounts::TCLineCounts() { + // Read and keep counts + NRead = 0; + NKeep = 0; + + // Checking entire track + RejTrackWatchWarn = 0; + RejInitThresh = 0; + RejInitStr = 0; + + // Filtering on track attributes + RejRIRW = 0; + RejLandfall = 0; + + // Checking track point attributes + RejAModel = 0; + RejBModel = 0; + RejDesc = 0; + RejStormId = 0; + RejBasin = 0; + RejCyclone = 0; + RejStormName = 0; + RejInit = 0; + RejInitHour = 0; + RejLead = 0; + RejValid = 0; + RejValidHour = 0; + RejInitMask = 0; + RejValidMask = 0; + RejLineType = 0; + RejWaterOnly = 0; + RejColumnThresh = 0; + RejColumnStr = 0; + RejMatchPoints = 0; + RejEventEqual = 0; + RejOutInitMask = 0; + RejOutValidMask = 0; + RejLeadReq = 0; +} + +//////////////////////////////////////////////////////////////////////// + void setup_table(AsciiTable &at, int n_hdr_cols, int prec) { int i; diff --git a/met/src/tools/tc_utils/tc_stat/tc_stat_job.h b/met/src/tools/tc_utils/tc_stat/tc_stat_job.h index 111c6a3564..8eeb816241 100644 --- a/met/src/tools/tc_utils/tc_stat/tc_stat_job.h +++ b/met/src/tools/tc_utils/tc_stat/tc_stat_job.h @@ -158,6 +158,8 @@ struct TCLineCounts { int RejOutInitMask; int RejOutValidMask; int RejLeadReq; + + TCLineCounts(); }; //////////////////////////////////////////////////////////////////////// From 72ac1a889bea17210664d6e982eb954ac5cb4d75 Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Wed, 28 Jul 2021 10:14:12 -0600 Subject: [PATCH 11/27] #1855 Added break statement back for case '-' --- met/src/basic/vx_config/my_config_scanner.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/met/src/basic/vx_config/my_config_scanner.cc b/met/src/basic/vx_config/my_config_scanner.cc index a9d8ac7fda..288952689b 100644 --- a/met/src/basic/vx_config/my_config_scanner.cc +++ b/met/src/basic/vx_config/my_config_scanner.cc @@ -264,7 +264,7 @@ switch ( c ) { case '+': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } - case '-': { if ( ! need_number ) { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } } + case '-': { if ( ! need_number ) { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } } break; case '*': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } case '^': { do_single_char_token(lexeme[0]); return ( token(lexeme[0]) ); } From 8d4bf01b128aefdd29efa2628a021ef8dcd84335 Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Wed, 28 Jul 2021 10:15:46 -0600 Subject: [PATCH 12/27] #1855 Check the new size before extending to avoid thereference of the null pointer --- met/src/tools/other/gsi_tools/gsi_record.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/met/src/tools/other/gsi_tools/gsi_record.cc b/met/src/tools/other/gsi_tools/gsi_record.cc index 23739a1ea9..88f2e6c543 100644 --- a/met/src/tools/other/gsi_tools/gsi_record.cc +++ b/met/src/tools/other/gsi_tools/gsi_record.cc @@ -133,9 +133,13 @@ gsi_clear(); if ( !(g.Buf) ) return; -extend(g.Nalloc); +if (g.Nalloc > 0) { -memcpy(Buf, g.Buf, Nalloc); + extend(g.Nalloc); + + memcpy(Buf, g.Buf, Nalloc); + +} Shuffle = g.Shuffle; From 24a1cc6513d0409b011d0bdf307e7dd457922f2d Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Wed, 28 Jul 2021 10:17:57 -0600 Subject: [PATCH 13/27] #1855 Changed count to processed_count for log messages. Initialized variables at get_filtered_nc_data\*() --- met/src/tools/other/madis2nc/madis2nc.cc | 149 +++++++++++++++-------- 1 file changed, 99 insertions(+), 50 deletions(-) diff --git a/met/src/tools/other/madis2nc/madis2nc.cc b/met/src/tools/other/madis2nc/madis2nc.cc index ba85dbffd0..47c327eb06 100644 --- a/met/src/tools/other/madis2nc/madis2nc.cc +++ b/met/src/tools/other/madis2nc/madis2nc.cc @@ -418,28 +418,38 @@ static bool get_filtered_nc_data(NcVar var, float *data, const long dim, const long cur, const char *var_name) { - bool status; + bool status = false; float in_fill_value; const char *method_name = "get_filtered_nc_data(float) "; if (IS_VALID_NC(var)) { - if(!(status = get_nc_data(&var, data, dim, cur))) return status; - - get_nc_att_value(&var, (string)in_fillValue_str, in_fill_value); - mlog << Debug(5) << " " << method_name << GET_NC_NAME(var) << " " - << in_fillValue_str << "=" << in_fill_value << "\n"; - for (int idx=0; idx Date: Wed, 28 Jul 2021 10:20:31 -0600 Subject: [PATCH 14/27] #1855 Corected the number of memory copy --- met/src/tools/other/mode_time_domain/fo_graph.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/met/src/tools/other/mode_time_domain/fo_graph.cc b/met/src/tools/other/mode_time_domain/fo_graph.cc index 9c22800a4f..d2032d3f66 100644 --- a/met/src/tools/other/mode_time_domain/fo_graph.cc +++ b/met/src/tools/other/mode_time_domain/fo_graph.cc @@ -141,7 +141,7 @@ N_nodes = N*N; TheGraph = new FO_Node [N_nodes]; -memcpy(TheGraph, g.TheGraph, N*sizeof(FO_Node)); +memcpy(TheGraph, g.TheGraph, N_nodes*sizeof(FO_Node)); // // done From 16faedbb7fc91fd0d4cd61595017ec63e4cda61f Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Wed, 28 Jul 2021 16:03:23 -0600 Subject: [PATCH 15/27] #1855 Exit with an error message if both fgi & bgi are null --- met/src/tools/tc_utils/tc_gen/tc_gen.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/met/src/tools/tc_utils/tc_gen/tc_gen.cc b/met/src/tools/tc_utils/tc_gen/tc_gen.cc index 21ecc6269f..bfb3960226 100644 --- a/met/src/tools/tc_utils/tc_gen/tc_gen.cc +++ b/met/src/tools/tc_utils/tc_gen/tc_gen.cc @@ -431,6 +431,12 @@ void do_genesis_ctc(const TCGenVxOpt &vx_opt, const GenesisInfo *fgi = gpd.fcst_gen(i); const GenesisInfo *bgi = gpd.best_gen(i); + if(!fgi && !bgi) { + mlog << Error << "\ndo_genesis_ctc() -> " + << "Both the forecast and the best track are null at index " << i << ".\n\n"; + exit(1); + } + // Initialize diff.clear(); From 0d118ca5cd7e4722bc77d496b582fefee8fa0fb3 Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Wed, 28 Jul 2021 16:27:25 -0600 Subject: [PATCH 16/27] #1855 Clear Lead_Times before extening. Formatting for error messages --- .../other/mode_time_domain/mtd_file_int.cc | 65 ++++++++++--------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/met/src/tools/other/mode_time_domain/mtd_file_int.cc b/met/src/tools/other/mode_time_domain/mtd_file_int.cc index 1d885d85bf..e51024de0e 100644 --- a/met/src/tools/other/mode_time_domain/mtd_file_int.cc +++ b/met/src/tools/other/mode_time_domain/mtd_file_int.cc @@ -279,6 +279,7 @@ int * d = Data; for (j=0; j bad value ... " << r << "\n\n"; + mlog << Error << "\n MtdIntFile::set_radius(int) -> bad value ... " << r << "\n\n"; exit ( 1 ); @@ -324,7 +325,7 @@ void MtdIntFile::set_time_window(int beg, int end) if ( end < beg ) { - mlog << Error << "\n\n MtdIntFile::set_time_window(int) -> bad values ... " << beg << " and " << end << "\n\n"; + mlog << Error << "\n MtdIntFile::set_time_window(int) -> bad values ... " << beg << " and " << end << "\n\n"; exit ( 1 ); @@ -348,7 +349,7 @@ void MtdIntFile::set_threshold(double t) // if ( t < 0.0 ) { // -// mlog << Error << "\n\n MtdIntFile::set_threshold(double) -> bad value ... " << t << "\n\n"; +// mlog << Error << "\n MtdIntFile::set_threshold(double) -> bad value ... " << t << "\n\n"; // // exit ( 1 ); // @@ -444,7 +445,7 @@ var = get_nc_var(&f, data_field_name); //if ( !(var->set_cur(0, 0, 0)) ) { // -// mlog << Error << "\n\n MtdIntFile::read() -> trouble setting corner\n\n"; +// mlog << Error << "\n MtdIntFile::read() -> trouble setting corner\n\n"; // // exit ( 1 ); // @@ -454,7 +455,7 @@ var = get_nc_var(&f, data_field_name); // //if ( ! (var->get(Data, Nt, Ny, Nx)) ) { // -// mlog << Error << "\n\n MtdIntFile::read(const char *) -> trouble getting data\n\n"; +// mlog << Error << "\n MtdIntFile::read(const char *) -> trouble getting data\n\n"; // // exit ( 1 ); // @@ -466,7 +467,7 @@ long lengths[3] = {Nt, Ny, Nx}; //if ( ! get_nc_data(&var, Data, (long *){Nt, Ny, Nx}, (long *){0,0,0}) ) { if ( ! get_nc_data(&var, Data, lengths, offsets) ) { - mlog << Error << "\n\n MtdIntFile::read(const char *) -> trouble getting data\n\n"; + mlog << Error << "\n MtdIntFile::read(const char *) -> trouble getting data\n\n"; exit ( 1 ); @@ -474,7 +475,7 @@ if ( ! get_nc_data(&var, Data, lengths, offsets) ) { // const time_t t_stop = time(0); // for timing the data read operation -// mlog << Debug(5) << "\n\n MtdIntFile::read(): Time to read data = " << (t_stop - t_start) << " seconds\n\n" << flush; +// mlog << Debug(5) << "\n MtdIntFile::read(): Time to read data = " << (t_stop - t_start) << " seconds\n\n" << flush; // // done @@ -570,7 +571,7 @@ long lengths[3] = {Nt, Ny, Nx}; if ( ! put_nc_data(&data_var, Data, lengths, offsets) ) { - mlog << Error << "\n\n MtdIntFile::write(const char *) -> trouble getting data\n\n"; + mlog << Error << "\n MtdIntFile::write(const char *) -> trouble getting data\n\n"; exit ( 1 ); @@ -578,7 +579,7 @@ if ( ! put_nc_data(&data_var, Data, lengths, offsets) ) { //if ( !(data_var->set_cur(0, 0, 0)) ) { // -// mlog << Error << "\n\n MtdIntFile::write() -> trouble setting corner on data field\n\n"; +// mlog << Error << "\n MtdIntFile::write() -> trouble setting corner on data field\n\n"; // // exit ( 1 ); // @@ -588,7 +589,7 @@ if ( ! put_nc_data(&data_var, Data, lengths, offsets) ) { // //if ( !(data_var->put(Data, Nt, Ny, Nx)) ) { // -// mlog << Error << "\n\n MtdIntFile::write() -> trouble writing data field\n\n"; +// mlog << Error << "\n MtdIntFile::write() -> trouble writing data field\n\n"; // // exit ( 1 ); // @@ -606,7 +607,7 @@ if ( is_split ) { if ( !(put_nc_data(&volumes_var, ObjVolume, Nobjects, 0)) ) { - mlog << Error << "\n\n MtdIntFile::write() -> trouble writing object volumes\n\n"; + mlog << Error << "\n MtdIntFile::write() -> trouble writing object volumes\n\n"; exit ( 1 ); @@ -616,7 +617,7 @@ if ( is_split ) { // const time_t t_stop = time(0); // for timing the data write operation -// mlog << Debug(5) << "\n\n MtdIntFile::write(): Time to write data = " << (t_stop - t_start) << " seconds\n\n" << flush; +// mlog << Debug(5) << "\n MtdIntFile::write(): Time to write data = " << (t_stop - t_start) << " seconds\n\n" << flush; // // done @@ -638,7 +639,7 @@ NcFile f(_filename, NcFile::replace); if ( IS_INVALID_NC(f) ) { - mlog << Error << "\n\n MtdIntFile::write(const char *) -> unable to open netcdf output file \"" << _filename << "\"\n\n"; + mlog << Error << "\n MtdIntFile::write(const char *) -> unable to open netcdf output file \"" << _filename << "\"\n\n"; // exit ( 1 ); @@ -666,7 +667,7 @@ MtdIntFile MtdIntFile::const_t_slice(const int t) const if ( (t < 0) || (t >= Nt) ) { - mlog << Error << "\n\n MtdIntFile MtdIntFile::const_t_slice(int) const -> range check error\n\n"; + mlog << Error << "\n MtdIntFile MtdIntFile::const_t_slice(int) const -> range check error\n\n"; exit ( 1 ); @@ -735,7 +736,7 @@ MtdIntFile MtdIntFile::const_t_mask(const int t, const int obj_num) const // if ( (t < 0) || (t >= Nt) ) { - mlog << Error << "\n\n MtdIntFile MtdIntFile::const_t_mask(int) const -> range check error\n\n"; + mlog << Error << "\n MtdIntFile MtdIntFile::const_t_mask(int) const -> range check error\n\n"; exit ( 1 ); @@ -921,7 +922,7 @@ void MtdIntFile::zero_border(int n) if ( !Data ) { - mlog << Error << "\n\n MtdIntFile::zero_border(int) -> no data field!\n\n"; + mlog << Error << "\n MtdIntFile::zero_border(int) -> no data field!\n\n"; exit ( 1 ); @@ -929,7 +930,7 @@ if ( !Data ) { if ( 2*n >= min(Nx, Ny) ) { - mlog << Error << "\n\n MtdIntFile::zero_border(int) -> border size too large!\n\n"; + mlog << Error << "\n MtdIntFile::zero_border(int) -> border size too large!\n\n"; exit ( 1 ); @@ -982,7 +983,7 @@ void MtdIntFile::set_to_zeroes() if ( !Data ) { - mlog << Error << "\n\n MtdIntFile::set_to_zeroes() -> no data!\n\n"; + mlog << Error << "\n MtdIntFile::set_to_zeroes() -> no data!\n\n"; exit ( 1 ); @@ -1008,7 +1009,7 @@ MtdIntFile MtdIntFile::split_const_t(int & n_shapes) const if ( Nt != 1 ) { - mlog << Error << "\n\n split_const_t(int &) -> not const-time slice!\n\n"; + mlog << Error << "\n split_const_t(int &) -> not const-time slice!\n\n"; exit ( 1 ); @@ -1244,7 +1245,7 @@ int MtdIntFile::volume(int k) const if ( !ObjVolume ) { - mlog << Error << "\n\n MtdIntFile::volume(int) -> field not split!\n\n"; + mlog << Error << "\n MtdIntFile::volume(int) -> field not split!\n\n"; exit ( 1 ); @@ -1252,7 +1253,7 @@ if ( !ObjVolume ) { if ( (k < 0) || (k >= Nobjects) ) { - mlog << Error << "\n\n MtdIntFile::volume(int) -> range check error!\n\n"; + mlog << Error << "\n MtdIntFile::volume(int) -> range check error!\n\n"; exit ( 1 ); @@ -1273,7 +1274,7 @@ int MtdIntFile::total_volume() const if ( !ObjVolume ) { - mlog << Error << "\n\n MtdIntFile::total_volume() -> field not split!\n\n"; + mlog << Error << "\n MtdIntFile::total_volume() -> field not split!\n\n"; exit ( 1 ); @@ -1343,7 +1344,7 @@ int * d = Data; // if ( n_new == 0 ) { // -// mlog << Error << "\n\n MtdIntFile::sift_objects() -> no objects left!\n\n"; +// mlog << Error << "\n MtdIntFile::sift_objects() -> no objects left!\n\n"; // // exit ( 1 ); // @@ -1522,7 +1523,7 @@ for (x=0; x empty object!\n\n"; + mlog << Error << "\n MtdIntFile::calc_3d_centroid() const -> empty object!\n\n"; exit ( 1 ); @@ -1572,7 +1573,7 @@ for (x=0; x empty object!\n\n"; + // mlog << Error << "\n MtdIntFile::calc_2d_centroid_at_t() const -> empty object!\n\n"; // exit ( 1 ); @@ -1624,7 +1625,7 @@ MtdIntFile MtdIntFile::select(int n) const // 1-based if ( (n < 1) || (n > Nobjects) ) { - mlog << Error << "\n\n MtdIntFile::select(int) -> range check error on n ... " + mlog << Error << "\n MtdIntFile::select(int) -> range check error on n ... " << "NObjects = " << Nobjects << " ... " << "n = " << n << "\n\n"; @@ -1676,7 +1677,7 @@ MtdIntFile MtdIntFile::select_cluster(const IntArray & a) const // 1-based if ( (a.min() < 0) || (a.max() > Nobjects) ) { - mlog << Error << "\n\n MtdIntFile::select_cluster(const IntArray &) -> range check error\n\n"; + mlog << Error << "\n MtdIntFile::select_cluster(const IntArray &) -> range check error\n\n"; exit ( 1 ); @@ -1737,7 +1738,7 @@ int MtdIntFile::x_left(const int y) const if ( (y < 0) || (y >= Ny) ) { - mlog << Error << "\n\n MtdIntFile::x_left(int) -> range check error\n\n"; + mlog << Error << "\n MtdIntFile::x_left(int) -> range check error\n\n"; exit ( 1 ); @@ -1766,7 +1767,7 @@ int MtdIntFile::x_right(const int y) const if ( (y < 0) || (y >= Ny) ) { - mlog << Error << "\n\n MtdIntFile::x_right(int) -> range check error\n\n"; + mlog << Error << "\n MtdIntFile::x_right(int) -> range check error\n\n"; exit ( 1 ); @@ -1855,7 +1856,7 @@ Mtd_2D_Moments MtdIntFile::calc_2d_moments() const if ( Nt != 1 ) { - mlog << Error << "\n\n MtdIntFile::calc_2d_moments() const -> not a 2D object!\n\n"; + mlog << Error << "\n MtdIntFile::calc_2d_moments() const -> not a 2D object!\n\n"; exit ( 1 ); @@ -1997,7 +1998,7 @@ for (t=0; t<(mask.nt()); ++t) { if ( nc < 0 ) { - mlog << Error << "\n\n split(const MtdIntFile &, int &) -> can't find cell!\n\n"; + mlog << Error << "\n split(const MtdIntFile &, int &) -> can't find cell!\n\n"; exit ( 1 ); @@ -2031,7 +2032,7 @@ void adjust_obj_numbers(MtdIntFile & s, int delta) if ( s.nt() != 1 ) { - mlog << Error << "\n\n adjust_obj_numbers() -> not const-time slice!\n\n"; + mlog << Error << "\n adjust_obj_numbers() -> not const-time slice!\n\n"; exit ( 1 ); From 0d89f7a535034a56bd3fbc6f26aad97cbd58fc94 Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Fri, 30 Jul 2021 13:52:07 -0600 Subject: [PATCH 17/27] #1855 Extend Lead_Times for new times --- met/src/tools/other/mode_time_domain/mtd_file_int.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/met/src/tools/other/mode_time_domain/mtd_file_int.cc b/met/src/tools/other/mode_time_domain/mtd_file_int.cc index e51024de0e..0668e26396 100644 --- a/met/src/tools/other/mode_time_domain/mtd_file_int.cc +++ b/met/src/tools/other/mode_time_domain/mtd_file_int.cc @@ -275,12 +275,9 @@ Nx = _nx; Ny = _ny; Nt = _nt; -int * d = Data; - -for (j=0; j Date: Fri, 30 Jul 2021 14:08:57 -0600 Subject: [PATCH 18/27] #1855 Removed break after exit --- met/src/basic/vx_config/dictionary.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/met/src/basic/vx_config/dictionary.cc b/met/src/basic/vx_config/dictionary.cc index cbe3013cba..55ef59a0ac 100644 --- a/met/src/basic/vx_config/dictionary.cc +++ b/met/src/basic/vx_config/dictionary.cc @@ -219,7 +219,6 @@ switch ( entry.Type ) { << "\n\n DictionaryEntry::assign(const DictionaryEntry &) -> bad object type ... \"" << configobjecttype_to_string(entry.Type) << "\"\n\n"; exit ( 1 ); - break; } // switch @@ -300,7 +299,6 @@ switch ( Type ) { << "bad object type ... \"" << configobjecttype_to_string(Type) << "\"\n\n"; exit ( 1 ); - break; } // switch @@ -377,7 +375,6 @@ switch ( Type ) { mlog << Error << "DictionaryEntry::dump_config_format() -> bad threshold type ... " << Thresh->get_type() << "\n"; exit ( 1 ); - break; } // switch if ( Thresh->get_type() != thresh_na ) out << Thresh->get_value(); @@ -402,7 +399,6 @@ switch ( Type ) { << "bad object type ... \"" << configobjecttype_to_string(Type) << "\"\n\n"; exit ( 1 ); - break; } // switch @@ -1313,7 +1309,7 @@ for (j=0; j<(scope.n_elements() - 1); ++j) { // try current dictionary // - const char * stub = scope[scope.n_elements() - 1].c_str(); +const string stub = scope[scope.n_elements() - 1].c_str(); E = D->lookup_simple(stub); From 33d0cebd2fb9c4650c9e08e45dfe50b7f01663ff Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Fri, 30 Jul 2021 14:09:57 -0600 Subject: [PATCH 19/27] #1855 define "c" dynamically --- met/src/libcode/vx_data2d_grib/grib_utils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/met/src/libcode/vx_data2d_grib/grib_utils.cc b/met/src/libcode/vx_data2d_grib/grib_utils.cc index 64c49234b4..3fbbdd23c5 100644 --- a/met/src/libcode/vx_data2d_grib/grib_utils.cc +++ b/met/src/libcode/vx_data2d_grib/grib_utils.cc @@ -565,7 +565,7 @@ double decode_lat_lon(const unsigned char * p, int n) int i, parity; double answer; -unsigned char c[3]; +unsigned char c[n]; // // For all of the lat/lon parameters, the leftmost bit indicates the From c0f678dc8d9c7509ba19f640dbda76fe0ef24cab Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Fri, 30 Jul 2021 14:42:39 -0600 Subject: [PATCH 20/27] #1855 Move the log message within if statement to avoid dereferencing a null pointer --- met/src/libcode/vx_grid/goes_grid.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/met/src/libcode/vx_grid/goes_grid.cc b/met/src/libcode/vx_grid/goes_grid.cc index eed67fbaaa..f7cc8e96fa 100644 --- a/met/src/libcode/vx_grid/goes_grid.cc +++ b/met/src/libcode/vx_grid/goes_grid.cc @@ -522,14 +522,14 @@ void GoesImagerData::compute_lat_lon() } } } + + mlog << Debug(4) << method_name << " lon: " << lon_min << " to " << lon_max + << ", lat: " << lat_min << " to " << lat_max << " at index " + << idx_lon_min << " & " << idx_lon_max << ", " + << idx_lat_min << " & " << idx_lat_max << " from " + << " x: " << x_values[0] << " to " << x_values[nx-1] + << " y: " << y_values[0] << " to " << y_values[ny-1] << "\n"; } - - mlog << Debug(4) << method_name << " lon: " << lon_min << " to " << lon_max - << ", lat: " << lat_min << " to " << lat_max << " at index " - << idx_lon_min << " & " << idx_lon_max << ", " - << idx_lat_min << " & " << idx_lat_max << " from " - << " x: " << x_values[0] << " to " << x_values[nx-1] - << " y: " << y_values[0] << " to " << y_values[ny-1] << "\n"; } //////////////////////////////////////////////////////////////////////// From 6b3d71368c90af28a7929be5f63f2950afa0bfee Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Fri, 30 Jul 2021 15:05:27 -0600 Subject: [PATCH 21/27] #1855 Corected typo - compare the numnber of U and V --- met/src/tools/core/grid_stat/grid_stat.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/met/src/tools/core/grid_stat/grid_stat.cc b/met/src/tools/core/grid_stat/grid_stat.cc index 1d75923bf3..f0daf3f6a9 100644 --- a/met/src/tools/core/grid_stat/grid_stat.cc +++ b/met/src/tools/core/grid_stat/grid_stat.cc @@ -2134,7 +2134,7 @@ void do_vl1l2(VL1L2Info *&v_info, int i_vx, int i; // Check that the number of pairs are the same - if(pd_u_ptr->n_obs != pd_u_ptr->n_obs) { + if(pd_u_ptr->n_obs != pd_v_ptr->n_obs) { mlog << Error << "\ndo_vl1l2() -> " << "unequal number of UGRD and VGRD pairs (" << pd_u_ptr->n_obs << " != " << pd_v_ptr->n_obs From 6846f629f1a608df053c1855835d415ddb223de7 Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Fri, 30 Jul 2021 15:13:52 -0600 Subject: [PATCH 22/27] #1855 Check if var_info is hull --- met/src/tools/core/pcp_combine/pcp_combine.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/met/src/tools/core/pcp_combine/pcp_combine.cc b/met/src/tools/core/pcp_combine/pcp_combine.cc index 6ff36272aa..98353430b2 100644 --- a/met/src/tools/core/pcp_combine/pcp_combine.cc +++ b/met/src/tools/core/pcp_combine/pcp_combine.cc @@ -1320,6 +1320,11 @@ void write_nc_data(unixtime nc_init, unixtime nc_valid, int nc_accum, StringArray sa; NcVar nc_var; + if (!var_info) { + mlog << Error << "\nwrite_nc_data() var_info is null.\n\n"; + exit(1); + } + // // Write to the -name command line argument, if specified. // From f7a0aead1be22eed61047c3f93d03b8e11d64685 Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Fri, 30 Jul 2021 15:41:19 -0600 Subject: [PATCH 23/27] #1855 Avoid un-initialized variables: dt at open(), v at lat() & lon(), and local variables at data() --- .../tools/other/modis_regrid/modis_file.cc | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/met/src/tools/other/modis_regrid/modis_file.cc b/met/src/tools/other/modis_regrid/modis_file.cc index c3825f8d85..33327eed82 100644 --- a/met/src/tools/other/modis_regrid/modis_file.cc +++ b/met/src/tools/other/modis_regrid/modis_file.cc @@ -369,9 +369,11 @@ status = get_double_data(sst, n0, n1, dt); if ( !status || (dt < 0.0) ) { - mlog << Error - << "\n\n ModisFile::open(const char *) -> bad scan start time (" - << dt << ") in file \"" << _filename << "\"\n\n"; + if ( status ) { + mlog << Error + << "\n\n ModisFile::open(const char *) -> bad scan start time (" + << dt << ") in file \"" << _filename << "\"\n\n"; + } close(); @@ -794,12 +796,10 @@ double ModisFile::lat(int n0, int n1) const { -double v; +double v = bad_data_double; float f[2]; -(void) get_float_data(Latitude, n0, n1, f[0]); - -v = f[0]; +if (get_float_data(Latitude, n0, n1, f[0])) v = f[0]; return ( v ); @@ -813,14 +813,16 @@ double ModisFile::lon(int n0, int n1) const { -double v; +double v = bad_data_double; float f[2]; -(void) get_float_data(Longitude, n0, n1, f[0]); +if (get_float_data(Longitude, n0, n1, f[0])) { + + v = f[0]; -v = f[0]; + v = -v; // west longitude positive -v = -v; // west longitude positive +} return ( v ); @@ -881,22 +883,22 @@ switch ( NumberType ) { case nt_int_8: status = get_int8_data (Field, n0, n1, c); - value = (double) c; + if (status) value = (double) c; break; case nt_int_16: status = get_int16_data (Field, n0, n1, s); - value = (double) s; + if (status) value = (double) s; break; case nt_float_32: status = get_float_data (Field, n0, n1, f); - value = (double) f; + if (status) value = (double) f; break; case nt_float_64: status = get_double_data (Field, n0, n1, d); - value = d; + if (status) value = d; break; @@ -907,7 +909,6 @@ switch ( NumberType ) { << "\n\n"; exit ( 1 ); - break; } // switch From 72cc21ebca265f2fd71ab4182d6f0374a0810a5f Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Fri, 30 Jul 2021 15:49:23 -0600 Subject: [PATCH 24/27] #1855 Check if ldf is null pointer --- met/src/basic/vx_util/data_line.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/met/src/basic/vx_util/data_line.cc b/met/src/basic/vx_util/data_line.cc index 0a155a8eb2..155e7a449e 100644 --- a/met/src/basic/vx_util/data_line.cc +++ b/met/src/basic/vx_util/data_line.cc @@ -522,6 +522,8 @@ bool DataLine::read_single_text_line(LineDataFile * ldf) { +if ( !ldf ) return ( false ); + #ifdef WITH_PYTHON PyLineDataFile * pldf = dynamic_cast(ldf); @@ -530,7 +532,7 @@ if ( pldf ) { const bool status = read_py_single_text_line(pldf); - return ( status ); + return ( status ); } From 4935a50f92872d43558a21a2d8eeebc8167c67ac Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Fri, 30 Jul 2021 15:50:39 -0600 Subject: [PATCH 25/27] #1855 Removed break after exit --- met/src/libcode/vx_data2d_factory/var_info_factory.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/met/src/libcode/vx_data2d_factory/var_info_factory.cc b/met/src/libcode/vx_data2d_factory/var_info_factory.cc index 354be867c0..5deb64d629 100644 --- a/met/src/libcode/vx_data2d_factory/var_info_factory.cc +++ b/met/src/libcode/vx_data2d_factory/var_info_factory.cc @@ -71,13 +71,13 @@ VarInfo * VarInfoFactory::new_var_info(GrdFileType type) case FileType_Gb2: #ifdef WITH_GRIB2 vi = new VarInfoGrib2; + break; #else mlog << Error << "\nVarInfoFactory::new_var_info() -> " << "Support for GRIB2 has not been compiled!\n" << "To read GRIB2 files, recompile with the --enable-grib2 option.\n\n"; exit(1); #endif - break; case FileType_NcMet: vi = new VarInfoNcMet; @@ -94,31 +94,29 @@ VarInfo * VarInfoFactory::new_var_info(GrdFileType type) p->set_file_type(type); vi = p; p = 0; + break; #else mlog << Error << "\nVarInfoFactory::new_var_info() -> " << "Support for Python has not been compiled!\n" << "To run Python scripts, recompile with the --enable-python option.\n\n"; exit(1); #endif - break; case FileType_NcCF: - vi = new VarInfoNcCF; - break; + vi = new VarInfoNcCF; + break; case FileType_HdfEos: mlog << Error << "\nVarInfoFactory::new_var_info() -> " << "Support for GrdFileType = " << grdfiletype_to_string(type) << " not yet implemented!\n\n"; exit(1); - break; default: mlog << Error << "\nVarInfoFactory::new_var_info() -> " << "unsupported gridded data file type \"" << grdfiletype_to_string(type) << "\"\n\n"; exit(1); - break; } // end switch mlog << Debug(4) From 07b700fe583794821c406d6039afd3dd8fb77015 Mon Sep 17 00:00:00 2001 From: Howard Soh Date: Fri, 30 Jul 2021 15:51:39 -0600 Subject: [PATCH 26/27] #1855 Removed break after exit --- met/src/basic/vx_log/concat_string.cc | 1 - met/src/basic/vx_util/data_plane_util.cc | 1 - met/src/basic/vx_util/interp_util.cc | 4 -- met/src/basic/vx_util/ordinal.cc | 1 - met/src/basic/vx_util/read_fortran_binary.cc | 3 -- met/src/basic/vx_util/roman_numeral.cc | 1 - met/src/basic/vx_util/two_to_one.cc | 2 - met/src/libcode/vx_afm/afm.cc | 41 ------------------- met/src/libcode/vx_afm/afm_token.cc | 1 - met/src/libcode/vx_analysis_util/stat_job.cc | 2 - .../vx_data2d_factory/data2d_factory.cc | 4 -- .../vx_data2d_grib/data2d_grib_utils.cc | 2 - .../libcode/vx_data2d_grib/grib_strings.cc | 1 - .../libcode/vx_data2d_python/data2d_python.cc | 1 - met/src/libcode/vx_grid/st_grid.cc | 1 - met/src/libcode/vx_pb_util/do_blocking.cc | 1 - met/src/libcode/vx_pb_util/do_unblocking.cc | 2 - met/src/libcode/vx_pb_util/pblock.cc | 1 - met/src/libcode/vx_ps/vx_ps.cc | 9 ---- met/src/libcode/vx_regrid/vx_regrid.cc | 1 - met/src/libcode/vx_render/render_pbm.cc | 2 - met/src/libcode/vx_render/render_pcm.cc | 2 - met/src/libcode/vx_render/render_pgm.cc | 2 - met/src/libcode/vx_render/render_ppm.cc | 2 - met/src/libcode/vx_render/rle_filter.cc | 1 - met/src/libcode/vx_shapedata/shapedata.cc | 2 - .../libcode/vx_statistics/pair_data_point.cc | 1 - met/src/libcode/vx_tc_util/track_point.cc | 1 - .../ensemble_stat/ensemble_stat_conf_info.cc | 1 - .../core/grid_stat/grid_stat_conf_info.cc | 1 - .../core/point_stat/point_stat_conf_info.cc | 1 - .../core/series_analysis/series_analysis.cc | 1 - .../tools/other/gen_vx_mask/gen_vx_mask.cc | 1 - met/src/tools/other/gis_utils/gis_dump_shp.cc | 1 - met/src/tools/other/lidar2nc/hdf_utils.cc | 1 - met/src/tools/other/lidar2nc/lidar2nc.cc | 1 - met/src/tools/other/madis2nc/madis2nc.cc | 1 - .../tools/other/mode_graphics/cgraph_main.cc | 4 -- .../mode_graphics/mode_nc_output_file.cc | 1 - .../other/mode_graphics/plot_mode_field.cc | 4 +- .../other/modis_regrid/cloudsat_swath_file.cc | 2 - met/src/tools/other/wwmca_tool/af_file.cc | 1 - met/src/tools/other/wwmca_tool/wwmca_ref.cc | 2 - 43 files changed, 1 insertion(+), 115 deletions(-) diff --git a/met/src/basic/vx_log/concat_string.cc b/met/src/basic/vx_log/concat_string.cc index 9fea23870b..d325f0ad8c 100644 --- a/met/src/basic/vx_log/concat_string.cc +++ b/met/src/basic/vx_log/concat_string.cc @@ -834,7 +834,6 @@ switch ( c ) { mlog << Error << "\noperator<<(ostream &, CSInlineCommand) -> " << "bad CSInlineCommand value\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/basic/vx_util/data_plane_util.cc b/met/src/basic/vx_util/data_plane_util.cc index 7b01b09f71..0004abe0f8 100644 --- a/met/src/basic/vx_util/data_plane_util.cc +++ b/met/src/basic/vx_util/data_plane_util.cc @@ -155,7 +155,6 @@ void smooth_field(const DataPlane &dp, DataPlane &smooth_dp, << interpmthd_to_string(mthd) << "(" << mthd << ")\n\n"; exit(1); - break; } // Store the smoothed value diff --git a/met/src/basic/vx_util/interp_util.cc b/met/src/basic/vx_util/interp_util.cc index 98cfa27ea4..1f1de88bea 100644 --- a/met/src/basic/vx_util/interp_util.cc +++ b/met/src/basic/vx_util/interp_util.cc @@ -1014,8 +1014,6 @@ double compute_sfc_interp(const DataPlane &dp, mlog << Error << "\ncompute_sfc_interp() -> " << "unsupported interpolation method encountered: " << interpmthd_to_string(mthd) << "(" << mthd << ")\n\n"; - exit(1); - break; } delete gt; @@ -1187,7 +1185,6 @@ double compute_horz_interp(const DataPlane &dp, << "unsupported interpolation method encountered: " << interpmthd_to_string(mthd) << "(" << mthd << ")\n\n"; exit(1); - break; } delete gt; @@ -1331,7 +1328,6 @@ DataPlane valid_time_interp(const DataPlane &in1, const DataPlane &in2, << "unsupported interpolation method encountered: " << interpmthd_to_string(mthd) << "(" << mthd << ")\n\n"; exit(1); - break; } // Initialize diff --git a/met/src/basic/vx_util/ordinal.cc b/met/src/basic/vx_util/ordinal.cc index 415a9e2634..b99768acde 100644 --- a/met/src/basic/vx_util/ordinal.cc +++ b/met/src/basic/vx_util/ordinal.cc @@ -94,7 +94,6 @@ switch ( n ) { // mlog << Error << "\nordinal_suffix() -> totally confused!\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/basic/vx_util/read_fortran_binary.cc b/met/src/basic/vx_util/read_fortran_binary.cc index 2c37d4b16a..2d2edf38b0 100644 --- a/met/src/basic/vx_util/read_fortran_binary.cc +++ b/met/src/basic/vx_util/read_fortran_binary.cc @@ -71,7 +71,6 @@ switch ( rec_pad_length ) { mlog << Error << "\n\n read_fortran_binary() -> bad record pad size ... " << rec_pad_length << "\n\n"; exit ( 1 ); - break; } @@ -179,7 +178,6 @@ switch ( rec_pad_length ) { mlog << Error << "\n\n read_fortran_binary() -> bad record pad size ... " << rec_pad_length << "\n\n"; exit ( 1 ); - break; } @@ -316,7 +314,6 @@ switch ( rec_pad_length ) { default: mlog << Error << "\n\n peek_record_size() -> bad record pad length\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/basic/vx_util/roman_numeral.cc b/met/src/basic/vx_util/roman_numeral.cc index 61af948566..5ce42c0109 100644 --- a/met/src/basic/vx_util/roman_numeral.cc +++ b/met/src/basic/vx_util/roman_numeral.cc @@ -178,7 +178,6 @@ switch ( n/modulus ) { default: // shouldn't ever happen mlog << Error << "\nrn_add() -> can't handle integer " << n << "\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/basic/vx_util/two_to_one.cc b/met/src/basic/vx_util/two_to_one.cc index 3eb7142a18..584d53a17c 100644 --- a/met/src/basic/vx_util/two_to_one.cc +++ b/met/src/basic/vx_util/two_to_one.cc @@ -643,7 +643,6 @@ switch ( k ) { mlog << Error << "\nget_two_to_one() -> " << "bad input values\n\n"; exit ( 1 ); - break; } // switch @@ -696,7 +695,6 @@ switch ( k ) { mlog << Error << "\nget_one_to_two() -> " << "bad input values\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/libcode/vx_afm/afm.cc b/met/src/libcode/vx_afm/afm.cc index 23df3616e3..a36bb6b8e3 100644 --- a/met/src/libcode/vx_afm/afm.cc +++ b/met/src/libcode/vx_afm/afm.cc @@ -1412,7 +1412,6 @@ while ( (*in) >> line ) { mlog << Error << "\nAfm::read() -> bad keyword\n\n"; tok.dump(cerr); exit ( 1 ); - break; } // switch @@ -1614,7 +1613,6 @@ while ( (*in) >> line ) { mlog << Error << "\nAfm::do_startfontmetrics() -> bad keyword\n\n"; tok.dump(cerr); exit ( 1 ); - break; } // switch @@ -1623,10 +1621,6 @@ while ( (*in) >> line ) { } // while - - - - return; } @@ -1681,21 +1675,14 @@ while ( (*in) >> line ) { mlog << Error << "\nAfm::do_startcharmetrics() -> bad keyword\n\n"; tok.dump(cerr); exit ( 1 ); - break; } // switch - if ( tok.keyword == afm_keyword_EndCharMetrics ) break; - } // while - - - - return; } @@ -1746,7 +1733,6 @@ while ( (*in) >> line ) { mlog << Error << "\nAfm::do_startkerndata() -> bad keyword\n\n"; tok.dump(cerr); exit ( 1 ); - break; } // switch @@ -1757,10 +1743,6 @@ while ( (*in) >> line ) { } // while - - - - return; } @@ -1821,23 +1803,14 @@ while ( (*in) >> line ) { mlog << Error << "\nAfm::do_startkernpairs() -> bad keyword\n\n"; tok.dump(cerr); exit ( 1 ); - break; } // switch if ( tok.keyword == afm_keyword_EndKernPairs ) break; - } // while - - - - - - - return; } @@ -1894,7 +1867,6 @@ while ( (*in) >> line ) { mlog << Error << "\nAfm::do_startcomposites() -> bad keyword\n\n"; tok.dump(cerr); exit ( 1 ); - break; } // switch @@ -1902,11 +1874,6 @@ while ( (*in) >> line ) { } // while - - - - - return; } @@ -1992,7 +1959,6 @@ while ( 1 ) { mlog << Error << "\nAfm::do_c(AfmLine &) -> bad token (2)\n\n"; tok.dump(cerr); exit ( 1 ); - break; } // switch @@ -2096,7 +2062,6 @@ while ( 1 ) { mlog << Error << "\nAfm::do_c(AfmLine &) -> bad token (2)\n\n"; tok.dump(cerr); exit ( 1 ); - break; } // switch @@ -2104,12 +2069,6 @@ while ( 1 ) { } // while - - - - - - return; } diff --git a/met/src/libcode/vx_afm/afm_token.cc b/met/src/libcode/vx_afm/afm_token.cc index 45d59be0f3..9dbf1926b4 100644 --- a/met/src/libcode/vx_afm/afm_token.cc +++ b/met/src/libcode/vx_afm/afm_token.cc @@ -239,7 +239,6 @@ switch ( type ) { mlog << Error << "\nAfmToken::as_double() const -> bad token type!\n\n"; dump(cerr); exit ( 1 ); - break; }; diff --git a/met/src/libcode/vx_analysis_util/stat_job.cc b/met/src/libcode/vx_analysis_util/stat_job.cc index dcd03688dc..c6cfafddea 100644 --- a/met/src/libcode/vx_analysis_util/stat_job.cc +++ b/met/src/libcode/vx_analysis_util/stat_job.cc @@ -1974,7 +1974,6 @@ void STATAnalysisJob::setup_stat_file(int n_row, int n) { << "unexpected stat line type \"" << statlinetype_to_string(cur_lt) << "\"!\n\n"; exit(1); - break; } if(c > n_col) n_col = c; } @@ -2052,7 +2051,6 @@ void STATAnalysisJob::setup_stat_file(int n_row, int n) { << "unexpected stat line type \"" << statlinetype_to_string(out_lt) << "\"!\n\n"; exit(1); - break; } // diff --git a/met/src/libcode/vx_data2d_factory/data2d_factory.cc b/met/src/libcode/vx_data2d_factory/data2d_factory.cc index 75664a0d1a..8f2b4fcda8 100644 --- a/met/src/libcode/vx_data2d_factory/data2d_factory.cc +++ b/met/src/libcode/vx_data2d_factory/data2d_factory.cc @@ -108,7 +108,6 @@ MetPythonDataFile * p = 0; << "Support for Python has not been compiled!\n" << "To run Python scripts, recompile with the --enable-python option.\n\n"; exit(1); - break; #endif @@ -118,7 +117,6 @@ MetPythonDataFile * p = 0; << "Support for GrdFileType = \"" << grdfiletype_to_string(type) << "\" not yet implemented!\n\n"; exit(1); - break; case FileType_Bufr: @@ -126,7 +124,6 @@ MetPythonDataFile * p = 0; << "cannot use this factory to read files of type \"" << grdfiletype_to_string(type) << "\"\n\n"; exit(1); - break; case FileType_None: // For FileType_None, silently return a NULL pointer @@ -138,7 +135,6 @@ MetPythonDataFile * p = 0; << "unsupported gridded data file type \"" << grdfiletype_to_string(type) << "\"\n\n"; exit(1); - break; } // end switch diff --git a/met/src/libcode/vx_data2d_grib/data2d_grib_utils.cc b/met/src/libcode/vx_data2d_grib/data2d_grib_utils.cc index 8e6a694bdc..337526cc4c 100644 --- a/met/src/libcode/vx_data2d_grib/data2d_grib_utils.cc +++ b/met/src/libcode/vx_data2d_grib/data2d_grib_utils.cc @@ -664,7 +664,6 @@ void read_pds(const GribRecord &r, int &bms_flag, << "unexpected time unit of " << (int) pds->fcst_unit << ".\n\n"; exit(1); - break; } // @@ -735,7 +734,6 @@ void read_pds(const GribRecord &r, int &bms_flag, << "unexpected time range indicator of " << (int) pds->tri << ".\n\n"; exit(1); - break; } return; diff --git a/met/src/libcode/vx_data2d_grib/grib_strings.cc b/met/src/libcode/vx_data2d_grib/grib_strings.cc index 2380f10c2f..37a0152c7c 100644 --- a/met/src/libcode/vx_data2d_grib/grib_strings.cc +++ b/met/src/libcode/vx_data2d_grib/grib_strings.cc @@ -124,7 +124,6 @@ ConcatString get_grib_level_list_str(int k, int grib_level) << "unexpected value for k: " << k << "\n\n"; exit(1); - break; } // switch diff --git a/met/src/libcode/vx_data2d_python/data2d_python.cc b/met/src/libcode/vx_data2d_python/data2d_python.cc index 97fab35c6a..3aca4f0119 100644 --- a/met/src/libcode/vx_data2d_python/data2d_python.cc +++ b/met/src/libcode/vx_data2d_python/data2d_python.cc @@ -208,7 +208,6 @@ switch ( Type ) { // assumes Type is already set << "MetPythonDataFile::open(const char * script_filename) -> bad file type: " << grdfiletype_to_string(Type) << "\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/libcode/vx_grid/st_grid.cc b/met/src/libcode/vx_grid/st_grid.cc index 64ed1a062d..65246ae5fc 100644 --- a/met/src/libcode/vx_grid/st_grid.cc +++ b/met/src/libcode/vx_grid/st_grid.cc @@ -96,7 +96,6 @@ switch ( data.hemisphere ) { mlog << Error << "\nStereographicGrid::StereographicGrid(const StereographicData &) -> " << "bad hemisphere ...\"" << (data.hemisphere) << "\"\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/libcode/vx_pb_util/do_blocking.cc b/met/src/libcode/vx_pb_util/do_blocking.cc index 814da8beb5..1e3d48d6dc 100644 --- a/met/src/libcode/vx_pb_util/do_blocking.cc +++ b/met/src/libcode/vx_pb_util/do_blocking.cc @@ -131,7 +131,6 @@ switch ( padsize ) { mlog << Error << "\nwrite_pad() -> " << "bad pad size\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/libcode/vx_pb_util/do_unblocking.cc b/met/src/libcode/vx_pb_util/do_unblocking.cc index f4d5af6cf2..6e8b6b250f 100644 --- a/met/src/libcode/vx_pb_util/do_unblocking.cc +++ b/met/src/libcode/vx_pb_util/do_unblocking.cc @@ -99,7 +99,6 @@ switch ( padsize ) { mlog << Error << "\nread_pad() -> " << "bad pad size\n\n"; exit ( 1 ); - break; } // switch @@ -132,7 +131,6 @@ switch ( padsize ) { mlog << Error << "\nread_pad() -> " << "bad pad size\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/libcode/vx_pb_util/pblock.cc b/met/src/libcode/vx_pb_util/pblock.cc index 26196a8421..643dc06540 100644 --- a/met/src/libcode/vx_pb_util/pblock.cc +++ b/met/src/libcode/vx_pb_util/pblock.cc @@ -79,7 +79,6 @@ void pblock(const char *infile, const char *outfile, Action action) { << "unexpected action requested!\n\n"; exit(1); - break; } // diff --git a/met/src/libcode/vx_ps/vx_ps.cc b/met/src/libcode/vx_ps/vx_ps.cc index 68d311077b..668efdbaba 100644 --- a/met/src/libcode/vx_ps/vx_ps.cc +++ b/met/src/libcode/vx_ps/vx_ps.cc @@ -290,7 +290,6 @@ switch ( Orientation ) { mlog << Error << "\nvoid PSfile::do_prolog() -> bad document orientation ... " << documentorientation_to_string(Orientation) << "\n\n"; exit ( 1 ); - break; } @@ -303,7 +302,6 @@ switch ( Media ) { mlog << Error << "\nvoid PSfile::do_prolog() -> bad document media ... " << documentmedia_to_string(Media) << "\n\n"; exit ( 1 ); - break; } @@ -708,7 +706,6 @@ switch ( fill_flag ) { mlog << Error << "\nPSfile::write_single_node() -> " << "unrecognized fill flag: \"" << fill_flag << "\"\n\n"; exit ( 1 ); - break; } // switch @@ -1154,7 +1151,6 @@ switch ( Media ) { mlog << Error << "\nPSfile::set_media(DocumentMedia) -> bad media size ... " << documentmedia_to_string(Media) << "\n\n"; exit ( 1 ); - break; } @@ -1469,7 +1465,6 @@ switch ( f ) { mlog << Error << "\n\n PSfile::set_family(FontFamily) -> bad font family ... " << fontfamily_to_string(f) << "\n\n"; exit ( 1 ); - break; } // switch @@ -1971,7 +1966,6 @@ switch ( f ) { mlog << Error << "\n\n ff_to_roman() -> bad font family ... " << fontfamily_to_string(f) << "\n\n"; exit ( 1 ); - break; } // switch @@ -2005,7 +1999,6 @@ switch ( f ) { mlog << Error << "\n\n ff_to_italic() -> bad font family ... " << fontfamily_to_string(f) << "\n\n"; exit ( 1 ); - break; } // switch @@ -2039,7 +2032,6 @@ switch ( f ) { mlog << Error << "\n\n ff_to_bold() -> bad font family ... " << fontfamily_to_string(f) << "\n\n"; exit ( 1 ); - break; } // switch @@ -2073,7 +2065,6 @@ switch ( f ) { mlog << Error << "\n\n ff_to_bolditalic() -> bad font family ... " << fontfamily_to_string(f) << "\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/libcode/vx_regrid/vx_regrid.cc b/met/src/libcode/vx_regrid/vx_regrid.cc index 1094fd6c86..0a7da68e3e 100644 --- a/met/src/libcode/vx_regrid/vx_regrid.cc +++ b/met/src/libcode/vx_regrid/vx_regrid.cc @@ -64,7 +64,6 @@ switch ( info.method ) { << "bad interpolation method ... " << interpmthd_to_string(info.method) << "\n\n"; exit(1); - break; } // switch info.method diff --git a/met/src/libcode/vx_render/render_pbm.cc b/met/src/libcode/vx_render/render_pbm.cc index af98e535fd..979c3bb12c 100644 --- a/met/src/libcode/vx_render/render_pbm.cc +++ b/met/src/libcode/vx_render/render_pbm.cc @@ -102,7 +102,6 @@ for (j=0; j<(info.n_filters()); ++j) { default: mlog << Error << "\nrender()(pbm) -> bad filter: \"" << (info.filter(j)) << "\"\n\n"; exit ( 1 ); - break; } // switch @@ -161,7 +160,6 @@ for (j=(info.n_filters() - 1); j>= 0; --j) { default: mlog << Error << "\nrender() -> bad filter: \"" << (info.filter(j)) << "\"\n\n"; exit ( 1 ); - break; } // swtich diff --git a/met/src/libcode/vx_render/render_pcm.cc b/met/src/libcode/vx_render/render_pcm.cc index 3246800645..eb8e82bb4b 100644 --- a/met/src/libcode/vx_render/render_pcm.cc +++ b/met/src/libcode/vx_render/render_pcm.cc @@ -90,7 +90,6 @@ for (j=0; j<(info.n_filters()); ++j) { default: mlog << Error << "\nrender_color_24() -> bad filter: \"" << (info.filter(j)) << "\"\n\n"; exit ( 1 ); - break; } // switch @@ -150,7 +149,6 @@ for (j=(info.n_filters() - 1); j>= 0; --j) { default: mlog << Error << "\nrender() -> bad filter: \"" << (info.filter(j)) << "\"\n\n"; exit ( 1 ); - break; } // swtich diff --git a/met/src/libcode/vx_render/render_pgm.cc b/met/src/libcode/vx_render/render_pgm.cc index 9a199c6d47..76f2d4a33e 100644 --- a/met/src/libcode/vx_render/render_pgm.cc +++ b/met/src/libcode/vx_render/render_pgm.cc @@ -86,7 +86,6 @@ for (j=0; j<(info.n_filters()); ++j) { default: mlog << Error << "\nrender()(pgm) -> bad filter: \"" << (info.filter(j)) << "\"\n\n"; exit ( 1 ); - break; } // switch @@ -145,7 +144,6 @@ for (j=(info.n_filters() - 1); j>= 0; --j) { default: mlog << Error << "\nrender() -> bad filter: \"" << (info.filter(j)) << "\"\n\n"; exit ( 1 ); - break; } // swtich diff --git a/met/src/libcode/vx_render/render_ppm.cc b/met/src/libcode/vx_render/render_ppm.cc index 2b1a63ff6c..20d9f2e1ad 100644 --- a/met/src/libcode/vx_render/render_ppm.cc +++ b/met/src/libcode/vx_render/render_ppm.cc @@ -77,7 +77,6 @@ for (j=0; j<(info.n_filters()); ++j) { default: mlog << Error << "\nrender()(ppm) -> bad filter: \"" << (info.filter(j)) << "\"\n\n"; exit ( 1 ); - break; } // switch @@ -140,7 +139,6 @@ for (j=(info.n_filters() - 1); j>= 0; --j) { default: mlog << Error << "\nrender() -> bad filter: \"" << (info.filter(j)) << "\"\n\n"; exit ( 1 ); - break; } // swtich diff --git a/met/src/libcode/vx_render/rle_filter.cc b/met/src/libcode/vx_render/rle_filter.cc index 39607b27b7..951c974d3a 100644 --- a/met/src/libcode/vx_render/rle_filter.cc +++ b/met/src/libcode/vx_render/rle_filter.cc @@ -76,7 +76,6 @@ switch ( mode ) { default: mlog << Error << "\nRunLengthEncodeFilter::eat(unsigned char) -> bad mode\n\n"; exit ( 1 ); - break; } diff --git a/met/src/libcode/vx_shapedata/shapedata.cc b/met/src/libcode/vx_shapedata/shapedata.cc index 4a0016ea59..319aa69e81 100644 --- a/met/src/libcode/vx_shapedata/shapedata.cc +++ b/met/src/libcode/vx_shapedata/shapedata.cc @@ -1801,7 +1801,6 @@ void boundary_step(const ShapeData &sd, int &xn, int &yn, int &direction) { mlog << Error << "\nboundary_step() -> " << "bad direction: " << direction << "\n\n"; exit(1); - break; } // @@ -1836,7 +1835,6 @@ void boundary_step(const ShapeData &sd, int &xn, int &yn, int &direction) { << "bad step case: " << get_step_case(lr, ur, ul, ll) << "\n\n"; exit(1); - break; } return; diff --git a/met/src/libcode/vx_statistics/pair_data_point.cc b/met/src/libcode/vx_statistics/pair_data_point.cc index 361939a010..daa40d1e9d 100644 --- a/met/src/libcode/vx_statistics/pair_data_point.cc +++ b/met/src/libcode/vx_statistics/pair_data_point.cc @@ -1476,7 +1476,6 @@ bool check_fo_thresh(double f, double o, double cmn, double csd, mlog << Error << "\ncheck_fo_thresh() -> " << "Unexpected SetLogic value of " << type << ".\n\n"; exit(1); - break; } return(status); diff --git a/met/src/libcode/vx_tc_util/track_point.cc b/met/src/libcode/vx_tc_util/track_point.cc index 17946957f0..c3ae422777 100644 --- a/met/src/libcode/vx_tc_util/track_point.cc +++ b/met/src/libcode/vx_tc_util/track_point.cc @@ -270,7 +270,6 @@ void QuadInfo::set_quad_vals(QuadrantType ref_quad, << "unexpected quadrant type encountered \"" << quadranttype_to_string(ref_quad) << "\".\n\n"; exit(1); - break; } return; diff --git a/met/src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc b/met/src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc index ff21bcd27d..c3d1235197 100644 --- a/met/src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc +++ b/met/src/tools/core/ensemble_stat/ensemble_stat_conf_info.cc @@ -1023,7 +1023,6 @@ int EnsembleStatVxOpt::n_txt_row(int i_txt_row) const { << "unexpected output type index value: " << i_txt_row << "\n\n"; exit(1); - break; } return(n); diff --git a/met/src/tools/core/grid_stat/grid_stat_conf_info.cc b/met/src/tools/core/grid_stat/grid_stat_conf_info.cc index 0bae27039c..d26a5fe088 100644 --- a/met/src/tools/core/grid_stat/grid_stat_conf_info.cc +++ b/met/src/tools/core/grid_stat/grid_stat_conf_info.cc @@ -1108,7 +1108,6 @@ int GridStatVxOpt::n_txt_row(int i_txt_row) const { << "unexpected output type index value: " << i_txt_row << "\n\n"; exit(1); - break; } return(n); 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 02cb465771..e56352d4ad 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 @@ -1241,7 +1241,6 @@ int PointStatVxOpt::n_txt_row(int i_txt_row) const { << "unexpected output type index value: " << i_txt_row << "\n\n"; exit(1); - break; } return(n); diff --git a/met/src/tools/core/series_analysis/series_analysis.cc b/met/src/tools/core/series_analysis/series_analysis.cc index f00ce209ea..11462290e2 100644 --- a/met/src/tools/core/series_analysis/series_analysis.cc +++ b/met/src/tools/core/series_analysis/series_analysis.cc @@ -479,7 +479,6 @@ void get_series_data(int i_series, << "unexpected SeriesType value: " << series_type << "\n\n"; exit(1); - break; } // Setup the verification grid diff --git a/met/src/tools/other/gen_vx_mask/gen_vx_mask.cc b/met/src/tools/other/gen_vx_mask/gen_vx_mask.cc index 18eabfd993..3b20c7ad60 100644 --- a/met/src/tools/other/gen_vx_mask/gen_vx_mask.cc +++ b/met/src/tools/other/gen_vx_mask/gen_vx_mask.cc @@ -391,7 +391,6 @@ void process_mask_file(DataPlane &dp) { mlog << Error << "\nprocess_mask_file() -> " << "Unxpected MaskType value (" << mask_type << ")\n\n"; exit(1); - break; } // Clean up diff --git a/met/src/tools/other/gis_utils/gis_dump_shp.cc b/met/src/tools/other/gis_utils/gis_dump_shp.cc index a9ecb7c350..b41841931b 100644 --- a/met/src/tools/other/gis_utils/gis_dump_shp.cc +++ b/met/src/tools/other/gis_utils/gis_dump_shp.cc @@ -144,7 +144,6 @@ switch ( shape_type ) { << "\n\n " << program_name << ": shape file type \"" << shapetype_to_string(shape_type) << "\" is not supported\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/tools/other/lidar2nc/hdf_utils.cc b/met/src/tools/other/lidar2nc/hdf_utils.cc index d7cd7d5740..165d500bc3 100644 --- a/met/src/tools/other/lidar2nc/hdf_utils.cc +++ b/met/src/tools/other/lidar2nc/hdf_utils.cc @@ -152,7 +152,6 @@ switch ( type ) { mlog << Error << "sizeof_hdf_type() -> unrecognized hdf data type\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/tools/other/lidar2nc/lidar2nc.cc b/met/src/tools/other/lidar2nc/lidar2nc.cc index 547692cf24..4ee2e1adb9 100644 --- a/met/src/tools/other/lidar2nc/lidar2nc.cc +++ b/met/src/tools/other/lidar2nc/lidar2nc.cc @@ -252,7 +252,6 @@ switch ( hdf_type ) { << program_name << ": hdf_type_to_nc_type() -> unrecognized hdf data type ... " << hdf_type << "\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/tools/other/madis2nc/madis2nc.cc b/met/src/tools/other/madis2nc/madis2nc.cc index 47c327eb06..29c5479f40 100644 --- a/met/src/tools/other/madis2nc/madis2nc.cc +++ b/met/src/tools/other/madis2nc/madis2nc.cc @@ -335,7 +335,6 @@ void process_madis_file(const char *madis_file) { << "MADIS type (" << my_mtype << ") not currently supported.\n\n"; exit(1); - break; } // Close the input NetCDF file diff --git a/met/src/tools/other/mode_graphics/cgraph_main.cc b/met/src/tools/other/mode_graphics/cgraph_main.cc index 6ed1092825..2e596a23b4 100644 --- a/met/src/tools/other/mode_graphics/cgraph_main.cc +++ b/met/src/tools/other/mode_graphics/cgraph_main.cc @@ -292,7 +292,6 @@ switch ( Ptype ) { << cgraphbase_plottype_to_string(Ptype) << " is not yet supported.\n\n"; exit ( 1 ); - break; } // switch @@ -1035,7 +1034,6 @@ if ( render_flag ) { mlog << Error << "\n\n CgraphBase::write_centered_text() -> fill_flag " << fill_flag << " is not supported\n\n"; exit ( 1 ); - break; } // switch @@ -1461,7 +1459,6 @@ switch ( k ) { default: mlog << Error << "\n\n CgraphBase::setlinecap(int) -> bad value ... " << k << "\n\n"; exit ( 1 ); - break; } // switch @@ -1495,7 +1492,6 @@ switch ( k ) { default: mlog << Error << "\n\n CgraphBase::setlinejoin(int) -> bad value ... " << k << "\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/tools/other/mode_graphics/mode_nc_output_file.cc b/met/src/tools/other/mode_graphics/mode_nc_output_file.cc index 708ece18cf..641bf1b408 100644 --- a/met/src/tools/other/mode_graphics/mode_nc_output_file.cc +++ b/met/src/tools/other/mode_graphics/mode_nc_output_file.cc @@ -725,7 +725,6 @@ for (x=0; x bad field\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/tools/other/mode_graphics/plot_mode_field.cc b/met/src/tools/other/mode_graphics/plot_mode_field.cc index 51516be279..23f12ba4bc 100644 --- a/met/src/tools/other/mode_graphics/plot_mode_field.cc +++ b/met/src/tools/other/mode_graphics/plot_mode_field.cc @@ -472,10 +472,9 @@ switch ( plot_field ) { n_obs = mode_in.n_obs_clus_objs(); break; - default: + default: mlog << Error << "\n\n " << program_name << ": do_plot() -> bad field selected\n\n"; exit ( 1 ); - break; } // switch @@ -1329,7 +1328,6 @@ switch ( plot_field ) { default: mlog << Error << "\n\n " << program_name << ": annotate() -> bad plot field\n\n"; exit ( 1 ); - break; } diff --git a/met/src/tools/other/modis_regrid/cloudsat_swath_file.cc b/met/src/tools/other/modis_regrid/cloudsat_swath_file.cc index 49d6fc5d4d..c3d60ab1ab 100644 --- a/met/src/tools/other/modis_regrid/cloudsat_swath_file.cc +++ b/met/src/tools/other/modis_regrid/cloudsat_swath_file.cc @@ -401,7 +401,6 @@ for (j=0; j bad number type ... " << numbertype_to_string(Numbertype) << "\n\n"; exit ( 1 ); - break; } // switch @@ -573,7 +572,6 @@ switch ( Numbertype ) { << "\n\n SatAttribute::set_value() -> bad numbertype ... " << numbertype_to_string(Numbertype) << "\n\n"; exit ( 1 ); - break; } // switch diff --git a/met/src/tools/other/wwmca_tool/af_file.cc b/met/src/tools/other/wwmca_tool/af_file.cc index 8e42f35045..1a60ecd0f8 100644 --- a/met/src/tools/other/wwmca_tool/af_file.cc +++ b/met/src/tools/other/wwmca_tool/af_file.cc @@ -163,7 +163,6 @@ switch ( Hemisphere ) { default: mlog << Error << "\nAFDataFile::assign(const AFDataFile &) -> bad hemisphere ... " << Hemisphere << "\n\n"; exit ( 1 ); - break; } diff --git a/met/src/tools/other/wwmca_tool/wwmca_ref.cc b/met/src/tools/other/wwmca_tool/wwmca_ref.cc index 828e517485..ab52792d8b 100644 --- a/met/src/tools/other/wwmca_tool/wwmca_ref.cc +++ b/met/src/tools/other/wwmca_tool/wwmca_ref.cc @@ -384,7 +384,6 @@ if ( Width > 1 ) { << "\n\n WwmcaRegridder::set_config(MetConfig & wc, const char * config_filename) -> " << "bad interpolation method ... " << interpmthd_to_string(Method) << "\n\n"; exit ( 1 ); - break; } // switch @@ -479,7 +478,6 @@ switch ( Hemi ) { mlog << Error << "\nWwmcaRegridder::get_interpolated_data(DataPlane &) const -> " << "bad hemisphere ... " << junk << "\n\n"; exit ( 1 ); - break; } // switch From ce3fcee8f03fe2910cf3c5760d52029adf035463 Mon Sep 17 00:00:00 2001 From: johnhg Date: Mon, 2 Aug 2021 10:52:25 -0600 Subject: [PATCH 27/27] Update pcp_combine.cc --- met/src/tools/core/pcp_combine/pcp_combine.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/met/src/tools/core/pcp_combine/pcp_combine.cc b/met/src/tools/core/pcp_combine/pcp_combine.cc index 98353430b2..56d24002b5 100644 --- a/met/src/tools/core/pcp_combine/pcp_combine.cc +++ b/met/src/tools/core/pcp_combine/pcp_combine.cc @@ -1321,7 +1321,8 @@ void write_nc_data(unixtime nc_init, unixtime nc_valid, int nc_accum, NcVar nc_var; if (!var_info) { - mlog << Error << "\nwrite_nc_data() var_info is null.\n\n"; + mlog << Error << "\nwrite_nc_data() -> " + << "var_info is null.\n\n"; exit(1); }