#!/bin/bash ############################# # Preliminary data setup step ############################# export PS4=' $SECONDS + ' set -xa date ########################## # Specify NET and RUN name ########################## export NET=${NET:-stofs} export RUN=${RUN:-stofs_3d_atl} ########################################################## # obtain unique process id (pid) and make temp directories ########################################################## export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir $DATA cd $DATA export cycle=t${cyc}z ################## # File To Log Msgs ################## ##################################### # Determine Job Output Name on System ##################################### export pgmout="OUTPUT.$$" ############################################## # SENDECF - Flag Events on ECF # SENDCOM - Copy Files From TMPDIR to $COMOUT # SENDDBN - Issue DBNet Client Calls ############################################## export SENDCOM=${SENDCOM:-YES} export SENDECF=${SENDECF:-YES} export SENDDBN=${SENDDBN:-YES} export SENDDBN_NTC=${SENDDBN_NTC:-YES} export N_DAYS_MODEL_RUN_PERIOD=5.0 setpdy.sh . ./PDY export PDYHH=${PDY}$cyc export PDYHH_FCAST_BEGIN=$PDYHH export PDYHH_FCAST_END=$($NDATE 72 $PDYHH) export PDYHH_NCAST_BEGIN=$($NDATE -24 $PDYHH) echo PDYHH = $PDYHH echo PDYHH_FCAST_BEGIN = $PDYHH_FCAST_BEGIN echo PDYHH_FCAST_END = $PDYHH_FCAST_END echo PDYHH_NCAST_BEGIN = $PDYHH_NCAST_BEGIN # ----------------> Define dir to prepare forcing files export DATA_prep_nwm=${DATA}/river export DATA_prep_river_st_lawrence=${DATA}/river_st_lawrence export DATA_prep_gfs=${DATA}/gfs export DATA_prep_hrrr=${DATA}/hrrr export DATA_prep_rtofs=${DATA}/rtofs export DATA_prep_restart=${DATA}/restart mkdir -p $DATA_prep_nwm $DATA_prep_river_st_lawrence $DATA_prep_gfs $DATA_prep_hrrr $DATA_prep_rtofs $DATA_prep_restart echo DATA = $DATA echo DATA_prep_nwm=$DATA_prep_nwm echo DATA_prep_river_st_lawrence=$DATA_prep_river_st_lawrence echo DATA_prep_gfs=${DATA_prep_gfs} echo DATA_prep_hrrr=${DATA_prep_hrrr} echo DATA_prep_rtofs=${DATA_prep_rtofs} echo DATA_prep_restart=${DATA_prep_restart} ################################################# # Execution directory structure # If dev, run config file to get input parameters ################################################# export JOBstofs3d=${JOBstofs3d:-$HOMEstofs/jobs/${RUN}} export EXECstofs3d=${EXECstofs3d:-$HOMEstofs/exec/${RUN}} export FIXstofs3d=${FIXstofs3d:-$HOMEstofs/fix/${RUN}} export PARMstofs3d=${PARMstofs3d:-$HOMEstofs/parm/${RUN}} export SORCstofs3d=${SORCstofs3d:-$HOMEstofs/sorc/${RUN}} export SCRIstofs3d=${SCRIstofs3d:-$HOMEstofs/scripts/${RUN}} export USHstofs3d=${USHstofs3d:-$HOMEstofs/ush/${RUN}} export ECFstofs3d=${ECFstofs3d:-$HOMEstofs/ecf/${RUN}} export PYstofs3d=${PYstofs3d:-$USHstofs3d/pysh} ############################################### # Define input and output com directories ############################################### export COMIN=${COMIN:-$(compath.py ${envir}/${NET}/${stofs_ver})/${RUN}.${PDY}} export COMINstofs=${COMINstofs:-$(compath.py ${envir}/${NET}/${stofs_ver})} export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${stofs_ver})/${RUN}.${PDY}} export COMOUTrerun=${COMOUTrerun:-$(compath.py -o ${NET}/${stofs_ver})/${RUN}.${PDY}/rerun} export COMOUT_PREV=${COMOUT_PREV:-$(compath.py ${envir}/${NET}/${stofs_ver})/${RUN}.${PDYm1}} export COMINadt=${COMINadt:-$DCOMROOT} mkdir -p $COMOUT $COMOUTrerun export COMINgfs=${COMINgfs:-$(compath.py gfs/${gfs_ver})} export COMINhrrr=${COMINhrrr:-$(compath.py hrrr/${hrrr_ver})} export COMINrtofs=${COMINrtofs:-$(compath.py rtofs/${rtofs_ver})} export COMINnwm=${COMINnwm:-$(compath.py nwm/${nwm_ver})} ###################################################################### # Execute script: ${SCRIstofs3d}/exstofs_3d_atl_prep_processing.sh #>> $pgmout 2> errfile ######################################################################### if [ -f $pgmout ]; then cat $pgmout fi if [ "${KEEPDATA}" != YES ]; then rm -rf $DATA fi date