#!/bin/sh set -xa export PS4='$SECONDS + ' date ############################################ # GFS FAX 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 USHgfs=${USHgfs:-$HOMEgfs/ush} 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/fix} export UTILgfs=${UTILgfs:-$HOMEgfs/util} ################################### # Specify NET and RUN Name and model #################################### export NET=${NET:-gfs} export RUN=${RUN:-gfs} export model=${model:-gfs} ############################################## # Define COM directories ############################################## export COMIN=${COMIN:-$(compath.py ${NET}/${envir}/${RUN}.${PDY})/${cyc}} export COMOUT=${COMOUT:-${COMROOT}/${NET}/${envir}/${RUN}.${PDY}/${cyc}} export COMOUTwmo=${COMOUTwmo:-${COMOUT}/wmo} if [ $SENDCOM = YES ] ; then mkdir -m 775 -p $COMOUT $COMOUTwmo fi export pgmout=OUTPUT.$$ env ############################################################ # The PATH has been modified to pick up the NCAR graphics. # The variable NCARG_ROOT is also needed for NCAR graphics. ############################################################ export NCARG_ROOT=${NCARG_ROOT} export PATH="$PATH":${NCARG_BIN} export HOMEobsproc_shared_bufr_dumplist=${HOMEobsproc_shared_bufr_dumplist:-$NWROOT/obsproc_shared/bufr_dumplist.${obsproc_shared_bufr_dumplist_ver}} ######################################################## # Execute the script. $HOMEgfs/scripts/exgfs_fax.sh.ecf $fcsthrs 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