From baff7cb4fee04dd9b39df1c8f4b4d5d4e055c53c Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Tue, 3 Dec 2024 18:01:01 -0700 Subject: [PATCH] Bug fix in physics/GWD/ugwp_driver_v0.F to prevent using uninitialized Bnv2 array in line 350 --- physics/GWD/ugwp_driver_v0.F | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/physics/GWD/ugwp_driver_v0.F b/physics/GWD/ugwp_driver_v0.F index 1bbb2770d..c7f283479 100644 --- a/physics/GWD/ugwp_driver_v0.F +++ b/physics/GWD/ugwp_driver_v0.F @@ -349,7 +349,9 @@ SUBROUTINE GWDPS_V0(IM, km, imx, do_tofd, BVF2 = grav2 * RDZ * (VTK(I,K+1)-VTK(I,K)) & / (VTK(I,K+1)+VTK(I,K)) bnv2(i,k+1) = max( BVF2, bnv2min ) - RI_N(I,K+1) = Bnv2(i,k)/SHR2 ! Richardson number consistent with BNV2 + ! https://github.com/NCAR/ccpp-physics/issues/1103 + !RI_N(I,K+1) = Bnv2(i,k)/SHR2 ! Richardson number consistent with BNV2 + RI_N(I,K+1) = Bnv2(i,max(k,2))/SHR2 ! Richardson number consistent with BNV2 ! ! add here computation for Ktur and OGW-dissipation fro VE-GFS !