From df8c204ecc9414837870d3856ce5399378a3e6f6 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Fri, 11 Feb 2022 11:28:35 -0700 Subject: [PATCH] Per #2040, still not compiling... just doing a bit of cleanup. --- met/src/libcode/vx_data2d_nc_met/met_file.cc | 34 ++------------------ met/src/libcode/vx_data2d_nc_met/met_file.h | 13 -------- met/src/libcode/vx_nc_util/nc_var_info.cc | 14 +++----- 3 files changed, 8 insertions(+), 53 deletions(-) diff --git a/met/src/libcode/vx_data2d_nc_met/met_file.cc b/met/src/libcode/vx_data2d_nc_met/met_file.cc index 4c72eb5df8..dd8f599c48 100644 --- a/met/src/libcode/vx_data2d_nc_met/met_file.cc +++ b/met/src/libcode/vx_data2d_nc_met/met_file.cc @@ -201,9 +201,6 @@ Nvars = 0; if ( Var ) { delete [] Var; Var = (NcVarInfo *) 0; } -//ValidTime = (unixtime) 0; -//InitTime = (unixtime) 0; - // // done // @@ -298,11 +295,8 @@ for (j=0; jvar, a, plane); // store the times // -//JAP -//plane.set_init ( ValidTime - lead_time() ); -//plane.set_valid ( ValidTime ); -plane.set_init ( info->ValidTime - info->lead_time() ); +plane.set_init ( info->InitTime ); plane.set_valid ( info->ValidTime ); plane.set_lead ( info->lead_time() ); plane.set_accum ( info->AccumTime ); diff --git a/met/src/libcode/vx_data2d_nc_met/met_file.h b/met/src/libcode/vx_data2d_nc_met/met_file.h index 7b16ed2722..8510aa3159 100644 --- a/met/src/libcode/vx_data2d_nc_met/met_file.h +++ b/met/src/libcode/vx_data2d_nc_met/met_file.h @@ -59,21 +59,8 @@ class MetNcFile { void dump(ostream &, int = 0) const; - NcFile * Nc; // allocated - // - // time - // - - //JAP - //unixtime ValidTime; - - //unixtime InitTime; - - //int lead_time () const; // seconds - - // // dimensions // diff --git a/met/src/libcode/vx_nc_util/nc_var_info.cc b/met/src/libcode/vx_nc_util/nc_var_info.cc index 3435323534..d41d7c8762 100644 --- a/met/src/libcode/vx_nc_util/nc_var_info.cc +++ b/met/src/libcode/vx_nc_util/nc_var_info.cc @@ -179,8 +179,6 @@ void NcVarInfo::dump(ostream & out, int depth) const { -ConcatString time_str; - Indent prefix(depth); out << prefix << "var = "; @@ -205,11 +203,11 @@ else out << "(nul)"; if ( units_att.length() > 0 ) out << '\"' << units_att << '\"'; else out << "(nul)"; -time_str = unix_to_yyyymmdd_hhmmss(ValidTime); -out << prefix << "ValidTime = " << time_str << " (" << ValidTime << ")\n"; +out << prefix << "ValidTime = " << unix_to_yyyymmdd_hhmmss(ValidTime) + << " (" << ValidTime << ")\n"; -time_str = unix_to_yyyymmdd_hhmmss(InitTime); -out << prefix << "InitTime = " << time_str << " (" << InitTime << ")\n"; +out << prefix << "InitTime = " << unix_to_yyyymmdd_hhmmss(InitTime) + << " (" << InitTime << ")\n"; out << prefix << "AccumTime = " << AccumTime; @@ -251,9 +249,7 @@ int NcVarInfo::lead_time() const { -unixtime dt = ValidTime - InitTime; - -return ( (int) dt ); +return ( (int) (ValidTime - InitTime) ); }