From ac5336cd31996461e8e6d6b1b62de8763c693936 Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Thu, 23 Jan 2025 20:50:39 +0000 Subject: [PATCH 01/14] Introduce prognostic updraft velocity --- .gitmodules | 3 ++- ccpp/data/CCPP_typedefs.F90 | 32 ++++++++++++++++++++------------ ccpp/data/GFS_typedefs.F90 | 23 ++++++++++++++++++----- ccpp/data/GFS_typedefs.meta | 29 ++++++++++++++++++++++++++++- ccpp/physics | 2 +- 5 files changed, 69 insertions(+), 20 deletions(-) diff --git a/.gitmodules b/.gitmodules index 22c723ac1..2d8618e36 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,7 +8,8 @@ branch = main [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/ufs-community/ccpp-physics +# url = https://github.com/ufs-community/ccpp-physics + url = https://github.com/lisa-bengtsson/ccpp-physics branch = ufs/dev [submodule "upp"] path = upp diff --git a/ccpp/data/CCPP_typedefs.F90 b/ccpp/data/CCPP_typedefs.F90 index 1f5deaec2..901b47cbf 100644 --- a/ccpp/data/CCPP_typedefs.F90 +++ b/ccpp/data/CCPP_typedefs.F90 @@ -1016,15 +1016,23 @@ subroutine gfs_interstitial_setup_tracers(Interstitial, Model) if (Model%ntke > 0) Interstitial%ntkev = Interstitial%nvdiff if (Model%ntiw > 0) then - if (Model%ntclamt > 0 .and. Model%ntsigma <= 0) then - Interstitial%nn = Model%ntrac - 2 - elseif (Model%ntclamt <= 0 .and. Model%ntsigma > 0) then - Interstitial%nn = Model%ntrac - 2 - elseif (Model%ntclamt > 0 .and. Model%ntsigma > 0) then - Interstitial%nn = Model%ntrac - 3 - else - Interstitial%nn = Model%ntrac - 1 - endif + if (Model%ntclamt > 0 .and. Model%ntsigma > 0 .and. Model%ntomega > 0) then + Interstitial%nn = Model%ntrac - 4 + elseif (Model%ntclamt > 0 .and. Model%ntsigma > 0 .and. Model%ntomega <= 0) then + Interstitial%nn = Model%ntrac - 3 + elseif (Model%ntclamt > 0 .and. Model%ntsigma <= 0 .and. Model%ntomega > 0) then + Interstitial%nn = Model%ntrac - 3 + elseif (Model%ntclamt > 0 .and. Model%ntsigma <= 0 .and. Model%ntomega <= 0) then + Interstitial%nn = Model%ntrac - 2 + elseif (Model%ntclamt <= 0 .and. Model%ntsigma > 0 .and. Model%ntomega > 0) then + Interstitial%nn = Model%ntrac - 3 + elseif (Model%ntclamt <= 0 .and. Model%ntsigma > 0 .and. Model%ntomega <= 0) then + Interstitial%nn = Model%ntrac - 2 + elseif (Model%ntclamt <= 0 .and. Model%ntsigma <= 0 .and. Model%ntomega > 0) then + Interstitial%nn = Model%ntrac - 2 + else + Interstitial%nn = Model%ntrac - 1 + endif elseif (Model%ntcw > 0) then Interstitial%nn = Model%ntrac else @@ -1043,7 +1051,7 @@ subroutine gfs_interstitial_setup_tracers(Interstitial, Model) n /= Model%nthl .and. n /= Model%nthnc .and. n /= Model%ntgv .and. & n /= Model%nthv .and. n /= Model%ntccn .and. n /= Model%ntccna .and. & n /= Model%ntrz .and. n /= Model%ntgz .and. n /= Model%nthz .and. & - n /= Model%ntsigma) + n /= Model%ntsigma .and. n /= Model%ntomega) Interstitial%otsptflag(n) = ltest if ( ltest ) then tracers = tracers + 1 @@ -1620,8 +1628,8 @@ subroutine gfdl_interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd else Interstitial%ngas = 0 end if - allocate (Interstitial%rilist(0:Interstitial%ngas)) - allocate (Interstitial%cpilist(0:Interstitial%ngas)) + allocate(Interstitial%rilist(0:Interstitial%ngas)) + allocate(Interstitial%cpilist(0:Interstitial%ngas)) if (present(rilist)) then Interstitial%rilist = rilist(0:Interstitial%ngas) Interstitial%cpilist = cpilist(0:Interstitial%ngas) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 4614c087b..1c6097299 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -1203,6 +1203,7 @@ module GFS_typedefs integer :: imfshalcnv_c3 = 5 !< flag for the Community Convective Cloud (C3) scheme logical :: hwrf_samfdeep !< flag for HWRF SAMF deepcnv scheme (HWRF) logical :: progsigma !< flag for prognostic area fraction in samf ddepcnv scheme (GFS) + logical :: progomega !< flag for prognostic vertical velocity in samf ddepcnv scheme (GFS) integer :: imfdeepcnv !< flag for mass-flux deep convection scheme !< 1: July 2010 version of SAS conv scheme !< current operational version as of 2016 @@ -1502,6 +1503,7 @@ module GFS_typedefs integer :: nthz !< tracer index for hail reflectivity integer :: ntke !< tracer index for kinetic energy integer :: ntsigma !< tracer index for updraft area fraction + integer :: ntomega !< tracer index for updraft velocity integer :: nto !< tracer index for oxygen ion integer :: nto2 !< tracer index for oxygen integer :: ntwa !< tracer index for water friendly aerosol @@ -3216,7 +3218,7 @@ subroutine coupling_create (Coupling, Model) allocate (Coupling%dqdt_qmicro (IM,Model%levs)) Coupling%dqdt_qmicro = clear_val endif - + !--- stochastic physics option if (Model%do_sppt .or. Model%ca_global) then allocate (Coupling%sppt_wts (IM,Model%levs)) @@ -3757,7 +3759,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & logical :: hwrf_samfdeep = .false. !< flag for HWRF SAMF deepcnv scheme logical :: hwrf_samfshal = .false. !< flag for HWRF SAMF shalcnv scheme - logical :: progsigma = .false. !< flag for prognostic updraft area fraction closure in saSAS or Unified conv. + logical :: progsigma = .false. !< flag for prognostic updraft area fraction closure in saSAS or C3 + logical :: progomega = .false. !< flag for prognostic updraft velocity in saSAS or C3 integer :: conv_cf_opt = 0 !< option for convection scheme cloud fraction computation logical :: do_mynnedmf = .false. !< flag for MYNN-EDMF logical :: do_mynnsfclay = .false. !< flag for MYNN Surface Layer Scheme @@ -4139,8 +4142,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & do_ugwp_v1, do_ugwp_v1_orog_only, do_ugwp_v1_w_gsldrag, & ugwp_seq_update, var_ric, coef_ric_l, coef_ric_s, hurr_pbl, & do_myjsfc, do_myjpbl, & - hwrf_samfdeep, hwrf_samfshal,progsigma,betascu,betamcu, & - betadcu,h2o_phys, pdfcld, shcnvcw, redrag, hybedmf, satmedmf,& + hwrf_samfdeep, hwrf_samfshal,progsigma,progomega,betascu, & + betamcu, betadcu, h2o_phys, pdfcld, shcnvcw, & + redrag, hybedmf, satmedmf, & shinhong, do_ysu, dspheat, lheatstrg, lseaspray, cnvcld, & xr_cnvcld, random_clds, shal_cnv, imfshalcnv, imfdeepcnv, & isatmedmf, conv_cf_opt, do_deep, jcap, & @@ -4961,7 +4965,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%hwrf_samfdeep = hwrf_samfdeep Model%hwrf_samfshal = hwrf_samfshal - !--prognostic closure - moisture coupling + !--prognostic closure - check if ((progsigma .and. imfdeepcnv/=2) .and. (progsigma .and. imfdeepcnv/=5)) then write(*,*) 'Logic error: progsigma requires imfdeepcnv=2 or 5' stop @@ -4971,6 +4975,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%betamcu = betamcu Model%betadcu = betadcu + !--prognostic closure - check + if (progomega .and. imfdeepcnv/=2) then + write(*,*) 'Logic error: progomega requires imfdeepcnv=2' + stop + end if + Model%progomega = progomega + if (oz_phys .and. oz_phys_2015) then write(*,*) 'Logic error: can only use one ozone physics option (oz_phys or oz_phys_2015), not both. Exiting.' stop @@ -5258,6 +5269,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%nthz = get_tracer_index(Model%tracer_names, 'hail_ref', Model%me, Model%master, Model%debug) Model%ntke = get_tracer_index(Model%tracer_names, 'sgs_tke', Model%me, Model%master, Model%debug) Model%ntsigma = get_tracer_index(Model%tracer_names, 'sigmab', Model%me, Model%master, Model%debug) + Model%ntomega = get_tracer_index(Model%tracer_names, 'omegab', Model%me, Model%master, Model%debug) Model%nqrimef = get_tracer_index(Model%tracer_names, 'q_rimef', Model%me, Model%master, Model%debug) Model%ntwa = get_tracer_index(Model%tracer_names, 'liq_aero', Model%me, Model%master, Model%debug) Model%ntia = get_tracer_index(Model%tracer_names, 'ice_aero', Model%me, Model%master, Model%debug) @@ -7057,6 +7069,7 @@ subroutine control_print(Model) print *, ' nthz : ', Model%nthz print *, ' ntke : ', Model%ntke print *, ' ntsigma : ', Model%ntsigma + print *, ' ntomega : ', Model%ntomega print *, ' nto : ', Model%nto print *, ' nto2 : ', Model%nto2 print *, ' ntwa : ', Model%ntwa diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index bd0e34975..e17740f05 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -349,6 +349,14 @@ type = real kind = kind_phys active = (index_of_updraft_area_fraction_in_tracer_concentration_array > 0 ) +[qgrs(:,:,index_of_updraft_velocity_in_tracer_concentration_array)] + standard_name = prognostic_updraft_velocity_in_convection + long_name = convective updraft velocity + units = frac + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + active = (index_of_updraft_velocity_in_tracer_concentration_array > 0 ) [qgrs(:,:,index_for_smoke_in_tracer_concentration_array)] standard_name = smoke_tracer_concentration long_name = concentration of smoke @@ -631,7 +639,14 @@ type = real kind = kind_phys active = ( index_of_updraft_area_fraction_in_tracer_concentration_array > 0 ) - +[gq0(:,:,index_of_updraft_velocity_in_tracer_concentration_array)] + standard_name = updraft_velocity_updated_by_physics + long_name = convective updraft area fraction updated by physics + units = frac + dimensions = (horizontal_dimension,vertical_layer_dimension) + type = real + kind = kind_phys + active = ( index_of_updraft_velocity_in_tracer_concentration_array > 0 ) ######################################################################## [ccpp-table-properties] name = GFS_sfcprop_type @@ -5653,6 +5668,12 @@ units = flag dimensions = () type = logical +[progomega] + standard_name = do_prognostic_updraft_velocity + long_name = do_prognostic_updraft_velocity + units = flag + dimensions = () + type = logical [betascu] standard_name = tuning_param_for_shallow_cu long_name = tuning param for shallow cu in case prognostic closure is used @@ -6615,6 +6636,12 @@ units = index dimensions = () type = integer +[ntomega] + standard_name = index_of_updraft_velocity_in_tracer_concentration_array + long_name = tracer index of updraft_velocity + units = index + dimensions = () + type = integer [nqrimef] standard_name = index_of_mass_weighted_rime_factor_in_tracer_concentration_array long_name = tracer index for mass weighted rime factor diff --git a/ccpp/physics b/ccpp/physics index 449343f16..a69aa8bbe 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 449343f16e87e149f05a76b565287c77f53ccf83 +Subproject commit a69aa8bbe8c5b0a679f0472d00152a74f9207340 From 8639b40f282cc623e15e785b4369896b098cefdc Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Tue, 28 Jan 2025 15:49:32 +0000 Subject: [PATCH 02/14] update submodule pointer to ccpp/physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index a69aa8bbe..d333da72e 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit a69aa8bbe8c5b0a679f0472d00152a74f9207340 +Subproject commit d333da72ec273ff2cf09515c7b40746e90e94e4d From e69e7db946ef6b9c3e9c654d5e9fab96de5998d5 Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Wed, 29 Jan 2025 17:31:43 +0000 Subject: [PATCH 03/14] update submodule pointer to ccpp/physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index d333da72e..3629c4557 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit d333da72ec273ff2cf09515c7b40746e90e94e4d +Subproject commit 3629c45573005dac147040431f18ed8c746c59a0 From 3fa53207be1b5cae6515f75a677367d0ee6643a1 Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Wed, 29 Jan 2025 19:24:42 +0000 Subject: [PATCH 04/14] update submodule pointer to ccpp/physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 3629c4557..177371aca 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 3629c45573005dac147040431f18ed8c746c59a0 +Subproject commit 177371aca51ef736331f8ece6324944767eee52f From ad6a382784f21e0390ebbfa6c3fc594e5a2175e3 Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Wed, 29 Jan 2025 21:19:51 +0000 Subject: [PATCH 05/14] update submodule pointer ccpp/physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 177371aca..0f51c08bb 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 177371aca51ef736331f8ece6324944767eee52f +Subproject commit 0f51c08bbcb4bba04da0311dd455739b5db1f420 From 0c1d53b9295c572cfdd353564099100f98d764fc Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Tue, 4 Feb 2025 15:03:33 +0000 Subject: [PATCH 06/14] sync with branch upstream --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 0f51c08bb..3b2bedb1b 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 0f51c08bbcb4bba04da0311dd455739b5db1f420 +Subproject commit 3b2bedb1b8f29fc1024aefe2aee1ff49803b6bc1 From 9b36bef2684fa487c9e60d57efbccaf154070f33 Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Thu, 6 Feb 2025 19:44:28 +0000 Subject: [PATCH 07/14] update submodule pointer to ccpp/physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 3b2bedb1b..02d73b6d0 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 3b2bedb1b8f29fc1024aefe2aee1ff49803b6bc1 +Subproject commit 02d73b6d0a4858d263f3b37b90d0deacd2baa91b From ebdf2f8c6ebdbe62267c59b3337a41a1572ab46d Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Wed, 19 Feb 2025 17:18:28 +0000 Subject: [PATCH 08/14] update submodule pointer to ccpp/physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 02d73b6d0..e920f4aed 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 02d73b6d0a4858d263f3b37b90d0deacd2baa91b +Subproject commit e920f4aed701c03cfb21326f3ed1801d67c59706 From 1f1762bc55d8482a3ec0565976d65e0dd540e92b Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Tue, 25 Feb 2025 16:05:45 +0000 Subject: [PATCH 09/14] update ccpp/physics submodule --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index e920f4aed..375aa85c5 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit e920f4aed701c03cfb21326f3ed1801d67c59706 +Subproject commit 375aa85c51f39dc662e25c724249c7415b4de207 From 53e9c7ee204c49df3dd3e521776e70349e721188 Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Wed, 26 Feb 2025 19:39:28 +0000 Subject: [PATCH 10/14] Address code review comments in ccpp/physics --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 375aa85c5..43807e61b 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 375aa85c51f39dc662e25c724249c7415b4de207 +Subproject commit 43807e61b2cc56cb4c4ef0e05d46369d625506b8 From 5d1c060693f50f687498bd5276285c4920f5a4d3 Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Thu, 27 Feb 2025 18:56:16 +0000 Subject: [PATCH 11/14] minor updates to ccpp/physics submodule --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 43807e61b..2c1887dc4 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 43807e61b2cc56cb4c4ef0e05d46369d625506b8 +Subproject commit 2c1887dc42adcd0f7afce237450cd8bfa163afb3 From d09e2f750ed6c89978f610dca0f9c94b22f1eb3a Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Fri, 7 Mar 2025 21:00:43 +0000 Subject: [PATCH 12/14] pull in the latest ccpp physics ufs/dev branch --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 2c1887dc4..bdd8baf10 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 2c1887dc42adcd0f7afce237450cd8bfa163afb3 +Subproject commit bdd8baf1065875c53dcdf46d55bfdebcda630b75 From ec47f3f5dc63785bee55851bd922b34ef9e6f372 Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Wed, 12 Mar 2025 15:22:53 +0000 Subject: [PATCH 13/14] Sync ccpp/physics with ufs/dev --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index bdd8baf10..b97717479 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit bdd8baf1065875c53dcdf46d55bfdebcda630b75 +Subproject commit b977174793775d89263eebc0a52dc6beb23122f5 From 85a13d42e68916fc33540e6e189ac00e54ed81bb Mon Sep 17 00:00:00 2001 From: Lisa Bengtsson Date: Mon, 24 Mar 2025 13:57:27 +0000 Subject: [PATCH 14/14] Update submodule pointer for ccpp-physics to ea1d6cc --- .gitmodules | 3 +-- ccpp/physics | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 2d8618e36..22c723ac1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,8 +8,7 @@ branch = main [submodule "ccpp/physics"] path = ccpp/physics -# url = https://github.com/ufs-community/ccpp-physics - url = https://github.com/lisa-bengtsson/ccpp-physics + url = https://github.com/ufs-community/ccpp-physics branch = ufs/dev [submodule "upp"] path = upp diff --git a/ccpp/physics b/ccpp/physics index b97717479..ea1d6cc6b 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit b977174793775d89263eebc0a52dc6beb23122f5 +Subproject commit ea1d6cc6b9526b5ef04797695bafc423489a1364