6 ( plyr,tlyr,qlyr,qstl,clw, &
90 use kinds,
only: r_kind
92 real,
parameter:: climit=0.001
94 integer,
intent(in) :: IX, NLAY, iflip
96 real (kind=r_kind),
dimension(ix,nlay),
intent(in) :: plyr, &
104 real (kind=r_kind),
dimension(ix,nlay),
intent(out) :: cldtot
113 real (kind=r_kind) :: rhly(ix,nlay)
114 real (kind=r_kind) :: clwmin, clwm, clwt, onemrh,
value, &
117 integer,
dimension(IX) :: kinver
119 integer :: i, k, id, id1
121 logical :: inversn(IX)
132 rhly(i,k) = qlyr(i,k)/qstl(i,k)
133 rhly(i,k) = max(0.0,min(1.0,rhly(i,k)))
149 if (plyr(i,k) > 600.0 .and. (.not.inversn(i)))
then
150 tem1 = tlyr(i,k-1) - tlyr(i,k)
152 if (tem1 > 0.1 .and. tlyr(i,k) > 278.0)
then
164 clwt = 1.0e-6 * (plyr(i,k)*0.001)
167 if (clw(i,k) > clwt .or. &
168 (inversn(i) .and. k >= kinver(i)) )
then
170 onemrh= max( 1.e-10, 1.0-rhly(i,k) )
171 clwm = clwmin / max( 0.01, plyr(i,k)*0.001 )
173 tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0)
178 value = max( min( tem1*(clw(i,k)-clwm), 50.0 ), 0.0 )
179 tem2 = sqrt( sqrt(rhly(i,k)) )
181 cldtot(i,k) = max( tem2*(1.0-exp(-
value)), 0.0 )
196 if (plyr(i,k) > 600.0 .and. (.not.inversn(i)))
then
197 tem1 = tlyr(i,k+1) - tlyr(i,k)
199 if (tem1 > 0.1 .and. tlyr(i,k) > 278.0)
then
211 clwt = 1.0e-6 * (plyr(i,k)*0.001)
214 if (clw(i,k) > clwt .or. &
215 (inversn(i) .and. k <= kinver(i)) )
then
217 onemrh= max( 1.e-10, 1.0-rhly(i,k) )
218 clwm = clwmin / max( 0.01, plyr(i,k)*0.001 )
220 tem1 = min(max(sqrt(sqrt(onemrh*qstl(i,k))),0.0001),1.0)
225 value = max( min( tem1*(clw(i,k)-clwm), 50.0 ), 0.0 )
226 tem2 = sqrt( sqrt(rhly(i,k)) )
228 cldtot(i,k) = max( tem2*(1.0-exp(-
value)), 0.0 )
235 where (cldtot < climit)
241 end subroutine progcld1