diff --git a/documentation/source/science_guide/turbulence_schemes/bl_scheme_doc.rst b/documentation/source/science_guide/turbulence_schemes/bl_scheme_doc.rst index 300bbaf98c..50b5e8234e 100644 --- a/documentation/source/science_guide/turbulence_schemes/bl_scheme_doc.rst +++ b/documentation/source/science_guide/turbulence_schemes/bl_scheme_doc.rst @@ -1986,7 +1986,7 @@ length, :math:`S` is the wind shear, :math:`f_\chi(Ri)` is the stability function and :math:`\chi` represents conserved heat and moisture variables, or momentum. Both schemes use the same stability function, and both schemes can use the full 3D shear for :math:`S`. Therefore the -only difference is in the mixing length, which is calculated as +only difference is in the mixing length, which is initially calculated as .. math:: :label: eq-lblend @@ -2119,18 +2119,27 @@ boundary layer depth and type `) but alternatively (``blending_option``\ :math:`=`\ 4) this can be restricted to strictly shallow cumulus clouds, defined as contiguously cloudy levels (cloud fraction greater than SC_CFTOL) with cloud top -height below input parameter ``shallow_cu_maxtop``. Note that the +height below the input parameter ``shallow_cu_maxtop``. Note that the diagnosis of shallow cumulus from the diagnosis parcel ascent (that was -used to identify a cumulus regime) was found frequently to indicate deep +used to identify a cumulus regime) has frequently been found to indicate deep convection even when the resolved clouds were shallow because the diagnosis parcel, being undilute, would penetrate to the tropopause. -However, having decided the regime is shallow convection, we do still -set :math:`z_{\mathrm{turb}}` to the diagnosis parcel top height because, for -current km-scale configurations (without a cumulus convection -parametrization), it was found that the resulting stronger parametrized -vertical mixing was beneficial for the development of the convection, -and that without this a widespread stratiform cloud layer could develop -instead. +Under ``blending_option``\ :math:`=`\ 4, then, if such a shallow cumulus +regime is diagnosed, :math:`z_{\mathrm{turb}}` is set to the resolved cloud +top height. + +One less desirable feature of the combination of the forms of the blended +mixing length :eq:`eq-lblend` and :math:`W_{1D}` :eq:`eq-tanh` functions +is that the resulting mixing length does not simply increase monotonically +towards :math:`l_{\mathrm{bl}}` as :math:`z_{\mathrm{turb}}` reduces (and +the turbulence becomes entirely unresolved). To illustrate this, consider +the case of :math:`\Delta x= z_{\mathrm{turb}} = 1` km, which gives +:math:`W_{1D} \approx 0.9` (see :numref:`Figure %s `\ a). +Ignoring the reduction in length scales towards the surface, we find +:math:`l_{\mathrm{bl}}=150` m and :math:`l_{\mathrm{smag}}=200` m such that +:math:`l_{\mathrm{blend}} = 155` m. A simple way to avoid this is to cap +the blended length scale explicitly by :math:`l_{\mathrm{bl}}` via the +namelist switch ``cap_blended_ml``. Above the boundary layer top, `Boutle et al. (2014)`_ aimed for any free atmospheric mixing to be done by the 3D Smagorinsky scheme. diff --git a/interfaces/physics_schemes_interface/source/support/um_physics_init_mod.f90 b/interfaces/physics_schemes_interface/source/support/um_physics_init_mod.f90 index b3e2e73252..e71207f0a1 100644 --- a/interfaces/physics_schemes_interface/source/support/um_physics_init_mod.f90 +++ b/interfaces/physics_schemes_interface/source/support/um_physics_init_mod.f90 @@ -194,14 +194,17 @@ module um_physics_init_mod heavy_rain_evap_fac_in => & heavy_rain_evap_fac - use mixing_config_mod, only : smagorinsky, & - mixing_method => method, & - method_3d_smag, & - method_2d_smag, & - method_blend_smag_fa, & - method_blend_1dbl_fa, & - mix_factor_in => mix_factor, & - leonard_term + use mixing_config_mod, only : smagorinsky, & + mixing_method => method, & + method_3d_smag, & + method_2d_smag, & + method_blend_smag_fa, & + method_blend_1dbl_fa, & + method_blend_cth_shcu_only, & + cap_blended_ml_in => cap_blended_ml, & + shallow_cu_maxtop_in => shallow_cu_maxtop, & + mix_factor_in => mix_factor, & + leonard_term use radiation_config_mod, only : topography, topography_horizon @@ -370,6 +373,7 @@ subroutine um_physics_init() l_noice_in_turb, l_use_var_fixes, & i_interp_local_cf_dbdz, tke_diag_fac, a_ent_2, dec_thres_cloud, & dec_thres_cu, near_neut_z_on_l, blend_gridindep_fa, & + blend_cth_shcu_only, shallow_cu_maxtop, cap_blended_ml, & specified_fluxes_tstar, buoy_integ_low, num_sweeps_bflux, & l_use_sml_dsc_fixes, l_converge_ga, improved_tke_diag use cloud_inputs_mod, only: i_cld_vn, forced_cu, i_rhcpt, i_cld_area, & @@ -1600,6 +1604,9 @@ subroutine um_physics_init() mix_factor = real(mix_factor_in, r_um) turb_startlev_vert = 2 turb_endlev_vert = bl_levels + if (mixing_method /= method_3d_smag) then + cap_blended_ml = cap_blended_ml_in + end if ! Options which are bespoke to the choice of scheme select case ( mixing_method ) @@ -1622,6 +1629,11 @@ subroutine um_physics_init() l_subfilter_horiz = .true. l_subfilter_vert = .true. blending_option = blend_gridindep_fa + case( method_blend_cth_shcu_only ) + l_subfilter_horiz = .true. + l_subfilter_vert = .true. + blending_option = blend_cth_shcu_only + shallow_cu_maxtop = real(shallow_cu_maxtop_in, r_bl) end select else ! not Smagorinsky diff --git a/rose-stem/app/lfric_atm/opt/README b/rose-stem/app/lfric_atm/opt/README index b514e42add..6e1098aba6 100644 --- a/rose-stem/app/lfric_atm/opt/README +++ b/rose-stem/app/lfric_atm/opt/README @@ -56,6 +56,8 @@ Science settings - ral3 - regional configuration - ral3_ens - extra config for regional ensembles (including stochastic physics) - ral3_scm - single column regional physics (includes convection scheme) +- ral_blendshcu - development version of the turbulence blending for shallow + cumulus regimes - ral_mixmol_opts - extra options for regional models when using the MoL transport scheme and mixed solver configuration - ral_opts - extra options for regional models, including LBC blending weights diff --git a/rose-stem/app/lfric_atm/opt/rose-app-blendshcu.conf b/rose-stem/app/lfric_atm/opt/rose-app-blendshcu.conf new file mode 100644 index 0000000000..81dbeceaf8 --- /dev/null +++ b/rose-stem/app/lfric_atm/opt/rose-app-blendshcu.conf @@ -0,0 +1,5 @@ +[namelist:mixing] +cap_blended_ml=.true. +method='blend_cth_shcu_only' +shallow_cu_maxtop=3000.0 +smagorinsky=.true. diff --git a/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc b/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc index 0cc0672024..af9ed7b087 100644 --- a/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc +++ b/rose-stem/site/common/lfric_atm/tasks_lfric_atm.cylc @@ -788,6 +788,20 @@ "xios_min_buffer_size": 2097152, }) %} +{% elif task_ns.conf_name == "ral_dev-seuk_MG" %} + + {% do task_dict.update({ + "opt_confs": ["l70_40km","ral3","blendshcu","ral_opts","hh_solve"], + "resolution": "seuk_MG", + "DT": 60, + "tsteps": 120, + "crun": 2, + "crun_compare": false, + "mpi_parts": 16, + "kgo_checks": ["checksum"], + "plot_str": "plot_map.py -ral $NODAL_DATA_DIR/lfric_diagnostics.nc $PLOT_DIR", + }) %} + {% elif task_ns.conf_name == "ral3_mixmol-seuk_MG" %} {% do task_dict.update({ diff --git a/rose-stem/site/meto/groups/groups_lfric_atm.cylc b/rose-stem/site/meto/groups/groups_lfric_atm.cylc index ed51787c53..4dbe19bdac 100644 --- a/rose-stem/site/meto/groups/groups_lfric_atm.cylc +++ b/rose-stem/site/meto/groups/groups_lfric_atm.cylc @@ -37,6 +37,7 @@ "lfric_atm_ral_azspice_developer": [ "lfric_atm_ral3-seuk_MG_azspice_gnu_fast-debug-32bit", "lfric_atm_ral3_ens-seuk_MG_azspice_gnu_fast-debug-32bit", + "lfric_atm_ral_dev-seuk_MG_azspice_gnu_fast-debug-32bit", "lfric_atm_ral3_mixmol-seuk_MG_azspice_gnu_fast-debug-32bit", ], "lfric_atm_scm_azspice_developer": [ @@ -140,6 +141,7 @@ "lfric_atm_ral_ex1a_developer": [ "lfric_atm_ral3-seuk_MG_ex1a_cce_fast-debug-32bit", "lfric_atm_ral3_ens-seuk_MG_ex1a_cce_fast-debug-32bit", + "lfric_atm_ral_dev-seuk_MG_ex1a_cce_fast-debug-32bit", "lfric_atm_ral3_mixmol-seuk_MG_ex1a_cce_fast-debug-32bit", ], "lfric_atm_ral_ex1a_weekly": [ diff --git a/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral_dev-seuk_MG_azspice_gnu_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral_dev-seuk_MG_azspice_gnu_fast-debug-32bit.txt new file mode 100644 index 0000000000..d0c68159dd --- /dev/null +++ b/rose-stem/site/meto/kgos/lfric_atm/azspice/checksum_lfric_atm_ral_dev-seuk_MG_azspice_gnu_fast-debug-32bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 4839977E +Inner product checksum theta = 5135493C +Inner product checksum u = 612F4556 +Inner product checksum mr1 = 4090F41B +Inner product checksum mr2 = 35AC7EDC +Inner product checksum mr3 = 2FA559EC +Inner product checksum mr4 = 33F4FDAE +Inner product checksum mr5 = BEDF860 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral_dev-seuk_MG_ex1a_cce_fast-debug-32bit.txt b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral_dev-seuk_MG_ex1a_cce_fast-debug-32bit.txt new file mode 100644 index 0000000000..391df8e30f --- /dev/null +++ b/rose-stem/site/meto/kgos/lfric_atm/ex1a/checksum_lfric_atm_ral_dev-seuk_MG_ex1a_cce_fast-debug-32bit.txt @@ -0,0 +1,9 @@ +Inner product checksum rho = 483997BF +Inner product checksum theta = 5135495F +Inner product checksum u = 612F491D +Inner product checksum mr1 = 4090F962 +Inner product checksum mr2 = 35B6E523 +Inner product checksum mr3 = 2FA5A395 +Inner product checksum mr4 = 33F4FE66 +Inner product checksum mr5 = BECFC40 +Inner product checksum mr6 = 0 diff --git a/rose-stem/site/meto/lfric_atm/tasks_lfric_atm_ex1a.cylc b/rose-stem/site/meto/lfric_atm/tasks_lfric_atm_ex1a.cylc index c2d5c4c210..b08b753471 100644 --- a/rose-stem/site/meto/lfric_atm/tasks_lfric_atm_ex1a.cylc +++ b/rose-stem/site/meto/lfric_atm/tasks_lfric_atm_ex1a.cylc @@ -64,6 +64,12 @@ "memory": [24, "GB"], }) %} +{% elif task_ns.conf_name == "ral_dev-seuk_MG" %} + + {% do task_dict.update({ + "memory": [24, "GB"], + }) %} + {% elif task_ns.conf_name == "ral3_mixmol-seuk_MG" %} {% do task_dict.update({ diff --git a/science/gungho/rose-meta/lfric-gungho/HEAD/rose-meta.conf b/science/gungho/rose-meta/lfric-gungho/HEAD/rose-meta.conf index d6b9f9d1f1..d83caa45a3 100644 --- a/science/gungho/rose-meta/lfric-gungho/HEAD/rose-meta.conf +++ b/science/gungho/rose-meta/lfric-gungho/HEAD/rose-meta.conf @@ -3786,12 +3786,38 @@ help=Options for Smagorinsky subgrid mixing scheme: =_________________________________________________________________ =Blended scheme + 1D BL above = As above, but relaxes to 1D BL above BL + =_________________________________________________________________ + =Blended scheme + cloud-top of for shallow cu + = As above, but use cloud-top as blending length-scale only for + = shallow cu = - = WARNING: This option currently does not conserve energy and as - = a result may be unstable. + = WARNING: This option will only conserve if + = conservative_diffusion is true sort-key=Panel-A05 -value-titles=3D Smagorinsky, 2D Smagorinsky + 1D BL, Blended scheme + Smag above, Blended scheme + 1D BL above -values='3d_smag', '2d_smag', 'blend_smag_fa','blend_1dbl_fa' +trigger=namelist:mixing=shallow_cu_maxtop: 'blend_cth_shcu_only' ; + =namelist:mixing=cap_blended_ml: 'blend_smag_fa', 'blend_1dbl_fa', 'blend_cth_shcu_only' ; +value-titles=3D Smagorinsky, 2D Smagorinsky + 1D BL, Blended scheme + Smag above, + =Blended scheme + 1D BL above, Blended scheme with CTH for shallow cu only +values='3d_smag', '2d_smag', 'blend_smag_fa','blend_1dbl_fa','blend_cth_shcu_only' + +[namelist:mixing=cap_blended_ml] +compulsory=true +description=Cap the blended mixing length by the 1D +help=If true this caps the magnitude of the blended 1D-3D mixing length + =by the 1D mixing length +!kind=default +sort-key=Panel-A05a +type=logical + +[namelist:mixing=shallow_cu_maxtop] +compulsory=true +description=Max permitted cloud top height for shallow cu blending +help=The maximum permitted cloud top height (in metres) for shallow cumulus + =to be diagosed, as then used for method=blending_option=blend_cth_shcu_only + =to use the cumulus parcel top height as the length scale in the blending weight +!kind=default +sort-key=Panel-A05b +type=real [namelist:mixing=mix_factor] compulsory=true diff --git a/science/gungho/rose-meta/lfric-gungho/versions.py b/science/gungho/rose-meta/lfric-gungho/versions.py index 0197e8a9f0..b95c77f85b 100644 --- a/science/gungho/rose-meta/lfric-gungho/versions.py +++ b/science/gungho/rose-meta/lfric-gungho/versions.py @@ -28,8 +28,6 @@ def upgrade(self, config, meta_config=None): # Add settings return config, self.reports """ - - class vn32_t634(MacroUpgrade): """Upgrade macro for ticket #634 by Ian Boutle.""" @@ -61,3 +59,18 @@ def upgrade(self, config, meta_config=None): self.add_setting(config, ["namelist:mixing", "fullstress"], ".false.") return config, self.reports + + +class vn32_t752(MacroUpgrade): + # Upgrade macro for #752 by Adrian Lock + + BEFORE_TAG = "vn3.2_t479" + AFTER_TAG = "vn3.2_t752" + + def upgrade(self, config, meta_config=None): + # Add settings + self.add_setting( + config, ["namelist:mixing", "cap_blended_ml"], ".false.") + self.add_setting( + config, ["namelist:mixing", "shallow_cu_maxtop"], "3000.0") + return config, self.reports diff --git a/science/gungho/unit-test/kernel/diffusion/diffusion_momentum_flux_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diffusion/diffusion_momentum_flux_kernel_mod_test.pf index b54a69d32d..d3f0a15c20 100644 --- a/science/gungho/unit-test/kernel/diffusion/diffusion_momentum_flux_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diffusion/diffusion_momentum_flux_kernel_mod_test.pf @@ -128,7 +128,9 @@ contains leonard_kl = 4.0_r_def, & conservative_diffusion = .true., & density_weighted = .true., & - max_diff_factor=1.0_r_def ) + max_diff_factor = 1.0_r_def, & + cap_blended_ml = .false., & + shallow_cu_maxtop= 0.0_r_def ) ! Variables for testing momentum_smagorinsky ! Get sizes of everything diff --git a/science/gungho/unit-test/kernel/diffusion/divergence_momentum_flux_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diffusion/divergence_momentum_flux_kernel_mod_test.pf index 68b710ddab..d53d998fdc 100644 --- a/science/gungho/unit-test/kernel/diffusion/divergence_momentum_flux_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diffusion/divergence_momentum_flux_kernel_mod_test.pf @@ -115,7 +115,9 @@ contains leonard_kl = 4.0_r_def, & conservative_diffusion = .true., & density_weighted = .true., & - max_diff_factor=1.0_r_def ) + max_diff_factor = 1.0_r_def, & + cap_blended_ml = .false., & + shallow_cu_maxtop= 0.0_r_def ) ! Variables for testing momentum_smagorinsky ! Get sizes of everything diff --git a/science/gungho/unit-test/kernel/diffusion/leonard_term_kl_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diffusion/leonard_term_kl_kernel_mod_test.pf index b5d65552ea..598d66956a 100644 --- a/science/gungho/unit-test/kernel/diffusion/leonard_term_kl_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diffusion/leonard_term_kl_kernel_mod_test.pf @@ -55,8 +55,10 @@ contains leonard_kl = 4.0_r_def, & conservative_diffusion = .false., & density_weighted = .false., & - max_diff_factor = 1.0_r_def, & - fullstress = .false. ) + max_diff_factor = 1.0_r_def, & + fullstress = .false., & + cap_blended_ml = .false., & + shallow_cu_maxtop= 0.0_r_def ) call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & diff --git a/science/gungho/unit-test/kernel/diffusion/tracer_smagorinsky_diff_kernel_mod_test.pf b/science/gungho/unit-test/kernel/diffusion/tracer_smagorinsky_diff_kernel_mod_test.pf index 8e41f751ac..a8f637ec09 100644 --- a/science/gungho/unit-test/kernel/diffusion/tracer_smagorinsky_diff_kernel_mod_test.pf +++ b/science/gungho/unit-test/kernel/diffusion/tracer_smagorinsky_diff_kernel_mod_test.pf @@ -56,8 +56,10 @@ contains leonard_kl = 1.0_r_def, & conservative_diffusion = .false., & density_weighted = .false., & - max_diff_factor = 1.0_r_def, & - fullstress = .false. ) + max_diff_factor = 1.0_r_def, & + fullstress = .false., & + cap_blended_ml = .false., & + shallow_cu_maxtop= 0.0_r_def ) call feign_finite_element_config( & cellshape=cellshape_quadrilateral, & diff --git a/science/physics_schemes/source/boundary_layer/bdy_expl2.F90 b/science/physics_schemes/source/boundary_layer/bdy_expl2.F90 index 2db1de0d4e..7b6c572763 100644 --- a/science/physics_schemes/source/boundary_layer/bdy_expl2.F90 +++ b/science/physics_schemes/source/boundary_layer/bdy_expl2.F90 @@ -602,6 +602,9 @@ subroutine bdy_expl2 ( & 2:bl_levels), & ! Mixing length for heat (m), ! held on theta and rho levels, resp. + cumulus_cth(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & + ! cf_bulk cloud top height used in blended BL + ! for shallow convection fm_3d(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end,bl_levels), & ! stability function for momentum transport ! level 1 value is dummy @@ -717,9 +720,6 @@ subroutine bdy_expl2 ( & ! Flag for having reached ! the top of the turbulently mixed ! layer. - l_shallow_cth(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & - ! Flag to indicate shallow convection based on - ! cf_bulk cloud top height cloud_base_found(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end), & ! Flag for having reached cloud base cloud_top_found(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end) @@ -1829,20 +1829,21 @@ subroutine bdy_expl2 ( & !$OMP SCHEDULE(STATIC) & !$OMP DEFAULT(none) & !$OMP private(i) & -!$OMP SHARED(pdims,l_shallow_cth) +!$OMP SHARED(pdims,cumulus_cth) do i = pdims%i_start, pdims%i_end - l_shallow_cth(i,j) = .false. + cumulus_cth(i,j) = zero ! initialise to zero for case of no cloud + ! - will then blend using BL depth end do !$OMP end PARALLEL do if (blending_option == blend_cth_shcu_only) then - ! only going to use the parcel top as the length scale in blending + ! going to use cloud top height as the length scale in blending only ! if the convection is shallow, where we define shallow convection here ! as the resolved cloud top (from cf_bluk) being below shallow_cu_maxtop !$OMP PARALLEL & !$OMP DEFAULT(none) & !$OMP private(i,k) & -!$OMP SHARED(pdims,bl_levels,z_uv,l_shallow_cth,cumulus,ntml,cf_bulk, & +!$OMP SHARED(pdims,bl_levels,z_uv,cumulus_cth,cumulus,ntml,cf_bulk, & !$OMP shallow_cu_maxtop,cloud_base_found,cloud_top_found) !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end @@ -1863,7 +1864,7 @@ subroutine bdy_expl2 ( & cf_bulk(i,j,k+1) < sc_cftol ) then ! got to cloud-top cloud_top_found(i,j) = .true. - l_shallow_cth(i,j) = z_uv(i,j,k+1) < shallow_cu_maxtop + cumulus_cth(i,j) = z_uv(i,j,k+1) end if end do !$OMP end do @@ -1878,7 +1879,7 @@ subroutine bdy_expl2 ( & bl_levels,k_log_layr,BL_diag, & ! in fields sigma_h,flandg,dvdzm,ri,rho_wet_tq,z_uv,z_tq,z0m_eff_gb,zhnl,zhpar,zhsc, & - zdsc_base,ntpar,ntml_nl,ntdsc,nbdsc,l_shallow_cth,rmlmax2,rneutml_sq, & + zdsc_base,ntpar,ntml_nl,ntdsc,nbdsc,cumulus_cth,rmlmax2,rneutml_sq, & delta_smag, & ! in/out fields cumulus,weight_1dbl, & @@ -2475,7 +2476,7 @@ subroutine bdy_expl2 ( & bl_type_6(i,j) = one ! Label this shallow regime as 2.0_r_bl here, to be able to identify it ! in diagnostics_bl, but the "cumulus" stash output will still be 1.0 - if (l_shallow_cth(i,j)) bl_type_6(i,j) = 2.0_r_bl + if (cumulus_cth(i,j) < shallow_cu_maxtop) bl_type_6(i,j) = 2.0_r_bl end if end if end do diff --git a/science/physics_schemes/source/boundary_layer/bl_option_mod.F90 b/science/physics_schemes/source/boundary_layer/bl_option_mod.F90 index b6b8f36a69..45f0c37c25 100644 --- a/science/physics_schemes/source/boundary_layer/bl_option_mod.F90 +++ b/science/physics_schemes/source/boundary_layer/bl_option_mod.F90 @@ -282,7 +282,10 @@ module bl_option_mod ! as minimum, and use cloud-top as blending length-scale only for shallow cu integer, parameter :: blend_cth_shcu_only =4 -! 11a max permitted cloud top height in metres for shallow cu, used for +! 11a switch to cap the blended mixing length by the 1D +LOGICAL :: cap_blended_ml = .FALSE. + +! 11b max permitted cloud top height in metres for shallow cu, used for ! blending_option=blend_cth_shcu_only real(kind=r_bl) :: shallow_cu_maxtop = rmdi @@ -640,6 +643,8 @@ subroutine print_nlist_run_bl() call umprint(linebuffer,src='bl_option_mod') write(lineBuffer,'(A,ES12.4)') 'shallow_cu_maxtop = ',shallow_cu_maxtop call umprint(linebuffer,src='bl_option_mod') +write(lineBuffer,'(A,L1)') ' cap_blended_ml = ',cap_blended_ml +call umprint(linebuffer,src='bl_option_mod') write(lineBuffer,'(2(A,F0.5))') 'alpha_cd_in = ', & alpha_cd_in(1),' ',alpha_cd_in(2) call umPrint(lineBuffer,src='bl_option_mod') diff --git a/science/physics_schemes/source/boundary_layer/ex_coef.F90 b/science/physics_schemes/source/boundary_layer/ex_coef.F90 index 8c03c44c97..91496490f0 100644 --- a/science/physics_schemes/source/boundary_layer/ex_coef.F90 +++ b/science/physics_schemes/source/boundary_layer/ex_coef.F90 @@ -27,7 +27,7 @@ subroutine ex_coef ( & bl_levels, k_log_layr, BL_diag, & ! in fields sigma_h,flandg,dvdzm,ri,rho_wet_tq,z_uv,z_tq,z0m,zhnl,zhpar,zhsc,zdsc_base, & - ntpar,ntml_nl,ntdsc,nbdsc,l_shallow_cth,rmlmax2,rneutml_sq,delta_smag, & + ntpar,ntml_nl,ntdsc,nbdsc,cumulus_cth,rmlmax2,rneutml_sq,delta_smag, & ! in/out fields cumulus,weight_1dbl, & ! out fields @@ -48,7 +48,7 @@ subroutine ex_coef ( & lambda_fac, beta_bl, beta_fa, rlinfac, linear0, smooth_to_bdys, & to_sharp_across_1km, ntml_level_corrn, free_trop_layers, two_thirds, & blending_option, blend_except_cu, blend_gridindep_fa, blend_cth_shcu_only, & - extended_tail, zero, one, one_half + shallow_cu_maxtop, extended_tail, zero, one, one_half, cap_blended_ml use conversions_mod, only: pi => pi_bl use gen_phys_inputs_mod, only: l_mr_physics @@ -119,12 +119,10 @@ subroutine ex_coef ( & ! IN Land fraction on all tiles. rneutml_sq(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end,bl_levels), & ! IN Square of the neutral mixing length for Smagorinsky - delta_smag(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end) + delta_smag(tdims%i_start:tdims%i_end,tdims%j_start:tdims%j_end), & ! IN delta_x used by Smagorinsky - -logical, intent(in) :: & - l_shallow_cth(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end) - ! IN Flag to indicate shallow convection based on cl-top + cumulus_cth(pdims%i_start:pdims%i_end,pdims%j_start:pdims%j_end) + ! IN cloud-top height for identifying shallow cu in blending ! Declaration of new BL diagnostics. type (strnewbldiag), intent(in out) :: BL_diag @@ -192,6 +190,7 @@ subroutine ex_coef ( & real(kind=r_bl) :: eh,em,g0,dh,dm,r_c_tke real(kind=r_bl) :: subbmin,subbmax,subcmin,subcmax real(kind=r_bl) :: a_ri,b_ri +real(kind=r_bl) :: elm_1d, elh_1d parameter ( & eh=25.0_r_bl, & @@ -793,12 +792,13 @@ subroutine ex_coef ( & do k = 2, bl_levels !$OMP PARALLEL DEFAULT(none) & -!$OMP PRIVATE(z_scale,i,lambdam,lambdah,vkz,f_log,zz,zht,zfa,beta) & +!$OMP PRIVATE(z_scale,i,lambdam,lambdah,vkz,f_log,zz,zht,zfa,beta,elm_1d, & +!$OMP elh_1d) & !$OMP SHARED(k,pdims,ri,ricrit,flandg,ntml_local,ntml_nl,z_tq, & !$OMP l_rp2,lambda_min,par_mezcla_rp,zh_local,turb_length,k_log_layr, & -!$OMP z_uv,z0m,elm,elh,elh_rho,blending_option,cumulus,l_shallow_cth,zhpar, & +!$OMP z_uv,z0m,elm,elh,elh_rho,blending_option,cumulus,cumulus_cth,zhpar, & !$OMP ntdsc,weight_1dbl,weight_bltop,delta_smag,rneutml_sq,BL_diag,local_fa, & -!$OMP lambda_min_use) +!$OMP lambda_min_use,shallow_cu_maxtop,cap_blended_ml) !$OMP do SCHEDULE(STATIC) do i = pdims%i_start, pdims%i_end !------------------------------------------------------------------------ @@ -890,10 +890,13 @@ subroutine ex_coef ( & ! zht = interface between BL and FA zht = max( z_uv(i,j,ntml_nl(i,j)+1) , zh_local(i,j) ) ! Relevant scale in cumulus layers can be cloud top height, zhpar - if ( cumulus(i,j) .and. ( blending_option /= blend_cth_shcu_only .or. & - l_shallow_cth(i,j) ) ) then + if ( cumulus(i,j) .and. blending_option /= blend_cth_shcu_only ) then z_scale = max( z_scale, zhpar(i,j) ) zht = max( zht, zhpar(i,j) ) + else if ( cumulus(i,j) .and. blending_option == blend_cth_shcu_only & + .and. cumulus_cth(i,j) < shallow_cu_maxtop ) THEN + z_scale = max( z_scale, cumulus_cth(i,j) ) + zht = max( zht, cumulus_cth(i,j) ) end if ! BL top includes decoupled stratocu layer, if it exists @@ -949,7 +952,6 @@ subroutine ex_coef ( & one - tanh( beta_bl*z_scale/delta_smag(i,j)) * & max( zero, & min( one, (linear0-delta_smag(i,j)/z_scale)*rlinfac) ) - end if end if ! test on zz < zht else @@ -968,10 +970,17 @@ subroutine ex_coef ( & end if end if + elm_1d = elm(i,j,k) + elh_1d = elh(i,j,k) elm(i,j,k) = elm(i,j,k)*weight_1dbl(i,j,k) + & sqrt(rneutml_sq(i,j,k-1))*(one-weight_1dbl(i,j,k)) elh(i,j,k) = elh(i,j,k)*weight_1dbl(i,j,k) + & sqrt(rneutml_sq(i,j,k-1))*(one-weight_1dbl(i,j,k)) + if (cap_blended_ml) then + ! restrict blended lengthscale to be at most the 1d + elm(i,j,k) = MIN( elm_1d, elm(i,j,k) ) + elh(i,j,k) = MIN( elh_1d, elh(i,j,k) ) + end if end do !$OMP end do end if ! test on blending_option