Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue NOAA-EMC#8 - add switch for MET+ jobs
Browse files Browse the repository at this point in the history
KateFriedman-NOAA committed Mar 5, 2020
1 parent 1b359db commit 2552467
Showing 3 changed files with 28 additions and 16 deletions.
2 changes: 2 additions & 0 deletions parm/config/config.base.emc.dyn
Original file line number Diff line number Diff line change
@@ -253,6 +253,8 @@ export nst_anl=.true.
# Analysis increments to zero in CALCINCEXEC
export INCREMENTS_TO_ZERO="'delz_inc','clwmr_inc','icmr_inc'"

# Verification options
export DO_METP="YES" # Run MET+ jobs

# Archiving options
export HPSSARCH="NO" # save data to HPSS archive
12 changes: 9 additions & 3 deletions ush/rocoto/setup_workflow.py
Original file line number Diff line number Diff line change
@@ -42,10 +42,12 @@ def main():
print 'input arg: --expdir = %s' % repr(args.expdir)
sys.exit(1)

gfs_steps = ['prep', 'anal', 'fcst', 'postsnd', 'post', 'awips', 'gempak', 'vrfy', 'metp', 'arch']
gfs_steps = ['prep', 'anal', 'fcst', 'postsnd', 'post', 'awips', 'gempak', 'vrfy', 'arch']
hyb_steps = ['eobs', 'eomg', 'eupd', 'ecen', 'efcs', 'epos', 'earc']
metp_steps = ['metp']

steps = gfs_steps + hyb_steps if _base.get('DOHYBVAR', 'NO') == 'YES' else gfs_steps
steps = steps + metp_steps if _base.get('DO_METP', 'NO') == 'YES' else steps

dict_configs = wfu.source_configs(configs, steps)

@@ -216,15 +218,18 @@ def get_gdasgfs_resources(dict_configs, cdump='gdas'):
do_bufrsnd = base.get('DO_BUFRSND', 'NO').upper()
do_gempak = base.get('DO_GEMPAK', 'NO').upper()
do_awips = base.get('DO_AWIPS', 'NO').upper()
do_metp = base.get('DO_METP', 'NO').upper()

tasks = ['prep', 'anal', 'fcst', 'post', 'vrfy', 'metp', 'arch']
tasks = ['prep', 'anal', 'fcst', 'post', 'vrfy', 'arch']

if cdump in ['gfs'] and do_bufrsnd in ['Y', 'YES']:
tasks += ['postsnd']
if cdump in ['gfs'] and do_gempak in ['Y', 'YES']:
tasks += ['gempak']
if cdump in ['gfs'] and do_awips in ['Y', 'YES']:
tasks += ['awips']
if cdump in ['gfs'] and do_metp in ['Y', 'YES']:
tasks += ['metp']

dict_resources = OrderedDict()

@@ -345,6 +350,7 @@ def get_gdasgfs_tasks(dict_configs, cdump='gdas'):
do_bufrsnd = base.get('DO_BUFRSND', 'NO').upper()
do_gempak = base.get('DO_GEMPAK', 'NO').upper()
do_awips = base.get('DO_AWIPS', 'NO').upper()
do_metp = base.get('DO_METP', 'NO').upper()
dumpsuffix = base.get('DUMP_SUFFIX', '')

dict_tasks = OrderedDict()
@@ -432,7 +438,7 @@ def get_gdasgfs_tasks(dict_configs, cdump='gdas'):
dict_tasks['%svrfy' % cdump] = task

# metp
if cdump in ['gfs']:
if cdump in ['gfs'] and do_metp in ['Y', 'YES']:
deps = []
dep_dict = {'type':'metatask', 'name':'%spost' % cdump}
deps.append(rocoto.add_dependency(dep_dict))
30 changes: 17 additions & 13 deletions ush/rocoto/setup_workflow_fcstonly.py
Original file line number Diff line number Diff line change
@@ -224,6 +224,9 @@ def get_workflow(dict_configs, cdump='gdas'):
envars.append(rocoto.create_envar(name='PDY', value='<cyclestr>@Y@m@d</cyclestr>'))
envars.append(rocoto.create_envar(name='cyc', value='<cyclestr>@H</cyclestr>'))

base = dict_configs['base']
do_metp = base.get('DO_METP', 'NO').upper()

tasks = []

# getics
@@ -322,20 +325,21 @@ def get_workflow(dict_configs, cdump='gdas'):
tasks.append('\n')

# metp
deps = []
dep_dict = {'type':'metatask', 'name':'%spost' % cdump}
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type':'task', 'name':'%sarch' % cdump, 'offset':'-&INTERVAL;'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)
metpcase = rocoto.create_envar(name='METPCASE', value='#metpcase#')
metpenvars = envars + [metpcase]
varname1 = 'metpcase'
varval1 = 'g2g1 g2o1 pcp1'
task = wfu.create_wf_task('metp', cdump=cdump, envar=metpenvars, dependency=dependencies,
if do_metp in ['Y', 'YES']:
deps = []
dep_dict = {'type':'metatask', 'name':'%spost' % cdump}
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type':'task', 'name':'%sarch' % cdump, 'offset':'-&INTERVAL;'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)
metpcase = rocoto.create_envar(name='METPCASE', value='#metpcase#')
metpenvars = envars + [metpcase]
varname1 = 'metpcase'
varval1 = 'g2g1 g2o1 pcp1'
task = wfu.create_wf_task('metp', cdump=cdump, envar=metpenvars, dependency=dependencies,
metatask='metp', varname=varname1, varval=varval1)
tasks.append(task)
tasks.append('\n')
tasks.append(task)
tasks.append('\n')

# arch
deps = []

0 comments on commit 2552467

Please sign in to comment.