#!/usr/bin/env bash
#PBS -N nwm_short_range_alaska_%CYC%_%STIME%
#PBS -j oe
#PBS -A "NWM-DEV" 
#PBS -l place=vscatter,select=1:ncpus=24:mpiprocs=24:mem=64gb
#PBS -q dev
#PBS -l walltime=01:00:00
#PBS -l debug=true

export NODES=1
export NCORES=24
export NPROCS=$((NODES*NCORES))

export model=nwm
source $ECFTESTDIR/model_envir.h

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 netcdf/${netcdf_ver}
module load hdf5/${hdf5_ver}
module load iobuf/${iobuf_ver}
module load cfp/${cfp_ver}
module load python/${python_ver}
module list

export I_MPI_DEVICE=rdssm
export I_MPI_PIN_PROCESSOR_LIST=15
export SAVE_ALL_TASKS=yes
export OMP_NUM_THREADS=1
export IOBUF_PARAMS='*.LAKEOUT_DOMAIN1:size=64M:count=2:prefetch=1,*:size=32M:count=4:vbuffer_count=4096:prefetch=1'
#export IOBUF_PARAMS='*:verbose'
export OMP_PLACES=cores
#

#Unlimit the stack size
ulimit -s unlimited

# EXPORT list here
export cyc=%CYC%
export CASETYPE=short_range_alaska

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


#%manual
######################################################################
#
#  PURPOSE:
#
######################################################################

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

# include manual page below
#%end