#!/bin/sh #################################### # Ensure environment is defined. #################################### set +x echo cyc is ${cyc:?} echo envir is ${envir:?} echo rtofs_glo_ver is ${rtofs_glo_ver:?} echo DATAROOT is $DATAROOT 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 ##################### # SETUP RUN VARIABLES ##################### export forcing_only=TRUE export mycyc='00' export cycle=t${mycyc}z ########################################################## # 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 Input/Output/Restart directories ############################################## export GETGES_COM=${GETGES_COM:-$(compath.py ${envir}/com/gfs/${gfs_ver})} 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 ################### # Define model grid ################### export inputgrid=navy_0.08 export useslp=NO # YES or NO, use sea level pressure ################################################################## # Run the config file to set up specific model variables if needed ################################################################## . $PARMrtofs/${RUN}_${modID}.${inputgrid}.config ################################# # Set up analysis_pre parameters ################################# eval fcstdays="\$analdays" ################################################################# # Send a message indicating the start of the job ################################################################# msg="JOB $job HAS BEGUN on $(hostname)" postmsg "$msg" #################### # execute the script #################### sh ${HOMErtofs}/scripts/ex${RUN}_${modID}_${RUN_MODE}_pre.sh #=================================================================== cat $pgmout cp -p $pgmout $COMOUT/${RUN}_${modID}.t${cyc}z.${RUN_MODE}_pre.$(basename $pgmout) msg="JOB $job HAS COMPLETED NORMALLY." postmsg "$msg" cd $DATAROOT if [ "$KEEPDATA" != YES ]; then rm -rf $DATA fi date