Skip to content

Commit

Permalink
Per #2040, still not compiling... just doing a bit of cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway committed Feb 11, 2022
1 parent 0afe640 commit df8c204
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 53 deletions.
34 changes: 3 additions & 31 deletions met/src/libcode/vx_data2d_nc_met/met_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,6 @@ Nvars = 0;

if ( Var ) { delete [] Var; Var = (NcVarInfo *) 0; }

//ValidTime = (unixtime) 0;
//InitTime = (unixtime) 0;

//
// done
//
Expand Down Expand Up @@ -298,11 +295,8 @@ for (j=0; j<Ndims; ++j) {
if ( is_bad_data(ill) ) get_att_unixtime( Var[j], init_time_att_name, ill);
if ( is_bad_data(vll) ) get_att_unixtime( Var[j], valid_time_att_name, vll);

//JAP
//if ( !is_bad_data(ill) ) InitTime = ill;
//if ( !is_bad_data(vll) ) ValidTime = vll;
if ( !is_bad_data(ill) ) Var[j].InitTime = ill;
if ( !is_bad_data(vll) ) Var[j].ValidTime = vll;
if ( !is_bad_data(ill) ) Var[j].InitTime = ill;
if ( !is_bad_data(vll) ) Var[j].ValidTime = vll;

StringArray dimNames;
get_dim_names(&v, &dimNames);
Expand Down Expand Up @@ -368,10 +362,6 @@ out << prefix << "Ydim = " << (Ydim ? GET_NC_NAME_P(Ydim) : "(nul)") << "\n";

out << prefix << "\n";

//JAP
//out << prefix << "Init Time = ";
//unix_to_mdyhms(InitTime, month, day, year, hour, minute, second);

snprintf(junk, sizeof(junk), "%s %d, %d %2d:%02d:%02d", short_month_name[month], day, year, hour, minute, second);

out << junk << "\n";
Expand Down Expand Up @@ -420,21 +410,6 @@ return;
}


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

//JAP
/*
int MetNcFile::lead_time() const
{
unixtime dt = ValidTime - InitTime;
return ( (int) dt );
}
*/

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


Expand Down Expand Up @@ -808,10 +783,7 @@ found = data(info->var, 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 );
Expand Down
13 changes: 0 additions & 13 deletions met/src/libcode/vx_data2d_nc_met/met_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand Down
14 changes: 5 additions & 9 deletions met/src/libcode/vx_nc_util/nc_var_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,6 @@ void NcVarInfo::dump(ostream & out, int depth) const

{

ConcatString time_str;

Indent prefix(depth);

out << prefix << "var = ";
Expand All @@ -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;

Expand Down Expand Up @@ -251,9 +249,7 @@ int NcVarInfo::lead_time() const

{

unixtime dt = ValidTime - InitTime;

return ( (int) dt );
return ( (int) (ValidTime - InitTime) );

}

Expand Down

0 comments on commit df8c204

Please sign in to comment.