Skip to content

Commit 0f1b726

Browse files
authored
Merge pull request NCAR#1104 from climbfuji/bugfix/ugwp_driver_v0_uninit_main
Bug fix in physics/GWD/ugwp_driver_v0.F to prevent using uninitialized Bnv2 array in line 350
2 parents ff08945 + 0edbdcf commit 0f1b726

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

physics/GWD/ugwp_driver_v0.F

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,9 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd,
349349
BVF2 = grav2 * RDZ * (VTK(I,K+1)-VTK(I,K))
350350
& / (VTK(I,K+1)+VTK(I,K))
351351
bnv2(i,k+1) = max( BVF2, bnv2min )
352-
RI_N(I,K+1) = Bnv2(i,k)/SHR2 ! Richardson number consistent with BNV2
352+
! https://github.com/NCAR/ccpp-physics/issues/1103
353+
!RI_N(I,K+1) = Bnv2(i,k)/SHR2 ! Richardson number consistent with BNV2
354+
RI_N(I,K+1) = Bnv2(i,max(k,2))/SHR2 ! Richardson number consistent with BNV2
353355
!
354356
! add here computation for Ktur and OGW-dissipation fro VE-GFS
355357
!

0 commit comments

Comments
 (0)