#!/bin/sh ######################################## # NHC_GUIDANCE_CLIPER5 Preliminary data setup step ######################################## set -ax ##################################################################################### # Run config file to get input parameters # This config file should define the following variables # DATA_IN: Location of working directory, default to /tmpnwprd2 # DEV_ECF: If the job is to be running using ECF, default to YES # SENDDBN: Set to NO for developers, default to YES # COM_IN: Directory for input files, default to /com/$NET/${envir} # COM_OUT: Directory for output file, default to /com/$NET/${envir} # gespath: Directory for the guess or restart files, default to /nwges/${envir} ##################################################################################### ############################### # Specify NET and RUN name ############################## export NET=${NET:-nhc} export RUN=${RUN:-guidance} ## TBD export MODEL=${MODEL:-tcvitals_devel} ## TBD export CYC=${CYC:-${cyc}} echo `date` $0 `date -u` begin export PS4='$SECONDS + ' ########################################################### # obtain unique process id (pid) and make temp directories ########################################################### export pid=$$ if [[ ${envir} == prod ]]; then export DATA_IN=${DATA_IN:-/tmpnwprd1} else export DATA_IN=${DATA_IN:-/tmpnwprd2} fi export DATA=$DATA_IN/${NET}_${RUN}_${CYC}_${envir} export WORK_DIR=$DATA # Remove old directory if it exists # rm -rf $WORK_DIR mkdir -p $WORK_DIR while [ ! -d $WORK_DIR ] do mkdir -p $WORK_DIR sleep 1 done cd $WORK_DIR #################################### # File To Log Msgs #################################### export jlogfile=${jlogfile:-/com/logs/jlogfiles/jlogfile.${job}.${pid}} #################################### # Determine Job Output Name on System #################################### export outid="LL$job" export jobid="${outid}.o${pid}" export pgmout="OUTPUT.${pid}" export cycle=t${cyc}z ################################################## # SENDECF - Flag Events on ECF # SENDCOM - Copy Files From TMPDIR to $COMOUT # SENDDBN - Issue DBNet Client Calls # RERUN - Rerun fcst from beginning (default no) # SEND2NHC - send a .com file to NHC ################################################## export SENDCOM=${SENDCOM:-YES} export SENDECF=${SENDECF:-YES} export SENDDBN=${SENDDBN:-YES} export SEND2NHC=${SEND2NHC:-NO} export HOMEnhc_guidance=${HOMEnhc_guidance:-/nw${envir}/nhc_guidance.${model_ver}} export EXECnhc_guidance=${EXECnhc_guidance:-$HOMEnhc_guidance/exec} export FIXnhc_guidance=${FIXnhc_guidance:-$HOMEnhc_guidance/fix} export PARMnhc_guidance=${PARMnhc_guidance:-$HOMEnhc_guidance/parm} export USHnhc_guidance=${USHnhc_guidance:-$HOMEnhc_guidance/ush} export SCRnhc_guidance=${SCRnhc_guidance:-$HOMEnhc_guidance/scripts} ############################################# # II. Model Types # 1. Simple track/intensity guidance (no changes from year to year): # CLIPER/SHIFOR/EXTRAP/OCD5/NCEPDATA/NCEPDATA-DEVEL # Input: ATCF data # Output: ATCF data # # 2. Track forecast guidance (Usually no changes from year to year): # LBAR/BAMS/BAMM/BAMD/UKMet # Input: ATCF data, GFS model forecasts, UKmet input file # Output: ATCF data # # 3. Advanced intensity models (Updates by May 15 each year): # SHIPS/LGEM # Input: ATCF data, GFS model forecasts, GOES imagery, SST analyses, Ocean Heat Content analysis, Blended satellite TPW # Output: ATCF data, text products # ############################################# export TYPE1=${TYPE1:-YES}; export TYPE2=${TYPE2:-YES}; export TYPE3=${TYPE3:-YES}; ############################################# # COMIN and COMOUT ############################################# export COM_IN=${COM_IN:-/com/${NET}/${envir}} export COM_OUT=${COM_OUT:-/com/${NET}/${envir}} export COMIN=${COMIN:-${COM_IN}/storm-data} export GFSDIR=${GFSDIR:-$(compath.py gfs/prod/)} export COMOUT=${COMOUT:-${COM_OUT}/storm-data/ncepdata-devel} mkdir -p -m 775 $COMOUT ################################### # Set up DBNET environment ################################### #export DBNROOT=${DBNROOT:-/iodprod/dbnet_siphon} export dbnet_type=${dbnet_type:-WAN_TEXT} export post_dbnettype=${post_dbnettype:-""} export dbnetdir=${dbnetdir:-/pcom/${NET}} mkdir -p -m 775 ${dbnetdir} ################################### # Set client connection data information for xfer utilization # connection information ################################### export CLIENT=${CLIENT:-"140.90.176.13"} export USER=${USER:-"atcf-ops"} ################################### # base directories on client's ATCF system ################################### export CLIENT_BASE_DIR=${CLIENT_BASE_DIR:-"/home/atcf-ops/atcf"} ############################################# # location of programs (executables and scripts) ############################################# export prgmsdir=${prgmsdir:-${HOMEnhc_guidance}} export exedir=${exedir:-${prgmsdir}/exec/} export scriptdir=${scriptdir:-${prgmsdir}/ush/} export utilsdir=${utilsdir:-${prgmsdir}/ush/} ################################### # specify the directories for ncepdata-devel # commonp - Specify common path for directories # rundir - Specify the directory where the script will run # comdir - Specify the directory containing the .com input files # xdir - Specify the directory with the ncepdata-dev executable # tvcdir - Specify the directory to put the cumulative tcvitals file # tvidir - Specify the directory to put the individual tcvitals file ################################### export STORM_INPUT_DIR=${STORM_INPUT_DIR:-${COMIN}/zcom/} export commonp=${commonp:-${COM_IN}} export rundir=${rundir:-${COMOUT}/run/} export comdir=${comdir:-${STORM_INPUT_DIR}} export xdir=${xdir:-${exedir}} export tvcdir=${tvcdir:-${COMOUT}/dat/} export tvidir=${tvidir:-${COMOUT}/dat/ind/} mkdir -p -m 775 ${rundir} ${tvcdir} ${tvidir} ################################### # Set up the UTILITIES ################################### export utilscript=/nwprod/util/ush export utilexec=/nwprod/util/exec machine=`hostname |cut -c1` if [ $machine = t -o $machine = g ]; then export MACHINE=wcoss fi # Run setpdy and initialize PDY variables setpdy.sh . PDY env ######################################################## # Execute the script. ${SCRnhc_guidance}/exnhc_tcvitals_devel.sh.ecf ######################################################## cat $pgmout msg="JOB COMPLETED NORMALLY" postmsg "$jlogfile" "$msg" ################################ # Remove the Working Directory ################################ cd $DATA_IN if [ ${RM_TMPDIR:-NO} = YES ] ; then rm -rf $DATA ; fi date