Skip to content

Commit

Permalink
Replace non-gfs EXEC* variables in ush scripts
Browse files Browse the repository at this point in the history
Change them to use EXECgfs.

Refs NOAA-EMC#2332
  • Loading branch information
KateFriedman-NOAA committed Feb 28, 2024
1 parent 1bd562b commit 08b57e6
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 46 deletions.
2 changes: 1 addition & 1 deletion ush/gfs_bufr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ ln -sf "${PARMgfs}/product/bufr_gfs_${CLASS}.tbl" fort.1
ln -sf "${STNLIST:-${PARMgfs}/product/bufr_stalist.meteo.gfs}" fort.8
ln -sf "${PARMgfs}/product/bufr_ij13km.txt" fort.7

${APRUN_POSTSND} "${EXECbufrsnd}/${pgm}" < gfsparm > "out_gfs_bufr_${FEND}"
${APRUN_POSTSND} "${EXECgfs}/${pgm}" < gfsparm > "out_gfs_bufr_${FEND}"
export err=$?

if [ $err -ne 0 ]; then
Expand Down
2 changes: 1 addition & 1 deletion ush/gfs_bufr_netcdf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ ln -sf ${PARMgfs}/product/bufr_gfs_${CLASS}.tbl fort.1
ln -sf ${STNLIST:-${PARMgfs}/product/bufr_stalist.meteo.gfs} fort.8
ln -sf ${PARMgfs}/product/bufr_ij13km.txt fort.7

${APRUN_POSTSND} "${EXECbufrsnd}/${pgm}" < gfsparm > "out_gfs_bufr_${FEND}"
${APRUN_POSTSND} "${EXECgfs}/${pgm}" < gfsparm > "out_gfs_bufr_${FEND}"
export err=$?

exit ${err}
7 changes: 2 additions & 5 deletions ush/syndat_getjtbul.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@
# Imported variables that must be passed in:
# DATA - path to working directory
# pgmout - string indicating path to for standard output file
# EXECSYND - path to syndat executable directory
# TANK_TROPCY - path to home directory containing tropical cyclone record
# data base

source "$HOMEgfs/ush/preamble.sh"

EXECSYND=${EXECSYND:-${HOMESYND}/exec}

cd $DATA

if [ "$#" -ne '1' ]; then
Expand Down Expand Up @@ -117,7 +114,7 @@ fi

[ -s jtwcbul ] && echo "Processing JTWC bulletin halfs into tcvitals records" >> $pgmout

pgm=$(basename $EXECSYND/syndat_getjtbul.x)
pgm=$(basename ${EXECgfs}/syndat_getjtbul.x)
export pgm
if [ -s prep_step ]; then
set +u
Expand All @@ -132,7 +129,7 @@ rm -f fnoc

export FORT11=jtwcbul
export FORT51=fnoc
time -p ${EXECSYND}/${pgm} >> $pgmout 2> errfile
time -p ${EXECgfs}/${pgm} >> $pgmout 2> errfile
errget=$?
###cat errfile
cat errfile >> $pgmout
Expand Down
7 changes: 2 additions & 5 deletions ush/syndat_qctropcy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
# COMSP - path to both output jtwc-fnoc file and output tcvitals file (this
# tcvitals file is read by subsequent relocation processing and/or
# subsequent program SYNDAT_SYNDATA)
# EXECSYND - path to syndat executable directory

# Imported variables that can be passed in:
# ARCHSYND - path to syndat archive directory
Expand All @@ -71,8 +70,6 @@ HOMENHCp1=${HOMENHCp1:-/gpfs/?p1/nhc/save/guidance/storm-data/ncep}
HOMENHC=${HOMENHC:-/gpfs/dell2/nhc/save/guidance/storm-data/ncep}
TANK_TROPCY=${TANK_TROPCY:-${DCOMROOT}/us007003}

EXECSYND=${EXECSYND:-$HOMEgfs/exec}

