diff --git a/env/HERA.env b/env/HERA.env index dce975a383..bd7e34ca31 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -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" diff --git a/env/JET.env b/env/JET.env index c9ab6c3c7f..a63222e3b4 100755 --- a/env/JET.env +++ b/env/JET.env @@ -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)) diff --git a/env/WCOSS_C.env b/env/WCOSS_C.env index b6a40b977d..8be3f66fe3 100755 --- a/env/WCOSS_C.env +++ b/env/WCOSS_C.env @@ -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)) diff --git a/env/WCOSS_DELL_P3.env b/env/WCOSS_DELL_P3.env index 484b5ce73c..c12ec6a327 100755 --- a/env/WCOSS_DELL_P3.env +++ b/env/WCOSS_DELL_P3.env @@ -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 diff --git a/jobs/rocoto/echgres.sh b/jobs/rocoto/echgres.sh new file mode 100755 index 0000000000..5278f58539 --- /dev/null +++ b/jobs/rocoto/echgres.sh @@ -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 diff --git a/parm/config/config.echgres b/parm/config/config.echgres new file mode 100755 index 0000000000..c7b2061545 --- /dev/null +++ b/parm/config/config.echgres @@ -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" diff --git a/parm/config/config.resources b/parm/config/config.resources index 1f24fe11b6..16b224f4c2 100755 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -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" @@ -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'" diff --git a/sorc/enkf_chgres_recenter_nc.fd/setup.f90 b/sorc/enkf_chgres_recenter_nc.fd/setup.f90 index 4bb1a0253c..1ea5b98a82 100644 --- a/sorc/enkf_chgres_recenter_nc.fd/setup.f90 +++ b/sorc/enkf_chgres_recenter_nc.fd/setup.f90 @@ -23,6 +23,7 @@ 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 @@ -30,8 +31,9 @@ subroutine program_setup 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 diff --git a/sorc/link_fv3gfs.sh b/sorc/link_fv3gfs.sh index fafcd34d02..74e5635423 100755 --- a/sorc/link_fv3gfs.sh +++ b/sorc/link_fv3gfs.sh @@ -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 . @@ -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 diff --git a/ush/rocoto/setup_workflow.py b/ush/rocoto/setup_workflow.py index c3cc41e46c..b0559e4bed 100755 --- a/ush/rocoto/setup_workflow.py +++ b/ush/rocoto/setup_workflow.py @@ -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 @@ -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'] @@ -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 @@ -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} @@ -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} @@ -1098,7 +1113,16 @@ def create_xml(dict_configs): dict_hyb_tasks = get_hyb_tasks(dict_configs) # Removes &MEMORY_JOB_DUMP 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]]