#!/usr/bin/env bash
#PBS -N nwm_forcing_long_range_mem%MEM%_%CYC%
#PBS -A %PROJ%-%PROJENVIR%
#PBS -j oe 
#PBS -S /bin/bash
#PBS -q %QUEUE%
#PBS -l place=vscatter:exclhost,select=1:ncpus=128:mpiprocs=64
#PBS -l walltime=00:20:00
#PBS -l debug=true

export NODES=1
#-----process count per node
export NCORES=64
#-----total process count
export NPROCS=$((NODES*NCORES))
export OMP_PLACES=cores
export OMP_NUM_THREADS=1

export model=nwm

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

#Unlimit the stack size
ulimit -s unlimited

module load PrgEnv-intel/${PrgEnv_intel_ver}
module load craype/${craype_ver}
module load intel/${intel_ver}
module load cray-pals/${pals_ver}
module load cfp/${cfp_ver}
module load python/${python_ver}
module load netcdf/${netcdf_ver}
module load wgrib2/${grib2_ver}
module list

# EXPORT list here
export cyc=%CYC%
export mem=%mem%
export member=`echo $mem|cut -c2-2`
export TIME_FLAG=YES

# CALL executable job script here
${HOMEnwm}/jobs/JNWM_FORCING_LONG_RANGE

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

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

# include manual page below
%end