Skip to content

Commit

Permalink
First draft to add chgresfcst to rocoto workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
CoryMartin-NOAA committed Jun 10, 2020
1 parent 9f2e4ec commit fc3066c
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 4 deletions.
13 changes: 13 additions & 0 deletions parm/config/config.chgresfcst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/ksh -x

########## config.chgresfcst ##########
# regrid full-res forecast for use in ensemble-res analysis generation

echo "BEGIN: config.chgresfcst"

# Get task specific resources
. $EXPDIR/config.resources chgresfcst

export CHGRESFCSTSH=$HOMEgsi/scripts/exglobal_chgresfcst_fv3gfs.sh.ecf

echo "END: config.chgresfcst"
11 changes: 10 additions & 1 deletion parm/config/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ $# -ne 1 ]; then

echo "Must specify an input task argument to set resource variables!"
echo "argument can be any one of the following:"
echo "anal analcalc analdiag gldas fcst post vrfy metp arch"
echo "anal analcalc analdiag gldas fcst post vrfy metp arch chgresfcst"
echo "eobs ediag eomg eupd ecen esfc efcs epos earc"
echo "waveinit waveprep wavepostsbs wavegempaksbs waveawipssbs"
echo "wavepost waveawips wavestat"
Expand Down Expand Up @@ -200,6 +200,15 @@ elif [ $step = "metp" ]; then
export memory_metp="16384M"
fi

elif [ $step = "chgresfcst" ]; then

export wtime_chgresfcst="01:00:00"
export npe_chgresfcst=24
export nth_chgresfcst=1
export npe_node_chgresfcst=$npe_node_max
if [[ "$machine" = "WCOSS_DELL_P3" ]]; then export npe_chgresfcst=24 ; fi
if [[ "$machine" == "WCOSS_C" ]]; then export memory_chgresfcst="3072M"; fi

elif [ $step = "arch" -o $step = "earc" -o $step = "getic" ]; then

eval "export wtime_$step='06:00:00'"
Expand Down
2 changes: 2 additions & 0 deletions sorc/link_fv3gfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ cd ${pwd}/../jobs ||exit 8
$LINK ../sorc/gsi.fd/jobs/JGLOBAL_ANALYSIS .
$LINK ../sorc/gsi.fd/jobs/JGLOBAL_ANALCALC .
$LINK ../sorc/gsi.fd/jobs/JGLOBAL_ANALDIAG .
$LINK ../sorc/gsi.fd/jobs/JGLOBAL_CHGRESFCST .
$LINK ../sorc/gsi.fd/jobs/JGLOBAL_ENKF_SELECT_OBS .
$LINK ../sorc/gsi.fd/jobs/JGLOBAL_ENKF_ANALDIAG .
$LINK ../sorc/gsi.fd/jobs/JGLOBAL_ENKF_INNOVATE_OBS .
Expand All @@ -118,6 +119,7 @@ cd ${pwd}/../scripts ||exit 8
$LINK ../sorc/gsi.fd/scripts/exglobal_analysis_fv3gfs.sh.ecf .
$LINK ../sorc/gsi.fd/scripts/exglobal_analcalc_fv3gfs.sh.ecf .
$LINK ../sorc/gsi.fd/scripts/exglobal_analdiag_fv3gfs.sh.ecf .
$LINK ../sorc/gsi.fd/scripts/exglobal_chgresfcst_fv3gfs.sh.ecf .
$LINK ../sorc/gsi.fd/scripts/exglobal_innovate_obs_fv3gfs.sh.ecf .
$LINK ../sorc/gsi.fd/scripts/exglobal_enkf_innovate_obs_fv3gfs.sh.ecf .
$LINK ../sorc/gsi.fd/scripts/exglobal_enkf_update_fv3gfs.sh.ecf .
Expand Down
21 changes: 18 additions & 3 deletions ush/rocoto/setup_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def main():
#wav_steps_awips = ['waveawipssbs', 'waveawips']
# From gfsv16b latest
# gfs_steps = ['prep', 'anal', 'gldas', 'fcst', 'postsnd', 'post', 'awips', 'gempak', 'vrfy', 'metp', 'arch']
hyb_steps = ['eobs', 'ediag', 'eomg', 'eupd', 'ecen', 'esfc', 'efcs', 'epos', 'earc']
hyb_steps = ['eobs', 'ediag', 'eomg', 'eupd', 'ecen', 'esfc', 'efcs', 'epos', 'earc', 'chgresfcst']

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
Expand Down Expand Up @@ -342,7 +342,7 @@ def get_hyb_resources(dict_configs):

# These tasks are always run as part of the GDAS cycle
cdump = 'gdas'
tasks2 = ['ecen', 'esfc', 'efcs', 'epos', 'earc']
tasks2 = ['ecen', 'esfc', 'efcs', 'epos', 'earc', 'chgresfcst']
for task in tasks2:

cfg = dict_configs[task]
Expand Down Expand Up @@ -473,7 +473,12 @@ def get_gdasgfs_tasks(dict_configs, cdump='gdas'):
deps.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'task', 'name': '%sanal' % cdump}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='or', dep=deps)
if dohybvar in ['y', 'Y', 'yes', 'YES']:
dep_dict = {'type': 'task', 'name': '%schgresfcst' % 'gdas', 'offset': '-06:00:00'}
deps.append(rocoto.add_dependency(dep_dict))
dependencies = rocoto.create_dependency(dep_condition='and', dep=deps)
else:
dependencies = rocoto.create_dependency(dep_condition='or', dep=deps)
task = wfu.create_wf_task('analcalc', cdump=cdump, envar=envars, dependency=dependencies)

dict_tasks['%sanalcalc' % cdump] = task
Expand Down Expand Up @@ -855,6 +860,16 @@ def get_hyb_tasks(dict_configs, cycledef='enkf'):

dict_tasks['%sesfc' % cdump] = task

# chgresfcst
deps1 = []
dep_dict = {'type': 'task', 'name': '%sfcst' % cdump}
deps1.append(rocoto.add_dependency(dep_dict))
dep_dict = {'type': 'metatask', 'name': '%sefmn' % cdump}
deps1.append(rocoto.add_dependency(dep_dict))
dependencies1 = rocoto.create_dependency(dep_condition='and', dep=deps2)
task = wfu.create_wf_task('chgresfcst', cdump=cdump, envar=envars1, dependency=dependencies1, cycledef=cycledef)

dict_tasks['%schgresfcst ' % cdump] = task

# efmn, efcs
deps1 = []
Expand Down

0 comments on commit fc3066c

Please sign in to comment.