15 """!Runs the ocean initialization and sets the ocean status file."""
19 ocean=conf.getstr(
'config',
'ocean_model')
20 logger=conf.log(
'exhwrf_ocean_init')
21 ocstatus=hwrf_expt.ocstatus
22 ocstatus.unset(logger)
24 if not conf.getbool(
'config',
'run_ocean'):
25 jlogger.info(
'Ocean is disabled. This job need not be run.')
26 ocstatus.set(
False,logger)
29 hwrf_expt.pominit.run()
30 ocstatus.set(
True,logger)
32 hi=hwrf_expt.hycominit
34 hi.fill_ocstatus(ocstatus,logger)
36 jlogger.critical(
'Config file error: unsupported ocean model '
37 '%s. Will run without ocean.'%(repr(ocean),))
38 ocstatus.set(
False,logger)
41 ocstatus.set(
False,logger)
43 except Exception
as e:
44 if conf.getbool(
'config',
'allow_fallbacks',
False):
45 logger.error(
'Could not run ocean init: will run without ocean.'
46 ' Unhandled exception: '+str(e),exc_info=
True)
47 ocstatus.set(
False,logger)
51 if __name__==
'__main__':
55 except Exception
as e:
56 jlogger.critical(
'HWRF Ocean Initialization is aborting: '
57 +str(e),exc_info=
True)
Runs the POM initialization and POM-WRF coupled forecast.
Contains setup(), which initializes the produtil package.
def init_module
Initializes the HWRF object structure.
def postmsg(message)
Sends the message to the jlogfile logging stream at level INFO.
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.
Raised when an unsupported basin is requested.
def main()
Runs the ocean initialization and sets the ocean status file.
This module contains exception classes for reporting errors in the POM initialization.