slmask=${slmask:-${FIXgfs}/am/syndat_slmask.t126.gaussian}
copy_back=${copy_back:-YES}
files_override=${files_override:-""}
Expand Down Expand Up @@ -239,7 +236,7 @@ cp $slmask slmask.126

# Execute program syndat_qctropcy

pgm=$(basename $EXECSYND/syndat_qctropcy.x)
pgm=$(basename ${EXECgfs}/syndat_qctropcy.x)
export pgm
if [ -s prep_step ]; then
set +u
Expand All @@ -253,7 +250,7 @@ fi
echo "$CDATE10" > cdate10.dat
export FORT11=slmask.126
export FORT12=cdate10.dat
${EXECSYND}/${pgm} >> $pgmout 2> errfile
${EXECgfs}/${pgm} >> $pgmout 2> errfile
errqct=$?
###cat errfile
cat errfile >> $pgmout
Expand Down
23 changes: 7 additions & 16 deletions ush/tropcy_relocate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,27 +122,20 @@
# POE_OPTS String indicating options to use with poe command
# Default is "-pgmmodel mpmd -ilevel 2 -labelio yes \
# -stdoutmode ordered"
# EXECRELO String indicating directory path for RELOCATE executables
# Default is "${HOMERELO}/exec"
# EXECUTIL String indicating directory path for utility program
# executables
# If the imported variable MACHINE!=sgi, then the default is
# "/nwprod/util/exec"; otherwise the default is
# "${HOMEALL}/util/exec"
# RELOX String indicating executable path for RELOCATE_MV_NVORTEX
# program
# Default is "$EXECRELO/relocate_mv_nvortex"
# Default is "${EXECgfs}/relocate_mv_nvortex"
# SUPVX String indicating executable path for SUPVIT utility
# program
# Default is "$EXECUTIL/supvit.x"
# Default is "${EXECgfs}/supvit.x"
# GETTX String indicating executable path for GETTRK utility
# program
# Default is "$EXECUTIL/gettrk"
# Default is "${EXECgfs}/gettrk"
# BKGFREQ Frequency of background files for relocation
# Default is "3"
# SENDDBN String when set to "YES" alerts output files to $COMSP
# NDATE String indicating executable path for NDATE utility program
# Default is "$EXECUTIL/ndate"
# Default is "${EXECgfs}/ndate"
#
# These do not have to be exported to this script. If they are, they will
# be used by the script. If they are not, they will be skipped
Expand Down Expand Up @@ -288,14 +281,12 @@ pgmout=${pgmout:-/dev/null}
tstsp=${tstsp:-/tmp/null/}
tmmark=${tmmark:-tm00}

EXECRELO=${EXECRELO:-${HOMERELO}/exec}

RELOX=${RELOX:-$EXECRELO/relocate_mv_nvortex}
RELOX=${RELOX:-${EXECgfs}/relocate_mv_nvortex}

export BKGFREQ=${BKGFREQ:-1}

SUPVX=${SUPVX:-$EXECRELO/supvit.x}
GETTX=${GETTX:-$EXECRELO/gettrk}
SUPVX=${SUPVX:-${EXECgfs}/supvit.x}
GETTX=${GETTX:-${EXECgfs}/gettrk}

################################################
# EXECUTE TROPICAL CYCLONE RELOCATION PROCESSING
Expand Down
6 changes: 3 additions & 3 deletions ush/wave_grib2_sbs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ if [[ ! -s "${COM_WAVE_GRID}/${outfile}.idx" ]]; then
echo " Model ID : $WAV_MOD_TAG"
set_trace

