Skip to content

Commit

Permalink
Per #2701, every time I run ascii2nc to I see a log message for 'DEBU…
Browse files Browse the repository at this point in the history
…G 1: Number of NDBC skipped files due to no lookup 0'. This is printed by the NdbcHandler destructor. Update the logic to only print a debug level 3 log message when the number of missing locations is greater than 0, 'DEBUG 3: Skipped 5 NDBC files whose locations are not defined in 'MET_BASE/table_files/ndbc_stations.xml'. Set the MET_NDBC_STATIONS environment variable to override this file.'
  • Loading branch information
JohnHalleyGotway committed Dec 5, 2023
1 parent 58cea27 commit 9107fc6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/tools/other/ascii2nc/ndbc_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,15 @@ NdbcHandler::NdbcHandler(const string &program_name) :

NdbcHandler::~NdbcHandler()
{
mlog << Debug(1) << "Number of NDBC skipped files due to no lookup " << numMissingStations
<< "\n";

// Log the non-zero number of missing stations
if(numMissingStations > 0) {
mlog << Debug(3) << "Skipped " << numMissingStations
<< " NDBC files whose locations are not defined in \""
<< locationsFileName << "\". Set the " << stations_env
<< " environment variable to provide an updated "
<< "locations file.\n";
}
}


Expand Down

0 comments on commit 9107fc6

Please sign in to comment.