#!/bin/ksh -l set -xa ######################################## # HRRR Smoke Source Preparation ######################################## ###################################################### # The following two variable 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:-hrrr} ##################################################################################### # 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:-hrrr} # . /${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}_prep_smoke_${envir}_${cyc} mkdir -p $DATA cd $DATA export cycle=t${cyc}z export tmmark=tm00 #################################### # 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 HOMEhrrr=${HOMEhrrr:-${PACKAGEROOT}/${NET}.${hrrr_ver}} export EXEChrrr=${EXEChrrr:-${HOMEhrrr}/exec} export FIXhrrr=${FIXhrrr:-${HOMEhrrr}/fix/${dom}} export PARMhrrr=${PARMhrrr:-${HOMEhrrr}/parm/${dom}} export USHhrrr=${USHhrrr:-${HOMEhrrr}/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}/${hrrr_ver}/${RUN}.${PDY}/${dom}} #export COMINm1=${COMIN:-${COMROOT}/${NET}/${hrrr_ver}/${RUN}.${PDYm1}/${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 COMINm1=${COMIN:-$(compath.py ${envir}/${NET}/${hrrr_ver})/${RUN}.${PDYm1}/${dom}} export COMOUT=${COMOUT:-$(compath.py ${envir}/${NET}/${hrrr_ver})/${RUN}.${PDY}/${dom}} mkdir -m 775 -p $COMOUT ####################################### # Define observation source directories ####################################### #export DCOMROOT=${DCOMROOT:-/lfs/h1/ops/$envir/dcom} export DCOM_MODIS=${DCOM_MODIS:-"$DCOMROOT/"} export DCOM_VIIRS_NPP=${DCOM_VIIRS_NPP:-"$DCOMROOT/"} export DCOM_VIIRS_J01=${DCOM_VIIRS_J01:-"$DCOMROOT/"} export VEG_TYPE_DATA="$FIXhrrr/smoke/SURFACE_DATA/2013_PREP" env ######################################################## # Execute the script. set -e ${HRRR_SMOKESH:-$HOMEhrrr/scripts/$dom/exhrrr_prep_smoke.sh} ######################################################## msg="ENDED NORMALLY." postmsg "$jlogfile" "$msg" export KEEPDATA=YES ############################## # Remove the Temporary working directory ############################## cd $DATAROOT if [ ${KEEPDATA} = NO ] ; then rm -rf $DATA ; fi date