#!/bin/sh set -xa export PS4='$SECONDS + ' date ############################################ # GFS GEMPAK NCDC 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 EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} 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} export MP_PULSE=0 export MP_TIMEOUT=2000 export cycle=t${cyc}z # # Set up model and cycle specific variables # export MODEL=GFS export fend=384 # set increment to 6 hours -- 3 hours is available. export finc=6 export fstart=00 ################################### # 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}/gempak} export COMINgfs=${COMINgfs:-$(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 msg="Begin job for $job" postmsg "$jlogfile" "$msg" ######################################################## # Execute the script. $SRCgfs/exgempak_gfs_gif_ncdc_skew_t.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