#PBS -N glwu_lc_forecast_%CYC%
#PBS -j oe
#PBS -S /bin/bash
#PBS -q %QUEUE%
#PBS -A %PROJ%-%PROJENVIR%
#PBS -l walltime=01:00:00
#PBS -l select=8:ncpus=120:mem=500GB
#PBS -l place=exclhost
#PBS -l debug=true

export model=glwu
%include <head.h>
%include <envir-p1.h>

set -x

# Set LSF variables
export KMP_AFFINITY=disabled
# specify X threads if using openmp
export OMP_NUM_THREADS=2

#Unlimit the stack size
ulimit -s unlimited

# Set global variables
modID=glwu
MODID=GLWU

export cyc=%CYC%

export mpicmd='mpiexec -n 480 -ppn 60 --depth 2 --cpu-bind depth'
# CALL executable job script here
module load PrgEnv-intel/${PrgEnv_intel_ver}
module load craype/${craype_ver}
module load intel/${intel_ver}
module load cray-mpich/${cray_mpich_ver}
module load cray-pals/${cray_pals_ver}
module load hdf5/${hdf5_ver}
module load netcdf/${netcdf_ver}
#module load libfabric/${libfabric_ver}
module load jasper/${jasper_ver}
module load libpng/${libpng_ver}
module load zlib/${zlib_ver}
module load g2/${g2_ver}
module load bacio/${bacio_ver}
module load libjpeg/${libjpeg_ver}
module load w3emc/${w3emc_ver}
module list

# Set LSF variables
export KMP_AFFINITY=disabled
# specify X threads if using openmp
export OMP_NUM_THREADS=2

export IOBUF_PARAMS='*:count=4:size=32M:prefetch=1:preflush=1'

${HOMEglwu}/jobs/JGLWU_LC_FORECAST

%include <tail.h>
%manual
######################################################################
# Purpose:  To execute the job that runs the glwu wave model
#           forecast on the IBMSP
######################################################################

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

# include manual page below
%end