#!/bin/ksh set -xa #################################### # Specify NET and RUN Name and model #################################### export NET=cfs export RUN=cdas export host=${host:-`hostname | cut -c1`} ############################################### # SETUP CDAS POST PROCESSING VARIABLES ############################################### export PS4='$SECONDS + ' date ########################################################## export DATA=${DATA:-${DATAROOT:?}/${jobid:?}} mkdir -p $DATA cd $DATA ########################################################## # define cfs directories/scripts/executables ########################################################## export EXECcfs=$HOMEcfs/exec export PARMcfs=$HOMEcfs/parm export USHcfs=$HOMEcfs/ush export FIXcfs=$HOMEcfs/fix export hpsstar=$USHcfs/cfs_hpsstar #################################### # Determine Job Output Name on System #################################### export pgmout="OUTPUT.$$" export pgmerr=errfile export cycle=t${cyc}z ############################## # Run setpdy and initialize PDY variables ############################## sh setpdy.sh . ./PDY ############################################## # Define COM directories ############################################## export COMROT=${COMROT:-$(compath.py ${NET}/${cfs_ver})} export COMIN=${COMIN:-$(compath.py ${NET}/${cfs_ver}/${RUN}.${PDY})} export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${cfs_ver}/${RUN}.${PDY})} mkdir -m755 -p $COMOUT ############################### # Execute the Script ############################### ${CDASARCHIVESH:-$HOMEcfs/ush/cfs_cdas_archive.sh} $PDYm2 msg="ENDED NORMALLY." postmsg "$msg" ######################################## # Remove the Temporary working directory ######################################## cd $DATAROOT if [ ${KEEPDATA:-NO} = NO ] ; then rm -rf $DATA ; fi date