From fd78dc031e50efafcda1e0bd53174ae218b3b821 Mon Sep 17 00:00:00 2001 From: Haipeng Lin Date: Wed, 5 Mar 2025 15:59:50 -0500 Subject: [PATCH] Fix #1254: incorrect definition of FREQSH in CAM4 Hack shallow convection --- src/physics/cam/convect_shallow.F90 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/physics/cam/convect_shallow.F90 b/src/physics/cam/convect_shallow.F90 index 9edd28c696..e049d52ebf 100644 --- a/src/physics/cam/convect_shallow.F90 +++ b/src/physics/cam/convect_shallow.F90 @@ -684,11 +684,9 @@ subroutine convect_shallow_tend( ztodt , cmfmc , & ! Calculate fractional occurance of shallow convection ! ! --------------------------------------------------------! - ! Modification : I should check whether below computation of freqsh is correct. - freqsh(:) = 0._r8 do i = 1, ncol - if( maxval(cmfmc2(i,:pver)) <= 0._r8 ) then + if (maxval(cmfmc2(i,:pver)) > 0._r8) then freqsh(i) = 1._r8 end if end do