#!/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=urma #export RUN=urma2p5, akurma, hiurma, prurma, or guurma #RUN MUST COME FROM HIGHER LEVEL SCRIPT! /MPondeca, 26Jul2015 ########################################### if [ "$RUN_ENVIR" = dev ] ### For Developers then configfile=${configfile:-/meso/save/${LOGNAME}/${NET}/user/${RUN}_para_config} . $configfile fi ########################################################## # 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 #################################### # Determine Job Output Name on System #################################### export pgmout=${pgmout:-"OUTPUT.$$"} export cycle=t${cyc}z # Specify Execution Areas export HOMEurma=${HOMEurma:-$NWROOT/urma.${urma_ver}} export EXECurma=${EXECurma:-$HOMEurma/exec} export FIXurma=${FIXurma:-$HOMEurma/fix/${RUN}} export PARMurma=${PARMurma:-$HOMEurma/parm} export USHurma=${USHurma:-$HOMEurma/ush/${RUN}} export MPIEXEC=${MPIEXEC:-mpiexec} ########################################### # Run setpdy and initialize PDY variables ########################################### setpdy.sh . ./PDY ################################################# # Set up the INPUT and OUTPUT directories # and the cycles for the min/maxT analyzes ################################################# export COM_IN=${COM_IN:-$(compath.py ${envir}/${NET}/${urma_ver})} export COMIN=${COMIN:-$COM_IN/${RUN}.${PDY}} export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${urma_ver})/${RUN}.${PDY}} ### Input from the URMA for the prepbufr file: #export COMINobsproc_urma=${COMINobsproc_urma:-$(compath.py prod/obsproc/$obsproc_ver)/urma.${PDY}} export COMINobsproc_urma=${COMINobsproc_urma:-$(compath.py ${envir}/obsproc/${obsproc_ver})/urma.${PDY}} #export COMINobsproc_urma_m1=${COMINobsproc_urma_m1:-$(compath.py prod/obsproc/$obsproc_ver)/urma.${PDYm1}} export COMINobsproc_urma_m1=${COMINobsproc_urma_m1:-$(compath.py ${envir}/obsproc/${obsproc_ver})/urma.${PDYm1}} ### Input from the DCOM GOES CLOUD files export DCOMIN=${DCOMROOT}/prod # 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 mkdir -p $COMOUT ########################################################## # make temp data directory, created by gsianl job # and removed by post jobs ########################################################## export DATAshared=${DATAshared:-$DATAROOT/${RUN}_${PDY}_${cyc}_${envir}_${urma_ver}} mkdir -p $DATAshared env ###################### # Execute the script. ###################### $HOMEurma/scripts/${RUN}/ex${RUN}_gsianl.sh export err=$?; err_chk cat $pgmout postmsg "$0 of $job completed normally" if [ "${KEEPDATA^^}" != YES ]; then rm -rf $DATA fi date