From 2f2991d16081a6391bb2cc24f1d3f1722bef7d04 Mon Sep 17 00:00:00 2001 From: Cheryl Craig Date: Thu, 6 Feb 2025 10:39:07 -0700 Subject: [PATCH] Fix bug for WACCM tests --- src/physics/cam/gw_convect.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/physics/cam/gw_convect.F90 b/src/physics/cam/gw_convect.F90 index 56fdc7eebd..311865b499 100644 --- a/src/physics/cam/gw_convect.F90 +++ b/src/physics/cam/gw_convect.F90 @@ -179,7 +179,7 @@ subroutine gw_beres_src(ncol, band, desc, u, v, & do i = 1, ncol if (topi(i) == 0) then ! First spot where heating rate is positive. - if ((netdt(i,k) > 0.0_r8) .AND. (zm(i,k) <= 20000._r8)) topi(i) = k + if ((netdt(i,k) > 0.0_r8) .AND. (zm(i,k) <= 20000._r8)) topi(i) = k-1 end if end do ! When all done, exit @@ -286,7 +286,7 @@ subroutine gw_beres_src(ncol, band, desc, u, v, & ! Adjust for critical level filtering. tau0(Umini(i):Umaxi(i)) = 0.0_r8 - + tau(i,:,topi(i)+1) = tau0 end if ! heating depth above min and not at the pole