Skip to content

Commit

Permalink
#1815 cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Soh committed Jun 27, 2022
1 parent 7c1ad06 commit ca162f5
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/tools/other/mode_graphics/mode_nc_output_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -255,23 +255,17 @@ for (x=0; x<Nx; ++x) {
// get init time, valid time, lead time from FcstRaw variable attributes
//

att = get_nc_att(FcstRaw, (string)"init_time_ut");
InitTime = get_att_value_unixtime(att);
if (InitTime < 0) {
if (!get_att_unixtime(FcstRaw, init_time_ut_att_name, InitTime) || InitTime < 0) {
mlog << Error
<< "ModeNcOutputFile::open(const char *) -> init time should be an integer or a string!\n\n";
exit ( 1 );
}
if (att) delete att;

att = get_nc_att(FcstRaw, (string)"valid_time_ut");
ValidTime = get_att_value_unixtime(att);
if (ValidTime < 0) {
if (!get_att_unixtime(FcstRaw, valid_time_ut_att_name, ValidTime) || ValidTime < 0) {
mlog << Error
<< "ModeNcOutputFile::open(const char *) -> valid time should be an integer or a string!\n\n";
exit ( 1 );
}
if (att) delete att;

// att = FcstRaw->get_att("accum_time_sec");
//
Expand Down Expand Up @@ -1006,6 +1000,3 @@ return ( s );

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




0 comments on commit ca162f5

Please sign in to comment.