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

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

export model=nwm
export OMP_PLACES=cores
export OMP_NUM_THREADS=1

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-mpich/${cray_mpich_ver}
module load cray-pals/${pals_ver}
module load python/${python_ver}
module load netcdf/${netcdf_ver}
module load wgrib2/${grib2_ver}
module list

#Unlimit the stack size
ulimit -s unlimited

# EXPORT list here
export cyc=%CYC%
export PRODUCTTYPE=GFS_Production_025d_GRIB2

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


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

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

# include manual page below
#%end