#BSUB -o /_PTMP_/_USER_/nps_geogrid.log.%J
#BSUB -e /_PTMP_/_USER_/nps_geogrid.log.%J
#BSUB -q "dev_shared"
#BSUB -W 0:39
#BSUB -R rusage[mem=6000]
#BSUB -R "span[ptile=_NPROCGEOGRID_]"
#BSUB -R affinity[core(1)]
#BSUB -a poe
#BSUB -J GEOGRID
#BSUB -n _NPROCGEOGRID_
##
. /usrx/local/Modules/3.2.9/init/ksh
module load ics
module load ibmpe
##
#

PACKDIR=_PACKDIR_
WORKDIR=_WORKDIR_

cd $WORKDIR
rm $WORKDIR/geo*.dio

mkdir -p geogrid

cp $PACKDIR/NPS/geogrid/GEOGRID.TBL._CORE_ ./geogrid/GEOGRID.TBL
cp $PACKDIR/NPS/geogrid.exe .

cp $PACKDIR/namelist.nps .

cp $PACKDIR/NPS/geogrid/testb.nml .

ln -sf testb.nml fort.81

rm -rf cored*

mpirun.lsf ./geogrid.exe

cd $PACKDIR

bsub < run_met.lsf