#!/bin/bash set -xa # export HOMEnam=$PACKAGEROOT/nam.${nam_ver} export JJOBSnam=$HOMEnam/jobs export WKDIRNAME=${jobid:?} # Setup directories and common environment variables . ${JJOBSnam}/JNAM_ENVARS ################################################# if [ $RUNTYPE = CATCHUP ] ; then export fend=${FMAX_CATCHUP_PARENT:-84} export finc=${finc:-3} else export fend=${FMAX_HOURLY_PARENT:-18} export finc=${finc:-1} fi export fstart=${fstart:-00} export model=`echo $RUN | awk '{print tolower($0)}'` ####export model=nam export GRIB=grbgrd export EXT=.tm00 export DBN_ALERT_TYPE=NAM_GEMPAK export DBN_ALERT_TYPE_2=NAM_HOURLY_GEMPAK rm poescript ################################################################# # Execute the script to make the 90 km GEMPAK grids mkdir -p $DATA/nam cd $DATA/nam # # Copy model specific GEMPAK tables into working directory # cp ${NAMFIXgem}/nam_wmogrib2.tbl wmogrib2.tbl cd $DATA export GRIB=grbgrd export GRIB1=null export type=nam export finc=3 echo "$HOMEnam/scripts/exnam_nawips.sh $type $GRIB $GRIB1 $finc $fend" > $DATA/poescript ################################################################# ################################################################# # Execute the script a second time for the AWIP 20 km grid. mkdir -p $DATA/nam20 cd $DATA/nam20 # # Copy model specific GEMPAK tables into working directory # cp ${NAMFIXgem}/nam_wmogrib2.tbl wmogrib2.tbl cd $DATA export GRIB=awip20 export GRIB1=null export type=nam20 export finc=3 echo "$HOMEnam/scripts/exnam_nawips.sh $type $GRIB $GRIB1 $finc $fend" >> $DATA/poescript ################################################################# ################################################################# # Execute the script a third time for the AWIP 44 km grid. (TPC) ##mkdir -p $DATA/nam44 ##cd $DATA/nam44 # # Copy model specific GEMPAK tables into working directory # ##cd $DATA ##export GRIB=awip44 ##export GRIB1=null ##export type=nam44 ##export finc=3 ##echo "$HOMEnam/scripts/exnam_nawips.sh $type $GRIB $GRIB1 $finc $fend" >> $DATA/poescript ################################################################# ################################################################# # Execute the script a third time for the AWIPS 40 km grid. (SPC) mkdir -p $DATA/nam40 cd $DATA/nam40 # # Copy model specific GEMPAK tables into working directory # cp ${NAMFIXgem}/nam_wmogrib2.tbl wmogrib2.tbl cd $DATA export GRIB=awip3d export GRIB1=null export type=nam40 export finc=3 echo "$HOMEnam/scripts/exnam_nawips.sh $type $GRIB $GRIB1 $finc $fend" >> $DATA/poescript ################################################################# ################################################################# # Execute the script a fourth time for the limited 12 km dataset. (SPC) mkdir -p $DATA/nam12 cd $DATA/nam12 # # Copy model specific GEMPAK tables into working directory # cp ${NAMFIXgem}/nam12_ncepgrib129.tbl ncepgrib129.tbl cd $DATA export GRIB=awphys export GRIB1=awip12 export type=nam12 export finc=3 echo "$HOMEnam/scripts/exnam_nawips.sh $type $GRIB $GRIB1 $finc $fend" >> $DATA/poescript ################################################################# if [ $RUNTYPE = CATCHUP ] ; then ################################################################# # Execute the script a fifth time for the GOES Simulated Products mkdir $DATA/namgoes cd $DATA/namgoes # # Copy model specific GEMPAK tables into working directory # cp ${NAMFIXgem}/namgoes_ncepgrib129.tbl ncepgrib129.tbl cp ${NAMFIXgem}/namgoes_vcrdgrib1.tbl vcrdgrib1.tbl cd $DATA export GRIB=goes218 export GRIB1=null export type=namgoes export finc=3 echo "$HOMEnam/scripts/exnam_nawips.sh $type $GRIB $GRIB1 $finc $fend" >> $DATA/poescript ################################################################# fi ################################################################# # Execute the script a sixth time for the AWIPS 32 km grid. (HPC/OPC) mkdir -p $DATA/nam32 cd $DATA/nam32 # # Copy model specific GEMPAK tables into working directory # cp ${NAMFIXgem}/nam32_wmogrib2.tbl wmogrib2.tbl cp ${NAMFIXgem}/nam32_ncepgrib129.tbl ncepgrib129.tbl cp ${NAMFIXgem}/nam32_ncepgrib2.tbl ncepgrib2.tbl cp ${NAMFIXgem}/nam32_vcrdgrib1.tbl vcrdgrib1.tbl cd $DATA export GRIB=awp151 export GRIB1=null export type=nam32 export finc=3 echo "$HOMEnam/scripts/exnam_nawips.sh $type $GRIB $GRIB1 $finc $fend" >> $DATA/poescript ################################################################# cat poescript chmod 775 $DATA/poescript export CMDFILE=$DATA/poescript # Execute the script. ${MPIEXEC} -cpu-bind core -configfile $CMDFILE export err=$?; err_chk cat $pgmout date msg="ENDED NORMALLY." postmsg "$msg" ############################# # Remove the Temporary working directory ############################# cd $DATAROOT if [ ${KEEPDATA:-YES} = NO ] ; then rm -rf $DATA ; fi exit $jerr