#!/bin/sh ######################################## # Runs NAM Postprocessing up to 24 hours ######################################## set -xa # #### 08/25/1999 ################### # SET SHELL PROCESSING VARIABLES # ################################### export PS4='$SECONDS + ' date # # obtain unique process id (pid) and make temp directories # export pid=$$ export DATA=/tmpnwprd2/${job}.${pid} mkdir $DATA cd $DATA #################################### # Determine Job Output Name on System #################################### export outid="LL$job" export jobid="${outid}.o${pid}" export pgmout="OUTPUT.${pid}" export cycle=t${cyc}z #################################### # File To Log Msgs #################################### if [ "$envir" = 'prod' ] || [ "$envir" = 'para' ] || [ "$envir" = 'test' ] then # NCO if [ $envir = "prod" ] then export jlogfile=/com/logs/jlogfiles/jlogfile.${job}.${pid} else export jlogfile=/com/logs/${envir}/jlogfile #export DBNROOT=/nwprod/spa_util/para_dbn export DBNROOT=/nwprod/spa_util/fakedbn fi else # DEV export jlogfile=/dev/null fi #################################### # #################################### export SENDCOM=YES export SENDECF=YES # CMC data is only included at 00z and 12z, so only alert at these times if test "$cyc" = "06" -o "$cyc" = "18"; then export SENDDBN=YES else export SENDDBN=YES fi # # Set up model and cycle specific variables # export NET=gens export RUN=naefs export fend=384 export finc=6 export fstart=06 export model=ensemble export GRIB= export EXT="" # # Now set up GEMPAK/NTRANS environment # . /nwprod/gempak/.gempak ######################### # Specify Execution Areas ######################### export HOMEnaefs=${HOMEnaefs:-/nw${envir}/naefs.${model_ver}} export EXECnaefs=${EXECnaefs:-$HOMEnaefs/exec} export FIXnaefs=${FIXnaefs:-$HOMEnaefs/fix} export USHnaefs=${USHnaefs:-$HOMEnaefs/ush} ################################### # Set up the UTILITIES ################################### export utilscript=/nwprod/util/ush export utilities=/nwprod/util/ush export utilexec=/nwprod/util/exec # Run setup to initialize working directory and utility scripts sh $utilscript/setup.sh # Run setpdy and initialize PDY variables sh $utilscript/setpdy.sh . PDY export COM=/com/${NET}/${envir} export COMIN_BC=${COM}/${RUN}.${PDY}/${cyc}/pgrba_bc export COMIN_AN=${COM}/${RUN}.${PDY}/${cyc}/pgrba_an export COMOUT=/com/nawips/${envir}/${RUN}.${PDY} if [ ! -f $COMOUT ] ; then mkdir -p -m 775 $COMOUT fi env DATAHOLD=$DATA ######################################################## # Execute the script. for member in 10pt 90pt 50pt avg spr mode do export model=ge${member} export DATA=$DATAHOLD/${member}_${RUN} mkdir -p $DATA cd $DATA # Run setup to initialize working directory and utility scripts sh $utilscript/setup.sh if test "$member" = "10pt"; then export DBN_ALERT_TYPE=NAEFS_10BC_GEMPAK elif test "$member" = "50pt"; then export DBN_ALERT_TYPE=NAEFS_50BC_GEMPAK elif test "$member" = "90pt"; then export DBN_ALERT_TYPE=NAEFS_90BC_GEMPAK elif test "$member" = "avg"; then export DBN_ALERT_TYPE=NAEFS_AVGBC_GEMPAK elif test "$member" = "spr"; then export DBN_ALERT_TYPE=NAEFS_SPRBC_GEMPAK elif test "$member" = "mode"; then export DBN_ALERT_TYPE=NAEFS_MODEBC_GEMPAK fi export COMIN=$COMIN_BC ${HOMEnaefs}/scripts/exnawips.sh.ecf > $DATAHOLD/${member}.out 2>&1 & done ######################################################## export DATA=$DATAHOLD/anv_naefs mkdir -p $DATA cd $DATA # Run setup to initialize working directory and utility scripts sh $utilscript/setup.sh export DBN_ALERT_TYPE=NAEFS_AVGAN_GEMPAK export COMIN=$COMIN_AN export RUN=naefs export model=geavganv ${HOMEnaefs}/scripts/exnawips.sh.ecf > $DATAHOLD/anv.out 2>&1 & ######################################################## wait cd $DATAHOLD for member in 10pt 90pt 50pt avg spr mode do set +x echo "######################################" echo " $member.OUT " echo "######################################" set -x cat ${member}.out done for member in anv do set +x echo "######################################" echo " $member.OUT " echo "######################################" set -x cat ${member}.out done cd /tmpnwprd2 rm -rf $DATA date