#!/bin/ksh set -xa export MP_IOAGENT_CNT=all export MP_IO_BUFFER_SIZE=8M # # Specify whether the run is production or development # export RUN_ENVIR=${RUN_ENVIR:-nco} ##################################################################################### # Run config file to get input parameters # This config file should define the following variables # DATA_IN: Location of working directory, default to ${DATAROOT} # DEV_ECF: 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 ${COMROOT}/$NET/${envir} # COM_OUT: Directory for output file, default to ${COMROOT}/$NET/${envir} # gespath: Directory for the guess or restart files, default to ${GESROOT}/${envir} ##################################################################################### if [ "$RUN_ENVIR" != nco ] ### For Developers then hrrr_ver=${hrrr_ver:-v4.0.0} PARA_CONFIG=${hrrr_para_config:-/meso/save/${LOGNAME}/hrrr.${hrrr_ver}/user/hrrr_para_config} if [ -s $PARA_CONFIG ] ; then . $PARA_CONFIG ; fi export userid=$LOGNAME fi ################################### # Specify NET and RUN Name and model #################################### export NET=${NET:-hrrr} export RUN=${RUN:-hrrr} export model=${model:-hrrr} export PS4='$SECONDS + ' date ######################################################## # obtain unique process id (pid) and make temp directory ######################################################## export DATA=${DATAROOT}/hrrr_${dom}_prep_radar_${envir}_${cyc} if [ ! -d $DATA ]; then mkdir -p $DATA fi rm -rf ${DATA}/${subhtime} mkdir ${DATA}/${subhtime} cd ${DATA}/${subhtime} export cycle=t${cyc}z export tmmark=tm00 export cycm1=`expr $cyc - 1` if [ "$cyc" = 00 ]; then cycm1=23 else cycm1=$(printf "%02d" $cycm1) fi export pgmout="OUTPUT.$$" #################################### # SENDECF - Flag Events on ECF # SENDCOM - Copy Files From TMPDIR to $COMOUT # SENDDBN - Issue DBNet Client Calls # GET_IOPROFILE - Run I/O statistics #################################### export SENDECF=${SENDECF:-YES} export SENDCOM=${SENDCOM:-YES} export SENDDBN=${SENDDBN:-YES} #################################### # Specify Execution Areas #################################### export HOMEhrrr=${HOMEhrrr:-${PACKAGEROOT}/${NET}.${hrrr_ver}} export SCRIPTShrrr=${SCRIPTShrrr:-$HOMEhrrr/scripts} export FIXhrrr=${FIXhrrr:-$HOMEhrrr/fix/${dom}} export PARMhrrr=${PARMhrrr:-$HOMEhrrr/parm/${dom}} export EXEChrrr=${EXEChrrr:-$HOMEhrrr/exec} export USHhrrr=${USHhrrr:-$HOMEhrrr/ush/${dom}} ############################## # Run setpdy and initialize PDY variables ############################## setpdy.sh . PDY ########################################### # Define input data directories ########################################### # Hourly Radar Data # JY - 2beRemoved: export COMINradar=${COMINradar:-$(compath.py $envir/hourly/$radar_ver)} export COMINradar=${COMINradar:-$(compath.py $envir/radarl2/$radarl2_ver)} # Hourly Lightning Data export COMINlight=${COMINlight:-$(compath.py $envir/obsproc/$obsproc_ver)} # Hourly Mosaic Data #export DCOMROOT=${DCOMROOT:-/lfs/h1/ops/$envir/dcom} export COMINmosaic=${COMINmosaic:-${DCOMROOT}/ldmdata/obs/upperair/mrms} ############################################## # Define COM directories ############################################## # for testing with canned data #export COMROOT=${COMROOT:-/lfs/h2/emc/ptmp/Benjamin.Blake/com} #export COMIN=${COMIN:-${COMROOT}/${NET}/${hrrr_ver}/${RUN}.${PDY}/${dom}} #export COMOUT=${COMOUT:-${COMROOT}/${NET}/${hrrr_ver}/${RUN}.${PDY}/${dom}} # for WCOSS2 ops export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${hrrr_ver})/${RUN}.${PDY}/${dom}} export COMOUT=${COMOUT:-$(compath.py ${envir}/${NET}/${hrrr_ver})/${RUN}.${PDY}/${dom}} mkdir -m 775 -p $COMOUT env ######################################################## # Execute the script. ${HRRR_PREPRADARSH:-$HOMEhrrr/scripts/${dom}/exhrrr_prep_radar.sh} ######################################################## cat $pgmout msg="ENDED NORMALLY." postmsg "$jlogfile" "$msg" export KEEPDATA=YES ############################## # Remove the Temporary working directory ############################## cd $DATA if [ ${KEEPDATA} = NO ] ; then rm -rf $DATA ; fi date