HWRF  trunk@4391
exhwrf_hycom_post.py
1 #! /bin/env python
2 
3 """This script runs the ocean post processor when ocean_model==HYCOM"""
4 
5 import sys, os
7 from produtil.log import jlogger
8 
9 def main():
10  import hwrf_expt
11  hwrf_expt.init_module(make_ensemble_da=False)
12 
13  conf=hwrf_expt.conf
14  ocean_flag=conf.getbool('config','run_ocean')
15  ocean=conf.getstr('config','ocean_model')
16  if not ocean_flag or ocean!='HYCOM':
17  jlogger.info('HYCOM is disabled. This job need not be run.')
18  return
19  hwrf_expt.hycompost.run()
20 
21 if __name__=='__main__':
22  try:
24  jlogger.info('ocean_post is starting')
25  main()
26  jlogger.info('ocean_post is completed')
27  except Exception as e:
28  jlogger.critical('ocean_post is aborting: '+str(e),exc_info=True)
29  sys.exit(2)
30 
Contains setup(), which initializes the produtil package.
Definition: setup.py:1
def init_module
Initializes the HWRF object structure.
Definition: hwrf_expt.py:384
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.
Definition: setup.py:15
Configures logging.
Definition: log.py:1
def main()
Runs the HWRF post-processing described in the exhwrf_gsi_post module description.