set -xa ####################################################### # JMAG_SETUP -- set up directories for new day # # P. Freeman 2/1029 Phase 3 Migration. # Use new module names. # Keep $DATA dir if KEEPDATA==yes # Remove reference to exMagDirClean.sh.ecf # (doesn't exist) # Anu Simon 04/2020 The jlog file reference is only commented # Left it there for future reference ####################################################### export pid=$$ export DATA=${DATAROOT}/JMAG_SETUP.${pid} mkdir -p $DATA cd $DATA export SENDECF=YES export COMOUT=${COMOUT:-${NWROOT}/com/mag/${envir}/gifs} #################################### # Time Variables #################################### export cyc=`date -u +%H` export cycle=t${cyc}z export CYCLE=T${cyc}Z export CYC=$cyc ############################################################## # Set up the UTILITIES # Add path to utility scripts. # Run setpdy and initialize PDY variables ############################################################### setpdy.sh . ./PDY ############################################################## # Load modules ############################################################### module load ips/18.0.5.274 prod_util/1.1.5 #################################### # File To Log Msgs #################################### #Removing the refernce to jlog file, but keeping it if needed in future A. Simon 04/2020 #export jlogfile=${jlogfile:-$COMROOT/logs/jlogfiles/jlogfile.${job}.${pid}} #################################### # Determine Job Output Name on System #################################### export outid="LL$job" export jobid="${outid}.o${pid}" export pgmout="OUTPUT.${pid}" env ############################################################# # execute the script ${NWROOT}/mag.${mag_ver}/scripts/exmag_setup.sh.ecf ############################################################# if [ "${KEEPDATA^^}" != 'YES' ]; then rm -rf ${DATA:?} fi exit