#!/bin/bash # #### 05/05/99 ######################### # SETUP CMC ENS POST PROCESSING VARIABLES # ####################################### #################################################### # The following two variable could be defined in the # loadleveler submission script (the sms script), if # not they will take the default values which is set # for the NCO running enviroment ##################################################### set -xa #################################### # Specify NET and RUN Name and model #################################### export NET=${NET:-naefs} export RUN=${RUN:-cmce} export PS4='$SECONDS + ' date ######################################################## # obtain unique process id (pid) and make temp directory ######################################################## export pid=$$ export DATAROOT=${DATAROOT:-/lfs/f1/ops/${envir}/tmp} export DATA=${DATA:-${DATAROOT:?}/${jobid}} mkdir -p $DATA cd $DATA export cycle=t${cyc}z ################## # File To Log Msgs ################## export jlogfile=${jlogfile:-${DATA}/jlogfile.${job}.${pid}} #################################### # Determine Job Output Name on System #################################### export outid="LL$job" export jobid="${outid}.o${pid}" export pgmout="OUTPUT.${pid}" export pgmerr=errfile ############################################## # SENDCOM - Copy Files From TMPDIR to $COMOUT # SENDDBN - Issue DBNet Client Calls ############################################## export SENDCOM=${SENDCOM:-YES} export SENDDBN=${SENDDBN:-YES} export SENDDBN_GB2=${SENDDBN_GB2:-YES} ################################################# # ANAPRDGEN - if yes, CMC anlysis data available ################################################# export ANAPRDGEN=${ANAPRDGEN:-YES} export RUN_TCTRACK=${RUN_TCTRACK:-NO} ################################################### # EXTDFCST - if yes, Extended forecast post process ################################################### export EXTDFCST=${EXTDFCST:-NO} ######################### # Specify Execution Areas ######################### export HOMEcmce=${HOMEcmce:-${PACKAGEROOT}/naefs.${naefs_ver}} export EXECcmce=${EXECcmce:-$HOMEcmce/exec} export FIXcmce=${FIXcmce:-$HOMEcmce/fix} export USHcmce=${USHcmce:-$HOMEcmce/ush} export ERRSCRIPT=err_chk export LOGSCRIPT=startmsg export REDOUT='1>>' export REDERR='2>' ######################################### # Run setpdy and initialize PDY variables ######################################### setpdy.sh . ./PDY ######################## # Define COM directories ######################## export DCOM=${DCOM:-${DCOMROOT}} export COMIN=$DCOM/$PDY/wgrbbul/cmcens_gb2 export COMINm1=$DCOM/${PDYm1}/wgrbbul/cmcens_gb2 export COM_OUT=${COM_OUT:-$(compath.py -o $NET/${naefs_ver})} export COMOUT=$COM_OUT/${RUN}.${PDY}/${cyc}/pgrb2ap5 export COMOUTm1=$COM_OUT/${RUN}.${PDYm1}/${cyc}/pgrb2ap5 export COMOUTenst=$COM_OUT/${RUN}.${PDY}/${cyc}/ensstat mkdir -m 775 -p $COMOUT mkdir -m 775 -p $COMOUTm1 mkdir -m 775 -p $COMOUTenst msg="$job HAS BEGUN on `hostname`" postmsg "$jlogfile" "$msg" env #################### # Execute the script #################### $HOMEcmce/scripts/exnaefs_cmcens_post.sh #cat $pgmout.003.p10 #cat $pgmout.024.p12 #cat $pgmout.024.c00 #cat $pgmout.039_avgspr #cat $pgmout.120_avgspr msg="$job JOB COMPLETED NORMALLY" postmsg "$jlogfile" "$msg" ######################################## # Remove the Temporary working directory ######################################## if [ $KEEPDATA != YES ]; then cd $DATAROOT rm -rf $DATA fi date