if [[ -z "${PDY}" ]] || [[ -z ${cyc} ]] || [[ -z "${cycle}" ]] || [[ -z "${EXECwave}" ]] || \
if [[ -z "${PDY}" ]] || [[ -z ${cyc} ]] || [[ -z "${cycle}" ]] || [[ -z "${EXECgfs}" ]] || \
[[ -z "${COM_WAVE_GRID}" ]] || [[ -z "${WAV_MOD_TAG}" ]] || [[ -z "${gribflags}" ]] || \
[[ -z "${GRIDNR}" ]] || [[ -z "${MODNR}" ]] || \
[[ -z "${SENDDBN}" ]]; then
Expand Down Expand Up @@ -138,11 +138,11 @@ if [[ ! -s "${COM_WAVE_GRID}/${outfile}.idx" ]]; then

set +x
echo " Run ww3_grib2"
echo " Executing ${EXECwave}/ww3_grib"
echo " Executing ${EXECgfs}/ww3_grib"
set_trace

export pgm=ww3_grib;. prep_step
"${EXECwave}/ww3_grib" > "grib2_${grdnam}_${FH3}.out" 2>&1
"${EXECgfs}/ww3_grib" > "grib2_${grdnam}_${FH3}.out" 2>&1
export err=$?;err_chk

if [ ! -s gribfile ]; then
Expand Down
8 changes: 4 additions & 4 deletions ush/wave_grid_interp_sbs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ source "$HOMEgfs/ush/preamble.sh"
echo " Model ID : $WAV_MOD_TAG"
set_trace

if [[ -z "${PDY}" ]] || [[ -z "${cyc}" ]] || [[ -z "${cycle}" ]] || [[ -z "${EXECwave}" ]] || \
if [[ -z "${PDY}" ]] || [[ -z "${cyc}" ]] || [[ -z "${cycle}" ]] || [[ -z "${EXECgfs}" ]] || \
[[ -z "${COM_WAVE_PREP}" ]] || [[ -z "${WAV_MOD_TAG}" ]] || [[ -z "${SENDDBN}" ]] || \
[ -z "${waveGRD}" ]
then
Expand All @@ -75,7 +75,7 @@ source "$HOMEgfs/ush/preamble.sh"
echo '*** EXPORTED VARIABLES IN postprocessor NOT SET ***'
echo '***************************************************'
echo ' '
echo "${PDY}${cyc} ${cycle} ${EXECwave} ${COM_WAVE_PREP} ${WAV_MOD_TAG} ${SENDDBN} ${waveGRD}"
echo "${PDY}${cyc} ${cycle} ${EXECgfs} ${COM_WAVE_PREP} ${WAV_MOD_TAG} ${SENDDBN} ${waveGRD}"
set_trace
exit 1
fi
Expand Down Expand Up @@ -137,11 +137,11 @@ source "$HOMEgfs/ush/preamble.sh"

set +x
echo " Run ww3_gint
echo " Executing $EXECwave/ww3_gint
echo " Executing ${EXECgfs}/ww3_gint
set_trace

export pgm=ww3_gint;. prep_step
$EXECwave/ww3_gint 1> gint.${grdID}.out 2>&1
${EXECgfs}/ww3_gint 1> gint.${grdID}.out 2>&1
export err=$?;err_chk

# Write interpolation file to main TEMP dir area if not there yet
Expand Down
6 changes: 3 additions & 3 deletions ush/wave_grid_moddef.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ source "$HOMEgfs/ush/preamble.sh"
# 0.c Define directories and the search path.
# The tested variables should be exported by the postprocessor script.

if [ -z "$grdID" ] || [ -z "$EXECwave" ]
if [ -z "$grdID" ] || [ -z "${EXECgfs}" ]
then
set +x
echo ' '
Expand All @@ -77,7 +77,7 @@ source "$HOMEgfs/ush/preamble.sh"
set +x
echo ' '
echo ' Creating mod_def file ...'
echo " Executing $EXECwave/ww3_grid"
echo " Executing ${EXECgfs}/ww3_grid"
echo ' '
set_trace

Expand All @@ -92,7 +92,7 @@ source "$HOMEgfs/ush/preamble.sh"



