#BSUB -J %E%sref_gempak132_%CYC%
#BSUB -o /%COM%/output/%ENVIR%/today/sref_gempak132_%CYC%.o%J
#BSUB -e /%COM%/output/%ENVIR%/today/sref_gempak132_%CYC%.o%J
#BSUB -L /bin/sh
#BSUB -q %QUEUE%_shared
#BSUB -W 01:30
#BSUB -cwd /tmpnwprd
#BSUB -P %PROJ%
#BSUB -R rusage[mem=1000]
#BSUB -R affinity[core]
#BSUB -R span[ptile=3]
#BSUB -n 3
#BSUB -a poe

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


set -x
module load grib_util

export cyc=%CYC%
export ens_mem="mean spread prob"
export RUN=sref

#  PURPOSE:  To submit the job creates SREF GEMPAK grids.



# 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_GEMPAK

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