20 """!Logs a message to the produtil.log.jlogger and exits with status 2
21 @param msg the error message"""
26 """!Runs the selected GSI task."""
28 gsi_domain=ENV[
'GSI_DOMAIN'].lower()
29 if gsi_domain!=
'd02' and gsi_domain!=
'd03':
30 fail(
'Aborting: gsi_domain="%s" must be "d02" or "d03"'%(gsi_domain,))
34 logger=hwrf_expt.conf.log(
'exhwrf_gsi')
36 if not hwrf_expt.conf.getbool(
'config',
'run_gsi'):
37 jlogger.info(
'GSI is disabled. This job need not be run.')
43 logger.info(
'Not on WCOSS, so not setting WCOSS-specific vars.')
46 jlogger.info(
'GSI is disabled for %s. This job need not be run.'
50 logger.info(
'GSI is enabled for %s.'%(gsi_domain,))
53 hwrf_expt.gsi_d02.run()
55 hwrf_expt.gsi_d03.run()
57 if __name__==
'__main__':
61 except Exception
as e:
62 jlogger.critical(
'HWRF GSI is aborting: '+str(e),exc_info=
True)
Contains setup(), which initializes the produtil package.
def fail(msg)
Logs a message to the produtil.log.jlogger and exits with status 2.
def init_module
Initializes the HWRF object structure.
def get_gsistatus
Checks the gsi status for a specific domain.
def setup(ignore_hup=False, dbnalert_logger=None, jobname=None, cluster=None, send_dbn=None, thread_logger=False, thread_stack=2 **24, kwargs)
Initializes the produtil package.
Runs the GSI data assimilation on the HWRF system.
Provides information about the cluster on which this job is running.
def main()
Runs the selected GSI task.
def name()
Synonym for here.name.
def set_vars_for_gsi(logger)
Set variables for running GSI quickly on WCOSS.