#!/bin/bash ###### 12/16/2016 ################### # SETUP ENS CQPF 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 # JY module load grib_util/1.0.3 #################################### # Specify NET and RUN Name and model #################################### export NET=${NET:-naefs} export RUN=${RUN:-gefs} 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 pgmout="OUTPUT" ############################################## # SENDECF - Flag Events on ECF # SENDCOM - Copy Files From TMPDIR to $COMOUT # SENDDBN - Issue DBNet Client Calls ############################################## export SENDCOM=${SENDCOM:-YES} export SENDECF=${SENDECF:-YES} export SENDDBN=${SENDDBN:-YES} ################################################################### # RUNJOB - Judge the Job for Regular Run or Extended 00 Cycle Run ################################################################### export RUNJOB=${RUNJOB:-REGULAR} ######################### # Specify Execution Areas ######################### export HOMEndgd=${HOMEndgd:-$PACKAGEROOT/naefs.${naefs_ver}} export EXECndgd=${EXECndgd:-$HOMEndgd/exec} export FIXndgd=${FIXndgd:-$HOMEndgd/fix} export USHndgd=${USHndgd:-$HOMEndgd/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 COMIN=${COMIN:-$(compath.py $envir/$NET/${naefs_ver})} export COMOUT=${COMOUT:-$(compath.py -o $NET/${naefs_ver})} mkdir -m 775 -p $COMOUT msg="HAS BEGUN on `hostname`" postmsg "$jlogfile" "$msg" env #################### # Execute the script #################### $HOMEndgd/scripts/exnaefs_gefs_conus_ndgd_enscqpf.sh ############################################################# cat $DATA/$cyc/06hr/$pgmout.024 cat $DATA/$cyc/24hr/$pgmout.024 cat $DATA/$cyc/06hr/$pgmout.240 cat $DATA/$cyc/24hr/$pgmout.240 msg="JOB COMPLETED NORMALLY" postmsg "$jlogfile" "$msg" ######################################## # Remove the Temporary working directory ######################################## if [ $KEEPDATA != YES ]; then cd $DATAROOT rm -rf $DATA fi date