"${EXECwave}/ww3_grid" 1> "grid_${grdID}.out" 2>&1
"${EXECgfs}/ww3_grid" 1> "grid_${grdID}.out" 2>&1
err=$?

if [ "$err" != '0' ]
Expand Down
6 changes: 3 additions & 3 deletions ush/wave_outp_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ source "$HOMEgfs/ush/preamble.sh"
# 0.c Define directories and the search path.
# The tested variables should be exported by the postprocessor script.

if [ -z "$CDATE" ] || [ -z "$dtspec" ] || [ -z "$EXECwave" ] || \
if [ -z "$CDATE" ] || [ -z "$dtspec" ] || [ -z "${EXECgfs}" ] || \
[ -z "$WAV_MOD_TAG" ] || [ -z "${STA_DIR}" ]
then
set +x
Expand Down Expand Up @@ -170,11 +170,11 @@ source "$HOMEgfs/ush/preamble.sh"
# 2.b Run the postprocessor

set +x
echo " Executing $EXECwave/ww3_outp"
echo " Executing ${EXECgfs}/ww3_outp"
set_trace

export pgm=ww3_outp;. prep_step
$EXECwave/ww3_outp 1> outp_${specdir}_${buoy}.out 2>&1
${EXECgfs}/ww3_outp 1> outp_${specdir}_${buoy}.out 2>&1
export err=$?;err_chk


Expand Down
4 changes: 2 additions & 2 deletions ush/wave_prnc_cur.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
################################################################################
#

source "$HOMEgfs/ush/preamble.sh"
source "${HOMEgfs}/ush/preamble.sh"

ymdh_rtofs=$1
curfile=$2
Expand Down Expand Up @@ -75,7 +75,7 @@ ln -s "cur_glo_uv_${PDY}_${fext}${fh3}_5min.nc" "cur.nc"
ln -s "${DATA}/mod_def.${WAVECUR_FID}" ./mod_def.ww3

export pgm=ww3_prnc;. prep_step
$EXECwave/ww3_prnc 1> prnc_${WAVECUR_FID}_${ymdh_rtofs}.out 2>&1
${EXECgfs}/ww3_prnc 1> prnc_${WAVECUR_FID}_${ymdh_rtofs}.out 2>&1

export err=$?; err_chk

Expand Down
6 changes: 3 additions & 3 deletions ush/wave_prnc_ice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# --------------------------------------------------------------------------- #
# 0. Preparations

source "$HOMEgfs/ush/preamble.sh"
source "${HOMEgfs}/ush/preamble.sh"

# 0.a Basic modes of operation

Expand Down Expand Up @@ -55,7 +55,7 @@ source "$HOMEgfs/ush/preamble.sh"
echo "Making ice fields."

if [[ -z "${YMDH}" ]] || [[ -z "${cycle}" ]] || \
[[ -z "${COM_WAVE_PREP}" ]] || [[ -z "${FIXgfs}" ]] || [[ -z "${EXECwave}" ]] || \
[[ -z "${COM_WAVE_PREP}" ]] || [[ -z "${FIXgfs}" ]] || [[ -z "${EXECgfs}" ]] || \
[[ -z "${WAV_MOD_TAG}" ]] || [[ -z "${WAVEICE_FID}" ]] || [[ -z "${COM_OBS}" ]]; then

set +x
Expand Down Expand Up @@ -144,7 +144,7 @@ source "$HOMEgfs/ush/preamble.sh"

export pgm=ww3_prnc;. prep_step

$EXECwave/ww3_prnc 1> prnc_${WAVEICE_FID}_${cycle}.out 2>&1
${EXECgfs}/ww3_prnc 1> prnc_${WAVEICE_FID}_${cycle}.out 2>&1
export err=$?; err_chk

if [ "$err" != '0' ]
Expand Down

0 comments on commit 08b57e6

Please sign in to comment.