/** * @mainpage EnsLookupGen * * This application generates a grid of probabilities of that a given field * has a value greater than a user specified threshold based on evaluation * of ensemble forecasts. */ /** * @file MainEnsLookupGen.cc */ #define _ENS_LOOKUP_GEN_ #include "EnsLookupGenMgr.hh" #include #include #include #include #include /** * Return value of program to indicate success */ const static int success = 0; /** * Return value of program to indicate failure */ const static int failure = 1; /** * Exit program, return signal to operating system * @param[in] sig Signal */ static void cleanExit (int sig); /** * New handler function */ static void outOfStore(void); static EnsLookupGenMgr *_mgr = NULL; static void _checkForSpecialArgs(int argc, char **argv) { for (int i=0; irun()) { iret = success; } else { iret = failure; } cleanExit(iret); return iret; } static void cleanExit (int sig) { printf("tidy and exit\n"); if (_mgr != NULL) { delete _mgr; _mgr = NULL; } InterfaceLL::finish(); exit(sig); } static void outOfStore() { std::cerr << "FATAL ERROR - program EnsLookupGen " << std::endl; std::cerr << "Operator new failed - out of store" << std::endl; exit(failure); }