Skip to content

Commit

Permalink
fixes for wave post processing
Browse files Browse the repository at this point in the history
  • Loading branch information
NeilBarton-NOAA committed Jul 24, 2024
1 parent ec4becc commit b69d653
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
20 changes: 10 additions & 10 deletions parm/config/gefs/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,15 @@ export FHOUT_ICE=3
# GFS cycle info
export gfs_cyc=@gfs_cyc@ # 0: no GFS cycle, 1: 00Z only, 2: 00Z and 12Z only, 4: all 4 cycles.

# set variables needed for use with REPLAY ICs
export REPLAY_ICS=@REPLAY_ICS@
if [[ "${REPLAY_ICS:-NO}" == "YES" ]]; then
export OFFSET_START_HOUR=$(( assim_freq / 2 ))
else
export OFFSET_START_HOUR=0
fi


# GFS output and frequency
export FHMIN_GFS=0
export FHMIN=${FHMIN_GFS}
Expand All @@ -241,7 +250,7 @@ export FHMAX_HF_GFS=@FHMAX_HF_GFS@
export FHOUT_HF_GFS=1
export FHOUT_OCN_GFS=6
export FHOUT_ICE_GFS=6
export FHMIN_WAV=0
export FHMIN_WAV=${OFFSET_START_HOUR:-0}
export FHOUT_WAV=3
export FHMAX_HF_WAV=120
export FHOUT_HF_WAV=1
Expand Down Expand Up @@ -294,15 +303,6 @@ export NMEM_ENS=@NMEM_ENS@
export ENSMEM=${ENSMEM:-"000"}
export MEMDIR="mem${ENSMEM}"

# initialize ocean ensemble members with perturbations
# if true, only occurs for members greater than zero
export REPLAY_ICS=@REPLAY_ICS@
if [[ "${REPLAY_ICS:-NO}" == "YES" ]]; then
export OFFSET_START_HOUR=$(( assim_freq / 2 ))
else
export OFFSET_START_HOUR=0
fi

export DOIAU="NO" # While we are not doing IAU, we may want to warm start w/ IAU in the future
# Check if cycle is cold starting
if [[ "${EXP_WARM_START}" = ".false." ]]; then
Expand Down
11 changes: 4 additions & 7 deletions scripts/exgfs_wave_post_pnt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ source "${USHgfs}/preamble.sh"

if [ "$DOSPC_WAV" = 'YES' ] || [ "$DOBLL_WAV" = 'YES' ]
then
ymdh=$(${NDATE} -"${WAVHINDH}" "${PDY}${OFFSET_START_HOUR}")
ymdh=$(${NDATE} -"${WAVHINDH}" "${PDY}${cyc}")
tstart="${ymdh:0:8} ${ymdh:8:2}0000"
dtspec=3600. # default time step (not used here)
sed -e "s/TIME/${tstart}/g" \
Expand All @@ -252,8 +252,8 @@ source "${USHgfs}/preamble.sh"
ww3_outp_spec.inp.tmpl > ww3_outp.inp

${NLN} mod_def.$waveuoutpGRD mod_def.ww3
sec=$(( ${cyc} + ${OFFSET_START_HOUR} ))
sec=$( printf "%02d" ${sec} )
#export OFFSET_START_HOUR=$( printf "%02d" ${half_assim} )
sec=$( printf "%02d" $(( cyc + OFFSET_START_HOUR )) )
HMS="${sec}0000"
if [[ -f "${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${PDY}.${HMS}" ]]; then
${NLN} "${COMIN_WAVE_HISTORY}/${WAV_MOD_TAG}.out_pnt.${waveuoutpGRD}.${PDY}.${HMS}" \
Expand Down Expand Up @@ -362,15 +362,12 @@ source "${USHgfs}/preamble.sh"
echo " Creating the wave point scripts at : $(date)"
ymdh=$($NDATE "${fhr}" "${PDY}${cyc}")
YMD=${ymdh:0:8}
sec=$(( ${cyc} + ${OFFSET_START_HOUR} ))
sec=$( printf "%02d" ${sec} )
HMS="${sec}0000"
HMS="${ymdh:8:2}0000"
YMDHMS=${YMD}${HMS}
FH3=$(printf %03i ${fhr})

rm -f tmpcmdfile.${FH3}
touch tmpcmdfile.${FH3}
rm -fr output_$YMDHMS
mkdir output_$YMDHMS
cd output_$YMDHMS

Expand Down

0 comments on commit b69d653

Please sign in to comment.