#!/bin/ksh set -xa export MP_IOAGENT_CNT=all export MP_IO_BUFFER_SIZE=8M export LC_TIME=C #XXW: Temporary added for cactus date format issue ######################################## # HRRRDAS Preliminary data setup step ######################################## ###################################################### # 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:-hrrr} export RUN=${RUN:-hrrr} export model=${model:-hrrrdas} ##################################################################################### # 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:-hrrrdas} # . /${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/hrrr_${dom}_makebc_${envir}_${cyc} rm -rf $DATA mkdir -p $DATA cd $DATA export cycle=t${cyc}z export 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:-YES} #################################### # Specify Execution Areas #################################### export HOMEhrrrdas=${HOMEhrrr:-${PACKAGEROOT}/${NET}.${hrrr_ver}} export EXEChrrrdas=${EXEChrrrdas:-${HOMEhrrrdas}/exec} export FIXhrrrdas=${FIXhrrrdas:-${HOMEhrrrdas}/fix/${dom}} export PARMhrrrdas=${PARMhrrrdas:-${HOMEhrrrdas}/parm/${dom}} export USHhrrrdas=${USHhrrrdas:-${HOMEhrrrdas}/ush/${dom}} ########################################### # Run setpdy and initialize PDY variables ########################################### setpdy.sh . PDY ############################################## # Define COM directories ############################################## # for testing with canned data #export COMROOT=${COMROOT:-/lfs/h2/emc/ptmp/Benjamin.Blake/com} #export COMIN=${COMIN:-${COMROOT}/${NET}/${envir}/${RUN}.${PDY}/${dom}} #export COMOUT=${COMOUT:-${COMROOT}/${NET}/${envir}/${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}} export COMINgfs=${COMINgfs:-$(compath.py $envir/gfs/$gfs_ver)} export COMINsst=${COMINsst:-$(compath.py $envir/nsst/$nsst_ver)} mkdir -m 775 -p $COMOUT ############################################## # Define GES directories ############################################## # for testing with canned data #export GESROOT=${GESROOT:-${COMROOT}/${NET}/${hrrr_ver}/nwges} # for WCOSS2 ops export GESROOT=${GESROOT:-$(compath.py ${envir}/${NET}/${hrrr_ver})/nwges} export HRRRDASBC=${HRRRDASBC:-$GESROOT/hrrrdasbc} mkdir -m 775 -p $HRRRDASBC env ######################################################## # Execute the script. ${HRRRDAS_MAKEBCSH:-$HOMEhrrrdas/scripts/${dom}/exhrrrdas_makebc.sh} ######################################################## cat $pgmout msg="ENDED NORMALLY." postmsg "$jlogfile" "$msg" ############################## # Remove the Temporary working directory ############################## cd $DATAROOT if [ ${KEEPDATA} = NO ] ; then rm -rf $DATA ; fi date