#!/bin/sh export PARAFLAG=${PARAFLAG:-NO} ######################################## # Run HWRF Gempak ######################################## if [ ${PARAFLAG} == NO ]; then $SMSBIN/smsinit $LOADL_STEP_ID fi set -xa export MP_IOAGENT_CNT=all export MP_IO_BUFFER_SIZE=8M # #### 08/25/1999 ################### # SET SHELL PROCESSING VARIABLES # ################################### export PS4='$SECONDS + ' date if [ ${PARAFLAG} = 'YES' ]; then export yymmdd=` echo $PDY | cut -c3-8` export yymmddhh=${yymmdd}${cyc} export jlogfile=${DATA}/jlogfile export SENDSMS=YES export SENDCOM=YES export SENDDBN=NO if [ ! -d $outdir ]; then mkdir -p $outdir; fi if [ ! -d $COMOUT ]; then mkdir -p $COMOUT; fi else export NWPROD=${NWPROD:-/nwprod} fi ############################################################### # This block can be modified for different Production test # environment. This is used for operational testings ############################################################### if [ ${PARAFLAG} == NO -a $envir != prod ]; then export SENDDBN=${SENDDBN:-NO} export jlogfile=${jlogfile:-/com/logs/${envir}/jlogfile} export DBN_ALERT_TYPE=TBD_PARA export DBNROOT=/nwprod/spa_util/fakedbn fi ########################################################### # obtain unique process id (pid) and make temp directories ########################################################### export pid=$$ export DATA=/tmpnwprd/${job}.${pid} mkdir $DATA cd $DATA export cycle=t${cyc}z #################################### # Specify NET and RUN Name and model #################################### export NET=hur export RUN=hwrf #################################### # File To Log Msgs #################################### export jlogfile=${jlogfile:-/com/logs/jlogfile} #################################### # Determine Job Output Name on System #################################### export outid="LL$job" export jobid="${outid}.o${pid}" export pgmout="OUTPUT.${pid}" #################################### # SENDSMS - Flag Events on SMS # SENDCOM - Copy Files From TMPDIR to $COMOUT # SENDDBN - Issue DBNet Client Calls # RERUN - Rerun fcst from beginning (default no) #################################### export SENDSMS=${SENDSMS:-YES} export SENDCOM=${SENDCOM:-YES} export SENDDBN=${SENDDBN:-YES} #################################### # Specify HWRF version number #################################### export HWRF_VERSION=${HWRF_VERSION:-${model_ver}} # # Copy model specific GEMPAK tables into working directory # # # Now set up GEMPAK/NTRANS environment # . /nwprod/gempak/.gempak ################################### # 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 #export PDY=20120101 # Run setpdy and initialize PDY variables sh $utilscript/setpdy.sh . PDY export PDY2=`echo $PDY | cut -c3-` export com=/com/${NET}/${envir} export COMIN=/com/${NET}/${envir}/${RUN}.${PDY}${cyc} ################################################# # Set up model and cycle specific variables ################################################# if test -f ${COMIN}/storm${storm_num}.holdvars.txt then . ${COMIN}/storm${storm_num}.holdvars.txt else msg="Hurricane WRF to Run But No storm${storm_num}.holdvars.txt file found." postmsg "$jlogfile" "$msg" export pgm=JHWRF_GEMPAK.sms.prod export err=911;err_chk fi #export DATA=/tmpnwprd/${job}.${pid} export fend=126 export finc=06 export fstart=00 export storm=`echo $STORM | tr [A-Z] [a-z]` export model="${storm}${stormid}" export EXT="" export DBN_ALERT_TYPE=HWRF_GEMPAK export COMOUT=/com/nawips/$envir/${RUN}.${PDY}/$model if [ ! -f $COMOUT ] ; then mkdir -p -m 775 $COMOUT if [ $? -ne 0 ]; then echo "Could not make $COMOUT directory, will retry" mkdir -p -m 775 $COMOUT if [ $? -ne 0 ]; then err_exit "Could not make $COMOUT directory, ABORT" fi fi fi env DATAHOLD=$DATA ################################################### # Now run script for the combined grid ################################################### export DATA=$DATAHOLD/hwrf_c mkdir -p $DATA cd $DATA $utilscript/setup.sh export GRIB=hwrfprs_c.grbf /nw${envir}/scripts/exnawips.sh.sms > $DATAHOLD/hwrf_c.out 2>&1 & ######################################################## ################################################### # Now run a second time for the nest ################################################### export DATA=$DATAHOLD/hwrf_n mkdir -p $DATA cd $DATA $utilscript/setup.sh export GRIB=hwrfprs_n.grbf /nw${envir}/scripts/exnawips.sh.sms > $DATAHOLD/hwrf_n.out 2>&1 & ######################################################## ################################################### # Now run a third time for the parent grib file ################################################### export DATA=$DATAHOLD/hwrf_p mkdir -p $DATA cd $DATA $utilscript/setup.sh export GRIB=hwrfprs_p.grbf /nw${envir}/scripts/exnawips.sh.sms > $DATAHOLD/hwrf_p.out 2>&1 & ######################################################## wait cd $DATAHOLD cat hwrf_c.out cat hwrf_n.out cat hwrf_p.out cd /tmpnwprd #rm -rf $DATAHOLD date $SMSBIN/smscomplete