##!/bin/ksh --login
#
#BSUB -oo /gpfs/hps3/ptmp/Ming.Hu/outputrap/rap_process_enkf.out06z
#BSUB -eo /gpfs/hps3/ptmp/Ming.Hu/outputrap/rap_process_enkf.out06z
#BSUB -J rap_enkf_06
#BSUB -W 00:40
#BSUB -q "devonprod"
#BSUB -P RAP-T2O
#BSUB -M 1800
#BSUB -extsched 'CRAYLINUX[]' -R '1*{select[craylinux && !vnode]} + 120*{select[craylinux && vnode]span[ptile=12] cu[type=cabinet]}' rusage[mem=1800]
#BSUB -x
#BSUB -a poe
#

##########################################################################
# Purpose: to run the analysis for the Rapid Refresh Model
##########################################################################

# EXPORT list here
export MP_SHARED_MEMORY=YES
export MEMORY_AFFINITY=MCM

set -x
module load prod_util
#module load prod_envir

module list

export MP_MPILIB=mpich2
export KMP_AFFINITY=disabled
export MP_TASK_AFFINITY=core:1
export OMP_NUM_THREADS=1

export numprocs=120
export NTASK=120
export PTILE=12

export envir=prod
export RUN_ENVIR=prod
export cyc=06
export cycle=t06z
export job=rap_process_enkf_06
export group_name=meso

SMSNAME=%SMSNAME% export SMSNAME
SMSNODE=%SMSNODE% export SMSNODE
SMSPASS=%SMSPASS% export SMSPASS
SMS_PROG=%SMS_PROG% export SMS_PROG

SMSBIN=/meso/save/Ming.Hu/sms/bin export SMSBIN

# CALL executable job script here
. /gpfs/hps3/emc/meso/save/Ming.Hu/nwprod/versions/rap.ver
/gpfs/hps3/emc/meso/save/Ming.Hu/nwprod/rap.${rap_ver}/jobs/JRAP_PROCESS_ENKF