#!/bin/sh 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=rtma #export RUN=rtma2p5, akrtma, hirtma, prrtma, gurtma , or rurtma2p5 #RUN MUST COME FROM HIGHER LEVEL SCRIPT! /MPondeca, 26Jul2015 ########################################### if [ "${RUN_ENVIR,,}" != nco ] ### For Developers then configfile=${configfile:-/meso/save/${LOGNAME}/${NET}/user/${RUN}_para_config} . $configfile fi # Note: grib_util module loaded in submission (lsf or ecFlow) script ########################################################## # obtain unique process id (pid) and 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 -p $DATA cd $DATA #################################### # Define subtypes for DBN alerts #################################### if [ "$RUN" = rtma2p5 ]; then export DBN_ALERT_TYPE_2P5=${DBN_ALERT_TYPE_2P5:-RTMA_2P5_GRIB} export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-RTMA_GRIB} export DBN_ALERT_TYPE_NWRFC=${DBN_ALERT_TYPE_NWRFC:-RTMA_NWRFC2P5_GRIB} fi if [ "$RUN" = akrtma ]; then export DBN_ALERT_TYPE_3P0=${DBN_ALERT_TYPE_3P0:-RTMA_AK3P0_GRIB} export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-RTMA_AK_GRIB} fi if [ "$RUN" = hirtma ]; then export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-RTMA_HI_GRIB} fi if [ "$RUN" = prrtma ]; then export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-RTMA_PR_GRIB} fi if [ "$RUN" = gurtma ]; then export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-RTMA_GUAM_GRIB} fi if [ "$RUN" = rtma2p5_ru ]; then export DBN_ALERT_TYPE_2P5=${DBN_ALERT_TYPE_2P5:-RTMA_2P5_RU_GB2} fi export NTC_ALERT_TYPE=${NTC_ALERT_TYPE:-NTC_LOW} #################################### # Determine Job Output Name on System #################################### export pgmout=${pgmout:-"OUTPUT.$$"} export cycle=t${cyc}z export subcyc=${subcyc} #Note: Must define subcyc in upper level script. Can be 00, 15, 30, or 45 /MPondeca, 30Jun2017 #only used for rurtma2p5 # Specify Execution Areas export HOMErtma=${HOMErtma:-$NWROOT/rtma.${rtma_ver}} export EXECrtma=${EXECrtma:-$HOMErtma/exec} export FIXrtma=${FIXrtma:-$HOMErtma/fix/${RUN}} export PARMrtma=${PARMrtma:-$HOMErtma/parm} export USHrtma=${USHrtma:-$HOMErtma/ush/${RUN}} export utilparm=${utilparm:-$HOMErtma/util/parm} export MPIEXEC=${MPIEXEC:-mpiexec} ########################################### # Run setpdy and initialize PDY variables ########################################### setpdy.sh . ./PDY ################################################# # Set up the INPUT and OUTPUT directories ################################################# export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${rtma_ver})/${RUN}.${PDY}} export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${rtma_ver})/${RUN}.${PDY}} export GESIN=${GESIN:-$(compath.py ${envir}/${NET}/${rtma_ver})/nwges/${RUN}.${PDY}} export GESOUT=${GESOUT:-$(compath.py -o ${NET}/${rtma_ver})/nwges/${RUN}.${PDY}} export GESIN=${GESIN:-${COMIN}} export GESOUT=${GESOUT:-${COMOUT}} mkdir -p $COMOUT/wmo $GESOUT ########################################################## # make temp data directory, created by gsianal job # and removed by post jobs ########################################################## if [ "$RUN" = rtma2p5_ru ]; then export DATAshared=${DATAshared:-$DATAROOT/${RUN}_${PDY}_${cyc}${subcyc}_${envir}_${rtma_ver}} else export DATAshared=${DATAshared:-$DATAROOT/${RUN}_${PDY}_${cyc}_${envir}_${rtma_ver}} fi env ###################### # Execute the script. ###################### $HOMErtma/scripts/${RUN}/ex${RUN}_post.sh export err=$?; err_chk cat $pgmout postmsg "$0 of $job completed normally" if [ "${KEEPDATA^^}" != YES ]; then rm -rf $DATA rm -rf $DATAshared fi date