#!/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_cloud_${envir}_${cyc} mkdir -p $DATA cd $DATA export cycle=t${cyc}z export tmmark=tm00 export pgmout="OUTPUT.$$" #################################### # SENDECF - Flag Events on ECF # SENDCOM - Copy Files From TMPDIR to $COMOUT # SENDDBN - Issue DBNet Client Calls #################################### 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 ########################################### # NASA LARC Data if [ $cyc -eq 00 -o $cyc -eq 12 ]; then export RAP_RUN=rap_e else export RAP_RUN=rap fi export COMINnasalarc=${COMINnasalarc:-$(compath.py $envir/obsproc/$obsproc_ver/${RAP_RUN}.${PDY})} ############################################## # 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_PREPCLOUDSSH:-$HOMEhrrr/scripts/${dom}/exhrrr_prep_cloud.sh} ######################################################## cat $pgmout msg="ENDED NORMALLY." postmsg "$jlogfile" "$msg" ############################## # Remove the Temporary working directory ############################## cd $DATA if [ ${KEEPDATA} = NO ] ; then rm -rf $DATA ; fi date