diff --git a/env/HERA.env b/env/HERA.env index 642fc33c4..922b6f6fd 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -4,7 +4,7 @@ if [ $# -ne 1 ]; then echo "Must specify an input argument to set runtime environment variables!" echo "argument can be any one of the following:" - echo "anal fcst post vrfy" + echo "anal fcst post vrfy metp" echo "eobs eupd ecen efcs epos" echo "postsnd awips gempak" exit 1 diff --git a/env/JET.env b/env/JET.env index 2bb02c3d9..bce371d41 100755 --- a/env/JET.env +++ b/env/JET.env @@ -4,7 +4,7 @@ if [ $# -ne 1 ]; then echo "Must specify an input argument to set runtime environment variables!" echo "argument can be any one of the following:" - echo "anal fcst post vrfy" + echo "anal fcst post vrfy metp" echo "eobs eupd ecen efcs epos" echo "postsnd awips gempak" exit 1 diff --git a/env/WCOSS_C.env b/env/WCOSS_C.env index 549d91f80..b9c426add 100755 --- a/env/WCOSS_C.env +++ b/env/WCOSS_C.env @@ -4,7 +4,7 @@ if [ $# -ne 1 ]; then echo "Must specify an input argument to set runtime environment variables!" echo "argument can be any one of the following:" - echo "anal fcst post vrfy" + echo "anal fcst post vrfy metp" echo "eobs eupd ecen efcs epos" echo "postsnd awips gempak" exit 1 @@ -166,6 +166,11 @@ elif [ $step = "vrfy" ]; then export IOBUF_PARAMS="*:size=32M:count=4:verbose" export APRUNTRACK="$launcher -j1 -n1 -N1 -d1 -cc depth" +elif [ $step = "metp" ]; then + + export IOBUF_PARAMS="*:size=32M:count=4:verbose" + export APRUNTRACK="$launcher -j1 -n1 -N1 -d1 -cc depth" + elif [ $step = "postsnd" ]; then export IOBUF_PARAMS="sigf*:size=128M:count=20:prefetch=0:verbose,gfs_collectiv*:size=128M:count=2:prefetch=0:verbose,*.snd:size=128M:count=3:prefetch=0:verbose,*.sfc:size=32M:count=3:prefetch=0:verbose,bufr.*:size=8M:count=20:prefetch=0:verbose" diff --git a/env/WCOSS_DELL_P3.env b/env/WCOSS_DELL_P3.env index 853f62d65..dabfbdb35 100755 --- a/env/WCOSS_DELL_P3.env +++ b/env/WCOSS_DELL_P3.env @@ -4,7 +4,7 @@ if [ $# -ne 1 ]; then echo "Must specify an input argument to set runtime environment variables!" echo "argument can be any one of the following:" - echo "anal fcst post vrfy" + echo "anal fcst post vrfy metp" echo "eobs eupd ecen efcs epos" echo "postsnd awips gempak" exit 1 diff --git a/jobs/rocoto/metp.sh b/jobs/rocoto/metp.sh new file mode 100755 index 000000000..b6658a523 --- /dev/null +++ b/jobs/rocoto/metp.sh @@ -0,0 +1,71 @@ +#!/bin/ksh -x + +############################################################### +## Abstract: +## Inline METplus verification and diagnostics driver script +## RUN_ENVIR : runtime environment (emc | nco) +## HOMEgfs : /full/path/to/workflow +## EXPDIR : /full/path/to/config/files +## CDATE : current analysis date (YYYYMMDDHH) +## CDUMP : cycle name (gdas / gfs) +## PDY : current date (YYYYMMDD) +## cyc : current cycle (HH) +## METPCASE : METplus verification use case (g2g1 | g2o1 | pcp1) +############################################################### + +############################################################### +echo +echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" +. $HOMEgfs/ush/load_fv3gfs_modules.sh +status=$? +[[ $status -ne 0 ]] && exit $status + + +############################################################### +echo +echo "=============== START TO SOURCE RELEVANT CONFIGS ===============" +configs="base vrfy metp" +for config in $configs; do + . $EXPDIR/config.${config} + status=$? + [[ $status -ne 0 ]] && exit $status +done + + +############################################################### +echo +echo "=============== START TO SOURCE MACHINE RUNTIME ENVIRONMENT ===============" +. $BASE_ENV/${machine}.env metp +status=$? +[[ $status -ne 0 ]] && exit $status + +############################################################### +export CDATEm1=$($NDATE -24 $CDATE) +export PDYm1=$(echo $CDATEm1 | cut -c1-8) + +export COMIN="$ROTDIR/$CDUMP.$PDY/$cyc" +export DATAROOT="$RUNDIR/$CDATE/$CDUMP/vrfy" +[[ -d $DATAROOT ]] && rm -rf $DATAROOT +mkdir -p $DATAROOT + + +############################################################### +echo +echo "=============== START TO RUN METPLUS VERIFICATION ===============" +if [ $CDUMP = "gfs" ]; then + + if [ $RUN_GRID2GRID_STEP1 = "YES" -o $RUN_GRID2OBS_STEP1 = "YES" -o $RUN_PRECIP_STEP1 = "YES" ]; then + + $VERIF_GLOBALSH + + fi +fi + + +if [ $CDUMP = "gdas" ]; then + echo "METplus verification currently not supported for CDUMP=${CDUMP}" +fi +############################################################### +# Force Exit out cleanly +if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf $DATAROOT ; fi +exit 0 diff --git a/parm/config/config.base.emc.dyn b/parm/config/config.base.emc.dyn index 59ece8918..6fd5c6a0f 100755 --- a/parm/config/config.base.emc.dyn +++ b/parm/config/config.base.emc.dyn @@ -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 diff --git a/parm/config/config.metp b/parm/config/config.metp new file mode 100755 index 000000000..9dd701ea1 --- /dev/null +++ b/parm/config/config.metp @@ -0,0 +1,69 @@ +#!/bin/ksh -x + +########## config.metp ########## +# METplus verification step specific + +echo "BEGIN: config.metp" + +# Get task specific resources +. $EXPDIR/config.resources metp + +export RUN_GRID2GRID_STEP1="YES" # Run grid-to-grid verification using METplus +export RUN_GRID2OBS_STEP1="YES" # Run grid-to-obs verification using METplus +export RUN_PRECIP_STEP1="YES" # Run precip verification using METplus + + +#---------------------------------------------------------- +# METplus, Verify grid-to-grid, and/or grid-to-obs, and/or precipitation options +#---------------------------------------------------------- + +if [ "$CDUMP" = "gfs" ] ; then + if [ $RUN_GRID2GRID_STEP1 = "YES" -o $RUN_GRID2OBS_STEP1 = "YES" -o $RUN_PRECIP_STEP1 = "YES" ]; then + export HOMEverif_global=${HOMEgfs}/sorc/verif-global.fd + export VERIF_GLOBALSH=$HOMEverif_global/ush/run_verif_global_in_global_workflow.sh + ## INPUT DATA SETTINGS + export model_list=$PSLOT + export model_data_dir_list=$ARCDIR/.. + export model_fileformat_list="pgbf{lead?fmt=%H}.${CDUMP}.{init?fmt=%Y%m%d%H}" + export model_hpssdir_list=$ATARDIR/.. + export get_data_from_hpss="NO" + export hpss_walltime="10" + ## OUTPUT SETTINGS + export OUTPUTROOT=$RUNDIR/$CDUMP/$CDATE/vrfy/metplus_exp + export model_arch_dir_list=$ARCDIR/.. + export make_met_data_by="VALID" + export gather_by="VSDB" + ## DATE SETTINGS + export VRFYBACK_HRS="24" + ## METPLUS SETTINGS + export METplus_verbosity="INFO" + export MET_verbosity="2" + export log_MET_output_to_METplus="yes" + ## FORECAST VERIFICATION SETTINGS + export fhr_min=$FHMIN_GFS + export fhr_max=$FHMAX_GFS + # GRID-TO-GRID STEP 1 + export g2g1_type_list="anom pres sfc" + export g2g1_anl_name="self_anl" + export g2g1_anl_fileformat_list="pgbanl.gfs.{valid?fmt=%Y%m%d%H}" + export g2g1_grid="G002" + # GRID-TO-OBS STEP 1 + export g2o1_type_list="upper_air conus_sfc" + export g2o1_obtype_upper_air="ADPUPA" + export g2o1_grid_upper_air="G003" + export g2o1_fhr_out_upper_air="6" + export g2o1_obtype_conus_sfc="ONLYSF" + export g2o1_grid_conus_sfc="G104" + export g2o1_fhr_out_conus_sfc="3" + export g2o1_prepbufr_data_runhpss="YES" + # PRECIP STEP 1 + export precip1_obtype="ccpa" + export precip1_accum_length="24" + export precip1_model_bucket_list="06" + export precip1_model_varname_list="APCP" + export precip1_model_fileformat_list="pgbf{lead?fmt=%H}.gfs.{init?fmt=%Y%m%d%H}" + export precip1_grid="G211" + fi +fi + +echo "END: config.metp" diff --git a/parm/config/config.resources b/parm/config/config.resources index 2b1559ed6..9923b94d6 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 fcst post vrfy arch" + echo "anal fcst post vrfy metp arch" echo "eobs eomg eupd ecen efcs epos earc" echo "postsnd awips gempak" exit 1 @@ -112,6 +112,21 @@ elif [ $step = "vrfy" ]; then export memory_vrfy="16384M" fi +elif [ $step = "metp" ]; then + + export nth_metp=1 + export wtime_metp="03:00:00" + export npe_metp=4 + export npe_node_metp=4 + export wtime_metp_gfs="06:00:00" + export npe_metp_gfs=4 + export npe_node_metp_gfs=4 + if [[ "$machine" == "WCOSS_C" ]]; then + export memory_metp="3072M" + elif [[ "$machine" == "THEIA" ]]; then + export memory_metp="16384M" + fi + elif [ $step = "arch" -o $step = "earc" -o $step = "getic" ]; then eval "export wtime_$step='06:00:00'" diff --git a/parm/config/config.vrfy b/parm/config/config.vrfy index 67287b167..432c6d4e2 100755 --- a/parm/config/config.vrfy +++ b/parm/config/config.vrfy @@ -14,7 +14,6 @@ export CDFNL="gdas" # Scores verification against GDAS/GFS analysi export MKPGB4PRCP="YES" # Make 0.25-deg pgb files in ARCDIR for precip verification export VRFYFITS="YES" # Fit to observations -export VRFY_PCKG2RUN="VSDB" # "VSDB" = run VSDB verification package only, "METPLUS" = run METplus verification package only, "BOTH = run both verification packages export VSDB_STEP1="YES" # Populate VSDB database export VSDB_STEP2="NO" export VRFYG2OBS="YES" # Grid to observations, see note below if turning ON @@ -22,12 +21,9 @@ export VRFYPRCP="YES" # Precip threat scores export VRFYRAD="YES" # Radiance data assimilation monitoring export VRFYOZN="YES" # Ozone data assimilation monitoring export VRFYMINMON="YES" # GSI minimization monitoring -export VRFYTRAK="YES" # Hurricane track verification -export VRFYGENESIS="YES" # Cyclone genesis verification +export VRFYTRAK="YES" # Hurricane track verification +export VRFYGENESIS="YES" # Cyclone genesis verification export RUNMOS="NO" # whether to run entire MOS package -export RUN_METPLUS_GRID2GRID_STEP1="YES" # Run grid-to-grid verification using METplus -export RUN_METPLUS_GRID2OBS_STEP1="YES" # Run grid-to-obs verification using METplus -export RUN_METPLUS_PRECIP_STEP1="YES" # Run precip verification using METplus #------------------------------------------------- # Fit to Observations @@ -36,7 +32,7 @@ export RUN_METPLUS_PRECIP_STEP1="YES" # Run precip verification using METplus if [ $VRFYFITS = "YES" ]; then export PRVT=$HOMEgfs/fix/fix_gsi/prepobs_errtable.global - export HYBLEVS=$HOMEgfs/fix/fix_am/global_hyblev.l65.txt + export HYBLEVS=$HOMEgfs/fix/fix_am/global_hyblev.l${LEVS}.txt export CUE2RUN=$QUEUE if [ $machine = "WCOSS_C" ]; then @@ -62,84 +58,25 @@ if [ "$CDUMP" = "gfs" ] ; then ddd=`echo $CDATE |cut -c 1-8` #if [ $ddd -eq 5 -o $ddd -eq 10 ]; then export VSDB_STEP2 = "YES" ;fi - if [ $VRFY_PCKG2RUN = "VSDB" -o $VRFY_PCKG2RUN = "BOTH" ]; then - if [ $VSDB_STEP1 = "YES" -o $VSDB_STEP2 = "YES" -o $VRFYPRCP = "YES" -o $VRFYG2OBS = "YES" ]; then - export BACKDATEVSDB=24 # execute vsdbjob for the previous day - export VBACKUP_PRCP=24 # back up for QPF verification data - export vsdbsave="$NOSCRUB/archive/vsdb_data" # place to save vsdb database - export vsdbhome=$BASE_VERIF # location of global verification scripts - export VSDBSH="$vsdbhome/vsdbjob.sh" # VSDB job script - export vlength=$FHMAX_GFS # verification length - export vhr_rain=$FHMAX_GFS # verification length for precip - export ftyplist="pgbq" # verif. files used for computing QPF ETS scores - export ptyplist="PRATE" # precip types in GRIB: PRATE or APCP - export anltype="gfs" # default=gfs, analysis type (gfs or gdas) for verification - export rain_bucket=6 # prate in pgb files is 6-hr accumulated - - export VSDB_START_DATE="$SDATE" # starting date for vsdb maps - export webhost="emcrzdm.ncep.noaa.gov" # webhost(rzdm) computer - export webhostid="$USER" # webhost(rzdm) user name - export SEND2WEB="NO" # whether or not to send maps to webhost - export WEBDIR="/home/people/emc/www/htdocs/gmb/${webhostid}/vsdb/$PSLOT" - export mdlist="gfs $PSLOT " # exps (up to 10) to compare in maps - fi - fi -fi - - -#---------------------------------------------------------- -# METplus, Verify grid-to-grid, and/or grid-to-obs, and/or precipitation options -#---------------------------------------------------------- -# All these call $METPLUSSH - -if [ "$CDUMP" = "gfs" ] ; then - if [ $RUN_METPLUS_GRID2GRID_STEP1 = "YES" -o $RUN_METPLUS_GRID2OBS_STEP1 = "YES" -o $RUN_METPLUS_PRECIP_STEP1 = "YES" ]; then - if [ $VRFY_PCKG2RUN = "METPLUS" -o $VRFY_PCKG2RUN = "BOTH" ]; then - export HOMEverif_global=${HOMEgfs}/sorc/verif-global.fd - export VERIF_GLOBALSH=$HOMEverif_global/ush/run_verif_global_in_global_workflow.sh - export RUNBATCH="NO" - ## INPUT DATA SETTINGS - export model_list=$PSLOT - export model_data_dir_list=$ARCDIR/.. - export model_fileformat_list="pgbf{lead?fmt=%H}.${CDUMP}.{init?fmt=%Y%m%d%H}" - export model_hpssdir_list=$ATARDIR/.. - export get_data_from_hpss="NO" - export hpss_walltime="10" - ## OUTPUT SETTINGS - export OUTPUTROOT=$RUNDIR/$CDUMP/$CDATE/vrfy/metplus_exp - export model_arch_dir_list=$ARCDIR/.. - export make_met_data_by="VALID" - export gather_by="VSDB" - ## DATE SETTINGS - export VRFYBACK_HRS="24" - ## METPLUS SETTINGS - export METplus_verbosity="INFO" - export MET_verbosity="2" - export log_MET_output_to_METplus="yes" - ## FORECAST VERIFICATION SETTINGS - export fhr_min=$FHMIN_GFS - export fhr_max=$FHMAX_GFS - # GRID-TO-GRID STEP 1 - export g2g1_type_list="anom pres sfc" - export g2g1_anl_name="self_anl" - export g2g1_anl_fileformat_list="pgbanl.gfs.{valid?fmt=%Y%m%d%H}" - export g2g1_grid="G002" - # GRID-TO-OBS STEP 1 - export g2o1_type_list="upper_air conus_sfc" - export g2o1_obtype_upper_air="ADPUPA" - export g2o1_grid_upper_air="G003" - export g2o1_fhr_out_upper_air="6" - export g2o1_obtype_conus_sfc="ONLYSF" - export g2o1_grid_conus_sfc="G104" - export g2o1_fhr_out_conus_sfc="3" - # PRECIP STEP 1 - export precip1_obtype="ccpa" - export precip1_accum_length="24" - export precip1_model_bucket_list="06" - export precip1_model_varname_list="APCP" - export precip1_model_fileformat_list="pgbf{lead?fmt=%H}.gfs.{init?fmt=%Y%m%d%H}" - export precip1_grid="G211" - fi + if [ $VSDB_STEP1 = "YES" -o $VSDB_STEP2 = "YES" -o $VRFYPRCP = "YES" -o $VRFYG2OBS = "YES" ]; then + export BACKDATEVSDB=24 # execute vsdbjob for the previous day + export VBACKUP_PRCP=24 # back up for QPF verification data + export vsdbsave="$NOSCRUB/archive/vsdb_data" # place to save vsdb database + export vsdbhome=$BASE_VERIF # location of global verification scripts + export VSDBSH="$vsdbhome/vsdbjob.sh" # VSDB job script + export vlength=$FHMAX_GFS # verification length + export vhr_rain=$FHMAX_GFS # verification length for precip + export ftyplist="pgbq" # verif. files used for computing QPF ETS scores + export ptyplist="PRATE" # precip types in GRIB: PRATE or APCP + export anltype="gfs" # default=gfs, analysis type (gfs or gdas) for verification + export rain_bucket=6 # prate in pgb files is 6-hr accumulated + + export VSDB_START_DATE="$SDATE" # starting date for vsdb maps + export webhost="emcrzdm.ncep.noaa.gov" # webhost(rzdm) computer + export webhostid="$USER" # webhost(rzdm) user name + export SEND2WEB="NO" # whether or not to send maps to webhost + export WEBDIR="/home/people/emc/www/htdocs/gmb/${webhostid}/vsdb/$PSLOT" + export mdlist="gfs $PSLOT " # exps (up to 10) to compare in maps fi fi @@ -208,6 +145,8 @@ if [ "$VRFYTRAK" = "YES" ]; then if [ $machine = "HERA" ]; then export COMROOTp1="/scratch1/NCEPDEV/rstprod/com" export COMINsyn=${COMINsyn:-${COMROOTp1}/arch/prod/syndat} + else + export COMINsyn=${COMINsyn:-${COMROOT}/gfs/prod/syndat} fi fi diff --git a/sorc/checkout.sh b/sorc/checkout.sh index 4bc5bc9ec..0fd2d4b77 100755 --- a/sorc/checkout.sh +++ b/sorc/checkout.sh @@ -66,7 +66,7 @@ if [[ ! -d verif-global.fd ]] ; then rm -f ${topdir}/checkout-verif-global.log git clone --recursive gerrit:EMC_verif-global verif-global.fd >> ${topdir}/checkout-verif-global.log 2>&1 cd verif-global.fd - git checkout verif_global_v1.2.2 + git checkout verif_global_v1.5.0 cd ${topdir} else echo 'Skip. Directory verif-global.fd already exist.' diff --git a/ush/rocoto/setup_expt.py b/ush/rocoto/setup_expt.py index 0d66a3691..a4630f74d 100755 --- a/ush/rocoto/setup_expt.py +++ b/ush/rocoto/setup_expt.py @@ -76,12 +76,12 @@ def edit_baseconfig(): top = os.path.abspath(os.path.join( os.path.abspath(here), '../..')) - # make a copy of the default before editing - shutil.copy(base_config, base_config + '.default') + if os.path.exists(base_config): + os.unlink(base_config) print '\nSDATE = %s\nEDATE = %s' % (idate, edate) - with open(base_config + '.default', 'rt') as fi: - with open(base_config + '.new', 'wt') as fo: + with open(base_config + '.emc.dyn', 'rt') as fi: + with open(base_config, 'wt') as fo: for line in fi: line = line.replace('@MACHINE@', machine.upper()) \ .replace('@PSLOT@', pslot) \ @@ -99,12 +99,10 @@ def edit_baseconfig(): if 'ICSDIR' in line: continue fo.write(line) - os.unlink(base_config) - os.rename(base_config + '.new', base_config) print '' print 'EDITED: %s/config.base as per user input.' % expdir - print 'DEFAULT: %s/config.base.default is for reference only.' % expdir + print 'DEFAULT: %s/config.base.emc.dyn is for reference only.' % expdir print 'Please verify and delete the default file before proceeding.' print '' diff --git a/ush/rocoto/setup_workflow.py b/ush/rocoto/setup_workflow.py index 778596846..505af50b9 100755 --- a/ush/rocoto/setup_workflow.py +++ b/ush/rocoto/setup_workflow.py @@ -44,8 +44,10 @@ def main(): 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,6 +218,7 @@ 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', 'arch'] @@ -225,6 +228,8 @@ def get_gdasgfs_resources(dict_configs, cdump='gdas'): 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() @@ -431,6 +437,21 @@ def get_gdasgfs_tasks(dict_configs, cdump='gdas'): dict_tasks['%svrfy' % cdump] = task + # metp + 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)) + dep_dict = {'type':'task', 'name':'%sarch' % cdump, 'offset':'-&INTERVAL_GFS;'} + 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) + dict_tasks['%smetp' % cdump] = task if cdump in ['gfs'] and do_bufrsnd in ['Y', 'YES']: #postsnd diff --git a/ush/rocoto/setup_workflow_fcstonly.py b/ush/rocoto/setup_workflow_fcstonly.py index e936b7efb..4ccee663a 100755 --- a/ush/rocoto/setup_workflow_fcstonly.py +++ b/ush/rocoto/setup_workflow_fcstonly.py @@ -28,7 +28,7 @@ import workflow_utils as wfu -taskplan = ['getic', 'fv3ic', 'fcst', 'post', 'vrfy', 'arch'] +taskplan = ['getic', 'fv3ic', 'fcst', 'post', 'vrfy', 'metp', 'arch'] def main(): parser = ArgumentParser(description='Setup XML workflow and CRONTAB for a forecast only experiment.', formatter_class=ArgumentDefaultsHelpFormatter) @@ -224,6 +224,9 @@ def get_workflow(dict_configs, cdump='gdas'): envars.append(rocoto.create_envar(name='PDY', value='@Y@m@d')) envars.append(rocoto.create_envar(name='cyc', value='@H')) + base = dict_configs['base'] + do_metp = base.get('DO_METP', 'NO').upper() + tasks = [] # getics @@ -321,6 +324,23 @@ def get_workflow(dict_configs, cdump='gdas'): tasks.append(task) tasks.append('\n') + # metp + 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') + # arch deps = [] dep_dict = {'type':'metatask', 'name':'%spost' % cdump}