Skip to content

Commit

Permalink
Issue #1: merge branch 'feature/chgresfcst' at 965ff42 into feature/g…
Browse files Browse the repository at this point in the history
…fsv16b
  • Loading branch information
RussTreadon-NOAA committed Jun 18, 2020
2 parents 1dd83b8 + 965ff42 commit ff8cd28
Show file tree
Hide file tree
Showing 10 changed files with 87 additions and 10 deletions.
5 changes: 4 additions & 1 deletion env/HERA.env
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,12 @@ elif [ $step = "anal" ]; then

export NTHREADS_GAUSFCANL=1
npe_gausfcanl=${npe_gausfcanl:-1}

export APRUN_GAUSFCANL="$launcher -n $npe_gausfcanl"

export NTHREADS_CHGRES=${nth_echgres:-1}
[[ $NTHREADS_CHGRES -gt $npe_node_max ]] && export NTHREADS_CHGRES=$npe_node_max
export APRUN_CHGRES=""

export USE_CFP=${USE_CFP:-"YES"}
export APRUNCFP="$launcher"

Expand Down
4 changes: 4 additions & 0 deletions env/JET.env
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ elif [ $step = "anal" ]; then
npe_gausfcanl=${npe_gausfcanl:-1}
export APRUN_GAUSFCANL="$launcher $npe_gausfcanl"

export NTHREADS_CHGRES=${nth_echgres:-1}
[[ $NTHREADS_CHGRES -gt $npe_node_max ]] && export NTHREADS_CHGRES=$npe_node_max
export APRUN_CHGRES=""

elif [ $step = "gldas" ]; then

nth_max=$(($npe_node_max / $npe_node_gldas))
Expand Down
4 changes: 4 additions & 0 deletions env/WCOSS_C.env
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ elif [ $step = "anal" ]; then
[[ $npe_node_gausfcanl -gt $npe_gausfcanl ]] && npe_node_gausfcanl=$npe_gausfcanl
export APRUN_GAUSFCANL="$launcher -j 1 -n $npe_gausfcanl -N $npe_node_gausfcanl -d $NTHREADS_GAUSFCANL -cc depth"

export NTHREADS_CHGRES=${nth_echgres:-1}
[[ $NTHREADS_CHGRES -gt $npe_node_max ]] && export NTHREADS_CHGRES=$npe_node_max
export APRUN_CHGRES="$launcher -j 1 -n 1 -N 1 -d $NTHREADS_CHGRES -cc depth"

elif [ $step = "gldas" ]; then

nth_max=$(($npe_node_max / $npe_node_gldas))
Expand Down
4 changes: 4 additions & 0 deletions env/WCOSS_DELL_P3.env
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ elif [ $step = "anal" ]; then
npe_gausfcanl=${npe_gausfcanl:-1}
export APRUN_GAUSFCANL="$launcher $npe_gausfcanl"

export NTHREADS_CHGRES=${nth_echgres:-14}
[[ $NTHREADS_CHGRES -gt $npe_node_max ]] && export NTHREADS_CHGRES=$npe_node_max
export APRUN_CHGRES=""

if [ ${USE_CFP:-"NO"} = "YES" ]; then
export APRUNCFP="$launcher \$ncmd $mpmd"
fi
Expand Down
13 changes: 13 additions & 0 deletions jobs/rocoto/echgres.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/ksh -x

###############################################################
# Source FV3GFS workflow modules
. $HOMEgfs/ush/load_fv3gfs_modules.sh
status=$?
[[ $status -ne 0 ]] && exit $status

###############################################################
# Execute the JJOB
$HOMEgfs/jobs/JGDAS_ENKF_CHGRES
status=$?
exit $status
13 changes: 13 additions & 0 deletions parm/config/config.echgres
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/ksh -x

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

echo "BEGIN: config.echgres"

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

export CHGRESFCSTSH=$HOMEgfs/scripts/exglobal_enkf_chgres_fv3gfs.sh.ecf

echo "END: config.echgres"
10 changes: 9 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 echgres"
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,14 @@ elif [ $step = "metp" ]; then
export memory_metp="16384M"
fi

elif [ $step = "echgres" ]; then

export wtime_echgres="01:00:00"
export npe_echgres=3
export nth_echgres=1
export npe_node_echgres=1
if [[ "$machine" = "WCOSS_DELL_P3" ]]; then export nth_echgres=28 ; fi

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

eval "export wtime_$step='06:00:00'"
Expand Down
6 changes: 4 additions & 2 deletions sorc/enkf_chgres_recenter_nc.fd/setup.f90
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@ subroutine program_setup
implicit none

integer :: istat
character(len=500) :: filenamelist

namelist /chgres_setup/ i_output, j_output, input_file, output_file, &
terrain_file, vcoord_file, cld_amt

