Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@
| thomasmelvin | Thomas Melvin | Met Office | 2026-01-15 |
| tinyendian | Wolfgang Hayek | Earth Sciences New Zealand | 2026-02-02 |
| DanStoneMO | Daniel Stone | Met Office | 2026-02-26 |
| ericaneininger | Erica Neininger | Met Office | 2026-03-02 |
| ericaneininger | Erica Neininger | Met Office | 2026-03-02 |
| MichaelWhitall | Michael Whitall | Met Office | 2026-03-27 |
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ type=real
compulsory=true
description=Options for where to allow PC2 initiation to operate
!enumeration=true
help=(1) Original logic;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This meta-data was copied from the UM previously. I just spotted that it still refers to the allowed integer values for this multi-option switch in the UM. The LFRic namelists now accept character strings for multi-option switches instead of the integers. So I've replaced the confusing integers with the appropriate character strings here.

help=(original) Original logic;
= Tests are performed to check whether the cloud cover is 0 or 1
= (but if it is below zero degree C we check for cloud cover less
= than 0.05 or greater than 1).
Expand All @@ -468,7 +468,7 @@ help=(1) Original logic;
= This is an issue in a convection-permitting model where there is no
= convection scheme to create that cloud via detrainment.
=
=(3) Much simpler logic that should yield smoother behaviour;
=(smooth) Much simpler logic that should yield smoother behaviour;
= The diagnostic cloud scheme calculations (Smith or Bimodal)
= are performed at any grid-point where they are expected to yield
= nonzero liquid water content, regardless of the existing cloud fraction.
Expand All @@ -477,10 +477,21 @@ help=(1) Original logic;
= diagnostic scheme value in proportion to the fractional increase
= of qcl by initiation (or the fractional increase of saturation deficit
= at points which are grid-mean total-water supersaturated).
=
=(smooth_fix) As (smooth), but the cloud-fraction is hard-limited by
= the diagnostic scheme value instead of being adjusted only partially
= towards it, consistent with the treatment of qcl
= (diagnostic cf_liq is taken as a minimum limit when grid-mean total-water
= sub-saturated, but as a max limit when super-saturated).
= This avoids a numerical problem with option (3), where qcl is hard
= limited while cf_liq is allowed to be reduced below its diagnosed
= value by PC2 erosion, resulting in the in-cloud water content
= qcl/cf_liq drifting upwards where erosion occurs
= (which will promote spurious rain production in the microphysics).
ns=namelist/Science/UM Cloud
sort-key=Panel-A02b
value-titles=Original,Smooth
values='original','smooth'
value-titles=Original,Smooth,Smooth fixed
values='original','smooth','smooth_fix'

