#!/bin/sh ########################## # Runs URMA 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:-urma} #export RUN=${RUN:-urma2p5} #urma2p5, akurma, hiurma, prurma, guurma # Must be defined in ecf script / MPondeca, 26Jul2015 ########################################### # Run urma_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 #################################### # 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" = urma2p5 ]; then export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-URMA_2P5_GEMPAK} fi if [ "$RUN" = akurma ]; then export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-URMA_AK3P0_GEMPAK} fi # Note: gempak module loaded in submission (lsf or ecFlow) script ################################### # Specify Execution Areas ################################### export HOMEurma=${HOMEurma:-${NWROOT:?}/urma.${urma_ver}} export HOMEscript=${HOMEscript:-${HOMEurma}/scripts} ########################################## # Run setpdy and initialize PDY variables setpdy.sh . ./PDY export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${urma_ver})/${RUN}.${PDY}} export COMOUT=${COMOUT_GEMPAK:-$(compath.py -o ${NET}/${urma_ver})/${RUN}.${PDY}/gempak} if [ ! -f $COMOUT ] ; then mkdir -p -m 775 $COMOUT fi # If it has not been at least 24 hours since the last coldstart, turn off MinT/MaxT usage if [ -n "$LAST_RESTART" ] && [ ${PDY}${cyc} -lt $(${NDATE:?} +24 $LAST_RESTART) ]; then echo -e "\nWARNING: Cold restart is in process. MinT/MaxT GUESS FILES WILL NOT BE USED!\n" export cyc_mxtm=-1 export cyc_mitm=-1 else export cyc_mxtm=08 export cyc_mitm=20 fi env ################################################################# # Execute the script to convert the Real Time Meso Analysis URMA # 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}/exurma_nawips.sh export err=$?; err_chk ################################################################# cat $pgmout postmsg "$0 of $job completed normally" if [ "${KEEPDATA^^}" != YES ]; then rm -rf $DATA fi date