From 3e8a77840e400c088221f66d8bfb8545deab08db Mon Sep 17 00:00:00 2001 From: iboutle <135141261+iboutle@users.noreply.github.com> Date: Thu, 6 Aug 2026 17:24:42 +0100 Subject: [PATCH 1/7] fix activation --- src/activation.F90 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/activation.F90 b/src/activation.F90 index 3c2ec85..a0f8d85 100644 --- a/src/activation.F90 +++ b/src/activation.F90 @@ -261,14 +261,11 @@ subroutine activate(dt, cloud_mass, cloud_number, w, rho, dnumber, dmac, T, p, activated_arg = sum(dnccn_all(:)) + dactive = zero_real_wp + dmass_d = zero_real_wp if (Smax_act > smax_act_min .and. .not. l_warm) then - if (iopt_inuc < 4) then - ! For lower-order ice nucleation options, need to initialise - ! dactive and dmass_d - dactive = zero_real_wp - dmass_d = zero_real_wp - else + if (iopt_inuc > 3) then ! For higher-order ice nucleation schemes, dactive and dmass_d ! can be based on dustphys dactive = 0.01*dustphys%N(1) From 080266c008769a98f22a2f8150e79b5e533ece4b Mon Sep 17 00:00:00 2001 From: iboutle <135141261+iboutle@users.noreply.github.com> Date: Fri, 7 Aug 2026 16:08:39 +0100 Subject: [PATCH 2/7] another div0 bugfix --- src/activation.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/activation.F90 b/src/activation.F90 index a0f8d85..b196c8a 100644 --- a/src/activation.F90 +++ b/src/activation.F90 @@ -237,7 +237,8 @@ subroutine activate(dt, cloud_mass, cloud_number, w, rho, dnumber, dmac, T, p, betai(imode)=0.5 !aerochem%beta(imode) This is set to 0.5 for ! Shipway not for ARG !print *, 'imode, bi', bi(imode), imode, Ak,betai(imode),rdi(imode) - if (rdi(imode) > epsilon(1.0_wp)) then + if (rdi(imode) > epsilon(1.0_wp) .and. & + bi(imode) > epsilon(1.0_wp)) then s0i(imode) = rdi(imode)**(-(1.0+betai(imode))) * & sqrt(4.0*Ak**3.0/(27.0*bi(imode))) else From d523000cb66dd3903754aefbb7b47ed908fd267c Mon Sep 17 00:00:00 2001 From: iboutle <135141261+iboutle@users.noreply.github.com> Date: Mon, 10 Aug 2026 11:30:44 +0100 Subject: [PATCH 3/7] another div0 fix --- src/aerosol_routines.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aerosol_routines.F90 b/src/aerosol_routines.F90 index ce2d505..0ad052e 100644 --- a/src/aerosol_routines.F90 +++ b/src/aerosol_routines.F90 @@ -742,7 +742,7 @@ subroutine AbdulRazzakGhan2000(w, p, T, phys, chem, nccn, Smax, active_phys, ncc rsmax2=0.0 do i=1, phys%nmodes - if (phys%N(i) > ccn_tidy) then + if (phys%N(i) > ccn_tidy .and. phys%M(i) > ccn_tidy*epsilon(1.0_wp)) then if(l_ukca_casim) then Bk =chem%bk(i) else From 57633e69a203ef7c30566e1293f1ae6c4de6344c Mon Sep 17 00:00:00 2001 From: iboutle <135141261+iboutle@users.noreply.github.com> Date: Wed, 12 Aug 2026 11:21:40 +0100 Subject: [PATCH 4/7] Revert "another div0 fix" This reverts commit d523000cb66dd3903754aefbb7b47ed908fd267c. --- src/aerosol_routines.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aerosol_routines.F90 b/src/aerosol_routines.F90 index 0ad052e..ce2d505 100644 --- a/src/aerosol_routines.F90 +++ b/src/aerosol_routines.F90 @@ -742,7 +742,7 @@ subroutine AbdulRazzakGhan2000(w, p, T, phys, chem, nccn, Smax, active_phys, ncc rsmax2=0.0 do i=1, phys%nmodes - if (phys%N(i) > ccn_tidy .and. phys%M(i) > ccn_tidy*epsilon(1.0_wp)) then + if (phys%N(i) > ccn_tidy) then if(l_ukca_casim) then Bk =chem%bk(i) else From b950416a3008a3fcd1e46c0368d60a12569a3f13 Mon Sep 17 00:00:00 2001 From: iboutle <135141261+iboutle@users.noreply.github.com> Date: Wed, 12 Aug 2026 11:21:48 +0100 Subject: [PATCH 5/7] Revert "another div0 bugfix" This reverts commit 080266c008769a98f22a2f8150e79b5e533ece4b. --- src/activation.F90 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/activation.F90 b/src/activation.F90 index b196c8a..a0f8d85 100644 --- a/src/activation.F90 +++ b/src/activation.F90 @@ -237,8 +237,7 @@ subroutine activate(dt, cloud_mass, cloud_number, w, rho, dnumber, dmac, T, p, betai(imode)=0.5 !aerochem%beta(imode) This is set to 0.5 for ! Shipway not for ARG !print *, 'imode, bi', bi(imode), imode, Ak,betai(imode),rdi(imode) - if (rdi(imode) > epsilon(1.0_wp) .and. & - bi(imode) > epsilon(1.0_wp)) then + if (rdi(imode) > epsilon(1.0_wp)) then s0i(imode) = rdi(imode)**(-(1.0+betai(imode))) * & sqrt(4.0*Ak**3.0/(27.0*bi(imode))) else From 852baa3639b03a9aa602a9f6db285d9edeca2b28 Mon Sep 17 00:00:00 2001 From: iboutle <135141261+iboutle@users.noreply.github.com> Date: Wed, 12 Aug 2026 12:17:16 +0100 Subject: [PATCH 6/7] contrib file --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index c1d9657..6dea6ef 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -5,3 +5,4 @@ | james-bruten-mo | James Bruten | Met Office | 2025-12-09 | | t00sa | Sam Clarke-Green | Met Office | 2026-03-02 | | Pierre-siddall| Pierre Siddall | Met Office | 2026-03-11 | +| iboutle | Ian Boutle | Met Office | 2026-08-12 | From d91abe0af2416ac502a9b3dbd4e8fba11065c2d8 Mon Sep 17 00:00:00 2001 From: iboutle <135141261+iboutle@users.noreply.github.com> Date: Wed, 12 Aug 2026 12:18:16 +0100 Subject: [PATCH 7/7] fix style --- CONTRIBUTORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 6dea6ef..f3f5e3e 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -5,4 +5,4 @@ | james-bruten-mo | James Bruten | Met Office | 2025-12-09 | | t00sa | Sam Clarke-Green | Met Office | 2026-03-02 | | Pierre-siddall| Pierre Siddall | Met Office | 2026-03-11 | -| iboutle | Ian Boutle | Met Office | 2026-08-12 | +| iboutle | Ian Boutle | Met Office | 2026-08-12 |