#!/bin/bash # ########################################################################################### # 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} set -xa export MP_IOAGENT_CNT=all export MP_IO_BUFFER_SIZE=8M export OMP_NUM_THREADS=1 #################################### # Specify NET and RUN Name and model #################################### export NET=gens export RUN=gefs ########################################### # Run config file to get input parameters ########################################### if [ "$RUN_ENVIR" != prod ] ### For Developers then PARA_CONFIG=${PARA_CONFIG:-/ensemble/save/${LOGNAME}/${direxp}/parm/dvgefs_rtma_prob_avgspr_alaska_config} . $PARA_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 pgmout="OUTPUT" export pgmerr=errfile 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} #################################### # Specify Execution Areas #################################### export HOMErtma=${HOMErtma:-/nw${envir}/naefs.${model_ver}} export EXECrtma=${EXECrtma:-$HOMErtma/exec} export FIXrtma=${FIXrtma:-$HOMErtma/fix} export PARMrtma=${PARMrtma:-$HOMErtma/parm} export USHrtma=${USHrtma:-$HOMErtma/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 ############################################################### # IFNAEFS - Generate Products from NCEP/CMC Combined Ensemble # IFGEFS - Generate Products from NCEP Ensemble # IFCMCE - Generate Products from CMC Ensemble ############################################################### export IFNAEFS=${IFNAEFS:-NO} export IFGEFS=${IFGEFS:-YES} export IFCMCE=${IFCMCE:-NO} ################################################# # Set up the INPUT and OUTPUT directories ################################################# export COM_NCEP=${COM_NCEP:-/com/${NET}/${envir}} export COM_DV=${COM_DV:-/com/${NET}/${envir}} export COM_IN=${COM_IN:-/com/${NET}/${envir}} export COMIN=$COM_IN/${RUN}.${PDY}/${cyc}/pgrb2a_bc export COM_OUT=${COM_OUT:-/com/${NET}/${envir}} export COMOUT=$COM_OUT/${RUN}.${PDY}/${cyc}/ndgd export COMOUT_GB2=$COM_OUT/${RUN}.${PDY}/${cyc}/ndgd_gb2 mkdir -m 775 -p $COMOUT $COMOUT_GB2 msg="HAS BEGUN on `hostname`" postmsg "$jlogfile" "$msg" env ############################################################# # Execute the script $HOMErtma/scripts/exnaefs_dvrtma_prob_avgspr_ak.sh.ecf ############################################################# cat $DATA/tmpdir_01/output_ds_tmaxmin.day1_tmax cat $DATA/tmpdir_01/output_ds_tmaxmin.day1_tmin cat $DATA/tmpdir_02/tmpdir_02_geavg/output_ds.360.geavg.part1 cat $DATA/tmpdir_03/output_ds_wind10m.360 msg="JOB COMPLETED NORMALLY" postmsg "$jlogfile" "$msg" ############################## # Remove the Temporary working directory ############################## cd $DATA_IN rm -rf $DATA date