#!/bin/sh ########################################################## # This job obtains the initial guess from the Downscaling # GFS output ######################################################## 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 ########################################### # 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 #################################### # File To Log Msgs #################################### #################################### # Define subtypes for DBN alerts #################################### if [ "$RUN" = rtma2p5 ]; then export DBN_ALERT_TYPE_SMART=${DBN_ALERT_TYPE_SMART:-RTMA_SMARTCONUS2P5_GB2} fi #################################### # 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 HOMEscript=${HOMEscript:-${HOMErtma}/scripts} export EXECrtma=${EXECrtma:-$HOMErtma/exec} export FIXrtma=${FIXrtma:-$HOMErtma/fix/${RUN}} export PARMrtma=${PARMrtma:-$HOMErtma/parm} export USHrtma=${USHrtma:-$HOMErtma/ush/${RUN}} ########################################### # Run setpdy and initialize PDY variables ########################################### setpdy.sh . ./PDY ################################################# # Set up the INPUT and OUTPUT directories # Also prescribe paths to the input model data ################################################# export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${rtma_ver})/${RUN}.${PDY}} export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${rtma_ver})/${RUN}.${PDY}} mkdir -p $COMOUT export COMINrap=${COMINrap:-$(compath.py rap/${rap_ver})} export COMINhrrr=${COMINhrrr:-$(compath.py hrrr/${hrrr_ver})} export COMINsubhrrr=${COMINsubhrrr:-$(compath.py hrrr/${hrrr_ver})} export COMINnam=${COMINnam:-$(compath.py smartinit/${smartinit_ver}/nam.${PDY})} export COMINhiresw=${COMINhiresw:-$(compath.py hiresw/${hiresw_ver})} export COMINww3=${COMINww3:-$(compath.py gfs/${gfs_ver})} #export gespath=${gespath:-$(compath.py ${envir}/${NET}/${rtma_ver})} #unfortunate choice of name in exrurtma2p5_getguess.sh. #Change in next upgrade /MPondeca, 30Jun2017 export gespath=${gespath:-$(compath.py -o ${NET}/${rtma_ver})} export GESIN=${GESIN:-$(compath.py ${envir}/${NET}/${rtma_ver}/nwges)/${RUN}.${PDY}} export GESIN=${GESIN:-${COMIN}} if [[ "$RUN" = rtma2p5 || "$RUN" = akrtma || "$RUN" = hirtma || "$RUN" = prrtma || "$RUN" = gurtma || "$RUN" = rtma2p5_ru ]]; then export use_similarity_2dvar=${use_similarity_2dvar:-.true.} fi env ###################### # Execute the script. ###################### $HOMErtma/scripts/${RUN}/ex${RUN}_getguess.sh export err=$?; err_chk cat $pgmout postmsg "$0 of $job completed normally" if [ "${KEEPDATA^^}" != YES ]; then rm -rf $DATA fi date