#!/bin/sh #################################### # Ensure environment is defined. #################################### set +x echo cyc is ${cyc:?} echo envir is ${envir:?} echo rtofs_glo_ver is ${rtofs_glo_ver:?} export PS4='$SECONDS + ' date env set -xa ####################################### # Specify NET and RUN Name and model ID ####################################### export NET=rtofs export RUN=rtofs export modID=glo export RUN_MODE=analysis export HYCOM_EXPT=930 export mycyc='00' export cycle=t${cyc}z export NPROCS=${NPROCS:-11} ########################################################## # obtain unique process id (pid) and make temp directories ########################################################## export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir $DATA cd $DATA #################################### # Determine Job Output Name on System #################################### export pgmout="OUTPUT.$$" #################################### # Specify Execution Areas #################################### #export HOMErtofs=${HOMErtofs:-${NWROOT:?}/${RUN}_${modID}.${rtofs_glo_ver}} export EXECrtofs=${HOMErtofs}/exec export PARMrtofs=${HOMErtofs}/parm export FIXrtofs=${HOMErtofs}/fix export USHrtofs=${HOMErtofs}/ush ############################# # Set up the UTILITIES ############################## export USHutil=${UTILROOT:?}/ush export EXECutil=${UTILROOT:?}/exec export utilexec=$EXECutil # needed by some scripts in USHutil ########################################################### # Run setpdy and initialize PDY variables # For any retrospecitve run, set the PDY in the ECF script ########################################################### setpdy.sh . ./PDY ################### # Define model grid ################### export inputgrid=navy_0.08 ################################################################## # Run the config file to set up specific model variables if needed ################################################################## . $PARMrtofs/${RUN}_${modID}.${inputgrid}.config ################################# # Set up analysis_post parameters ################################# eval fcstdays="\$analdays" ############################################## # Define Input/Output/Restart directories ############################################## export COMIN=${COMIN:-$(compath.py ${envir}/com/${NET}/${rtofs_glo_ver})/${RUN}.${PDY}} export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${rtofs_glo_ver})/${RUN}.${PDY}} mkdir -m 775 -p $COMOUT test -d $COMOUT || mkdir -p $COMOUT ################################################################ # Send a message indicating the start of the job ################################################################ msg="JOB $job HAS BEGUN on $(hostname)" postmsg "$msg" #################### # execute the script #################### ksh ${HOMErtofs}/scripts/exrtofs_glo_post.sh cat $pgmout cp -p $pgmout $COMOUT/${RUN}_${modID}.t${cyc}z.post.$(basename $pgmout) msg="JOB $job HAS COMPLETED NORMALLY." postmsg "$msg" cd $DATAROOT if [ "$KEEPDATA" != YES ]; then rm -rf $DATA fi date