#!/bin/sh set -xa export PS4='$SECONDS + ' date -u ################################## # Specify NET, RUN ################################## export NET=${NET:-madis} export RUN=${RUN:-${runtyp}} ############################## # Specify cycle ############################## export cycle=t${cyc}z ############################### # Create new working directory ############################### export DATA=${DATA:-${DATAROOT:?}/${jobid:?}} mkdir -p $DATA cd $DATA ########################## # Specify Execution Areas ########################## export USHmadis=${USHmadis:-${HOMEmadis}/ush} # -------------------------------------------------------------------- # TANK is root directory path to observational database used in dumpjb # -------------------------------------------------------------------- export TANK=${TANK:-${DCOMROOT}} export HHMM=${HHMM:-`date -u +%H%M`} ###################################################################### # Temporary(?) logic to keep behaviour consistent with runs on Dell-p3 # where $cyc is hardcoded to 00 so PDY is advanced for runs between # 23:51 and 23:59. This section comes before call to setpdy.sh in # order to use $PDY only if it is predefined. # if [[ -z "$CDY" ]]; then if [[ -n "$PDY" ]]; then CDY=${PDY} else CDY=$(date -u +%Y%m%d) fi fi export CDY ###################################################################### ########################################## # Run setpdy and initialize PDY variables ########################################## setpdy.sh . ./PDY ########################################### # Define COMOUT directory (COMIN not used) ########################################### export COMOUT=${COMOUT:-$(compath.py -o madis/${madis_ver})/madis.$PDY} mkdir -m 775 -p $COMOUT ##################### # Execute the script ##################### env ${HOMEmadis}/scripts/exmadis_${runtyp}.sh export err=$?; err_chk echo "`hostname -f` -- `date -u`" > $COMOUT/where_${cycle}_${RUN}_dump_ran if [ "${KEEPDATA:-NO}" = NO ]; then cd $DATAROOT rm -rf $DATA fi date -u exit