#!/bin/sh ########################## # Runs RTMA Gempak processing ########################## date export PS4=' $SECONDS + ' set -x ####################################################### # The following variable could be defined in the # 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} ###################### # Set NET and RUN ###################### export NET=${NET:-rtma} #export RUN=${RUN:-rtma2p5} #rtma2p5, akrtma, hirtma, prrtma, gurtma # Must be defined in ecf script / MPondeca, 26Jul2015 ########################################### # Run rtma_config to get input parameters ########################################### if [ "$RUN_ENVIR" = dev ] ### For Developers to specify the necessary parameters to overwrite the default settings then configfile=${configfile:-/meso/save/${LOGNAME}/${NET}/user/${RUN}_para_config} . $configfile fi # ################################### # make temp directories export DATA=${DATA:-${DATAROOT:?}/${jobid:?}} #jobid ($job.$LSB_JOBID MUST BE DEFINED IN TERNS OF $RUN IN UPPER LEVEL SCRIPT /MPondeca, 26Jul2015 mkdir $DATA cd $DATA #################################### # File To Log Msgs #################################### #################################### # Determine Job Output Name on System #################################### export pgmout=${pgmout:-"OUTPUT.$$"} export cycle=t${cyc}z # # Set up model and cycle specific variables # export GRIB=pgrbf export EXT="" if [ "$RUN" = rtma2p5 ]; then export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-RTMA_2P5_GEMPAK} fi if [ "$RUN" = akrtma ]; then export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-RTMA_AK3P0_GEMPAK} fi # Note: gempak module loaded in submission (lsf or ecFlow) script ################################### # Specify Execution Areas ################################### export HOMErtma=${HOMErtma:-${NWROOT:?}/rtma.${rtma_ver}} export HOMEscript=${HOMEscript:-${HOMErtma}/scripts} ########################################## # Run setpdy and initialize PDY variables setpdy.sh . ./PDY export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${rtma_ver})/${RUN}.${PDY}} export COMOUT=${COMOUT_GEMPAK:-$(compath.py -o ${NET}/${rtma_ver})/${RUN}.${PDY}/gempak} if [ ! -f $COMOUT ] ; then mkdir -p -m 775 $COMOUT fi env ################################################################# # Execute the script to convert the Real Time Meso Analysis RTMA # grib files to nawips format export fend=0 export finc=1 export fstart=0 #No GEMPAK FILES FOR HI or PR for some reason/ MPondeca, 26Jul2015 ${HOMEscript}/exrtma_nawips.sh export err=$?; err_chk ################################################################# cat $pgmout postmsg "$0 of $job completed normally" if [ "${KEEPDATA^^}" != YES ]; then rm -rf $DATA fi date