Commit 437c545f authored by Sabine's avatar Sabine

BUGFIX: boundary overflow related to cloud height

parent 77783e3d
......@@ -557,9 +557,21 @@ subroutine readwind_gfs(indj,n,uuh,vvh,wwh)
endif
! SEC & IP 12/2018 read GFS clouds
if(isec1(6).eq.153) then !! CLWCR Cloud liquid water content [kg/kg]
clwch(i,j,nlev_ec-k+2,n)=zsec4(nxfield*(ny-j-1)+i+1)
if((i.eq.0).and.(j.eq.0)) then
do ii=1,nuvz
if ((isec1(8)*100.0).eq.akz(ii)) numpu=ii
end do
endif
help=zsec4(nxfield*(ny-j-1)+i+1)
if(i.le.i180) then
clwch(i179+i,j,numpu,n)=help
else
clwch(i-i181,j,numpu,n)=help
endif
readclouds=.true.
sumclouds=.true.
! readclouds=.false.
! sumclouds=.false.
endif
......
......@@ -653,7 +653,7 @@ subroutine verttransform_ecmwf(n,uuh,vvh,wwh,pvh)
! If Precipitation. Define removal type in the vertical
if ((lsp.gt.0.01).or.(convp.gt.0.01)) then ! cloud and precipitation
do kz=nz,1,-1 !go Bottom up!
do kz=nz,2,-1 !go Bottom up!
if (clw(ix,jy,kz,n).gt. 0) then ! is in cloud
cloudsh(ix,jy,n)=cloudsh(ix,jy,n)+height(kz)-height(kz-1)
clouds(ix,jy,kz,n)=1 ! is a cloud
......
......@@ -547,12 +547,12 @@ subroutine verttransform_gfs(n,uuh,vvh,wwh,pvh)
! If Precipitation. Define removal type in the vertical
if ((lsp.gt.0.01).or.(convp.gt.0.01)) then ! cloud and precipitation
do kz=nz,1,-1 !go Bottom up!
do kz=nz,2,-1 !go Bottom up!
if (clw(ix,jy,kz,n).gt. 0) then ! is in cloud
cloudsh(ix,jy,n)=cloudsh(ix,jy,n)+height(kz)-height(kz-1)
clouds(ix,jy,kz,n)=1 ! is a cloud
if (lsp.ge.convp) then
clouds(ix,jy,kz,n)=3 ! lsp in-cloud
clouds(ix,jy,kz,n)=3 ! lsp in-cloud
else
clouds(ix,jy,kz,n)=2 ! convp in-cloud
endif ! convective or large scale
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment