#!/bin/sh set -xa # ################################### # SET SHELL PROCESSING VARIABLES # ################################### export PS4='$SECONDS + ' date # export HOMEnam=$PACKAGEROOT/nam.${nam_ver} export JJOBSnam=$HOMEnam/jobs export WKDIRNAME=${job}.${pid} # Setup directories and common environment variables . ${JJOBSnam}/JNAM_ENVARS # # obtain unique process id (pid) and make temp directories # export pid=$$ export pgmout="OUTPUT.${pid}" export DATA=${DATAROOT:?}/${jobid:?} mkdir $DATA cd $DATA ################################# # Set up the NET and RUN ################################# export NET=nam export RUN=nam export model=nam export cycle=t${cyc}z #################################### # Determine Job Output Name on System #################################### export outid="LL$job" export jobid="${outid}.o${pid}" ################################ # Set up the HOME directory ################################ ##### export HOMEnam=$PACKAGEROOT/nam.${nam_ver} export EXECnam=$HOMEnam/exec export FIXnam=$HOMEnam/fix export PARMnam=$HOMEnam/parm export USHnam=$HOMEnam/ush ################################### # Set up the UTILITIES ; UTILSHAREDROOT set in util_shared module load ################################### export HOMEutil=$UTILSHAREDROOT export EXECutil=$UTILSHAREDROOT/exec export FIXutil=$FIXshared export PARMutil=$HOMEnam/util/parm export USHutil=$USHshared export UTIL_USHnam=${UTIL_USHnam:-${HOMEnam}/util/ush} # Run setpdy and initialize PDY variables setpdy.sh . ./PDY ######################################## # Set up the input/output directory ######################################## # JY export COMIN=$COMROOT/nam/${nam_ver}/${RUN}.${PDY} #export COMOUT=$COMROOT/nam/${nam_ver}/${RUN}.${PDY} export COMIN=${COMIN:-$(compath.py $envir/nam/$nam_ver)/${RUN}.${PDY}} export COMOUT=${COMOUT:-$(compath.py $envir/nam/$nam_ver)/${RUN}.${PDY}} export COMOUTwmo=${COMOUT}/wmo export pcom=$COMOUTwmo mkdir -p $COMOUT $COMOUTwmo env ######################################################## # Execute the script. $HOMEnam/scripts/exnam_grib_awips.sh $fcsthrs ######################################################## ############################## # Remove the Temporary working directory ############################## cd $DATAROOT if [ ${KEEPDATA:-YES} = NO ] ; then rm -rf $DATA ; fi date