HWRF  trunk@4391
exhwrf_unpost.py
1 #! /usr/bin/env python
2 
3 ##@namespace scripts.exhwrf_unpost
4 # This script marks all post-processor products as having not been
5 # created. It exists solely for the convenience of the operators: it
6 # allows an NCO SPA (operator) to click a button to rerun the entire
7 # post-processing system from the beginning.
8 
10 import hwrf_expt
11 from produtil.datastore import *
12 def main():
13  """!Undoes the effect of the exhwrf_post and exhwrf_products scripts."""
16  jlogger=produtil.log.jlogger
17  jlogger.info('unpost starting')
18  conf=hwrf_expt.conf
19  ocean=conf.getstr('config','ocean_model','POM')
20  run_ocean=conf.getbool('config','run_ocean',True)
21  with hwrf_expt.ds.transaction():
22  hwrf_expt.runwrf.state=UNSTARTED
23  hwrf_expt.runwrf.unrun()
24  hwrf_expt.wrfcopier.unrun()
25  hwrf_expt.satpost.unrun()
26  hwrf_expt.nonsatpost.unrun()
27  hwrf_expt.gribber.unrun()
28  if run_ocean and ocean=='HYCOM':
29  hwrf_expt.hycompost.unrun()
30  jlogger.info('unpost completed')
31 
32 if __name__ == '__main__': main()
33 
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
Stores products and tasks in an sqlite3 database file.
Definition: datastore.py:1
def main()
Undoes the effect of the exhwrf_post and exhwrf_products scripts.
Configures logging.
Definition: log.py:1