#!/bin/ksh set -xa ######################################## # RAP Smoke Source Preparation for partial cycle ######################################## ###################################################### # 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:-rap} export RUN=${RUN:-rap_p} 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_p} # . /${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_smoke_pcyc_${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 HOMErap=${HOMErap:-${PACKAGEROOT}/${NET}.${rap_ver}} export EXECrap=${EXECrap:-${HOMErap}/exec} export FIXrap=${FIXrap:-${HOMErap}/fix} export PARMrap=${PARMrap:-${HOMErap}/parm} export USHrap=${USHrap:-${HOMErap}/ush} export FIXcrtm=${FIXcrtm:-$CRTM_FIX} ########################################### # 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 -o ${NET}/${rap_ver})/${RUN}.${PDY}} export COMINsst=${COMINsst:-$(compath.py nsst/${nsst_ver}/nsst.${PDY})} export PREPDIR=${PREPDIR:-$(compath.py obsproc/${obsproc_ver})} #export PREPDIR2=${PREPDIR2:-$(compath.py obsproc/${obsproc_ver})} export PREPDIR2=${PREPDIR2:-$(compath.py ${NET}/${rap_ver})} mkdir -m 775 -p $COMOUT ############################################## # Define GES directories ############################################## export gespath=${gespath:-$(compath.py ${NET}/${rap_ver})/nwges} export RAPBC=${RAPBC:-$gespath/rapbc} export RAPGES_FCYC=${RAPGES_FCYC:-$gespath/rapges} export RAPGES_PCYC=${RAPGES_PCYC:-$gespath/rapges_pcyc} export RAPGES_ENKF=${RAPGES_ENKF:-$gespath/rapges_enkf} export RAPGES_SATBIAS=${RAPGES_SATBIAS:-$gespath/rapges_satbias} mkdir -m 775 -p $RAPBC $RAPGES_FCYC $RAPGES_PCYC $RAPGES_SATBIAS env ####################################### # Define observation source directories ####################################### export DCOM_VIIRS_NPP="$DCOMROOT/" export DCOM_VIIRS_J01="$DCOMROOT/" export DCOM_MODIS="$DCOMROOT/" test -d "$DCOM_VIIRS_NPP" test -d "$DCOM_VIIRS_J01" test -d "$MODIS_DIR" export VEG_TYPE_DATA="$FIXrap/smoke/SURFACE_DATA/2013_PREP" ######################################################## # Execute the script. set -e ${RAP_SMOKESH:-$HOMErap/scripts/exrap_prep_smoke.sh} ######################################################## msg="ENDED NORMALLY." postmsg "$msg" export KEEPDATA=YES ############################## # Remove the Temporary working directory ############################## cd $DATAROOT if [ ${KEEPDATA} = NO ] ; then rm -rf $DATA ; fi date