#!/bin/bash ############################################################# # HREF RUNALL # 02/02/2015 Binbin Zhou, create for run all scripts ############################################################# ######################################## # Preliminary data setup step ######################################## set -xa export PS4='$SECONDS + ' date ########################################################### # obtain unique process id (pid) and make temp directories ########################################################### export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir -p $DATA rm -rf $DATA/* cd $DATA export jlogfile=${jlogfile:-${DATA}/jlogfile.${jobid}} msg="JOB $job HAS BEGUN" postmsg "$jlogfile" "$msg" # # Run setpdy and initialize PDY variables # export cycle=${cycle:-t${cyc}z} setpdy.sh . ./PDY if [ ${cyc} = "00" ] then cycold=18 PDYold=${PDYm1} fi if [ ${cyc} = "06" ] then cycold=00 PDYold=${PDY} fi if [ ${cyc} = "12" ] then cycold=06 PDYold=${PDY} fi if [ ${cyc} = "18" ] then cycold=12 PDYold=${PDY} fi ################################################## # SENDCOM - Copy Files From TMPDIR to $COMOUT # SENDDBN - Issue DBNet Client Calls ################################################## export SENDCOM=${SENDCOM:-YES} export SENDECF=${SENDECF:-YES} export SENDDBN=${SENDDBN:-YES} export SENDDBN_NTC=${SENDDBN_NTC:-NO} ############################################################### # This block can be modified for different Production test # environment. This is used for operational testings ############################################################### export EXEChref=${EXEChref:-$HOMEhref/exec} export PARMhref=${PARMhref:-$HOMEhref/parm} export USHhref=${USHhref:-$HOMEhref/ush} export FIXhref=${FIXhref:-$HOMEhref/fix} export SCRIPTShref=${SCRIPTShref:-$HOMEhref/scripts} ################################### # Specify NET and RUN Name and model #################################### export NET=${NET:-href} export RUN=${RUN:-href} # JY will see if needs following line: (from EMC checkout, but not from canned run) # export IOBUF_PARAMS='*:size=8M:count=8' ############################################## # Define running directory and COM directories ############################################## ## PDY not included here as pull data from PDYm1 as well export COMINnam=${COMINnam:-$(compath.py prod/nam/${nam_ver})/nam} export GESOUT=${GESOUT:-$(compath.py $envir/$NET/${href_ver})/nwges/${RUN}} export COMOUT=${COMOUT:-$(compath.py $envir/$NET/${href_ver})/${RUN}.${PDY}} if [ ! -d $COMOUT ] ; then mkdir -p $COMOUT/ensprod mkdir -p $COMOUT/verf_g2g fi export pgmout="OUTPUT.$$" ####################################################### # Pass information which is needed to run the Script ####################################################### # export VERBOSE=YES ################################################### # Execute the Script exhref_ensprod.sh rm -rf poe.* if [ $NEST = "conus" ] then hrlist="00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 \ 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 \ 37 38 39 40 41 42 43 44 45 46 47 48" for hr in $hrlist do echo "$USHhref/preprocess_nam_1h.sh ${PDY} ${cyc} ${hr}" >> poe.nam done hrlist_old="49 50 51 52 53 54" for hr in $hrlist_old do echo "$USHhref/preprocess_nam_1h.sh ${PDYold} ${cycold} ${hr} " >> poe.nam done chmod 775 poe.nam #mpiexec -n $NTASK -ppn $PTILE --cpu-bind verbose,core cfp ./poe.nam mpiexec -np $NTASK --cpu-bind verbose,depth cfp ./poe.nam export err=$?; err_chk msg="JOB $job HAS COMPLETED NORMALLY." postmsg "$jlogfile" "$msg" date fi cd $DATAROOT if [ $KEEPDATA = NO ]; then rm -rf $DATA; fi date