#PBS -N hrrr_prep_radar_30_%DOMAIN%_%CYC%
#PBS -j oe
#PBS -l walltime=00:15:00
#PBS -A %PROJ%-%PROJENVIR%
#PBS -q %QUEUE% 
#PBS -S /bin/bash
#PBS -l select=1:ncpus=36:mem=28GB
#PBS -l debug=true

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

set -x

# EXPORT list here
# Set MPI options
export OMP_NUM_THREADS=1
export MP_TASK_AFFINITY=core:1
export KMP_AFFINITY=disabled
export MP_MPILIB=mpich2

export cyc=%CYC%
export dom=%DOMAIN%
export subhtime=30

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 hdf5/${hdf5_ver}
module load netcdf/${netcdf_ver}
module load pnetcdf/${pnetcdf_ver}
module load util_shared/${util_shared_ver}
module load cray-pals/${cray_pals_ver}
 
# CALL executable job script here
$HOMEhrrr/jobs/JHRRR_PREP_RADAR

if [ $? -ne 0 ]; then
  ecflow_client --abort
  exit
fi

%include <tail.h>
%manual
##########################################################################
# Purpose: to prepare the boundary conditions for the Hi-Res Rapid Refresh Model
##########################################################################


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

# include manual page below
%end
~