#!/bin/sh $SMSBIN/smsinit $LOADL_STEP_ID set -xa # #### 05/18/99 ############################# # SETUP SEAICE CONCENTRATION ANALYSIS PROCESSING CONTROL SHELL VARIABLES # ########################################### export PS4='$SECONDS + ' date echo cyc is ${cyc:?} echo envir is ${envir:?} echo code_ver is ${code_ver:?} #ensure code_ver is defined export pid=$$ ######################################################## # obtain unique process id (pid) and make temp directory ######################################################## if [ "$envir" = 'prod' ] || [ "$envir" = 'para' ] || [ "$envir" = 'test' ] || [ "$envir" = 'dev' ] ; then #NCO export BASEDIR=/tmpnwprd else #developer export BASEDIR=/ptmp/wx21rg/ fi export DATA=$BASEDIR/${job}.${pid} mkdir $DATA cd $DATA export TMPDIR=$DATA #################################### # File To Log Msgs #################################### if [ "$envir" = 'prod' ] || [ "$envir" = 'para' ] || [ "$envir" = 'test' ] || [ "$envir" = 'dev' ] ; then #NCO if [ "$envir" = 'prod' ] ; then export jlogfile=/com/logs/jlogfile else export jlogfile=/com/logs/${envir}/jlogfile fi else #developer export jlogfile=~/jlogfile fi #################################### # Determine Job Output Name on System #################################### export outid="LL$job" export jobid="${outid}.o${pid}" export pgmout="OUTPUT.${pid}" export cycle=t${cyc}z #################################### # variables that control processing # Determine variable settings before testing and set them accordingly # SENDDBN=YES file will be sent to OSO # SENDCOM=YES copy files from TMPDIR to $COMOUT # SENDSMS=YES Flag Events on SMS #################################### export SENDCOM=YES export SENDSMS=YES if [ "$envir" = "prod" ] ; then export SENDDBN=YES export SENDDBN_GB2=YES export SAVEMRF=YES else if [ $envir = "para" ] ; then export SENDDBN=YES export SENDDBN_GB2=NO export SAVEMRF=YES export DBN_ALERT_TYPE=TBD_PARA export DBNROOT=/nwprod/spa_util/fakedbn else export SENDDBN=NO export SENDDBN_GB2=NO export SAVEMRF=YES fi fi #################################### # Specify NET and RUN Name and model #################################### export NET=omb export RUN=sice ################################################# # Specify job's execution areas (directory paths) ################################################# #Path to home directory: if [ "$envir" = 'prod' ] || [ "$envir" = 'para' ] || [ "$envir" = 'test' ] || [ "$envir" = 'dev' ]; then #NCO export HOMEbase=/nw${envir} else #developer export HOMEbase=/u/wx21rg/save/ fi export HOMEsice=$HOMEbase/seaice_concentration_analysis.${code_ver} #Paths to useful directories: export EXECsice=$HOMEsice/exec export FIXsice=$HOMEsice/fix export PARMsice=$HOMEsice/parm export USHsice=$HOMEsice/ush ###################### # Set up the UTILITIES ###################### export HOMEutil=/nwprod/util export EXECutil=$HOMEutil/exec export FIXutil=$HOMEutil/fix export PARMutil=$HOMEutil/parm export USHutil=$HOMEutil/ush export PATH=$PATH:/usrx/local/imajik/bin:. export LIBPATH="$LIBPATH":/usrx/local/imajik/lib ############################################################### # Run setup to initialize working directory and utility scripts ############################################################### sh $USHutil/setup.sh ######################################### # Run setpdy and initialize PDY variables ######################################### sh $USHutil/setpdy.sh . PDY ################################################### # Set directories where this job's input is located # using the COMIN variable ################################################### if [ "$envir" = 'prod' ] || [ "$envir" = 'para' ] || [ "$envir" = 'test' ] || [ "$envir" = 'dev' ]; then export COMbase=/com/${NET}/${envir} export pcom=/pcom/${envir}/mrf else export COMbase=/u/wx21rg/noscrub/com/${NET}/${envir}/ export pcom=/u/wx21rg/noscrub/pcom/$RUN/ fi export COMIN=$COMbase/${RUN}.${PDY} export COMINm1=$COMbase/${RUN}.${PDYm1} export COMOUT=$COMbase/${RUN}.${PDY} #VK export COMMRF=$COMbase/mrf.${PDY} export COMMRF=/com/mrf/$envir/mrf.${PDY} mkdir -p $COMMRF mkdir -p $COMOUT mkdir -p $pcom export DCOM=$DCOMROOT/us007003/$PDY ##################################### # Execute the script sh $HOMEsice/scripts/exseaice_concentration_analysis.sh.sms export err=$? $DATA/err_check ##################################### cat $pgmout date if [ "$envir" = 'prod' ] || [ "$envir" = 'para' ] || [ "$envir" = 'test' ] || [ "$envir" = 'dev' ]; then $SMSBIN/endt fi