#!/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 ################################################## # 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} 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} 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 COMINhiresw=${COMINhiresw:-$(compath.py prod/hiresw/${hiresw_ver})/hiresw} export GESROOT=${GESROOT:-$(compath.py $envir/$NET/${href_ver})/nwges} export COMINnam=${COMINnam:-$GESROOT/${RUN}} export COMINhrrr=${COMINhrrr:-$GESROOT/${RUN}} export COMOUT=${COMOUT:-$(compath.py -o $NET/${href_ver})/${RUN}.${PDY}} export COMINffg=${COMINffg:-$(compath.py -o $NET/${href_ver})/${RUN}.${PDY}} export COMINffgm1=${COMINffg:-$(compath.py -o $NET/${href_ver})/${RUN}.${PDYm1}} if [ ! -d $COMOUT/ensprod ] ; then mkdir -p $COMOUT/ensprod mkdir -p $COMOUT/verf_g2g mkdir -p $COMOUT/wmo fi export pgmout="OUTPUT.$$" ####################################################### # Pass information which is needed to run the Script ####################################################### # export VERBOSE=YES ################################################### # Execute the Script exhref_ensprod.sh.ecf rm -rf poe.* # might need to link from about f18 onward? (for 24 h QPF) # need every hour or just every 3 h?? hrlist_link="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" hrlist="37 38 39 40 41 42 43 44 45 46 47 48" for hr in $hrlist_link do echo "$SCRIPTShref/exhref_ensprod_link.sh $hr" >> poe.link.all done for hr in $hrlist do echo "$SCRIPTShref/exhref_ensprod.sh $hr" >> poe.ensprod.all done chmod 775 poe.link.all chmod 775 poe.ensprod.all #mpiexec -n $NTASK_LINK -ppn $PTILE_LINK cfp ./poe.link.all mpiexec -np $NTASK_LINK --cpu-bind verbose,depth cfp ./poe.link.all export err=$?; err_chk #mpiexec -n $NTASK -ppn $PTILE cfp ./poe.ensprod.all mpiexec -np $NTASK --cpu-bind verbose,depth cfp ./poe.ensprod.all export err=$?; err_chk msg="JOB $job HAS COMPLETED NORMALLY." postmsg "$jlogfile" "$msg" date cd $DATAROOT if [ $KEEPDATA = NO ]; then rm -rf $DATA; fi date