Skip to content

Commit

Permalink
Update JGDAS ENKF POST job (#3090)
Browse files Browse the repository at this point in the history
NCO has requested that each COM variable specify whether it is an input
or an output. This completes that process for the global jgdas enkf post
job.

Refs #2451
  • Loading branch information
mingshichen-noaa authored Nov 15, 2024
1 parent 57c8aa3 commit 6bde6ac
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions scripts/exgdas_enkf_post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,31 +66,34 @@ export OMP_NUM_THREADS=$NTHREADS_EPOS
# Forecast ensemble member files
for imem in $(seq 1 $NMEM_ENS); do
memchar="mem"$(printf %03i "${imem}")
MEMDIR=${memchar} YMD=${PDY} HH=${cyc} declare_from_tmpl -x COM_ATMOS_HISTORY:COM_ATMOS_HISTORY_TMPL
MEMDIR=${memchar} YMD=${PDY} HH=${cyc} declare_from_tmpl -x \
COMIN_ATMOS_HISTORY:COM_ATMOS_HISTORY_TMPL

for fhr in $(seq $FHMIN $FHOUT $FHMAX); do
fhrchar=$(printf %03i $fhr)
${NLN} "${COM_ATMOS_HISTORY}/${PREFIX}sfcf${fhrchar}.nc" "sfcf${fhrchar}_${memchar}"
${NLN} "${COM_ATMOS_HISTORY}/${PREFIX}atmf${fhrchar}.nc" "atmf${fhrchar}_${memchar}"
${NLN} "${COMIN_ATMOS_HISTORY}/${PREFIX}sfcf${fhrchar}.nc" "sfcf${fhrchar}_${memchar}"
${NLN} "${COMIN_ATMOS_HISTORY}/${PREFIX}atmf${fhrchar}.nc" "atmf${fhrchar}_${memchar}"
done
done

# Forecast ensemble mean and smoothed files
MEMDIR="ensstat" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_ATMOS_HISTORY_STAT:COM_ATMOS_HISTORY_TMPL
if [[ ! -d "${COM_ATMOS_HISTORY_STAT}" ]]; then mkdir -p "${COM_ATMOS_HISTORY_STAT}"; fi
MEMDIR="ensstat" YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMOUT_ATMOS_HISTORY_STAT:COM_ATMOS_HISTORY_TMPL
if [[ ! -d "${COMOUT_ATMOS_HISTORY_STAT}" ]]; then mkdir -p "${COMOUT_ATMOS_HISTORY_STAT}"; fi

for fhr in $(seq $FHMIN $FHOUT $FHMAX); do
fhrchar=$(printf %03i $fhr)
${NLN} "${COM_ATMOS_HISTORY_STAT}/${PREFIX}sfcf${fhrchar}.ensmean.nc" "sfcf${fhrchar}.ensmean"
${NLN} "${COM_ATMOS_HISTORY_STAT}/${PREFIX}atmf${fhrchar}.ensmean.nc" "atmf${fhrchar}.ensmean"
${NLN} "${COMOUT_ATMOS_HISTORY_STAT}/${PREFIX}sfcf${fhrchar}.ensmean.nc" "sfcf${fhrchar}.ensmean"
${NLN} "${COMOUT_ATMOS_HISTORY_STAT}/${PREFIX}atmf${fhrchar}.ensmean.nc" "atmf${fhrchar}.ensmean"
if [ $SMOOTH_ENKF = "YES" ]; then
for imem in $(seq 1 $NMEM_ENS); do
memchar="mem"$(printf %03i "${imem}")
MEMDIR="${memchar}" YMD=${PDY} HH=${cyc} declare_from_tmpl -x COM_ATMOS_HISTORY
${NLN} "${COM_ATMOS_HISTORY}/${PREFIX}atmf${fhrchar}${ENKF_SUFFIX}.nc" "atmf${fhrchar}${ENKF_SUFFIX}_${memchar}"
MEMDIR="${memchar}" YMD=${PDY} HH=${cyc} declare_from_tmpl -x \
COMIN_ATMOS_HISTORY:COM_ATMOS_HISTORY_TMPL
${NLN} "${COMIN_ATMOS_HISTORY}/${PREFIX}atmf${fhrchar}${ENKF_SUFFIX}.nc" "atmf${fhrchar}${ENKF_SUFFIX}_${memchar}"
done
fi
[[ $ENKF_SPREAD = "YES" ]] && ${NLN} "${COM_ATMOS_HISTORY_STAT}/${PREFIX}atmf${fhrchar}.ensspread.nc" "atmf${fhrchar}.ensspread"
[[ $ENKF_SPREAD = "YES" ]] && ${NLN} "${COMOUT_ATMOS_HISTORY_STAT}/${PREFIX}atmf${fhrchar}.ensspread.nc" "atmf${fhrchar}.ensspread"
done

################################################################################
Expand Down Expand Up @@ -145,7 +148,7 @@ if [ $SENDDBN = "YES" ]; then
fhrchar=$(printf %03i $fhr)
if [ $(expr $fhr % 3) -eq 0 ]; then
if [ -s ./sfcf${fhrchar}.ensmean ]; then
${DBNROOT}/bin/dbn_alert "MODEL" "GFS_ENKF" "${job}" "${COM_ATMOS_HISTORY_STAT}/${PREFIX}sfcf${fhrchar}.ensmean.nc"
${DBNROOT}/bin/dbn_alert "MODEL" "GFS_ENKF" "${job}" "${COMOUT_ATMOS_HISTORY_STAT}/${PREFIX}sfcf${fhrchar}.ensmean.nc"
fi
fi
done
Expand Down

0 comments on commit 6bde6ac

Please sign in to comment.