#!/bin/bash # #### 12/18/2016 ######################################################### # Generates the 24-hourly CQPF and CPQPF # ####################################################################### set -xa #################################################### # 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/${job}.${pid}} 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 #################################### # 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} ######################### # 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>' ################################### # HRINTER - Forecast Hour Interval ################################### export HRINTER=24 ############################## # Run setpdy and initialize PDY variables ############################## setpdy.sh . ./PDY #module load grib_util ############################################## # 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 COMOUT=$COM_OUT/${RUN}.${PDY}/${cyc}/prcp_bc_gb2 mkdir -m 775 -p $COMOUT msg="HAS BEGUN on `hostname`" postmsg "$jlogfile" "$msg" env #################### # Execute the script #################### $HOMEgefs/scripts/exnaefs_gefs_24hr_enscqpf.sh cat $DATA/output msg="JOB COMPLETED NORMALLY" postmsg "$jlogfile" "$msg" ############################## # Remove the Temporary working directory ############################## if [ $KEEPDATA != YES ]; then cd $DATAROOT rm -rf $DATA fi date