16 """!Sets MPI tuning variables for the local cluster."""
20 logger.info(
'Not on WCOSS, so not setting WCOSS-specific vars.')
23 """!Main program for this script: runs the forecast."""
28 logger=hwrf_expt.conf.log(
'exhwrf_forecast')
30 ocean_flag=conf.getbool(
'config',
'run_ocean')
31 ocean_model=conf.getstr(
'config',
'ocean_model')
33 wave_flag=conf.getbool(
'config',
'run_wave')
34 wave_model=conf.getstr(
'config',
'wave_model')
36 fallbacks_flag=conf.getbool(
'config',
'allow_fallbacks')
37 wrf_ranks=conf.getint(
'runwrf',
'wrf_ranks')
43 wave_success=hwrf_expt.wvstatus.get(logger)
45 if wave_model==
'WW3' and not hwrf_expt.ww3init.is_completed():
46 logger.warning(
'The ww3init completion flag is off. '
51 basin1=conf.syndat.basin1
52 if basin1
in hwrf_expt.non_wave_basins:
54 'Cannot run wave in this basin- run uncoupled.')
56 hwrf_expt.runwrf.remove_wave()
59 'CRITICAL FAILURE: HWRF wave init failed, but '
60 'fallbacks are enabled. Running uncoupled.')
62 hwrf_expt.runwrf.remove_wave()
66 'CRITICAL FAILURE: HWRF wave init failed, and '
67 'fallbacks are disabled. Aborting.')
77 ocean_success=hwrf_expt.ocstatus.get(logger)
79 if ocean_model==
'POM' and not hwrf_expt.pominit.is_completed():
80 logger.warning(
'The pominit completion flag is off. '
84 if ocean_model==
'HYCOM' and not hwrf_expt.hycominit.is_completed():
85 logger.warning(
'The hycominit completion flag is off. '
90 basin1=conf.syndat.basin1
91 if basin1
in hwrf_expt.non_ocean_basins:
93 'Cannot run ocean in this basin- run uncoupled.')
95 hwrf_expt.runwrf.remove_ocean()
98 'CRITICAL FAILURE: HWRF ocean init failed, but '
99 'fallbacks are enabled. Running uncoupled.')
101 hwrf_expt.runwrf.remove_ocean()
104 'CRITICAL FAILURE: HWRF ocean init failed, and '
105 'fallbacks are disabled. Aborting.')
114 hwrf_expt.runwrf.run()
120 def set_total_tasks(conf):
121 num_storms=len(conf.getstr(
'config',
'multistorm_sids',
'nosids').split(
','))
123 num_domains=num_storms*2+1
125 nio_g=int(conf.getstr(
'runwrf',
'nio_groups'))
126 nio_tpg=conf.getstr(
'runwrf',
'nio_tasks_per_group').split(
',')
128 npx=int(conf.getstr(
'runwrf_namelist',
'dm_task_split.nest_pes_x').split(
',')[0])
129 npy=int(conf.getstr(
'runwrf_namelist',
'dm_task_split.nest_pes_y').split(
',')[0])
130 num_computetasks=npx*npy
133 for index
in range(num_domains):
134 num_iotasks+=nio_g*int(nio_tpg[index])
136 total_tasks=num_computetasks + num_iotasks
138 os.environ[
"TOTAL_TASKS"]=str(total_tasks)
141 if __name__==
'__main__':
Runs the POM initialization and POM-WRF coupled forecast.
Contains setup(), which initializes the produtil package.
def doit()
Main program for this script: runs the forecast.
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.
Provides information about the cluster on which this job is running.
def set_vars_for_coupled_hwrf(logger, wave, ocean, wrf_ranks)
Sets variables that seem to speed up the H15B (2015 pre-baseline) version of HWRF on Phase I WCOSS...
def name()
Synonym for here.name.
def set_vars(coupling, logger, wrf_ranks)
Sets MPI tuning variables for the local cluster.