diff --git a/met/src/libcode/vx_data2d_nccf/nccf_file.cc b/met/src/libcode/vx_data2d_nccf/nccf_file.cc index a43c25fcb5..f948800ef1 100644 --- a/met/src/libcode/vx_data2d_nccf/nccf_file.cc +++ b/met/src/libcode/vx_data2d_nccf/nccf_file.cc @@ -375,6 +375,7 @@ bool NcCfFile::open(const char * filepath) } } } + delete [] time_values; } NcVar init_time_var = get_var(_ncFile, "forecast_reference_time"); diff --git a/met/src/libcode/vx_grid/gaussian_grid.cc b/met/src/libcode/vx_grid/gaussian_grid.cc index c44bd8a3dd..6a175077a4 100644 --- a/met/src/libcode/vx_grid/gaussian_grid.cc +++ b/met/src/libcode/vx_grid/gaussian_grid.cc @@ -157,20 +157,18 @@ for (j=0; j max_filters ) { +if ( Nfilters >= max_filters ) { mlog << Error << "\nRenderInfo::add_filter() -> " << "too many filters!\n\n"; diff --git a/met/src/tools/tc_utils/rmw_analysis/rmw_analysis.cc b/met/src/tools/tc_utils/rmw_analysis/rmw_analysis.cc index 5965ba8c84..5f02d8bb34 100644 --- a/met/src/tools/tc_utils/rmw_analysis/rmw_analysis.cc +++ b/met/src/tools/tc_utils/rmw_analysis/rmw_analysis.cc @@ -243,41 +243,26 @@ void setup() { // Initialize statistical data cube lists for(int i_var = 0; i_var < data_names.size(); i_var++) { - // Size data cubes - DataCube* data_count_2d = new DataCube(); - DataCube* data_count_3d = new DataCube(); - DataCube* data_mean_2d = new DataCube(); - DataCube* data_mean_3d = new DataCube(); - DataCube* data_stdev_2d = new DataCube(); - DataCube* data_stdev_3d = new DataCube(); - DataCube* data_max_2d = new DataCube(); - DataCube* data_max_3d = new DataCube(); - DataCube* data_min_2d = new DataCube(); - DataCube* data_min_3d = new DataCube(); - - data_count_2d->set_size(n_range, n_azimuth, 1); - data_count_3d->set_size(n_range, n_azimuth, n_level); - data_mean_2d->set_size(n_range, n_azimuth, 1); - data_mean_3d->set_size(n_range, n_azimuth, n_level); - data_stdev_2d->set_size(n_range, n_azimuth, 1); - data_stdev_3d->set_size(n_range, n_azimuth, n_level); - data_max_2d->set_size(n_range, n_azimuth, 1); - data_max_3d->set_size(n_range, n_azimuth, n_level); - data_min_2d->set_size(n_range, n_azimuth, 1); - data_min_3d->set_size(n_range, n_azimuth, n_level); - - data_count_2d->set_constant(0); - data_count_3d->set_constant(0); - data_mean_2d->set_constant(0); - data_mean_3d->set_constant(0); - data_stdev_2d->set_constant(0); - data_stdev_3d->set_constant(0); - data_max_2d->set_constant(-1.0e6); - data_max_3d->set_constant(-1.0e6); - data_min_2d->set_constant(1.0e6); - data_min_3d->set_constant(1.0e6); - if (data_n_dims[i_var] == 2) { + // Size data cubes + DataCube* data_count_2d = new DataCube(); + DataCube* data_mean_2d = new DataCube(); + DataCube* data_stdev_2d = new DataCube(); + DataCube* data_max_2d = new DataCube(); + DataCube* data_min_2d = new DataCube(); + + data_count_2d->set_size(n_range, n_azimuth, 1); + data_mean_2d->set_size(n_range, n_azimuth, 1); + data_stdev_2d->set_size(n_range, n_azimuth, 1); + data_max_2d->set_size(n_range, n_azimuth, 1); + data_min_2d->set_size(n_range, n_azimuth, 1); + + data_count_2d->set_constant(0); + data_mean_2d->set_constant(0); + data_stdev_2d->set_constant(0); + data_max_2d->set_constant(-1.0e6); + data_min_2d->set_constant(1.0e6); + data_counts.push_back(data_count_2d); data_means.push_back(data_mean_2d); data_stdevs.push_back(data_stdev_2d); @@ -285,6 +270,25 @@ void setup() { data_maxs.push_back(data_max_2d); } if (data_n_dims[i_var] == 3) { + // Size data cubes + DataCube* data_count_3d = new DataCube(); + DataCube* data_mean_3d = new DataCube(); + DataCube* data_stdev_3d = new DataCube(); + DataCube* data_max_3d = new DataCube(); + DataCube* data_min_3d = new DataCube(); + + data_count_3d->set_size(n_range, n_azimuth, n_level); + data_mean_3d->set_size(n_range, n_azimuth, n_level); + data_stdev_3d->set_size(n_range, n_azimuth, n_level); + data_max_3d->set_size(n_range, n_azimuth, n_level); + data_min_3d->set_size(n_range, n_azimuth, n_level); + + data_count_3d->set_constant(0); + data_mean_3d->set_constant(0); + data_stdev_3d->set_constant(0); + data_max_3d->set_constant(-1.0e6); + data_min_3d->set_constant(1.0e6); + data_counts.push_back(data_count_3d); data_means.push_back(data_mean_3d); data_stdevs.push_back(data_stdev_3d);