#!/bin/sh ############################################### # Processes HRRR grib2 files into gempak files ############################################### set -xa ###################################################### # The following two variable could be defined in the # loadleveler submission script (the sms script), if # not they will take the default values which is set # for the NCO running enviroment ####################################################### export RUN_ENVIR=${RUN_ENVIR:-nco} # #### 08/25/1999 ################### # SET SHELL PROCESSING VARIABLES # ################################### export PS4='$SECONDS + ' date # # obtain unique process id (pid) and make temp directories # export DATA=${DATAROOT}/hrrr_${dom}_gempak_${envir}_${cyc} mkdir $DATA cd $DATA export pgmout="OUTPUT.$$" export cycle=t${cyc}z export SENDCOM=${SENDCOM:-YES} export SENDDBN=${SENDDBN:-YES} export SENDECF=${SENDECF:-YES} # # Set up model and cycle specific variables # export NET=hrrr export RUN=hrrr export finc=1 export fstart=00 export model=hrrr if [ $cyc -eq 00 -o $cyc -eq 06 -o $cyc -eq 12 -o $cyc -eq 18 ]; then export fend=48 else export fend=18 fi # Run setpdy and initialize PDY variables setpdy.sh . PDY # for testing with canned data #export COMROOT=${COMROOT:-/lfs/h2/emc/ptmp/Benjamin.Blake/com} #export COMIN=${COMIN:-${COMROOT}/${NET}/${hrrr_ver}/${RUN}.${PDY}/${dom}} #export COMOUT=${COMROOT}/${NET}/${hrrr_ver}/${RUN}.${PDY}/${dom}/gempak # for WCOSS2 ops export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${hrrr_ver})/${RUN}.${PDY}/${dom}} export COMOUT=${COMOUT:-$(compath.py ${envir}/${NET}/${hrrr_ver})/${RUN}.${PDY}/${dom}/gempak} if [ ! -f $COMOUT ] ; then mkdir -p -m 775 $COMOUT fi env export HOMEhrrr=${HOMEhrrr:-${PACKAGEROOT}/${NET}.${hrrr_ver}} export SCRIPTShrrr=${SCRIPTShrrr:-$HOMEhrrr/scripts/${dom}} export FIXgem=${GEMPAKhrrr:-$HOMEhrrr/gempak/fix} export RUN=hrrr export GRIB=wrfsfc if [ $dom = conus ]; then export DBN_ALERT_TYPE=HRRR_GEMPAK elif [ $dom = alaska ]; then export DBN_ALERT_TYPE=HRRR_AK_GEMPAK fi export EXT="" export ALERT_EXT=${ALERT_EXT:-} ######################################################## # Execute the script. ${HRRR_GEMPAKSH:-$SCRIPTShrrr/exhrrr_nawips.sh $RUN $GRIB $DBN_ALERT_TYPE $EXT} ######################################################## cd $DATA if [ ${KEEPDATA} = NO ] ; then rm -rf $DATA ; fi date