#!/bin/bash ###### 12/16/2016 ################### # SETUP ENS CQPF/ANFEFI 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} ######################################### # Run config file to get input parameters ######################################### 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 HOMEgefs=${HOMEgefs:-$PACKAGEROOT/naefs.${naefs_ver}} export EXECgefs=${EXECgefs:-$HOMEgefs/exec} export FIXgefs=${FIXgefs:-$HOMEgefs/fix} export USHgefs=${USHgefs:-$HOMEgefs/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 COM_IN=${COM_IN:-$(compath.py $envir/$NET/${naefs_ver})} export COM_OUT=${COM_OUT:-$(compath.py -o $NET/${naefs_ver})} export COMINgefs=${COMINgefs:-$(compath.py ${envir}/com/gefs/${gefs_ver}/${RUN}.${PDY}/${cyc}/atmos)} export COMIN=$COM_IN/${RUN}.${PDY}/${cyc} export COMOUTANFEFI_p5=$COM_OUT/${RUN}.${PDY}/${cyc}/prcp_bc_gb2 mkdir -m 775 -p $COMOUTANFEFI_p5 msg="HAS BEGUN on `hostname`" postmsg "$jlogfile" "$msg" env #################### # Execute the script #################### $HOMEgefs/scripts/exnaefs_gefs_anfefi_acpr.sh ############################################################# cat $pgmout.* msg="JOB COMPLETED NORMALLY" postmsg "$jlogfile" "$msg" ######################################## # Remove the Temporary working directory ######################################## if [ $KEEPDATA != YES ]; then cd $DATAROOT rm -rf $DATA fi date