diff --git a/src/libcode/vx_data2d_grib/var_info_grib.cc b/src/libcode/vx_data2d_grib/var_info_grib.cc index cfe81f5a4a..e6bb74198f 100644 --- a/src/libcode/vx_data2d_grib/var_info_grib.cc +++ b/src/libcode/vx_data2d_grib/var_info_grib.cc @@ -74,13 +74,14 @@ VarInfoGrib & VarInfoGrib::operator=(const VarInfoGrib &f) { } /////////////////////////////////////////////////////////////////////////////// -VarInfo *VarInfoGrib::clone() const -{ + +VarInfo *VarInfoGrib::clone() const { + VarInfoGrib *ret = new VarInfoGrib(*this); + return (VarInfo *)ret; } - /////////////////////////////////////////////////////////////////////////////// void VarInfoGrib::init_from_scratch() { diff --git a/src/libcode/vx_data2d_grib2/var_info_grib2.cc b/src/libcode/vx_data2d_grib2/var_info_grib2.cc index ab159b3407..ef3a3c7db6 100644 --- a/src/libcode/vx_data2d_grib2/var_info_grib2.cc +++ b/src/libcode/vx_data2d_grib2/var_info_grib2.cc @@ -77,9 +77,10 @@ VarInfoGrib2 & VarInfoGrib2::operator=(const VarInfoGrib2 &f) { /////////////////////////////////////////////////////////////////////////////// -VarInfo *VarInfoGrib2::clone() const -{ +VarInfo *VarInfoGrib2::clone() const { + VarInfoGrib2 *ret = new VarInfoGrib2(*this); + return (VarInfo *)ret; } diff --git a/src/libcode/vx_data2d_nc_cf/var_info_nc_cf.cc b/src/libcode/vx_data2d_nc_cf/var_info_nc_cf.cc index a1a4e6eba0..dba8bd4ec5 100644 --- a/src/libcode/vx_data2d_nc_cf/var_info_nc_cf.cc +++ b/src/libcode/vx_data2d_nc_cf/var_info_nc_cf.cc @@ -76,9 +76,10 @@ VarInfoNcCF & VarInfoNcCF::operator=(const VarInfoNcCF &f) { /////////////////////////////////////////////////////////////////////////////// -VarInfo *VarInfoNcCF::clone() const -{ +VarInfo *VarInfoNcCF::clone() const { + VarInfoNcCF *ret = new VarInfoNcCF(*this); + return (VarInfo *)ret; } diff --git a/src/libcode/vx_data2d_nc_met/var_info_nc_met.cc b/src/libcode/vx_data2d_nc_met/var_info_nc_met.cc index dcfbdd9da2..c1624d8785 100644 --- a/src/libcode/vx_data2d_nc_met/var_info_nc_met.cc +++ b/src/libcode/vx_data2d_nc_met/var_info_nc_met.cc @@ -75,9 +75,11 @@ VarInfoNcMet & VarInfoNcMet::operator=(const VarInfoNcMet &f) { } /////////////////////////////////////////////////////////////////////////////// -VarInfo *VarInfoNcMet::clone() const -{ + +VarInfo *VarInfoNcMet::clone() const { + VarInfoNcMet *ret = new VarInfoNcMet(*this); + return (VarInfo *)ret; } diff --git a/src/libcode/vx_data2d_nc_wrf/var_info_nc_wrf.cc b/src/libcode/vx_data2d_nc_wrf/var_info_nc_wrf.cc index e2d12532f4..351ddf302a 100644 --- a/src/libcode/vx_data2d_nc_wrf/var_info_nc_wrf.cc +++ b/src/libcode/vx_data2d_nc_wrf/var_info_nc_wrf.cc @@ -75,6 +75,7 @@ VarInfoNcWrf & VarInfoNcWrf::operator=(const VarInfoNcWrf &f) { VarInfo *VarInfoNcWrf::clone() const { VarInfoNcWrf *ret = new VarInfoNcWrf(*this); + return (VarInfo *)ret; } diff --git a/src/libcode/vx_data2d_python/var_info_python.cc b/src/libcode/vx_data2d_python/var_info_python.cc index 5454c58454..74d8767816 100644 --- a/src/libcode/vx_data2d_python/var_info_python.cc +++ b/src/libcode/vx_data2d_python/var_info_python.cc @@ -75,9 +75,10 @@ VarInfoPython & VarInfoPython::operator=(const VarInfoPython &f) { /////////////////////////////////////////////////////////////////////////////// -VarInfo *VarInfoPython::clone() const -{ +VarInfo *VarInfoPython::clone() const { + VarInfoPython *ret = new VarInfoPython(*this); + return (VarInfo *)ret; } diff --git a/src/libcode/vx_data2d_ugrid/var_info_ugrid.cc b/src/libcode/vx_data2d_ugrid/var_info_ugrid.cc index 2fdf681b2e..9e74762a48 100644 --- a/src/libcode/vx_data2d_ugrid/var_info_ugrid.cc +++ b/src/libcode/vx_data2d_ugrid/var_info_ugrid.cc @@ -32,7 +32,6 @@ using namespace std; - /////////////////////////////////////////////////////////////////////////////// static bool is_grib_code_abbr_match(const ConcatString &, int); @@ -77,9 +76,10 @@ VarInfoUGrid & VarInfoUGrid::operator=(const VarInfoUGrid &f) { /////////////////////////////////////////////////////////////////////////////// -VarInfo *VarInfoUGrid::clone() const -{ +VarInfo *VarInfoUGrid::clone() const { + VarInfoUGrid *ret = new VarInfoUGrid(*this); + return (VarInfo *)ret; } diff --git a/src/libcode/vx_shapedata/engine.cc b/src/libcode/vx_shapedata/engine.cc index c5bcdf9b46..6087bf62bd 100644 --- a/src/libcode/vx_shapedata/engine.cc +++ b/src/libcode/vx_shapedata/engine.cc @@ -1004,14 +1004,13 @@ void ModeFuzzyEngine::do_obs_merging(const ShapeData &merge_data) if(need_obs_thresh) do_obs_thresholding(); if(!need_obs_merge) return; - + if (obs_thresh->data.nx() != merge_data.data.nx() || obs_thresh->data.ny() != merge_data.data.ny()) { mlog << Error << "\nModeFuzzyEngine::do_obs_merging() -> " << "inconsistent array dims\n\n"; exit(1); } - if(conf_info.Obs->merge_flag == MergeType_Both || conf_info.Obs->merge_flag == MergeType_Thresh) @@ -1020,7 +1019,7 @@ void ModeFuzzyEngine::do_obs_merging(const ShapeData &merge_data) if(conf_info.Obs->merge_flag == MergeType_Both || conf_info.Obs->merge_flag == MergeType_Engine) do_obs_merge_engine("", ""); - + // // Done // diff --git a/src/libcode/vx_shapedata/engine.h b/src/libcode/vx_shapedata/engine.h index 0b8241110a..50d67628cf 100644 --- a/src/libcode/vx_shapedata/engine.h +++ b/src/libcode/vx_shapedata/engine.h @@ -225,6 +225,7 @@ class ModeFuzzyEngine { // traditional version void do_obs_merging(const char *default_config, const char *merge_config); + // multivar version void do_obs_merging(const ShapeData &merge_data);