#!/bin/ksh set -x export RUN_ENVIR=${RUN_ENVIR:-"nco"} export PS4='$SECONDS + ' date ############################################## # Obtain unique process id (pid) and make temp directory ############################################## export pid=${pid:-$$} export outid=${outid:-"LL$job"} export DATA=${DATA:-${DATAROOT}/${jobid:?}} mkdir -p $DATA cd $DATA ############################################## # Run setpdy and initialize PDY variables ############################################## export cycle="t${cyc}z" setpdy.sh . ./PDY ############################################## # Determine Job Output Name on System ############################################## export pgmout="OUTPUT.${pid}" export pgmerr=errfile ############################################## # Set CDATE ############################################## CDATE=${CDATE:-${PDY}${cyc}} GDATE=$($NDATE -06 $CDATE) PDY_m6hrs=$(echo $GDATE | cut -c1-8) cyc_m6hrs=$(echo $GDATE | cut -c9-10) export cycle_m6hrs=t${cyc_m6hrs}z #### Lin Gan request for change #### export COMOUT=${COMROOT}/$NET/$envir/$RUN.$PDY/$cyc export COMOUT=${COMOUT:-${COMROOT}/$NET/$envir/$RUN.$PDY/$cyc} export COMINgfs=${COMINgfs:-$(compath.py $NET/$envir/$RUN.$PDY)/$cyc} export COMINgfs_m6hrs=${COMINgfs_m6hrs:-$(compath.py $NET/$envir/$RUN.$PDY_m6hrs)/$cyc_m6hrs} export IMS_FILE=${COMINgfs}/${RUN}.${cycle}.imssnow96.grib2 export FIVE_MIN_ICE_FILE=${COMINgfs}/${RUN}.${cycle}.seaice.5min.grib2 export AFWA_NH_FILE=${COMINgfs}/${RUN}.${cycle}.NPR.SNWN.SP.S1200.MESH16.grb export AFWA_SH_FILE=${COMINgfs}/${RUN}.${cycle}.NPR.SNWS.SP.S1200.MESH16.grb export BLENDED_ICE_FILE=${BLENDED_ICE_FILE:-${RUN}.${cycle}.seaice.5min.blend.grb} export BLENDED_ICE_FILE_m6hrs=${BLENDED_ICE_FILE_m6hrs:-${COMINgfs_m6hrs}/${RUN}.${cycle_m6hrs}.seaice.5min.blend.grb} ############################################################### # Run relevant script ############################################################### env msg="HAS BEGUN on `hostname`" postmsg "$jlogfile" "$msg" ${EMCSFCPREPSH:-$SCRgfs/exemcsfc_global_sfc_prep.sh.ecf} status=$? [[ $status -ne 0 ]] && exit $status ############################################## # End JOB SPECIFIC work ############################################## ############################################## # Final processing ############################################## if [ -e ${pgmout} ]; then cat $pgmout fi msg="ENDED NORMALLY." postmsg "$jlogfile" "$msg" ########################################## # Remove the Temporary working directory ########################################## cd $DATAROOT [[ $KEEPDATA = "NO" ]] && rm -rf $DATA date exit 0