Skip to content

Commit

Permalink
Remove EnKF forecast groups
Browse files Browse the repository at this point in the history
Removes the grouping of EnKF forecasts so each job only runs one
forecast. This change makes much of the system simpler and allows
the elimination of the separate efcs scripts.

Resolves NOAA-EMC#2254
  • Loading branch information
WalterKolczynski-NOAA committed Feb 1, 2024
1 parent f4d187f commit c2e8caf
Show file tree
Hide file tree
Showing 14 changed files with 154 additions and 443 deletions.
84 changes: 0 additions & 84 deletions jobs/JGDAS_ENKF_FCST

This file was deleted.

58 changes: 22 additions & 36 deletions jobs/JGLOBAL_FORECAST
Original file line number Diff line number Diff line change
@@ -1,40 +1,19 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "fcst" -c "base fcst"

##############################################
# Set variables used in the script
##############################################
export CDUMP=${RUN/enkf}
if (( ${ENSMEM:-0} > 0 )); then
source "${HOMEgfs}/ush/jjob_header.sh" -e "efcs" -c "base fcst efcs"
else
source "${HOMEgfs}/ush/jjob_header.sh" -e "fcst" -c "base fcst"
fi

##############################################
# Begin JOB SPECIFIC work
##############################################

# Restart conditions for GFS cycle come from GDAS
rCDUMP=${CDUMP}
[[ ${CDUMP} = "gfs" ]] && export rCDUMP="gdas"

# Forecast length for GFS forecast
case ${RUN} in
*gfs | *gefs)
# shellcheck disable=SC2153
export FHMAX=${FHMAX_GFS}
# shellcheck disable=SC2153
export FHOUT=${FHOUT_GFS}
export FHMAX_HF=${FHMAX_HF_GFS}
export FHOUT_HF=${FHOUT_HF_GFS}
;;
*gdas)
export FHMAX_HF=0
export FHOUT_HF=0
;;
*)
echo "FATAL ERROR: Unsupported RUN '${RUN}'"
exit 1
esac

rCDUMP=${RUN}
[[ ${RUN} == "gfs" ]] && export rCDUMP="gdas"

# Ignore possible spelling error (nothing is misspelled)
# shellcheck disable=SC2153
Expand Down Expand Up @@ -78,11 +57,19 @@ fi

###############################################################
# Run relevant exglobal script

###############################################################
${FORECASTSH:-${SCRgfs}/exglobal_forecast.sh}
status=$?
[[ ${status} -ne 0 ]] && exit ${status}

[[ ${status} -ne 0 ]] && exit "${status}"

if [[ "${RUN}" =~ "enkf" ]] && [[ "${SENDDBN}" = YES ]]; then
for (( fhr = FHOUT; fhr <= FHMAX; fhr + FHOUT )); do
if (( fhr % 3 == 0 )); then
fhr3=$(printf %03i "${fhr}")
"${DBNROOT}/bin/dbn_alert" MODEL GFS_ENKF "${job}" "${COM_ATMOS_HISTORY}/${RUN}.t${cyc}z.sfcf${fhr3}.nc"
fi
done
fi

##############################################
# End JOB SPECIFIC work
Expand All @@ -91,15 +78,14 @@ status=$?
##############################################
# Final processing
##############################################
if [ -e "${pgmout}" ] ; then
cat ${pgmout}
if [[ -e "${pgmout}" ]] ; then
cat "${pgmout}"
fi

##########################################
# Remove the Temporary working directory
##########################################
cd ${DATAROOT}
[[ ${KEEPDATA} = "NO" ]] && rm -rf ${DATA}

cd "${DATAROOT}" || true
[[ ${KEEPDATA} = "NO" ]] && rm -rf "${DATA}"

exit 0
25 changes: 0 additions & 25 deletions jobs/rocoto/efcs.sh

This file was deleted.

33 changes: 20 additions & 13 deletions parm/config/gefs/config.efcs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@

echo "BEGIN: config.efcs"

# Turn off components in ensemble via _ENKF, or use setting from deterministic
export DO_AERO=${DO_AERO_ENKF:-${DO_AERO:-"NO"}}
export DO_OCN=${DO_OCN_ENKF:-${DO_OCN:-"NO"}}
export DO_ICE=${DO_ICE_ENKF:-${DO_ICE:-"NO"}}
export DO_WAVE=${DO_WAVE_ENKF:-${DO_WAVE:-"NO"}}
# Turn off components in ensemble
# export DO_AERO="NO"
# export DO_OCN="NO"
# export DO_ICE="NO"
# export DO_WAVE="NO"

export CASE=${CASE_ENS}

# Source model specific information that is resolution dependent
string="--fv3 ${CASE_ENS}"
string="--fv3 ${CASE}"
# Ocean/Ice/Waves ensemble configurations are identical to deterministic member
[[ "${DO_OCN}" == "YES" ]] && string="${string} --mom6 ${OCNRES}"
[[ "${DO_ICE}" == "YES" ]] && string="${string} --cice6 ${ICERES}"
Expand All @@ -24,17 +26,22 @@ source "${EXPDIR}/config.ufs" ${string}
# Get task specific resources
source "${EXPDIR}/config.resources" efcs

# nggps_diag_nml
export FHOUT=${FHOUT_ENKF:-3}
if [[ ${RUN} == "enkfgfs" ]]; then
export FHOUT=${FHOUT_ENKF_GFS:-${FHOUT_ENKF:${FHOUT:-3}}}
fi

