#!/bin/bash ##### 08/25/1999 ################### # SET SHELL PROCESSING VARIABLES #################################### set -x export PS4=' $SECONDS + ' date ########################################################### # SET UP envir VARIABLE FOR DETERMINING VARIOUS # PATH VARIABLES. ########################################################### export RUN_ENVIR=${RUN_ENVIR:-prod} # #### 05/15/00 ############################### # SETUP GLMP MODEL PREP PROCESSING VARIABLES # ############################################# ############################################### # Make temp directory ############################################### export DATA=${DATA:-${DATAROOT:?}/${jobid:?}} mkdir -p $DATA cd $DATA export HOUR=$cyc export cycle=t${cyc}z #################################### # Specify NET and RUN Name #################################### export NET=glmp export RUN=glmp #################################### # Determine Diagnostic Output Name on System #################################### export pgmout="OUTPUT.$$" #################################### # Specify Execution Areas #################################### export EXECglmp=${EXECglmp:-$HOMEglmp/exec} export FIXglmp=${FIXglmp:-$HOMEglmp/fix} export PARMglmp=${PARMglmp:-$HOMEglmp/parm} export USHglmp=${USHglmp:-$HOMEglmp/ush} ############################## # Run setpdy and initialize PDY variables ############################## setpdy.sh . ./PDY ########################################## # SET DATETIME PARAMETERS ########################################## export DAT="$PDY$HOUR" export DATm1=`$NDATE -1 $DAT` export HOURm1=`printf $DATm1 | cut -c 9-` export PDYm1h=`echo $DATm1 | cut -c1-8` ############################################## # Define COM directories # NOTE: $PDYp1 is set by setpdy.sh to be the # next day ############################################## export COMIN=${COMIN:-$(compath.py ${envir}/com/${NET}/${glmp_ver})/${RUN}.${PDY}} export COMINm1h=${COMINm1h:-$(compath.py ${envir}/com/${NET}/${glmp_ver})/${RUN}.${PDYm1h}} export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${glmp_ver})/${RUN}.${PDY}} export COMOUTm1h=${COMOUTm1h:-$(compath.py -o ${NET}/${glmp_ver})/${RUN}.${PDYm1h}} export COMINlmp_base=${COMINlmp_base:-$(compath.py ${envir}/com/lmp/${lmp_ver})} export COMINlmp=$COMINlmp_base export COMOUTglmp_base=${COMOUTglmp_base:-$(compath.py -o ${NET}/${glmp_ver})/${RUN}.${PDY}} mkdir -m 775 -p $COMOUT ########################################################### # DEFINE THE SEASON ########################################################### export MIN=$MIN if [[ $MIN -eq '00' ]] || [[ $MIN -eq '15' ]] ; then MMDD=`printf ${PDYm1h} | cut -c5-8` elif [[ $MIN -eq '30' ]] || [[ $MIN -eq '45' ]] ; then MMDD=`printf ${PDY} | cut -c5-8` fi num0=`echo $MMDD | cut -c 1` if [[ $num0 -eq 0 ]]; then MMDD=`echo $MMDD | cut -c 2-4` else MMDD=$MMDD fi if [[ ${MMDD} -ge 401 && ${MMDD} -le 930 ]]; then export SEASON=wm else export SEASON=cl fi ################################################################## # *****NOTE TO SPAS****** # This variable is needed by the script to determine which element # to run for. ################################################################## # Two possible elm arguments: vis or cig export elm=$ELEMENT export MIN=$MIN env ############################################################# # execute the script $HOMEglmp/scripts/exglmp_fcst_rap3.sh ############################################################# if [ $catoutput == "yes" ]; then cat $pgmout; fi if [ "${KEEPDATA^^}" != "YES" ]; then rm -rf $DATA fi date