#!/bin/ksh set -xa echo "1 NWROOT=",${NWROOT} ############################################ # RAP Post Manager to Release Post-Processor # Jobs as the Forecast Progresses ############################################ ###################################################### # The following two variables could be defined in the # loadleveler 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} export SENDECF=${SENDECF:-YES} ################################### # Specify NET and RUN Name and model #################################### export NET=${NET:-rap} export RUN=${RUN:-rap} export model=${model:-rap} ##################################################################################### # This block is for Developer's test run: # Run config file to get input parameters # This config file should define the following variables # DATA_IN: Location of working directory, default to /tmpnwprd # SENDECF: If the job is to be running using ECF, default to YES # SENDDBN: Set to NO for developers, default to YES # COM_IN: Directory for input files, default to /com/$NET/${envir} # COM_OUT: Directory for output file, default to /com/$NET/${envir} # gespath: Directory for the guess or restart files, default to /nwges/${envir} ##################################################################################### if [ "$RUN_ENVIR" != nco ] ### For Developers, "group_name" is passed from the SMS script then group_name=${group_name:-meso} package_name=${package_name:-rap} # . /${group_name}/save/${LOGNAME}/${package_name}/nwprod/parm/${package_name}_para_config export userid=${userid:-$LOGNAME} fi export PS4='$SECONDS + ' date #################################### # obtain unique process id (pid) and make temp directory #################################### export DATA=$DATAROOT/rap_postmgr_${cyc}.$$ export DATApostchk=$DATAROOT/rap_postchk_${envir}_${cyc} mkdir -p $DATA $DATApostchk cd $DATA export cycle=t${cyc}z export tmmark=${tmmark:-tm00} export pgmout="OUTPUT.$$" #################################### # SENDECF - Flag Events on ECF # SENDCOM - Copy files to /com directory #################################### export SENDECF=${SENDECF:-YES} export SENDCOM=${SENDCOM:-YES} export SENDDBN=${SENDDBN:-NO} #################################### # Specify Execution Areas #################################### export HOMErap=${HOMErap:-${NWROOT}/${NET}.${rap_ver}} export EXECrap=${EXECrap:-${HOMErap}/exec} export FIXrap=${FIXrap:-${HOMErap}/fix} export PARMrap=${PARMrap:-${HOMErap}/parm} export USHrap=${USHrap:-${HOMErap}/ush} ########################################### # Run setpdy and initialize PDY variables ########################################### setpdy.sh . ./PDY ############################################## # Define COM directories ############################################## export COMIN=${COMIN:-$(compath.py ${NET}/${rap_ver})/${RUN}.${PDY}} export COMOUT=${COMOUT:-$(compath.py ${NET}/${rap_ver})/${RUN}.${PDY}} mkdir -m 775 -p $COMOUT ############################################## # Define GES directories ############################################## export gespath=${gespath:-$(compath.py ${NET}/${rap_ver})/nwges} env export INPUT_DATA=$DATAROOT/rap_fcst_${envir}_${cyc} ######################################################## # Execute the script. ${RAP_POSTMGRSH:-$HOMErap/scripts/exrap_postmgr.sh} ######################################################## cat $pgmout msg="ENDED NORMALLY." postmsg "$msg" export KEEPDATA=YES ############################## # Remove the Temporary working directory ############################## cd $DATAROOT if [ ${KEEPDATA} = NO ] ; then rm -rf $DATA ; fi date