#!/bin/sh # ########################################################################################### # This Job Updates Downscaling Vector Estimation Between RTMA and NCEP Analysis for Alaska Region # ########################################################################################### ###################################################### # The following two variable could be defined in the # loadleveler submission script (the sms script), if # not they will take the default values which is set # for the NCO running enviroment ####################################################### export RUN_ENVIR=${RUN_ENVIR:-prod} export SENDECF=${SENDECF:-YES} set -xa ########################################### # Run config file to get input parameters ########################################### if [ "$RUN_ENVIR" = dev ] ### For Developers, "group_name" is passed from the SMS script then . /${group_name}/save/${LOGNAME}/dvgefs-rtma/nwprod/parm/dvgefs-rtma_config fi export PS4='$SECONDS + ' date ######################################################## # obtain unique process id (pid) and make temp directory ######################################################## export pid=$$ export DATA_IN=${DATA_IN:-/tmpnwprd2} export DATA=$DATA_IN/${job}.${pid} mkdir -p $DATA cd $DATA #################################### # Determine Job Output Name on System #################################### export outid="LL$job" export jobid="${outid}.o${pid}" export pgmout="OUTPUT.${pid}" 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 ################################################################ # SENDCOM=YES--Copy output file to /com # SENDECF=YES--Allow to talk back to ecFLOW # SENDDBN=YES--Alert output file to TOC, set to NO for testing ################################################################ export SENDCOM=${SENDCOM:-YES} export SENDDBN=${SENDDBN:-YES} # need to set to NO for testing export SENDECF=${SENDECF:-YES} # # Set up model and cycle specific variables # export NET=gens export RUN=naefs export fend=384 export finc=6 export fstart=06 export model=ensemble export GRIB= export EXT="" # # Now set up GEMPAK/NTRANS environment # . /nwprod/gempak/.gempak ######################### # 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} ################################### # Set up the UTILITIES ################################### export utilscript=/nwprod/util/ush export utilities=/nwprod/util/ush export utilexec=/nwprod/util/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 ################################################# # Set up the INPUT and OUTPUT directories ################################################# export COM_IN_NAWIPS=${COM_IN_NAWIPS:-/com/${NET}/${envir}} export COM_NAWIPS=${COM_NAWIPS:-/com/nawips/${envir}} export COMIN=$COM_IN_NAWIPS/${RUN}.${PDY}/${cyc}/ndgd export COMOUT=$COM_NAWIPS/${RUN}.${PDY} export COM=${COM:-/com/${NET}/${envir}} if [ ! -f $COMOUT ] ; then mkdir -p -m 775 $COMOUT fi env DATAHOLD=$DATA ######################################################## # Execute the script. for member in 10pt 90pt 50pt avg spr mode do export RUN=naefs export model=ndgd_alaska export member=ge${member} export DATA=$DATAHOLD/${member}${model}_${RUN} mkdir -p $DATA cd $DATA # Run setup to initialize working directory and utility scripts sh $utilscript/setup.sh if test "$member" = "ge10pt"; then export DBN_ALERT_TYPE=NAEFS_10NDGD_GEMPAK elif test "$member" = "ge50pt"; then export DBN_ALERT_TYPE=NAEFS_50NDGD_GEMPAK elif test "$member" = "ge90pt"; then export DBN_ALERT_TYPE=NAEFS_90NDGD_GEMPAK elif test "$member" = "geavg"; then export DBN_ALERT_TYPE=NAEFS_AVGNDGD_GEMPAK elif test "$member" = "gespr"; then export DBN_ALERT_TYPE=NAEFS_SPRNDGD_GEMPAK elif test "$member" = "gemode"; then export DBN_ALERT_TYPE=NAEFS_MODENDGD_GEMPAK fi ${HOMEnaefs}/scripts/exnawips.sh.ecf > $DATAHOLD/${member}${model}_${RUN}.out 2>&1 & done ######################################################## wait cd $DATAHOLD for member in 10pt 90pt 50pt avg spr mode do set +x echo "######################################" echo " $member.OUT " echo "######################################" set -x cat ge${member}${model}_${RUN}.out done cd $DATA_IN rm -rf $DATA date