Skip to content

Commit

Permalink
Update functionality for Prototype HR3 UGWP (#1987)
Browse files Browse the repository at this point in the history
This PR adds/modifies namelist options and activates new 'ccpp' suite definition
files for the updated Unified Gravity Wave Physics (UGWP) in the ufs-weather-
model recently updated for HR3.  The changes to UGWP are the use of the GSL
drag suite for orographic gravity wave drag (GWD) and blocking, as well as the
new UGWP Version 1 non-stationary GWD.  See
ufs-community/ufs-weather-model#1923 for details.

Resolves #1986
  • Loading branch information
mdtoyNOAA committed Nov 15, 2023
1 parent be9085e commit 255616d
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 25 deletions.
4 changes: 2 additions & 2 deletions parm/config/gefs/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export DO_WAVE="NO"
export DO_OCN="NO"
export DO_ICE="NO"
export DO_AERO="NO"
export CCPP_SUITE="FV3_GFS_v17_p8"
export CCPP_SUITE="FV3_GFS_v17_p8_ugwpv1"
export WAVE_CDUMP="" # When to include wave suite: gdas, gfs, or both
export DOBNDPNT_WAVE="NO"
export cplwav2atm=".false."
Expand Down Expand Up @@ -204,7 +204,7 @@ case "${APP}" in
export DO_COUPLED="YES"
export DO_OCN="YES"
export DO_ICE="YES"
export CCPP_SUITE="FV3_GFS_v17_coupled_p8" # TODO: Does this include FV3_GFS_v17_p8? Can this be used instead of FV3_GFS_v17_p8 on L141
export CCPP_SUITE="FV3_GFS_v17_coupled_p8_ugwpv1" # TODO: Does this include FV3_GFS_v17_p8? Can this be used instead of FV3_GFS_v17_p8 on L141
export confignamevarfornems="cpld"

if [[ "${APP}" =~ A$ ]]; then
Expand Down
17 changes: 10 additions & 7 deletions parm/config/gefs/config.fcst
Original file line number Diff line number Diff line change
Expand Up @@ -119,24 +119,27 @@ if (( gwd_opt == 2 )); then
#export do_ugwp_v1_orog_only=".false."

#--used for UFS p8
export knob_ugwp_version=0
export knob_ugwp_version=1
export do_ugwp=".false."
export do_tofd=".false."
export do_ugwp_v0=".true."
export do_ugwp_v1=".false."
export do_ugwp_v0=".false."
export do_ugwp_v1=".true."
export do_ugwp_v0_orog_only=".false."
export do_ugwp_v0_nst_only=".false."
export do_gsl_drag_ls_bl=".false."
export do_gsl_drag_ls_bl=".true."
export do_gsl_drag_ss=".true."
export do_gsl_drag_tofd=".false."
export do_gsl_drag_tofd=".true."
export do_ugwp_v1_orog_only=".false."
launch_level=$(echo "${LEVS}/2.35" |bc)
export launch_level
if [[ ${do_gsl_drag_ls_bl} == ".true." ]]; then
export cdmbgwd=${cdmbgwd_gsl}
fi
fi

# Sponge layer settings
export tau=10.0
export rf_cutoff=7.5e2
export tau=0.
export rf_cutoff=10.
export d2_bg_k1=0.20
export d2_bg_k2=0.04
export dz_min=6
Expand Down
14 changes: 14 additions & 0 deletions parm/config/gefs/config.ufs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ case "${fv3_res}" in
export nthreads_fv3=1
export nthreads_fv3_gfs=1
export cdmbgwd="0.071,2.1,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="40.0,1.77,1.0,1.0" # settings for GSL drag suite
export knob_ugwp_tauamp=6.0e-3 # setting for UGWPv1 non-stationary GWD
export WRITE_GROUP=1
export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE=1
export WRITE_GROUP_GFS=1
Expand All @@ -126,6 +128,8 @@ case "${fv3_res}" in
export nthreads_fv3=1
export nthreads_fv3_gfs=1
export cdmbgwd="0.14,1.8,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="20.0,2.5,1.0,1.0" # settings for GSL drag suite
export knob_ugwp_tauamp=3.0e-3 # setting for UGWPv1 non-stationary GWD
export WRITE_GROUP=1
export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE=1
export WRITE_GROUP_GFS=1
Expand All @@ -140,6 +144,8 @@ case "${fv3_res}" in
export nthreads_fv3=1
export nthreads_fv3_gfs=2
export cdmbgwd="0.23,1.5,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="10.0,3.5,1.0,1.0" # settings for GSL drag suite
export knob_ugwp_tauamp=1.5e-3 # setting for UGWPv1 non-stationary GWD
export WRITE_GROUP=1
export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE=10
export WRITE_GROUP_GFS=2
Expand All @@ -154,6 +160,8 @@ case "${fv3_res}" in
export nthreads_fv3=1
export nthreads_fv3_gfs=2
export cdmbgwd="1.1,0.72,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="5.0,5.0,1.0,1.0" # settings for GSL drag suite
export knob_ugwp_tauamp=0.8e-3 # setting for UGWPv1 non-stationary GWD
export WRITE_GROUP=2
export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE=8
export WRITE_GROUP_GFS=2
Expand All @@ -168,6 +176,8 @@ case "${fv3_res}" in
export nthreads_fv3=4
export nthreads_fv3_gfs=4
export cdmbgwd="4.0,0.15,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="2.5,7.5,1.0,1.0" # settings for GSL drag suite
export knob_ugwp_tauamp=0.5e-3 # setting for UGWPv1 non-stationary GWD
export WRITE_GROUP=2
export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE=10
export WRITE_GROUP_GFS=4
Expand All @@ -182,6 +192,8 @@ case "${fv3_res}" in
export nthreads_fv3=4
export nthreads_fv3_gfs=4
export cdmbgwd="4.0,0.10,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="1.67,8.8,1.0,1.0" # settings for GSL drag suite
export knob_ugwp_tauamp=0.35e-3 # setting for UGWPv1 non-stationary GWD
export WRITE_GROUP=4
export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE=10 # TODO: refine these numbers when a case is available
export WRITE_GROUP_GFS=4
Expand All @@ -196,6 +208,8 @@ case "${fv3_res}" in
export nthreads_fv3=4
export nthreads_fv3_gfs=4
export cdmbgwd="4.0,0.05,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="0.625,14.1,1.0,1.0" # settings for GSL drag suite
export knob_ugwp_tauamp=0.13e-3 # setting for UGWPv1 non-stationary GWD
export WRITE_GROUP=4
export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE=10 # TODO: refine these numbers when a case is available
export WRITE_GROUP_GFS=4
Expand Down
4 changes: 2 additions & 2 deletions parm/config/gfs/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export DO_WAVE="NO"
export DO_OCN="NO"
export DO_ICE="NO"
export DO_AERO="NO"
export CCPP_SUITE="FV3_GFS_v17_p8"
export CCPP_SUITE="FV3_GFS_v17_p8_ugwpv1"
export WAVE_CDUMP="" # When to include wave suite: gdas, gfs, or both
export DOBNDPNT_WAVE="NO"
export cplwav2atm=".false."
Expand Down Expand Up @@ -217,7 +217,7 @@ case "${APP}" in
export DO_COUPLED="YES"
export DO_OCN="YES"
export DO_ICE="YES"
export CCPP_SUITE="FV3_GFS_v17_coupled_p8" # TODO: Does this include FV3_GFS_v17_p8? Can this be used instead of FV3_GFS_v17_p8 on L149
export CCPP_SUITE="FV3_GFS_v17_coupled_p8_ugwpv1" # TODO: Does this include FV3_GFS_v17_p8? Can this be used instead of FV3_GFS_v17_p8 on L149
export confignamevarfornems="cpld"

if [[ "${APP}" =~ A$ ]]; then
Expand Down
17 changes: 10 additions & 7 deletions parm/config/gfs/config.fcst
Original file line number Diff line number Diff line change
Expand Up @@ -119,24 +119,27 @@ if (( gwd_opt == 2 )); then
#export do_ugwp_v1_orog_only=".false."

#--used for UFS p8
export knob_ugwp_version=0
export knob_ugwp_version=1
export do_ugwp=".false."
export do_tofd=".false."
export do_ugwp_v0=".true."
export do_ugwp_v1=".false."
export do_ugwp_v0=".false."
export do_ugwp_v1=".true."
export do_ugwp_v0_orog_only=".false."
export do_ugwp_v0_nst_only=".false."
export do_gsl_drag_ls_bl=".false."
export do_gsl_drag_ls_bl=".true."
export do_gsl_drag_ss=".true."
export do_gsl_drag_tofd=".false."
export do_gsl_drag_tofd=".true."
export do_ugwp_v1_orog_only=".false."
launch_level=$(echo "${LEVS}/2.35" |bc)
export launch_level
if [[ ${do_gsl_drag_ls_bl} == ".true." ]]; then
export cdmbgwd=${cdmbgwd_gsl}
fi
fi

# Sponge layer settings
export tau=10.0
export rf_cutoff=7.5e2
export tau=0.
export rf_cutoff=10.
export d2_bg_k1=0.20
export d2_bg_k2=0.04
export dz_min=6
Expand Down
14 changes: 14 additions & 0 deletions parm/config/gfs/config.ufs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ case "${fv3_res}" in
export nthreads_fv3=1
export nthreads_fv3_gfs=1
export cdmbgwd="0.071,2.1,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="40.0,1.77,1.0,1.0" # settings for GSL drag suite
export knob_ugwp_tauamp=6.0e-3 # setting for UGWPv1 non-stationary GWD
export WRITE_GROUP=1
export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE=1
export WRITE_GROUP_GFS=1
Expand All @@ -126,6 +128,8 @@ case "${fv3_res}" in
export nthreads_fv3=1
export nthreads_fv3_gfs=1
export cdmbgwd="0.14,1.8,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="20.0,2.5,1.0,1.0" # settings for GSL drag suite
export knob_ugwp_tauamp=3.0e-3 # setting for UGWPv1 non-stationary GWD
export WRITE_GROUP=1
export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE=1
export WRITE_GROUP_GFS=1
Expand All @@ -140,6 +144,8 @@ case "${fv3_res}" in
export nthreads_fv3=1
export nthreads_fv3_gfs=2
export cdmbgwd="0.23,1.5,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="10.0,3.5,1.0,1.0" # settings for GSL drag suite
export knob_ugwp_tauamp=1.5e-3 # setting for UGWPv1 non-stationary GWD
export WRITE_GROUP=1
export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE=10
export WRITE_GROUP_GFS=2
Expand All @@ -154,6 +160,8 @@ case "${fv3_res}" in
export nthreads_fv3=2
export nthreads_fv3_gfs=2
export cdmbgwd="1.1,0.72,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="5.0,5.0,1.0,1.0" # settings for GSL drag suite
export knob_ugwp_tauamp=0.8e-3 # setting for UGWPv1 non-stationary GWD
export WRITE_GROUP=4
export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE=10
export WRITE_GROUP_GFS=4
Expand All @@ -168,6 +176,8 @@ case "${fv3_res}" in
export nthreads_fv3=4
export nthreads_fv3_gfs=4
export cdmbgwd="4.0,0.15,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="2.5,7.5,1.0,1.0" # settings for GSL drag suite
export knob_ugwp_tauamp=0.5e-3 # setting for UGWPv1 non-stationary GWD
export WRITE_GROUP=2
export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE=10
export WRITE_GROUP_GFS=4
Expand All @@ -182,6 +192,8 @@ case "${fv3_res}" in
export nthreads_fv3=4
export nthreads_fv3_gfs=4
export cdmbgwd="4.0,0.10,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="1.67,8.8,1.0,1.0" # settings for GSL drag suite
export knob_ugwp_tauamp=0.35e-3 # setting for UGWPv1 non-stationary GWD
export WRITE_GROUP=4
export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE=10 # TODO: refine these numbers when a case is available
export WRITE_GROUP_GFS=4
Expand All @@ -196,6 +208,8 @@ case "${fv3_res}" in
export nthreads_fv3=4
export nthreads_fv3_gfs=4
export cdmbgwd="4.0,0.05,1.0,1.0" # mountain blocking, ogwd, cgwd, cgwd src scaling
export cdmbgwd_gsl="0.625,14.1,1.0,1.0" # settings for GSL drag suite
export knob_ugwp_tauamp=0.13e-3 # setting for UGWPv1 non-stationary GWD
export WRITE_GROUP=4
export WRTTASK_PER_GROUP_PER_THREAD_PER_TILE=10 # TODO: refine these numbers when a case is available
export WRITE_GROUP_GFS=4
Expand Down
2 changes: 1 addition & 1 deletion sorc/build_ufs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cwd=$(pwd)

# Default settings
APP="S2SWA"
CCPP_SUITES="FV3_GFS_v17_p8,FV3_GFS_v17_coupled_p8" # TODO: does the g-w need to build with all these CCPP_SUITES?
CCPP_SUITES="FV3_GFS_v17_p8_ugwpv1,FV3_GFS_v17_coupled_p8_ugwpv1" # TODO: does the g-w need to build with all these CCPP_SUITES?

while getopts ":da:j:v" option; do
case "${option}" in
Expand Down
2 changes: 1 addition & 1 deletion sorc/checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ source "${topdir}/../workflow/gw_setup.sh"
# The checkout version should always be a speciifc commit (hash or tag), not a branch
errs=0
# Checkout UFS submodules in parallel
checkout "ufs_model.fd" "https://github.com/ufs-community/ufs-weather-model" "${ufs_model_hash:-63a43d9}" "8" ; errs=$((errs + $?))
checkout "ufs_model.fd" "https://github.com/ufs-community/ufs-weather-model" "${ufs_model_hash:-63a43d9}" "8" &

# Run all other checkouts simultaneously with just 1 core each to handle submodules.
checkout "wxflow" "https://github.com/NOAA-EMC/wxflow" "528f5ab" &
Expand Down
2 changes: 1 addition & 1 deletion ush/forecast_postdet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ EOF

# time step parameters in FV3
k_split=${k_split:-2}
n_split=${n_split:-6}
n_split=${n_split:-5}

if [[ "${MONO:0:4}" = "mono" ]]; then # monotonic options
d_con=${d_con_mono:-"0."}
Expand Down
14 changes: 10 additions & 4 deletions ush/parsing_namelists_FV3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ cat > input.nml <<EOF
${fms_nml:-}
/
&fms2_io_nml
netcdf_default_format = "netcdf4"
/
&fv_core_nml
layout = ${layout_x},${layout_y}
io_layout = ${io_layout}
Expand Down Expand Up @@ -143,6 +147,7 @@ cat > input.nml <<EOF
dry_mass=${dry_mass:-98320.0}
consv_te = ${consv_te}
do_sat_adj = ${do_sat_adj:-".false."}
fast_tau_w_sec = ${fast_tau_w_sec:-"0.2"}
consv_am = .false.
fill = .true.
dwind_2d = .false.
Expand Down Expand Up @@ -263,11 +268,11 @@ EOF
do_ugwp = ${do_ugwp:-".false."}
do_tofd = ${do_tofd:-".false."}
gwd_opt = ${gwd_opt:-"2"}
do_ugwp_v0 = ${do_ugwp_v0:-".true."}
do_ugwp_v1 = ${do_ugwp_v1:-".false."}
do_ugwp_v0 = ${do_ugwp_v0:-".false."}
do_ugwp_v1 = ${do_ugwp_v1:-".true."}
do_ugwp_v0_orog_only = ${do_ugwp_v0_orog_only:-".false."}
do_ugwp_v0_nst_only = ${do_ugwp_v0_nst_only:-".false."}
do_gsl_drag_ls_bl = ${do_gsl_drag_ls_bl:-".false."}
do_gsl_drag_ls_bl = ${do_gsl_drag_ls_bl:-".true."}
do_gsl_drag_ss = ${do_gsl_drag_ss:-".true."}
do_gsl_drag_tofd = ${do_gsl_drag_tofd:-".true."}
do_ugwp_v1_orog_only = ${do_ugwp_v1_orog_only:-".false."}
Expand Down Expand Up @@ -333,7 +338,7 @@ cat >> input.nml <<EOF
iopt_tbot = ${iopt_tbot:-"2"}
iopt_stc = ${iopt_stc:-"1"}
iopt_trs = ${iopt_trs:-"2"}
iopt_diag = ${iopt_diag:-"3"}
iopt_diag = ${iopt_diag:-"1"}
debug = ${gfs_phys_debug:-".false."}
nstf_name = ${nstf_name}
nst_anl = ${nst_anl}
Expand Down Expand Up @@ -447,6 +452,7 @@ if [[ ${knob_ugwp_version} -eq 1 ]]; then
knob_ugwp_doheat = ${knob_ugwp_doheat:-1}
knob_ugwp_dokdis = ${knob_ugwp_dokdis:-2}
knob_ugwp_ndx4lh = ${knob_ugwp_ndx4lh:-4}
knob_ugwp_version = ${knob_ugwp_version:-1}
knob_ugwp_palaunch = ${knob_ugwp_palaunch:-275.0e2}
knob_ugwp_nslope = ${knob_ugwp_nslope:-1}
knob_ugwp_lzmax = ${knob_ugwp_lzmax:-15.750e3}
Expand Down

0 comments on commit 255616d

Please sign in to comment.