# model_configure
export FHMAX=${FHMAX_ENKF:-9}
if [[ ${RUN} == "enkfgfs" ]]; then
export FHMAX=${FHMAX_ENKF_GFS:-${FHMAX_ENKF:-${FHMAX}}}
fi

# Use serial I/O for ensemble (lustre?)
export OUTPUT_FILETYPE_ATM="netcdf"
export OUTPUT_FILETYPE_SFC="netcdf"

# Number of enkf members per fcst job
export NMEM_EFCSGRP=1
export RERUN_EFCSGRP="NO"

# Turn off inline UPP for EnKF forecast
export WRITE_DOPOST=".true."

# Stochastic physics parameters (only for ensemble forecasts)
export DO_SKEB="YES"
export SKEB=0.3
Expand Down
6 changes: 6 additions & 0 deletions parm/config/gefs/config.fcst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ string="--fv3 ${CASE}"
# shellcheck disable=SC2086
source "${EXPDIR}/config.ufs" ${string}

# shellcheck disable=SC2153
export FHMAX=${FHMAX_GFS}
# shellcheck disable=SC2153
export FHOUT=${FHOUT_GFS}
export FHMAX_HF=${FHMAX_HF_GFS}
export FHOUT_HF=${FHOUT_HF_GFS}

# Get task specific resources
source "${EXPDIR}/config.resources" fcst
Expand Down
51 changes: 40 additions & 11 deletions parm/config/gfs/config.efcs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@

echo "BEGIN: config.efcs"

# Turn off components in ensemble via _ENKF, or use setting from deterministic
export DO_AERO=${DO_AERO_ENKF:-${DO_AERO:-"NO"}}
export DO_OCN=${DO_OCN_ENKF:-${DO_OCN:-"NO"}}
export DO_ICE=${DO_ICE_ENKF:-${DO_ICE:-"NO"}}
export DO_WAVE=${DO_WAVE_ENKF:-${DO_WAVE:-"NO"}}
# Turn off components in ensemble
# export DO_AERO="NO"
# export DO_OCN="NO"
# export DO_ICE="NO"
export DO_WAVE="NO"

export CASE=${CASE_ENS}

# Source model specific information that is resolution dependent
string="--fv3 ${CASE_ENS}"
string="--fv3 ${CASE}"
# Ocean/Ice/Waves ensemble configurations are identical to deterministic member
[[ "${DO_OCN}" == "YES" ]] && string="${string} --mom6 ${OCNRES}"
[[ "${DO_ICE}" == "YES" ]] && string="${string} --cice6 ${ICERES}"
Expand All @@ -25,15 +27,23 @@ source "${EXPDIR}/config.ufs" ${string}
# Get task specific resources
. "${EXPDIR}/config.resources" efcs

# nggps_diag_nml
export FHOUT=${FHOUT_ENKF:-3}
if [[ ${RUN} == "enkfgfs" ]]; then
export FHOUT=${FHOUT_ENKF_GFS:-${FHOUT_ENKF:${FHOUT:-3}}}
fi

# model_configure
export FHMIN=${FHMIN_ENKF:-3}
export FHMAX=${FHMAX_ENKF:-9}
if [[ ${RUN} == "enkfgfs" ]]; then
export FHMAX=${FHMAX_ENKF_GFS:-${FHMAX_ENKF:-${FHMAX}}}
fi

# Use serial I/O for ensemble (lustre?)
export OUTPUT_FILETYPE_ATM="netcdf"
export OUTPUT_FILETYPE_SFC="netcdf"

# Number of enkf members per fcst job
export NMEM_EFCSGRP=2
export NMEM_EFCSGRP_GFS=1
export RERUN_EFCSGRP="NO"

# Turn off inline UPP for EnKF forecast
export WRITE_DOPOST=".false."

Expand Down Expand Up @@ -62,6 +72,25 @@ else
export DIAG_TABLE="${HOMEgfs}/parm/ufs/fv3/diag_table_da_orig"
fi

# Model config option for Ensemble
# export TYPE=nh # choices: nh, hydro
# export MONO=non-mono # choices: mono, non-mono

# gfs_physics_nml
export FHSWR=3600.
export FHLWR=3600.
export IEMS=1
export ISOL=2
export ICO2=2
export dspheat=".true."
export shal_cnv=".true."
export FHZER=6

# Set PREFIX_ATMINC to r when recentering on
if [[ ${RECENTER_ENKF:-"YES"} = "YES" ]]; then
export PREFIX_ATMINC="r"
fi

# For IAU, write restarts at beginning of window also
if [[ "${DOIAU_ENKF:-}" = "YES" ]]; then
export restart_interval="3"
Expand Down
18 changes: 18 additions & 0 deletions parm/config/gfs/config.fcst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,24 @@ string="--fv3 ${CASE}"
# shellcheck disable=SC2086
source "${EXPDIR}/config.ufs" ${string}

# Forecast length for GFS forecast
case ${RUN} in
*gfs)
# shellcheck disable=SC2153
export FHMAX=${FHMAX_GFS}
# shellcheck disable=SC2153
export FHOUT=${FHOUT_GFS}
export FHMAX_HF=${FHMAX_HF_GFS}
export FHOUT_HF=${FHOUT_HF_GFS}
;;
*gdas)
export FHMAX_HF=0
export FHOUT_HF=0
;;
*)
echo "FATAL ERROR: Unsupported RUN '${RUN}'"
exit 1
esac

# Get task specific resources
source "${EXPDIR}/config.resources" fcst
Expand Down
Loading

0 comments on commit c2e8caf

Please sign in to comment.