#BSUB -J %E%sref_wrf%MOD%_fcst_%MEM%_%CYC%
#BSUB -o /%COM%/output/%ENVIR%/today/sref_wrf%MOD%_fcst_%MEM%_%CYC%.o%J
#BSUB -e /%COM%/output/%ENVIR%/today/sref_wrf%MOD%_fcst_%MEM%_%CYC%.o%J
#BSUB -L /bin/sh
#BSUB -q %QUEUE%
#BSUB -x
#BSUB -n 128
#BSUB -a poe
#BSUB -network "type=sn_all:mode=US"
#BSUB -cwd /tmpnwprd
#BSUB -R "span[ptile=16]"
#BSUB -W 02:00
#BSUB -P %PROJ%
#BSUB -R affinity[core:distribute=balance]

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


set -x


export cyc=%CYC%
export MODEL="%MODEL%"
export DOMNAM="na32"
export MEMBER="%MEM0%"



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

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


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

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

# include manual page below
%end