#!/bin/sh ######################################## # Runs RAP Postprocessing out to 18 hours ######################################## set -xa ###################################################### # The following two variables could be defined in the # loadleveler submission script (the ecf script), if # not they will take the default values which is set # for the NCO running enviroment ####################################################### export RUN_ENVIR=${RUN_ENVIR:-nco} export SENDECF=${SENDECF:-YES} # #### 08/25/1999 ################### # SET SHELL PROCESSING VARIABLES # ################################### export PS4='$SECONDS + ' date # # obtain unique process id (pid) and make temp directories # export DATA=${DATA:-$DATAROOT/${jobid}} mkdir $DATA cd $DATA export cycle=t${cyc}z export pgmout="OUTPUT.$$" export SENDCOM=${SENDCOM:-YES} export SENDDBN=${SENDDBN:-YES} export SENDECF=${SENDECF:-YES} # # Set up model and cycle specific variables # export NET=rap export RUN=rap if [ $cyc -eq 03 -o $cyc -eq 09 -o $cyc -eq 15 -o $cyc -eq 21 ] ; then export fend=51 else export fend=21 fi export finc=1 export fstart=00 export model=rap export EXT="" # Run setpdy and initialize PDY variables setpdy.sh . ./PDY ############################################## # Define COM directories ############################################## # for testing with canned data #export COMROOT=${COMROOT:-/lfs/h2/emc/ptmp/Ming.Hu/com} #export COMIN=${COMIN:-${COMROOT}/${NET}/${rap_ver}/${RUN}.${PDY}} # for wcoss2 ops export COMIN=${COMIN:-$(compath.py ${NET}/${rap_ver})/${RUN}.${PDY}} export COMAWP=${COMAWP:-${COMIN}/gempak} if [ ! -f $COMAWP ] ; then mkdir -p -m 775 $COMAWP fi env export HOMErap=${HOMErap:-${PACKAGEROOT}/${NET}.${rap_ver}} export SCRIPTSrap=${SCRIPTSrap:-$HOMErap/scripts} export GEMPAKrap=${GEMPAKrap:-$HOMErap/gempak} export NAGRIB_TABLE=${NAGRIB_TABLE:-$GEMPAKrap/fix/nagrib.tbl} ######################################################## # RAP40 ######################################################## mkdir -p $DATA/rap export EXT=.grib2 export RUN=rap export GRIB=awp236pgrbf export DBN_ALERT_TYPE=RAP_GEMPAK echo "$SCRIPTSrap/exrap_nawips.sh $RUN $GRIB $DBN_ALERT_TYPE $EXT &> rap.log " >>poescript ######################################################## # RAP20 ######################################################## mkdir -p $DATA/rap20 export EXT=.grib2 export RUN=rap20 export GRIB=awp252pgrbf export DBN_ALERT_TYPE=RAP20_GEMPAK echo "$SCRIPTSrap/exrap_nawips.sh $RUN $GRIB $DBN_ALERT_TYPE $EXT &> rap20.log " >>poescript ######################################################## # RAP13 ######################################################## mkdir -p $DATA/rap13 export EXT=.grib2 export RUN=rap13 export GRIB=awp130pgrbf export DBN_ALERT_TYPE=RAP13_GEMPAK echo "$SCRIPTSrap/exrap_nawips.sh $RUN $GRIB $DBN_ALERT_TYPE $EXT &> rap13.log " >>poescript ######################################################## # RAP32 ######################################################## mkdir -p $DATA/rap32 export EXT=.grib2 export RUN=rap32 export GRIB=awip32f export DBN_ALERT_TYPE=RAP32_GEMPAK echo "$SCRIPTSrap/exrap_nawips.sh $RUN $GRIB $DBN_ALERT_TYPE $EXT &> rap32.log " >>poescript ######################################################## # RAPAK ######################################################## mkdir -p $DATA/rapak export EXT=.grib2 export RUN=rapak export GRIB=awp242f export DBN_ALERT_TYPE=RAPAK_GEMPAK echo "$SCRIPTSrap/exrap_nawips.sh $RUN $GRIB $DBN_ALERT_TYPE $EXT &> rapak.log " >>poescript ######################################################## # RAPHI ######################################################## mkdir -p $DATA/raphi export EXT=.grib2 export RUN=raphi export GRIB=awp243f export DBN_ALERT_TYPE=RAPHI_GEMPAK echo "$SCRIPTSrap/exrap_nawips.sh $RUN $GRIB $DBN_ALERT_TYPE $EXT &> raphi.log " >>poescript cat poescript chmod 775 $DATA/poescript export MP_PGMMODEL=mpmd export MP_CMDFILE=$DATA/poescript # Execute the script. #aprun -N $PTILE -n $((NODES*PTILE)) cfp poescript mpiexec -np 8 --cpu-bind core cfp ./poescript cd $DATA cat rap20.log cat rap13.log cat rap32.log cat rapak.log cat raphi.log cd $DATAROOT if [ $KEEPDATA = NO ]; then rm -rf $DATA; fi date