#BSUB -J %E%sref_enspost_%CYC%
#BSUB -o /%COM%/output/%ENVIR%/today/sref_enspost_%CYC%.o%J
#BSUB -e /%COM%/output/%ENVIR%/today/sref_enspost_%CYC%.o%J
#BSUB -cwd /tmpnwprd
#BSUB -L /bin/sh
#BSUB -q %QUEUE%
#BSUB -R "span[ptile=3]"
#BSUB -n 9
##BSUB -n 6
#BSUB -W 02:00
#BSUB -P %PROJ%
#BSUB -a poe
#BSUB -x    # not_shared
##BSUB -M 110

%include <head.h>
%include <envir-p2.h>


set -x
module load grib_util
module load util_shared

export cyc=%CYC%

#  PURPOSE:      To execute the SREF Post Processing



# versions file for SREF model $sref_ver
VERSION_FILE=$NWROOT/versions/sref.ver
if [ -f $VERSION_FILE ]; then
  . $VERSION_FILE
else
  exit
fi

$NWROOT/sref.${sref_ver}/jobs/JSREF_ENSPOST

if [ $? -ne 0 ]; then
  ecflow_client --msg="***JOB ${ECF_NAME} ERROR RUNNING J-SCRIPT ***"
  ecflow_client --abort
  exit
fi


%include <tail.h>
%manual
######################################################################
#
#
######################################################################

######################################################################
# Job specific troubleshooting instructions:
#  see generic troubleshoot manual page
#
######################################################################

# include manual page below
%end