#!/bin/sh date export PS4='$SECONDS ${0/\/nw.*\/nwps.*\/} + ' set -xa # #### 04/01/15 ############################### # SETUP NWPS SHELL VARIABLES # ############################################# export DATA=${DATA:-${DATAROOT}/${jobid}} mkdir $DATA cd $DATA #################################### # Specify NET and RUN Name and model #################################### export NET=${model} export OFS=ofs export RUN=${OFSTYPE:-${OFSTYPE:?}} ##### cycle - WW 20200918## export CYC=${cyc} export cycle=t${cyc}z ############################ #################################### # SENDECF - Flag Events on ECFLOW # SENDCOM - Copy Files From TMPDIR to $COMOUT # SENDDBN - Issue DBNet Client Calls #################################### export SENDCOM=${SENDCOM:-YES} export SENDECF=${SENDECF:-YES} export SENDDBN=${SENDDBN:-YES} #################################### # Specify Execution Areas #################################### export HOMEnwps=${HOMEnwps:-${PACKAGEROOT}/${model}.${nwps_ver}} export FIXnwps=${FIXnwps:-${HOMEnwps}/fix} export EXECnwps=${EXECnwps:-${HOMEnwps}/exec} export SORCnwps=${SORCnwps:-${HOMEnwps}/sorc} export PARMnwps=${PARMnwps:-${HOMEnwps}/parm} export USHnwps=${USHnwps:-${HOMEnwps}/ush} export PMnwps=${PMnwps:-${USHnwps}/pm} export BATHYdb=${BATHYdb:-${FIXnwps}/bathy_db} export SHAPEFILEdb=${SHAPEFILEdb:-${FIXnwps}/shapefile_db} # Set processing DIRs here export ARCHdir=${ARCHdir:-${DATA}/archive} export DATAdir=${DATAdir:-${DATA}/data} export INPUTdir=${INPUTdir:-${DATA}/input} export VARdir=${VARdir:-${DATA}/var} export OUTPUTdir=${OUTPUTdir:-${DATA}/output} export RUNdir=${RUNdir:-${DATA}/run} export TMPdir=${TMPdir:-${DATA}/tmp} export LOGdir=${LOGdir:-${DATA}/logs} export GEN_NETCDF=${GEN_NETCDF:-TRUE} export GEN_HDF5=${GEN_HDF5:-TRUE} # Set NWPS run conditions export DEBUGGING=${DEBUGGING:-TRUE} export DEBUG_LEVEL=${DEBUG_LEVEL:-1} export ISPRODUCTION=${ISPRODUCTION:-TRUE} export SITETYPE=${SITETYPE:-EMC} export MODELTYPE="SWAN" export TS_f=3600 export pgmout=OUTPUT.$$ setpdy.sh . ./PDY ############################################## # Define COM directory ############################################## export COMOUT=${COMOUT:-$(compath.py -o ${NET}/${nwps_ver})/${OFS}.${PDY}} export GESOUT=$(compath.py -o ${NET}/${nwps_ver})/${NET}.${PDY}/nwges export COMINestofs=${COMINestofs:-$(compath.py stofs/${stofs_ver}/stofs_2d_glo.${PDY})} export COMINrtofs=${COMINrtofs:-$(compath.py rtofs/${rtofs_ver}/rtofs.${PDY})} export COMINsice=${COMINsice:-$(compath.py seaice_analysis/${seaice_analysis_ver}/seaice_analysis.${PDY})} export COMINsicem1=${COMINsicem1:-$(compath.py seaice_analysis/${seaice_analysis_ver}/seaice_analysis.${PDYm1})} export COMINpsurge=${COMINpsurge:-$(compath.py psurge/${psurge_ver})} # # make sure NWPS COM directory exists if [ "${SENDCOM}" = YES ]; then mkdir -p $COMOUT fi mkdir -p $LOGdir $RUNdir $TMPdir $OUTPUTdir $ARCHdir $DATAdir $INPUTdir $VARdir $GESOUT env ############################################## # Execute the script ${HOMEnwps}/scripts/exnwps_ofs_prep.sh export err=$?; err_chk ############################################## msg="JOB $job HAS COMPLETED NORMALLY." postmsg $jlogfile "$msg" if [ -e $pgmout ]; then cat $pgmout fi cd $DATAROOT if [ "$KEEPDATA" != YES ]; then rm -rf $DATA fi date