#!/bin/ksh set -x export RUN_ENVIR=${RUN_ENVIR:-"nco"} export PS4='$SECONDS + ' date ############################# # Source relevant config files ############################# configs="base prep" export EXPDIR=${EXPDIR:-$HOMEgfs/parm/config} config_path=${EXPDIR:-$NWROOT/gfs.${gfs_ver}/parm/config} for config in $configs; do . $config_path/config.$config status=$? [[ $status -ne 0 ]] && exit $status done ########################################## # Source machine runtime environment ########################################## . $HOMEgfs/env/${machine}.env prep status=$? [[ $status -ne 0 ]] && exit $status ############################################## # Obtain unique process id (pid) and make temp directory ############################################## export pid=${pid:-$$} export outid=${outid:-"LL$job"} export DATA=${DATA:-${DATAROOT}/${jobid:?}} mkdir -p $DATA cd $DATA ############################################## # Run setpdy and initialize PDY variables ############################################## export cycle="t${cyc}z" setpdy.sh . ./PDY ############################################## # Determine Job Output Name on System ############################################## export pgmout="OUTPUT.${pid}" export pgmerr=errfile ############################################## # Set variables used in the exglobal script ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} export COMPONENT=${COMPONENT:-atmos} ############################################## # Begin JOB SPECIFIC work ############################################## export PROCESS_TROPCY=${PROCESS_TROPCY:-YES} # Turn on tropical cyclone tcvitals QC proc. if YES export DO_RELOCATE=${DO_RELOCATE:-NO} # Turn on tropical cyclone relocation proc. if YES export tmmark=tm00 export ARCHSYND=${ROTDIR}/syndat # this location is unique, do not change if [ ! -d ${ARCHSYND} ]; then mkdir -p $ARCHSYND; fi export HOMENHCp1=${HOMENHCp1:-/gpfs/?p1/nhc/save/guidance/storm-data/ncep} export HOMENHC=${HOMENHC:-/lfs/h1/ops/prod/dcom/nhc/atcf/ncep} # JY export TANK_TROPCY=${TANK_TROPCY:-${DCOMROOT}/${envir}} # path to tropical cyclone record database export TANK_TROPCY=${TANK_TROPCY:-${DCOMROOT}} # path to tropical cyclone record database ############################################## # Define COM directories ############################################## export COMIN=${ROTDIR}/${RUN}.${PDY}/${cyc}/$COMPONENT export COMOUT=${ROTDIR}/${RUN}.${PDY}/${cyc}/$COMPONENT if [ ! -d ${COMOUT} ]; then mkdir -p $COMOUT; fi #export COMINgdas=${ROTDIR}/gdas.${PDY}/${cyc} #export COMINgfs=${ROTDIR}/gfs.${PDY}/${cyc} export CRES=$(echo $CASE | cut -c2-) export LATB=$((CRES*2)) export LONB=$((CRES*4)) export BKGFREQ=1 # for hourly relocation ############################################## # Run relevant script ############################################## env echo "HAS BEGUN on `hostname`" $LOGSCRIPT ${TROPCYQCRELOSH:-$SCRgfs/exglobal_atmos_tropcy_qc_reloc.sh} status=$? [[ $status -ne 0 ]] && exit $status ############################################## # Final processing ############################################## if [ -e "$pgmout" ] ; then cat $pgmout fi echo "ENDED NORMALLY." ########################################## # Remove the Temporary working directory ########################################## cd $DATAROOT [[ $KEEPDATA = "NO" ]] && rm -rf $DATA date exit 0