diff --git a/physics/GWD/cires_ugwpv1_oro.F90 b/physics/GWD/cires_ugwpv1_oro.F90 index 423a21348..12f9d0d13 100644 --- a/physics/GWD/cires_ugwpv1_oro.F90 +++ b/physics/GWD/cires_ugwpv1_oro.F90 @@ -222,7 +222,8 @@ subroutine orogw_v1 (im, km, imx, me, master, dtp, kdt, do_tofd, & dusfc(i) = 0.0 dvsfc(i) = 0.0 ipt(i) = 0 - enddo + enddo + zlwb(:) = 0.0 ! ---- for lm and gwd calculation points !cires_ugwp_initialize.F90: real, parameter :: hpmax=2400.0, hpmin=25.0 diff --git a/physics/GWD/cires_ugwpv1_triggers.F90 b/physics/GWD/cires_ugwpv1_triggers.F90 index 009d91775..29d66f823 100644 --- a/physics/GWD/cires_ugwpv1_triggers.F90 +++ b/physics/GWD/cires_ugwpv1_triggers.F90 @@ -298,7 +298,7 @@ subroutine get_spectra_tau_okw(nw, im, levs, trig_okw, xlatd, sinlat, coslat, t if (dmax >= tlim_okw) kex = kex+1 do k=klow+1, ktop dtot = abs(trig_okw(i,k)) - if (dtot >= tlim_fgf ) kex = kex+1 + if (dtot >= tlim_okw ) kex = kex+1 if ( dtot > dmax) then klev(i) = k dmax = dtot diff --git a/physics/Interstitials/UFS_SCM_NEPTUNE/sfcsub.F b/physics/Interstitials/UFS_SCM_NEPTUNE/sfcsub.F index 78afbac42..d4dadfe0d 100644 --- a/physics/Interstitials/UFS_SCM_NEPTUNE/sfcsub.F +++ b/physics/Interstitials/UFS_SCM_NEPTUNE/sfcsub.F @@ -3093,8 +3093,11 @@ subroutine subst(data,imax,jmax,dlon,dlat,ijordr) enddo enddo else - do i=1,imax - data(imax-i+1,jj) = work(i,j) + do j=1,jmax + jj = jmax - j + 1 + do i=1,imax + data(imax-i+1,jj) = work(i,j) + enddo enddo endif else