15 """!Checks to see if all ensda jobs (exhwrf_ensda) ran
16 correctly. Creates the "donefile" if so."""
21 run_ensemble_da=conf.getbool(
'config',
'run_ensemble_da')
22 ensda_flag_file=conf.getstr(
'tdrcheck',
'tdr_flag_file')
23 run_ensda=read_ensda_flag_file(ensda_flag_file)
24 if run_ensemble_da
and run_ensda:
25 ensda_size=conf.getint(
'hwrf_da_ens',
'ensda_size')
27 jlogger.info(
'ENSDA was not run.')
30 logger=conf.log(
'output')
33 for ens
in xrange(ensda_size):
35 omemb=hwrf_expt.ensda.member(hwrf_expt.conf.cycle,imemb)
36 for prod
in omemb.products():
38 logger.warning(
'ensda %03d: No product: %s'%(imemb,prod.did,))
40 elif not prod.available:
42 'ensda %03d: product %s not available (location %s)'%(
43 imemb,repr(prod.did),repr(prod.location)))
46 dest=
'%s/%s.ensda_%03d.%s'%(
47 hwrf_expt.conf.getdir(
'com'),
48 hwrf_expt.conf.getstr(
'config',
'out_prefix'),
49 imemb,os.path.basename(prod.location))
50 if not os.path.exists(dest):
51 logger.warning(
'ensda %03d: %s: does not exist'
54 elif os.path.getsize(dest)<1:
55 logger.warning(
'ensda %03d: %s: is empty'%(imemb,dest))
58 logger.info(
'ensda %03d: %s exists and is non-empty.'
63 'HWRF data assimilation ensemble products are missing.')
66 if __name__==
'__main__':
69 jlogger.info(
'ensda_output is starting')
71 jlogger.info(
'ensda_output is completed')
72 except Exception
as e:
73 jlogger.critical(
'ensda_output is aborting: '+str(e),exc_info=
True)
Contains setup(), which initializes the produtil package.
def init_module
Initializes the HWRF object structure.
def main()
Checks to see if all ensda jobs (exhwrf_ensda) ran correctly.
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.
Utilities for ensemble-based data assimilation.