From a027f1fbab7e578b23f0ee95910a72aa5a4e5cb3 Mon Sep 17 00:00:00 2001 From: Tracy Date: Tue, 4 Nov 2025 20:28:38 +0000 Subject: [PATCH 1/4] updates for ufs-dev PR325 and PR326 --- .gitmodules | 6 ++++-- ccpp/physics | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index dc0798c32..fd03d04cd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,8 +4,10 @@ branch = main [submodule "ccpp-physics"] path = ccpp/physics - url = https://github.com/NCAR/ccpp-physics - branch = main + #url = https://github.com/NCAR/ccpp-physics + #branch = main + url = https://github.com/hertneky/ccpp-physics + branch = ufs-dev-PR325 [submodule "CMakeModules"] path = CMakeModules url = https://github.com/noaa-emc/CMakeModules diff --git a/ccpp/physics b/ccpp/physics index b100295db..f7c2c56e9 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit b100295db17faebc821cfcce61a22a232dfbd410 +Subproject commit f7c2c56e9fb5bbda19fe2dda5ab738c1d3ad603f From 7444e2054261877869b9287bd60d44864a42ea9b Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 11 Nov 2025 12:09:49 -0500 Subject: [PATCH 2/4] make changes to Xu-Randall-based cloud fraction algorithms configurable by host --- ccpp/physics | 2 +- scm/src/GFS_typedefs.F90 | 38 +++++++++++++++++++++++++++++++++++--- scm/src/GFS_typedefs.meta | 14 ++++++++++++++ 3 files changed, 50 insertions(+), 4 deletions(-) diff --git a/ccpp/physics b/ccpp/physics index 304dfeb57..c223af7c3 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 304dfeb57bed108b9743e85ccd804656ce07ef88 +Subproject commit c223af7c39c28bd72f8f068c099e871ac203e1d4 diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index b6550526f..f4094ea2d 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -898,6 +898,8 @@ module GFS_typedefs logical :: lrseeds !< flag to use host-provided random seeds integer :: nrstreams !< number of random number streams in host-provided random seed array logical :: lextop !< flag for using an extra top layer for radiation + real(kind_phys) :: xr_con !< Xu-Randall cloud fraction multiplicative constant + real(kind_phys) :: xr_exp !< Xu-Randall cloud fraction exponent constant ! RRTMGP logical :: do_RRTMGP !< Use RRTMGP @@ -3570,6 +3572,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & logical :: lrseeds = .false. !< flag to use host-provided random seeds integer :: nrstreams = 2 !< number of random number streams in host-provided random seed array logical :: lextop = .false. !< flag for using an extra top layer for radiation + real(kind_phys) :: xr_con = -999.0 !< Xu-Randall cloud fraction multiplicative constant + real(kind_phys) :: xr_exp = -999.0 !< Xu-Randall cloud fraction exponent constant ! RRTMGP logical :: do_RRTMGP = .false. !< Use RRTMGP? character(len=128) :: active_gases = '' !< Character list of active gases used in RRTMGP @@ -4179,7 +4183,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & fhswr, fhlwr, levr, nfxr, iaerclm, iflip, isol, ico2, ialb, & isot, iems, iaer, icliq_sw, iovr, ictm, isubc_sw, & isubc_lw, lcrick, lcnorm, lwhtr, swhtr, & - nhfrad, idcor, dcorr_con, & + nhfrad, idcor, dcorr_con, xr_con, xr_exp, & ! --- RRTMGP do_RRTMGP, active_gases, nGases, rrtmgp_root, & lw_file_gas, lw_file_clouds, rrtmgp_nBandsLW, rrtmgp_nGptsLW,& @@ -4823,7 +4827,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & Model%lrseeds = lrseeds Model%nrstreams = nrstreams Model%lextop = (ltp > 0) - ! RRTMGP Model%do_RRTMGP = do_RRTMGP Model%rrtmgp_nrghice = rrtmgp_nrghice @@ -6581,7 +6584,34 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, & !--- BEGIN CODE FROM GLOOPB !--- set up random number seed needed for RAS and old SAS and when cal_pre=.true. ! Model%imfdeepcnv < 0 when Model%ras = .true. - + + if (xr_con > 0.0 .and. xr_exp > 0.0) then !values have been read in from namelist, so set them to read values + Model%xr_con = xr_con + Model%xr_exp = xr_exp + else ! values have not been read in from namelist and should be set according to logic in radiation_clouds.f + if (Model%imp_physics == Model%imp_physics_zhao_carr .or. Model%imp_physics == Model%imp_physics_mg .or. Model%imp_physics == Model%imp_physics_fer_hires) then + if (.not. Model%lmfshal) then + !calls cloud_fraction_XuRandall() + Model%xr_con = 2000.0 + Model%xr_exp = 0.25 + else + !calls cloud_fraction_mass_flx_1() + Model%xr_con = 100.0 + Model%xr_exp = 0.49 + endif + else ! specifically used when progcld_thompson_wsm6 is called in radiation_clouds.f (see logic in that routine) + if (.not. Model%lmfshal) then + !calls cloud_fraction_XuRandall() + Model%xr_con = 2000.0 + Model%xr_exp = 0.25 + else + !calls cloud_fraction_mass_flx_2() + Model%xr_con = 2000.0 + Model%xr_exp = 0.25 + endif + endif + endif + if (Model%imfdeepcnv <= 0 .or. Model%cal_pre ) then if (Model%random_clds) then seed0 = Model%idate(1) + Model%idate(2) + Model%idate(3) + Model%idate(4) @@ -6943,6 +6973,8 @@ subroutine control_print(Model) print *, ' lrseeds : ', Model%lrseeds print *, ' nrstreams : ', Model%nrstreams print *, ' lextop : ', Model%lextop + print *, ' xr_con : ', Model%xr_con + print *, ' xr_exp : ', Model%xr_exp if (Model%do_RRTMGP) then print *, ' rrtmgp_nrghice : ', Model%rrtmgp_nrghice print *, ' do_GPsw_Glw : ', Model%do_GPsw_Glw diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index 00cbb2794..55e302bf4 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -4167,6 +4167,20 @@ units = flag dimensions = () type = logical +[xr_con] + standard_name = multiplicative_tuning_parameter_for_Xu_Randall_cloud_fraction + long_name = multiplicative tuning parameter for Xu Randall cloud fraction + units = 1 + dimensions = () + type = real + kind = kind_phys +[xr_exp] + standard_name = exponent_tuning_parameter_for_Xu_Randall_cloud_fraction + long_name = exponent tuning parameter for Xu Randall cloud fraction + units = 1 + dimensions = () + type = real + kind = kind_phys [active_gases] standard_name = active_gases_used_by_RRTMGP long_name = active gases used by RRTMGP From 3d4c9ee8d7822321c786e11900306ecacd50ed85 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 11 Nov 2025 12:18:24 -0500 Subject: [PATCH 3/4] update ccpp/physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index c223af7c3..076fee745 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit c223af7c39c28bd72f8f068c099e871ac203e1d4 +Subproject commit 076fee74562e468ddeee6721d8319239a9c8f74f From cf4bf4a5b3c36b306e264d320d4f538548d93396 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 11 Nov 2025 14:17:30 -0500 Subject: [PATCH 4/4] update ccpp/physics and .gitmodules --- .gitmodules | 6 ++---- ccpp/physics | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index fd03d04cd..dc0798c32 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,10 +4,8 @@ branch = main [submodule "ccpp-physics"] path = ccpp/physics - #url = https://github.com/NCAR/ccpp-physics - #branch = main - url = https://github.com/hertneky/ccpp-physics - branch = ufs-dev-PR325 + url = https://github.com/NCAR/ccpp-physics + branch = main [submodule "CMakeModules"] path = CMakeModules url = https://github.com/noaa-emc/CMakeModules diff --git a/ccpp/physics b/ccpp/physics index 076fee745..9c72a9fdb 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 076fee74562e468ddeee6721d8319239a9c8f74f +Subproject commit 9c72a9fdb0acc2a9ed2bf81de17b1697384c7c3a