#!/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} ################################################################# # 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 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 ################################### # ----------------- Note for Dev ----------------------------------- # Zeus' /nwprod is acutally in /scratch2/portfolios/NCEPDEV/rstprod/nwprod. # need to define EXECutil for wwgrib. It is normally the same as # /nwprod/util/exec, but Zeus does not have a working /nwprod/util/exec/wgrib. # WGRIBpath is defined in the Zeus sms script. # ------------------------------------------------------------------- # If the calling script specifies a $vday value, then PDY=$vday+1. if [ "$vday" != "" ]; then PDY=`date -d "$vday + 1 day" +%Y%m%d` fi # /com/date is maintained by NCO on the CCS and WCOSS, but it does not exist # on Zeus. Do not use setpdy on Zeus. if [ $machine = theia ]; then today=`date -u +%Y%m%d` PDYm1=`date +%Y%m%d -d "1 day ago"` else # Run setpdy and initialize PDY variables setpdy.sh . $DATA/PDY fi export vday=${vday:-$PDYm1} ################################################# # 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)} 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_24h_config.retro else . $PARMverf_precip/verf_precip_fss_24h_config fi ####################################################################### # Execute the script. $HOMEverf_precip/scripts/exverf_precip_fss_24h.sh ####################################################################### cat $pgmout msg="JOB $job HAS COMPLETED NORMALLY." postmsg "$jlogfile" "$msg" if [ "$RUN_ENVIR" = dev ]; then ### for dev only if [ $bsubnext = Y -a $cronmode = Y -a $machine = wcoss ]; then echo "skip the following two until para on phase1 is discontinued." # bsub < $HOMEverf_precip/util.dev/trans_tar_dev_vsdb_for_tempest.ksh > /ptmpp1/Ying.Lin/cron.out/bsub.devtarfortempest 2>&1 # bsub < $HOMEverf_precip/util.dev/trans_save_verf.dat.ksh > /ptmpp1/Ying.Lin/cron.out/bsub.save_verf_dat 2>&1 fi fi # if [ "$KEEPDATA" != "YES" ] ; then cd $DATAROOT rm -rf $DATA fi date