Skip to content

Commit

Permalink
Remove jlogfile and modify waveexe for wcoss2
Browse files Browse the repository at this point in the history
1) Remove jlogfile based on new standard for wcoss2
2) Modify the format of wavempexec for wcoss2

 On branch feature/gefs_v12_github_port2acorn
 Changes to be committed:
	modified:   scripts/exglobal_fcst_nemsfv3gfs.sh
	modified:   scripts/exwave_init.sh
	modified:   scripts/exwave_post_sbs.sh
	modified:   scripts/exwave_prep.sh
	modified:   scripts/exwave_stat.sh
	modified:   ush/wave_ens_bull.sh
	modified:   ush/wave_ens_stat.sh
	modified:   ush/wave_grib2_sbs.sh
	modified:   ush/wave_grid_interp_sbs.sh
	modified:   ush/wave_grid_moddef.sh
	modified:   ush/wave_outp_spec.sh
	modified:   ush/wave_prnc_ice.sh
	modified:   ush/wave_tar.sh

Refs: NOAA-EMC#345
  • Loading branch information
XianwuXue-NOAA committed Sep 24, 2021
1 parent 7ab32de commit 404edb3
Show file tree
Hide file tree
Showing 13 changed files with 99 additions and 93 deletions.
2 changes: 1 addition & 1 deletion scripts/exglobal_fcst_nemsfv3gfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ nfiles=$(ls -1 $DATA/INPUT/* | wc -l)
if [ $nfiles -le 0 ]; then
msg="FATAL ERROR: Initial conditions must exist in $DATA/INPUT, ABORT!"
echo "$msg"
postmsg "$jlogfile" "$msg"
postmsg "$msg"
exit 1
fi

Expand Down
10 changes: 5 additions & 5 deletions scripts/exwave_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
cd $DATA

msg="HAS BEGUN on `hostname`"
#postmsg "$jlogfile" "$msg"
postmsg "$msg"
echo $msg
msg="Starting MWW3 INIT CONFIG SCRIPT for $COMPONENTwave"
#postmsg "$jlogfile" "$msg"
postmsg "$msg"
echo $msg

set +x
Expand Down Expand Up @@ -118,7 +118,7 @@
[[ "$LOUD" = YES ]] && set -x
else
msg="ABNORMAL EXIT: NO INP FILE FOR MODEL DEFINITION FILE"
#postmsg "$jlogfile" "$msg"
postmsg "$msg"
echo $msg
set +x
echo ' '
Expand Down Expand Up @@ -203,7 +203,7 @@
[[ "$LOUD" = YES ]] && set -x
else
msg="ABNORMAL EXIT: NO MODEL DEFINITION FILE"
#postmsg "$jlogfile" "$msg"
postmsg "$msg"
echo $msg
set +x
echo ' '
Expand Down Expand Up @@ -233,7 +233,7 @@
[[ "$LOUD" = YES ]] && set -x

msg="$job completed normally"
#postmsg "$jlogfile" "$msg"
postmsg "$msg"
echo $msg

# End of MWW3 init config script ------------------------------------------- #
38 changes: 20 additions & 18 deletions scripts/exwave_post_sbs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@

cd $DATA

postmsg "$jlogfile" "HAS BEGUN on `hostname`"
postmsg "HAS BEGUN on `hostname`"

msg="Starting WAVE POSTPROCESSOR SCRIPT for $WAV_MOD_TAG"
postmsg "$jlogfile" "$msg"
postmsg "$msg"

set +x
echo ' '
Expand Down Expand Up @@ -161,7 +161,7 @@
echo ' '
[[ "$LOUD" = YES ]] && set -x
echo "$WAV_MOD_TAG post $grdID $date $cycle : mod_def file missing." >> $wavelog
postmsg "$jlogfile" "FATAL ERROR : NO MOD_DEF file mod_def.$grdID"
postmsg "FATAL ERROR : NO MOD_DEF file mod_def.$grdID"
DOFLD_WAV='NO'
export err=2; ${errchk}
exit $err
Expand Down Expand Up @@ -199,7 +199,7 @@
echo ' '
[[ "$LOUD" = YES ]] && set -x
echo "$WAV_MOD_ID post $date $cycle : buoy location file missing." >> $wavelog
postmsg "$jlogfile" "FATAL ERROR : NO BUOY LOCATION FILE"
postmsg "FATAL ERROR : NO BUOY LOCATION FILE"
export err=3; ${errchk}
exit $err
DOPNT_WAV='NO'
Expand All @@ -221,7 +221,7 @@
echo ' '
[[ "$LOUD" = YES ]] && set -x
echo "$WAV_MOD_ID post $date $cycle : buoy location file missing." >> $wavelog
postmsg "$jlogfile" "FATAL ERROR : NO BUOY LOCATION FILE"
postmsg "FATAL ERROR : NO BUOY LOCATION FILE"
export err=3; ${errchk}
exit $err
DOPNT_WAV='NO'
Expand All @@ -245,7 +245,7 @@
echo ' '
[[ "$LOUD" = YES ]] && set -x
echo "$AV_MOD_ID post $date $cycle : buoy location file missing." >> $wavelog
postmsg "$jlogfile" "FATAL ERROR : NO BUOY LOCATION FILE"
postmsg "FATAL ERROR : NO BUOY LOCATION FILE"
err=3; export err;${errchk}
exit $err
DOPNT_WAV='NO'
Expand Down Expand Up @@ -280,7 +280,7 @@
echo ' '
[[ "$LOUD" = YES ]] && set -x
echo "$WAV_MOD_TAG post $date $cycle : GRINT template file missing." >> $wavelog
postmsg "$jlogfile" "NON-FATAL ERROR : NO TEMPLATE FOR GRINT INPUT FILE"
postmsg "NON-FATAL ERROR : NO TEMPLATE FOR GRINT INPUT FILE"
exit_code=1
DOGRI_WAV='NO'
fi
Expand Down Expand Up @@ -310,7 +310,7 @@
echo ' '
[[ "$LOUD" = YES ]] && set -x
echo "$WAV_MOD_TAG post $date $cycle : GRIB2 template file missing." >> $wavelog
postmsg "$jlogfile" "NON-FATAL ERROR : NO TEMPLATE FOR GRIB2 INPUT FILE"
postmsg "NON-FATAL ERROR : NO TEMPLATE FOR GRIB2 INPUT FILE"
exit_code=2
DOGRB_WAV='NO'
fi
Expand Down Expand Up @@ -362,7 +362,7 @@
echo ' '
[[ "$LOUD" = YES ]] && set -x
echo "$WAV_MOD_TAG post $date $cycle : buoy log file missing." >> $wavelog
postmsg "$jlogfile" "FATAL ERROR : NO BUOY LOG FILE GENERATED FOR SPEC AND BULLETIN FILES"
postmsg "FATAL ERROR : NO BUOY LOG FILE GENERATED FOR SPEC AND BULLETIN FILES"
export err=5;${errchk}
exit $err
DOSPC_WAV='NO'
Expand Down Expand Up @@ -411,7 +411,7 @@
then
pgm=wave_post
msg="ABNORMAL EXIT: ERROR IN ww3_outp"
postmsg "$jlogfile" "$msg"
postmsg "$msg"
set +x
echo ' '
echo '******************************************** '
Expand Down Expand Up @@ -454,7 +454,7 @@
echo ' '
[[ "$LOUD" = YES ]] && set -x
echo "$WAV_MOD_TAG post $date $cycle : ibp log file missing." >> $wavelog
postmsg "$jlogfile" "FATAL ERROR : NO IBP LOG FILE GENERATED FOR SPEC AND BULLETIN FILES"
postmsg "FATAL ERROR : NO IBP LOG FILE GENERATED FOR SPEC AND BULLETIN FILES"
export err=6;${errchk}
exit $err
DOIBP_WAV='NO'
Expand Down Expand Up @@ -550,7 +550,7 @@
echo ' '
[[ "$LOUD" = YES ]] && set -x
echo "$WAV_MOD_TAG post $waveuoutpGRD $date $cycle : point output missing." >> $wavelog
postmsg "$jlogfile" "FATAL ERROR : NO RAW POINT OUTPUT FILE out_pnt.$waveuoutpGRD"
postmsg "FATAL ERROR : NO RAW POINT OUTPUT FILE out_pnt.$waveuoutpGRD"
export err=7;${errchk}
exit $err
fi
Expand All @@ -566,7 +566,7 @@
echo ' '
[[ "$LOUD" = YES ]] && set -x
echo "$WAV_MOD_TAG post $waveuoutpGRD $date $cycle : point output missing." >> $wavelog
postmsg "$jlogfile" "FATAL ERROR : NO RAW POINT OUTPUT FILE out_pnt.$waveuoutpGRD
postmsg "FATAL ERROR : NO RAW POINT OUTPUT FILE out_pnt.$waveuoutpGRD
err=6; export err;${errchk}
exit $err
fi
Expand Down Expand Up @@ -615,7 +615,7 @@
echo ' '
[[ "$LOUD" = YES ]] && set -x
echo "$WAV_MOD_TAG post $grdID $date $cycle : field output missing." >> $wavelog
postmsg "$jlogfile" "NON-FATAL ERROR : NO RAW FIELD OUTPUT FILE out_grd.$grdID"
postmsg "NON-FATAL ERROR : NO RAW FIELD OUTPUT FILE out_grd.$grdID"
DOFLD_WAVE='NO'
export err=8;${errchk}
exit $err
Expand Down Expand Up @@ -679,7 +679,8 @@

if [ "$wavenproc" -gt '1' ]
then
${wavempexec} ${wavenproc} ${wave_mpmd} ${fcmdnow}
#${wavempexec} ${wavenproc} ${wave_mpmd} ${fcmdnow}
${wavempexec} ${wave_mpmd} ${fcmdnow}
exit=$?
else
chmod 744 ${fcmdnow}
Expand Down Expand Up @@ -787,7 +788,8 @@

if [ "$wavenproc" -gt '1' ]
then
${wavempexec} ${wavenproc} ${wave_mpmd} cmdtarfile
#${wavempexec} ${wavenproc} ${wave_mpmd} cmdtarfile
${wavempexec} ${wave_mpmd} cmdtarfile
exit=$?
else
chmod 744 cmdtarfile
Expand Down Expand Up @@ -826,14 +828,14 @@
then
echo " FATAL ERROR: Problem in MWW3 POST"
msg="ABNORMAL EXIT: Problem in MWW3 POST"
postmsg "$jlogfile" "$msg"
postmsg "$msg"
echo $msg
export err=11;${errchk}
exit $err
else
echo " Side-by-Side Wave Post Completed Normally "
msg="$job completed normally"
postmsg "$jlogfile" "$msg"
postmsg "$msg"
exit 0
fi

Expand Down
34 changes: 17 additions & 17 deletions scripts/exwave_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
mkdir outtmp

msg="HAS BEGUN on `hostname`"
postmsg "$jlogfile" "$msg"
postmsg "$msg"
msg="Starting MWW3 PREPROCESSOR SCRIPT for $WAV_MOD_TAG"
postmsg "$jlogfile" "$msg"
postmsg "$msg"

set +x
echo ' '
Expand Down Expand Up @@ -179,7 +179,7 @@

else
msg="FATAL ERROR: NO MODEL DEFINITION FILE"
postmsg "$jlogfile" "$msg"
postmsg "$msg"
set +x
echo ' '
echo '*********************************************************** '
Expand Down Expand Up @@ -231,7 +231,7 @@
[[ "$LOUD" = YES ]] && set -x
else
msg="ABNORMAL EXIT: NO FILE $file"
./postmsg "$jlogfile" "$msg"
./postmsg "$msg"
set +x
echo ' '
echo '************************************** '
Expand Down Expand Up @@ -266,7 +266,7 @@

if [ -d ice ]
then
postmsg "$jlogfile" "FATAL ERROR ice field not generated."
postmsg "FATAL ERROR ice field not generated."
set +x
echo ' '
echo ' FATAL ERROR: ice field not generated '
Expand Down Expand Up @@ -387,7 +387,7 @@
echo " File for $ymdh : error in wave_g2ges.sh"
echo ' '
[[ "$LOUD" = YES ]] && set -x
postmsg "$jlogfile" " File for $ymdh : error in wave_g2ges.sh"
postmsg " File for $ymdh : error in wave_g2ges.sh"
nr_err=`expr $nr_err + 1`
rm -f gwnd.$ymdh
else
Expand Down Expand Up @@ -442,13 +442,13 @@
echo ' '
[[ "$LOUD" = YES ]] && set -x
mv -f grb_*.out $DATA/outtmp
postmsg "$jlogfile" "NON-FATAL ERROR in wave_g2ges.sh, possibly in multiple calls."
postmsg "NON-FATAL ERROR in wave_g2ges.sh, possibly in multiple calls."
fi

if [ "$nr_err" -gt "$err_max" ]
then
msg="ABNORMAL EXIT: TOO MANY MISSING WIND INPUT GRB2 FILES"
postmsg "$jlogfile" "$msg"
postmsg "$msg"
set +x
echo ' '
echo '********************************************* '
Expand Down Expand Up @@ -477,7 +477,7 @@
if [ -z "$files" ]
then
msg="ABNORMAL EXIT: NO gwnd.* FILES FOUND"
postmsg "$jlogfile" "$msg"
postmsg "$msg"
set +x
echo ' '
echo '******************************************** '
Expand Down Expand Up @@ -525,7 +525,7 @@
if [ "$err" != '0' ]
then
msg="ABNORMAL EXIT: ERROR IN waveprnc"
postmsg "$jlogfile" "$msg"
postmsg "$msg"
set +x
echo ' '
echo '*************************************** '
Expand All @@ -541,7 +541,7 @@
if [ ! -f wind.ww3 ]
then
msg="ABNORMAL EXIT: FILE wind.ww3 MISSING"
postmsg "$jlogfile" "$msg"
postmsg "$msg"
set +x
echo ' '
cat waveprep.out
Expand Down Expand Up @@ -679,7 +679,7 @@
echo '************************************** '
echo ' '
set $seton
postmsg "$jlogfile" "FATAL ERROR - NO CURRENT FILE (RTOFS)"
postmsg "FATAL ERROR - NO CURRENT FILE (RTOFS)"
export err=12;${errchk}
exit $err
echo ' '
Expand Down Expand Up @@ -731,7 +731,7 @@
if [ -z "$files" ]
then
msg="ABNORMAL EXIT: NO ${WAVECUR_FID}.* FILES FOUND"
postmsg "$jlogfile" "$msg"
postmsg "$msg"
set +x
echo ' '
echo '******************************************** '
Expand Down Expand Up @@ -781,7 +781,7 @@
if [ ! -f ww3_multi.inp.tmpl ]
then
msg="ABNORMAL EXIT: NO TEMPLATE FOR INPUT FILE"
postmsg "$jlogfile" "$msg"
postmsg "$msg"
set +x
echo ' '
echo '************************************************ '
Expand Down Expand Up @@ -816,7 +816,7 @@
echo '*** FATAL ERROR : buoy.loc NOT FOUND *** '
echo '**************************************** '
echo ' '
postmsg "$jlogfile" " FATAL ERROR : buoy.loc ($FIXwave/wave_${NET}.buoys) NOT FOUND"
postmsg " FATAL ERROR : buoy.loc ($FIXwave/wave_${NET}.buoys) NOT FOUND"
touch buoy.loc
echo "$WAV_MOD_TAG fcst $date $cycle : no buoy locations file ($FIXwave/wave_${NET}.buoys)." >> $wavelog
export err=15;${errchk}
Expand Down Expand Up @@ -967,7 +967,7 @@
done
else
msg="NO rmp precomputed nc files found, is this OK???"
postmsg "$jlogfile" "$msg"
postmsg "$msg"
set +x
echo ' '
echo '************************************************ '
Expand Down Expand Up @@ -1034,6 +1034,6 @@
[[ "$LOUD" = YES ]] && set -x

msg="$job completed normally"
postmsg "$jlogfile" "$msg"
postmsg "$msg"

# End of MWW3 preprocessor script ------------------------------------------- #
Loading

0 comments on commit 404edb3

Please sign in to comment.