#!/bin/sh set -xa export PS4='$SECONDS + ' date ############################################ # GDAS BULLETIN PRODUCT GENERATION ############################################ ########################################################## # obtain unique process id (pid) and make temp directory ########################################################## export DATA=${DATA:-${DATAROOT}/${jobid:?}} mkdir -p $DATA cd $DATA ###################################### # Set up the cycle variable ###################################### export cycle=${cycle:-t${cyc}z} ########################################### # Run setpdy and initialize PDY variables ########################################### setpdy.sh . PDY ################################ # Set up the HOME directory ################################ export HOMEgfs=${HOMEgfs:-${NWROOT}/gfs.${gfs_ver}} export EXECgfs=${EXECgfs:-$HOMEgfs/exec} export PARMgfs=${PARMgfs:-$HOMEgfs/parm} export PARMwmo=${PARMwmo:-$HOMEgfs/parm/wmo} export PARMproduct=${PARMproduct:-$HOMEgfs/parm/product} export FIXgfs=${FIXgfs:-$HOMEgfs/gempak/fix} export USHgfs=${USHgfs:-$HOMEgfs/gempak/ush} export SRCgfs=${SRCgfs:-$HOMEgfs/scripts} export UTILgfs=${UTILgfs:-$HOMEgfs/util} ###################################### # Set up the GEMPAK directory ####################################### export HOMEgempak=${HOMEgempak:-${NWROOTp1}/gempak} export FIXgempak=${FIXgempak:-$HOMEgempak/fix} export USHgempak=${USHgempak:-$HOMEgempak/ush} ################################# # Set up the NET and RUN ################################# export NET=gfs export RUN=gdas export model=gdas ############################################## # Define COM directories ############################################## export COMIN=${COMIN:-$(compath.py ${NET}/${envir}/${RUN}.${PDY})} export COMINm1=${COMINm1:-$(compath.py ${NET}/${envir}/${RUN}.${PDYm1})} export COMINgdas=${COMINgdas:-$(compath.py ${NET}/${envir}/${RUN})} export COMOUT=${COMOUT:-${COMROOT}/${NET}/${envir}/${RUN}.${PDY}} export COMOUTwmo=${COMOUTwmo:-${COMOUT}/${cyc}/wmo} if [ $SENDCOM = YES ] ; then mkdir -m 775 -p $COMOUT $COMOUTwmo fi export pgmout=OUTPUT.$$ env ######################################################## # Execute the script. $SRCgfs/exgdas_bulls_navy.sh.ecf export err=$?; err_chk ######################################################## msg="JOB $job HAS COMPLETED NORMALLY!" postmsg $jlogfile "$msg" ############################################ # print exec I/O output ############################################ if [ -e "$pgmout" ] ; then cat $pgmout fi ################################### # Remove temp directories ################################### if [ "$KEEPDATA" != "YES" ] ; then rm -rf $DATA fi date