#!/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 ########################################### # Run ${RUN}_config to get input parameters ########################################### 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" = urma2p5 ]; then export DBN_ALERT_TYPE_2P5=${DBN_ALERT_TYPE_2P5:-URMA_2P5_GB2} export DBN_ALERT_TYPE_NWRFC=${DBN_ALERT_TYPE_NWRFC:-URMA_NWRFC2P5_GB2} fi if [ "$RUN" = akurma ]; then export DBN_ALERT_TYPE_3P0=${DBN_ALERT_TYPE_3P0:-URMA_AK3P0_GB2} export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-URMA_AK_GB2} fi if [ "$RUN" = hiurma ]; then export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-URMA_HI_GB2} fi if [ "$RUN" = prurma ]; then export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-URMA_PR_GB2} fi if [ "$RUN" = guurma ]; then export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-URMA_GUAM_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 # 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 COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${urma_ver})/${RUN}.${PDY}} export COMINm1=${COMINm1:-$(compath.py ${envir}/${NET}/${urma_ver})/${RUN}.${PDYm1}} #path to grab minRH.grb2 export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${urma_ver})/${RUN}.${PDY}} export GESIN=${GESIN:-$(compath.py ${envir}/${NET}/${urma_ver})/nwges/${RUN}.${PDY}} export GESOUT=${GESOUT:-$(compath.py -o ${NET}/${urma_ver})/nwges/${RUN}.${PDY}} #export COMINsice=${COMINsice:-$(compath.py prod/seaice_analysis/${seaice_analysis_ver})} export COMINsice=${COMINsice:-$(compath.py ${envir}/seaice_analysis/${seaice_analysis_ver})} export GESIN=${GESIN:-${COMIN}} export GESOUT=${GESOUT:-${COMOUT}} # 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/wmo $GESOUT ########################################################## # make temp data directory, created by gsianal job # and removed by post jobs ########################################################## export DATAshared=${DATAshared:-$DATAROOT/${RUN}_${PDY}_${cyc}_${envir}_${urma_ver}} env ###################### # Execute the script. ###################### $HOMEurma/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