#!/bin/ksh set -x # ################################### # SET SHELL PROCESSING VARIABLES # ################################### export PS4='$SECONDS + ' date ################################################################# # Scripts are modified to be sharable # between EMC and NCO # Please note that variable "RUN_ENVIR" is set and used # in the development enviroment only. ################################################################# export machine=${machine:-wcoss} export RUN_ENVIR=${RUN_ENVIR:-nco} export SENDECF=${SENDECF:-YES} # vacc, vgrid and region are used in VSDB output. export vacc=06 # 6-hourly FSS verification export vgrid=240 # verif done on HRAP grid export region=CNS # ConUS ################################################################# # Notes for dev: # # verf_precip_config contains exports such as # export HOMEverf_precip=/nw{envir} (for prod; dev defines this in ecf script) # export EXECverf_precip=$HOMEverf_precip/exec # export PARMverf_precip=$HOMEverf_precip/parm # ... # export SENDCOM= ... # export SENDECF= ... # export SENDDBN= ... # export SENDRZDM= ... # ... # Machine is wcoss by default, unless the calling script or user's # .cshrc/.profile has machine set to zeus. ################################################################# # export VERFANL so fss.f knows what analysis to put into the VSDB record. export VERFANL=${VERFANL:-CCPA} if [ "$RUN_ENVIR" = dev ] ### For Developers then # PARMverf_precip is set in the ecf/sms script. It is either 'parm' or # parm.dev.$machine, under $HOMEverf_precip. # . $PARMverf_precip/verf_precip_config # export DATAROOT=${DATAROOT:-/tmpnwprd2} # export jlogfile=${jlogfile:-$DATAROOT/jlogfile} export SENDDBN=NO if [ $debug = N ]; then KEEPDATA=NO else KEEPDATA=YES fi fi ############################################################### # This block can be modified for different Production test # environment. This is used for operational testings ############################################################### if [ $RUN_ENVIR = "nco" -a $envir != "prod" ] ### For Operations then export SENDDBN=${SENDDBN:-YES} export DBNLOG=${DBNLOG:-YES} fi ########################################################### # obtain unique process id (pid) and make temp directories ########################################################### export pid=$$ export DATA=$DATAROOT/${jobid} mkdir -p $DATA cd $DATA export pgmout="OUTPUT.$$" export cycle=t${cyc}z ############################### # Specify NET and RUN name ############################### export NET=verf_precip export RUN=precip ################################################################ # SENDCOM=YES--Copy output file to /com # SENDECF=YES--Allow to talk back to ECF # 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 only export SENDECF=${SENDECF:-YES} export SENDRZDM=${SENDRZDM:-NO} # for daily side-by-side plots ################################################################ # Specify Execution Areas # Non-dev uses the follwing block instead of parm/verf_precip_config ################################################################ export HOMEverf_precip=${HOMEverf_precip:-${PACKAGEROOT}/verf_precip.${verf_precip_ver}} export EXECverf_precip=${EXECverf_precip:-$HOMEverf_precip/exec} export PARMverf_precip=${PARMverf_precip:-$HOMEverf_precip/parm} export USHverf_precip=${USHverf_precip:-$HOMEverf_precip/ush} export FIXverf_precip=${FIXverf_precip:-$HOMEverf_precip/fix} ################################### # Set up the UTILITIES ################################### # If the calling script specifies a $vday value, then PDY=$vday+9. if [ "$vday" != "" ]; then PDY=`date -d "$vday + 9 day" +%Y%m%d` fi # /com/date is maintained by NCO on the CCS and WCOSS, but it does not exist # on Theia. Do not use setpdy on Zeus. if [ "$machine" = theia ]; then PDYm9=`date +%Y%m%d -d "9 days ago"` else # Run setpdy and initialize PDY variables setpdy.sh . $DATA/PDY # setpdy only sets PDYM7-PDYP7 (the script 'PDY' exports these days), so # we need to set PDYm9 ourselves. PDYm9=`date -d "$PDY - 9 days" +%Y%m%d` fi export vday=${vday:-$PDYm9} ################################################# # Set up the INPUT and OUTPUT directories ################################################# export COMIN=${COMIN:-$(compath.py -o ${NET}/${verf_precip_ver}/${RUN})} export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${verf_precip_ver}/${RUN})} export COMVSDB=${COMVSDB:-$(compath.py -o ${NET}/${verf_precip_ver}/vsdb)} export COMINpcpanl=${COMINpcpanl:-$(compath.py $envir/com/pcpanl/${pcpanl_ver})} # COMCCPA is a prefix, not directory name. Directory is # $(compath.py ccpa/prod)/ccpa.yyyymmdd export COMCCPA=${COMCCPA:-$(compath.py $envir/com/ccpa/${ccpa_ver}/ccpa)} export DCOM=${DCOM:-$DCOMROOT} echo "DCOM is: $DCOM" # COMIN1/COMIN2 setup is for dev mode. Define them for non-dev: # if [ ! "$RUN_ENVIR" = dev ] then export COMIN1=$COMIN export COMIN2=$COMIN fi if [ ! -d $COMVSDB ]; then mkdir -p -m 775 $COMVSDB fi # don't create verf/v4.5/precip/. It's always empty. #if [ ! -d $COMOUT ]; then # mkdir -p -m 775 $COMOUT #fi env echo Actual output starts here ################################################ # Run the config file to set up model variables ################################################ if [ $retro = Y ]; then . $PARMverf_precip/verf_precip_fss_06h_config.retro else . $PARMverf_precip/verf_precip_fss_06h_config fi ####################################################################### $HOMEverf_precip/scripts/exverf_precip_fss_06h.sh ####################################################################### cat $pgmout msg="JOB $job HAS COMPLETED NORMALLY." postmsg "$jlogfile" "$msg" if [ "$KEEPDATA" != "YES" ] ; then cd $DATAROOT rm -rf $DATA fi date