[namelist:cloud=pc2ini]
compulsory=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,19 @@ def upgrade(self, config, meta_config=None):
# Add settings
return config, self.reports
"""

class vn31_t249(MacroUpgrade):
# Upgrade macro for Issue #249 by Mike Whitall

BEFORE_TAG = "vn3.1"
AFTER_TAG = "vn3.1_t249"

def upgrade(self, config, meta_config=None):
# Add settings

# Blank macro needed just to update meta-data version
# (apps using the new option 'smooth_fix' under the existing
# multi-option switch 'pc2_init_logic' fail checks against
# the existing meta-data).

return config, self.reports
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ subroutine bl_imp2_code(nlayers, seg_len, &
end do
end if

if ( i_pc2_init_logic/=pc2init_logic_smooth ) then
if ( i_pc2_init_logic < pc2init_logic_smooth ) then
! Only do this removal of cloud at and below ntml if NOT using
! "smooth" PC2 initiation logic. With "smooth" logic, we allow
! cloud to initiate below ntml, so also need to allow homogenous
Expand All @@ -845,7 +845,7 @@ subroutine bl_imp2_code(nlayers, seg_len, &
end if
end do
end do ! k
end if ! ( i_pc2_init_logic/=pc2init_logic_smooth )
end if ! ( i_pc2_init_logic < pc2init_logic_smooth )

! To be consistent with the code above, set zlcl_mixed to
! prevent PC2 initiating cloud below this level
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ module um_physics_init_mod
two_d_fsd_factor_in => two_d_fsd_factor, &
pc2_init_logic, pc2_init_logic_original, &
pc2_init_logic_smooth, &
pc2_init_logic_smooth_fix, &
i_pc2_erosion_numerics_explicit, &
i_pc2_erosion_numerics_implicit, &
i_pc2_erosion_numerics_analytic, &
Expand Down Expand Up @@ -457,14 +458,14 @@ subroutine um_physics_init()
use casim_parent_mod, only: casim_parent, parent_um
use initialize, only: mphys_init
use generic_diagnostic_variables, only: casdiags
use pc2_constants_mod, only: i_cld_off, i_cld_smith, i_cld_pc2, &
i_cld_bimodal, rhcpt_off, acf_off, real_shear, rhcpt_tke_based, &
pc2eros_exp_rh,pc2eros_hybrid_sidesonly, ignore_shear, &
original_but_wrong, acf_cusack, cbl_and_cu, pc2init_smith, &
pc2init_logic_original, pc2init_bimodal, i_pc2_homog_g_cf, &
forced_cu_cca, i_pc2_homog_g_width, pc2init_logic_smooth, &
i_pc2_erosion_explicit, i_pc2_erosion_implicit, &
i_pc2_erosion_analytic
use pc2_constants_mod, only: i_cld_off, i_cld_smith, i_cld_pc2, &
i_cld_bimodal, rhcpt_off, acf_off, real_shear, rhcpt_tke_based, &
pc2eros_exp_rh,pc2eros_hybrid_sidesonly, ignore_shear, &
original_but_wrong, acf_cusack, cbl_and_cu, forced_cu_cca, &
pc2init_smith, pc2init_bimodal, i_pc2_homog_g_cf, i_pc2_homog_g_width,&
pc2init_logic_original, pc2init_logic_smooth, &
pc2init_logic_smooth_fix, &
i_pc2_erosion_explicit, i_pc2_erosion_implicit, i_pc2_erosion_analytic
use rad_input_mod, only: two_d_fsd_factor
use science_fixes_mod, only: i_fix_mphys_drop_settle, second_fix, &
l_pc2_homog_turb_q_neg, l_fix_ccb_cct, l_fix_conv_precip_evap, &
Expand Down Expand Up @@ -1110,6 +1111,8 @@ subroutine um_physics_init()
i_pc2_init_logic = pc2init_logic_original
case(pc2_init_logic_smooth)
i_pc2_init_logic = pc2init_logic_smooth
case(pc2_init_logic_smooth_fix)
i_pc2_init_logic = pc2init_logic_smooth_fix
end select
if (pc2ini == pc2ini_smith) i_pc2_init_method = pc2init_smith
if (pc2ini == pc2ini_bimodal) i_pc2_init_method = pc2init_bimodal
Expand Down
2 changes: 1 addition & 1 deletion rose-stem/app/lfric_atm/opt/rose-app-comorph_dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ l_bm_sigma_s_grad=.true.
l_bm_tweaks=.true.
max_sigmas=2.0
min_sigx_ft=0.15
pc2_init_logic='smooth'
pc2_init_logic='smooth_fix'
turb_var_fac_bm=4.0

[namelist:convection]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 42F8B1D8
Inner product checksum theta = 4D84DAFD
Inner product checksum u = 601AD40F
Inner product checksum mr1 = 3C825A8B
Inner product checksum mr2 = 33EB5DE2
Inner product checksum mr3 = 317D3117
Inner product checksum theta = 4D84DADF
Inner product checksum u = 601AD41E
Inner product checksum mr1 = 3C82954F
Inner product checksum mr2 = 340B8B8F
Inner product checksum mr3 = 31963166
Inner product checksum mr4 = 0
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 42F50044
Inner product checksum theta = 4E044E7D
Inner product checksum u = 5FD4B116
Inner product checksum mr1 = 3CCA582B
Inner product checksum mr2 = 33C805E1
Inner product checksum mr3 = 30364C90
Inner product checksum mr4 = 2F0E3313
Inner product checksum theta = 4E044AB9
Inner product checksum u = 5FD99B8E
Inner product checksum mr1 = 3CCF46C3
Inner product checksum mr2 = 33E4F9C5
Inner product checksum mr3 = 306AA7FD
Inner product checksum mr4 = 2F167F46
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 46D832D6
Inner product checksum theta = 518BE1F6
Inner product checksum u = 6A86BC76
Inner product checksum mr1 = 3FD120E6
Inner product checksum mr2 = 37FAD7AC
Inner product checksum mr3 = 376811C0
Inner product checksum mr4 = 37BFF8BC
Inner product checksum mr5 = 3697AF6E
Inner product checksum rho = 46D831B9
Inner product checksum theta = 518BE176
Inner product checksum u = 6A86439E
Inner product checksum mr1 = 3FD0BCC7
Inner product checksum mr2 = 37F8345A
Inner product checksum mr3 = 377E837C
Inner product checksum mr4 = 37C26916
Inner product checksum mr5 = 36A8819B
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 42F8B1D6
Inner product checksum theta = 4D84DAEF
Inner product checksum u = 601AD41A
Inner product checksum mr1 = 3C829C2B
Inner product checksum mr2 = 3407BDD6
Inner product checksum mr3 = 314F5B36
Inner product checksum theta = 4D84DAEC
Inner product checksum u = 601AD41E
Inner product checksum mr1 = 3C82885E
Inner product checksum mr2 = 3406F027
Inner product checksum mr3 = 31A1AD74
Inner product checksum mr4 = 0
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Inner product checksum rho = 42F50046
Inner product checksum theta = 4E044E4C
Inner product checksum u = 5FDD4323
Inner product checksum mr1 = 3CC7B2CE
Inner product checksum mr2 = 331179D2
Inner product checksum mr3 = 2FF24AD6
Inner product checksum mr4 = 2F26E792
Inner product checksum theta = 4E044B4A
Inner product checksum u = 5FD795C0
Inner product checksum mr1 = 3CCE8492
Inner product checksum mr2 = 33A0F9CA
Inner product checksum mr3 = 301B04D3
Inner product checksum mr4 = 2F1F7C0C
Inner product checksum mr5 = 0
Inner product checksum mr6 = 0
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ subroutine check_run_cloud()
pc2eros_exp_rh, pc2eros_hybrid_sidesonly, &
i_pc2_erosion_explicit, i_pc2_erosion_implicit, i_pc2_erosion_analytic, &
pc2init_smith, pc2init_bimodal, &
pc2init_logic_original, pc2init_logic_simplified, pc2init_logic_smooth, &
pc2init_logic_original, pc2init_logic_simplified, &
pc2init_logic_smooth, pc2init_logic_smooth_fix, &
cbl_and_cu, forced_cu_cca
use cv_run_mod, only: i_convection_vn, i_convection_vn_5a, i_convection_vn_6a, &
i_cv_comorph, l_param_conv
Expand Down Expand Up @@ -405,7 +406,7 @@ subroutine check_run_cloud()

call chk_var(i_pc2_init_logic,'i_pc2_init_logic', &
[pc2init_logic_original, pc2init_logic_simplified, &
pc2init_logic_smooth])
pc2init_logic_smooth, pc2init_logic_smooth_fix])

call chk_var(forced_cu,'forced_cu', &
[off, on, cbl_and_cu, forced_cu_cca])
Expand Down
Loading