#!/bin/bash ######################################################## # This job runs the code to blend US's and UK's WAFS products at 0.25 deg ######################################################## date export PS4='$SECONDS + ' set -x #################################### # make temp directory #################################### export DATA=${DATA:-${DATAROOT}/${jobid:?}} mkdir -p "${DATA}" && cd "${DATA}" ########################################### # Run setpdy and initialize PDY variables ########################################### export cycle=${cycle:-"t${cyc}z"} setpdy.sh . ./PDY #################################### # SEND to COM, DBN, etc #################################### export SENDCOM=${SENDCOM:-"YES"} export SENDDBN=${SENDDBN:-"YES"} export SENDDBN_NTC=${SENDDBN_NTC:-"YES"} #################################### # Specify NET and RUN Name and model #################################### export NET=${NET:-wafs} export RUN=${RUN:-wafs} ############################################## # Define COM directories ############################################## export COMIN=${COMIN:-$(compath.py "${envir}/${NET}/${wafs_ver}")"/${RUN}.${PDY}/${cyc}/grib2/0p25"} export COMOUT=${COMOUT:-$(compath.py -o "${NET}/${wafs_ver}")"/${RUN}.${PDY}/${cyc}/grib2/0p25/blending"} export COMOUTwmo=${COMOUTwmo:-"${COMOUT}/wmo"} mkdir -p "${COMOUT}" "${COMOUTwmo}" export COMINus=${COMINus:-"${COMIN}"} export COMINuk=${COMINuk:-"${DCOMROOT}/${PDY}/wgrbbul/ukmet_wafs"} #################################### # Determine Job Output Name on System #################################### export pgmout="OUTPUT.$$" #################################### # Specify Execution Areas #################################### export EXECwafs="${HOMEwafs}/exec" export FIXwafs="${HOMEwafs}/fix" export USHwafs="${HOMEwafs}/ush" ######################################################### # print current environment ######################################################### env ############################################ # Execute the script. ############################################ "${HOMEwafs}/scripts/exwafs_grib2_0p25_blending.sh" export err=$? err_chk if [[ -e "${pgmout}" ]]; then cat "${pgmout}" fi ############################## # Remove the Temporary working directory ############################## if [[ "${KEEPDATA^^}" != "YES" ]]; then rm -rf "${DATA}" fi date