#!/bin/sh set -xa export PS4='$SECONDS + ' date # #### 07/15/05 ############################### # SETUP CMC HI-RES POST PROCESSING VARIABLES # IN ORDER TO TRACK TROPICAL CYCLONES IN CMC # 7/15/05 - First implementation (Marchok) # ############################################# #################################### # obtain unique process id (pid) and make temp directory #################################### export pid=$$ export DATA=/tmpnwprd2/${job}.${pid} mkdir $DATA cd $DATA export cycle=t${cyc}z #################################### # File To Log Msgs #################################### if [ "$envir" = 'prod' ] || [ "$envir" = 'para' ] || [ "$envir" = 'test' ] then # NCO if [ $envir = "prod" ] then export jlogfile=/com/logs/jlogfiles/jlogfile.${job}.${pid} else export jlogfile=/com/logs/${envir}/jlogfile #export DBNROOT=/nwprod/spa_util/para_dbn export DBNROOT=/nwprod/spa_util/fakedbn fi else # DEV export jlogfile=/dev/null fi #################################### # Specify NET and RUN Name and model #################################### export NET=gens export RUN=cmce #################################### # Determine Job Output Name on System #################################### export outid="LL$job" export jobid="${outid}.o${pid}" export pgmout="OUTPUT.${pid}" export pgmerr=errfile #################################### # SENDECF - Flag Events on ecFLOW # SENDCOM - Copy Files From TMPDIR to $COMOUT # SENDDBN - Issue DBNet Client Calls #################################### export SENDECF=YES export SENDCOM=YES export SENDDBN=YES #################################### # Specify Execution Areas #################################### export HOMEnaefs=${HOMEnaefs:-/nw${envir}/naefs.${model_ver}} export EXECnaefs=${EXECnaefs:-$HOMEnaefs/exec} export FIXnaefs=${FIXnaefs:-$HOMEnaefs/fix} export USHnaefs=${USHnaefs:-$HOMEnaefs/ush} export UTILUSHnaefs=${UTILUSHnaefs:-$HOMEnaefs/util/ush} export ERRSCRIPT=err_chk export LOGSCRIPT=startmsg export REDOUT='1>>' export REDERR='2>' ############################## # Set up the UTILITIES ############################## export HOMEUTIL=/nwprod/util export utilscript=$HOMEUTIL/ush export EXECUTIL=$HOMEUTIL/exec ############################## # Run setup to initialize working directory and utility scripts ############################## sh $utilscript/setup.sh ############################## # Run setpdy and initialize PDY variables ############################## sh $utilscript/setpdy.sh . PDY ############################################## # Define COM directories # Job using /dcom as input ############################################## export COMOUT=/com/${NET}/${envir}/${RUN}.${PDY} mkdir -m 775 -p $COMOUT msg="HAS BEGUN on `hostname`" postmsg "$jlogfile" "$msg" env ############################################################# # Execute the script export cmodel=cmc #sh ${utilscript}/extrkr.sh sh ${UTILUSHnaefs}/extrkr.sh ############################################################# msg="JOB COMPLETED NORMALLY" postmsg "$jlogfile" "$msg" ############################## # Remove the Temporary working directory ############################## cd /tmpnwprd2 rm -rf $DATA date