cld_amt = .false. ! default option

print*
print*,"OPEN SETUP NAMELIST."
open(43, file="./chgres_nc_gauss.nml", iostat=istat)
call getarg(1,filenamelist)
print*,"OPEN SETUP NAMELIST ",trim(filenamelist)
open(43, file=filenamelist, iostat=istat)
if (istat /= 0) then
print*,"FATAL ERROR OPENING NAMELIST FILE. ISTAT IS: ",istat
stop
Expand Down
2 changes: 2 additions & 0 deletions sorc/link_fv3gfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ cd ${pwd}/../jobs ||exit 8
$LINK ../sorc/gsi.fd/jobs/JGDAS_ENKF_SURFACE .
$LINK ../sorc/gsi.fd/jobs/JGDAS_ENKF_FCST .
$LINK ../sorc/gsi.fd/jobs/JGDAS_ENKF_POST .
$LINK ../sorc/gsi.fd/jobs/JGDAS_ENKF_CHGRES .
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 .
Expand All @@ -125,6 +126,7 @@ cd ${pwd}/../scripts ||exit 8
$LINK ../sorc/gsi.fd/scripts/exglobal_enkf_surface_fv3gfs.sh.ecf .
$LINK ../sorc/gsi.fd/scripts/exglobal_enkf_fcst_fv3gfs.sh.ecf .
$LINK ../sorc/gsi.fd/scripts/exglobal_enkf_post_fv3gfs.sh.ecf .
$LINK ../sorc/gsi.fd/scripts/exglobal_enkf_chgres_fv3gfs.sh.ecf .
cd ${pwd}/../fix ||exit 8
[[ -d fix_gsi ]] && rm -rf fix_gsi
$LINK ../sorc/gsi.fd/fix fix_gsi
Expand Down
36 changes: 30 additions & 6 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', 'echgres', 'epos', 'earc']

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 @@ -308,9 +308,9 @@ def get_hyb_resources(dict_configs):

# These tasks can be run in either or both cycles
if lobsdiag_forenkf in ['.T.', '.TRUE.']:
tasks1 = ['eobs', 'ediag', 'eupd']
tasks1 = ['eobs', 'ediag', 'eupd', 'echgres']
else:
tasks1 = ['eobs', 'eomg', 'eupd']
tasks1 = ['eobs', 'eomg', 'eupd', 'echgres']

if eupd_cyc in ['BOTH']:
cdumps = ['gfs', 'gdas']
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'] and cdump == 'gdas':
dep_dict = {'type': 'task', 'name': '%sechgres' % '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,7 +860,6 @@ def get_hyb_tasks(dict_configs, cycledef='enkf'):

dict_tasks['%sesfc' % cdump] = task


# efmn, efcs
deps1 = []
dep_dict = {'type': 'metatask', 'name': '%secmn' % cdump}
Expand All @@ -876,6 +880,17 @@ def get_hyb_tasks(dict_configs, cycledef='enkf'):

dict_tasks['%sefmn' % cdump] = task

# echgres
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=deps1)
task = wfu.create_wf_task('echgres', cdump=cdump, envar=envars1, dependency=dependencies1, cycledef=cycledef)

dict_tasks['%sechgres' % cdump] = task

# epmn, epos
deps = []
dep_dict = {'type': 'metatask', 'name': '%sefmn' % cdump}
Expand Down Expand Up @@ -1098,7 +1113,16 @@ def create_xml(dict_configs):
dict_hyb_tasks = get_hyb_tasks(dict_configs)

# Removes <memory>&MEMORY_JOB_DUMP</memory> post mortem from hyb tasks
hyp_tasks = {'gdaseobs':'gdaseobs', 'gdasediag':'gdasediag', 'gdaseomg':'gdaseomn', 'gdaseupd':'gdaseupd','gdasecen':'gdasecmn','gdasesfc':'gdasesfc','gdasefcs':'gdasefmn','gdasepos':'gdasepmn','gdasearc':'gdaseamn'}
hyp_tasks = {'gdaseobs':'gdaseobs',
'gdasediag':'gdasediag',
'gdaseomg':'gdaseomn',
'gdaseupd':'gdaseupd',
'gdasecen':'gdasecmn',
'gdasesfc':'gdasesfc',
'gdasefcs':'gdasefmn',
'gdasepos':'gdasepmn',
'gdasearc':'gdaseamn',
'gdasechgres':'gdasechgres'}
for each_task, each_resource_string in dict_hyb_resources.iteritems():
#print each_task,hyp_tasks[each_task]
#print dict_hyb_tasks[hyp_tasks[each_task]]
Expand Down

0 comments on commit ff8cd28

Please sign in to comment.