Skip to content

Commit

Permalink
[develop] Input namelist related changes needed for RRFS (#744)
Browse files Browse the repository at this point in the history
This PR brings back input namelist related changes from RRFS_dev1.
  • Loading branch information
danielabdi-noaa authored May 16, 2023
1 parent b72ab14 commit 7baa285
Show file tree
Hide file tree
Showing 5 changed files with 325 additions and 84 deletions.
27 changes: 22 additions & 5 deletions scripts/exregional_run_fcst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -438,24 +438,41 @@ cat > itag <<EOF
/
EOF
fi

#
#-----------------------------------------------------------------------
#
# Update or copy the FV3 input.nml file
# Choose namelist file to use
#
#-----------------------------------------------------------------------
#
if [ "${DO_ENSEMBLE}" = TRUE ] && ([ "${DO_SPP}" = TRUE ] || [ "${DO_SPPT}" = TRUE ] || [ "${DO_SHUM}" = TRUE ] || \
[ "${DO_SKEB}" = TRUE ] || [ "${DO_LSM_SPP}" = TRUE ]); then
STOCH="FALSE"
if [ "${DO_ENSEMBLE}" = "TRUE" ] && ([ "${DO_SPP}" = "TRUE" ] || [ "${DO_SPPT}" = "TRUE" ] || [ "${DO_SHUM}" = "TRUE" ] || \
[ "${DO_SKEB}" = "TRUE" ] || [ "${DO_LSM_SPP}" = "TRUE" ]); then
STOCH="TRUE"
fi
if [ "${STOCH}" == "TRUE" ]; then
ln_vrfy -sf ${FV3_NML_STOCH_FP} ${DATA}/${FV3_NML_FN}
else
ln_vrfy -sf ${FV3_NML_FP} ${DATA}/${FV3_NML_FN}
fi

#
#-----------------------------------------------------------------------
#
# Set stochastic physics seeds
#
#-----------------------------------------------------------------------
#
if [ "$STOCH" == "TRUE" ]; then
cp_vrfy ${DATA}/${FV3_NML_FN} ${DATA}/${FV3_NML_FN}_base
python3 $USHdir/set_FV3nml_ens_stoch_seeds.py \
--path-to-defns ${GLOBAL_VAR_DEFNS_FP} \
--cdate "$CDATE" || print_err_msg_exit "\
Call to function to create the ensemble-based namelist for the current
cycle's (cdate) run directory (DATA) failed:
cdate = \"${CDATE}\"
DATA = \"${DATA}\""
else
cp_vrfy "${FV3_NML_FP}" "${DATA}/${FV3_NML_FN}"
fi
#
#-----------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions tests/test_python/test_set_FV3nml_ens_stoch_seeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def setUp(self):

cp_vrfy(
os.path.join(PARMdir, "input.nml.FV3"),
os.path.join(EXPTDIR, "input.nml"),
os.path.join(EXPTDIR, "input.nml_base"),
)

# Put this in the tmp_dir structure so it gets cleaned up
Expand All @@ -55,7 +55,7 @@ def setUp(self):
set_env_var("USHdir", USHdir)
set_env_var("ENSMEM_INDX", 2)
set_env_var("FV3_NML_FN", "input.nml")
set_env_var("FV3_NML_FP", os.path.join(EXPTDIR, "input.nml"))
set_env_var("FV3_NML_FP", os.path.join(EXPTDIR, "input.nml_base"))
set_env_var("DO_SHUM", True)
set_env_var("DO_SKEB", True)
set_env_var("DO_SPPT", True)
Expand Down
42 changes: 39 additions & 3 deletions ush/config_defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -652,10 +652,10 @@ workflow:

RGNL_GRID_NML_FN: "regional_grid.nml"

FV3_NML_BASE_SUITE_FN: "input.nml.FV3"
FV3_NML_YAML_CONFIG_FN: "FV3.input.yml"
FV3_NML_BASE_ENS_FN: "input.nml.base_ens"
FV3_NML_FN: "input.nml"
FV3_NML_BASE_SUITE_FN: "{{ FV3_NML_FN }}.FV3"
FV3_NML_YAML_CONFIG_FN: "FV3.input.yml"
FV3_NML_BASE_ENS_FN: "{{ FV3_NML_FN }}.base_ens"
FV3_EXEC_FN: "ufs_model"

DATA_TABLE_FN: "data_table"
Expand Down Expand Up @@ -683,6 +683,10 @@ workflow:
FIELD_TABLE_FP: '{{ [EXPTDIR, FIELD_TABLE_FN]|path_join }}'
NEMS_CONFIG_FP: '{{ [EXPTDIR, NEMS_CONFIG_FN]|path_join }}'
FV3_NML_FP: '{{ [EXPTDIR, FV3_NML_FN]|path_join }}'
FV3_NML_CYCSFC_FP: '{{ [EXPTDIR, [FV3_NML_FN, "_cycsfc"]|join ]|path_join }}'
FV3_NML_RESTART_FP: '{{ [EXPTDIR, [FV3_NML_FN, "_restart"]|join ]|path_join }}'
FV3_NML_STOCH_FP: '{{ [EXPTDIR, [FV3_NML_FN, "_stoch"]|join ]|path_join }}'
FV3_NML_RESTART_STOCH_FP: '{{ [EXPTDIR, [FV3_NML_FN, "_restart_stoch"]|join ]|path_join }}'

FCST_MODEL: "ufs-weather-model"
WFLOW_XML_FN: "FV3LAM_wflow.xml"
Expand Down Expand Up @@ -1183,6 +1187,32 @@ rrfs:
#
DO_RRFS_DEV: false # Turn this on to test RRFS dev workflow
DO_NLDN_LGHT: false
#
#-----------------------------------------------------------------------
#
# Set switches associated with ensembles. Definitions:
#
# DO_ENKFUPDATE:
# Decide whether or not to run EnKF update for the ensemble members
#
#-----------------------------------------------------------------------
#
DO_ENKFUPDATE: false
#
#-----------------------------------------------------------------------
#
# Set switches associated with running data assimilation. Definitions:
#
# DO_DACYCLE:
# Flag that determines whether to run a data assimilation cycle.
#
# DO_SURFACE_CYCLE:
# Flag that determines whether to continue cycle surface fields.
#
#-----------------------------------------------------------------------
#
DO_DACYCLE: false
DO_SURFACE_CYCLE: false

#----------------------------
# MAKE GRID config parameters
Expand Down Expand Up @@ -2363,6 +2393,12 @@ global:
#
#-----------------------------------------------------------------------
#
# PRINT_DIFF_PGR:
# Option to turn on/off pressure tendency diagnostic
#
#-----------------------------------------------------------------------
#
PRINT_DIFF_PGR: false

#----------------------------
# verification (vx) parameters
Expand Down
Loading

0 comments on commit 7baa285

Please sign in to comment.