35 & dist_model_layertops,
60 REAL zfull(npoints,nlev)
66 REAL dtau_s(npoints,nlev)
70 REAL dtau_c(npoints,nlev)
74 REAL frac_out(npoints,
ncol,nlev)
80 REAL fq_misr_tau_v_cth(npoints,7,n_misr_cth)
81 REAL dist_model_layertops(npoints,n_misr_cth)
82 REAL misr_cldarea(npoints)
83 REAL misr_mean_ztop(npoints)
93 INTEGER j,ilev,ilev2,ibox
96 LOGICAL box_cloudy(npoints,
ncol)
101 REAL box_misr_ztop(npoints,
ncol)
103 integer thres_crossed_misr
104 integer loop,imisr_ztop
106 real dtau, cloud_dtau, misr_penetration_height,ztest
108 real misr_cth_boundaries(n_misr_cth+1)
110 DATA misr_cth_boundaries / -99, 0, 0.5, 1, 1.5, 2, 2.5, 3,
111 c 4, 5, 7, 9, 11, 13, 15, 17, 99 /
113 DATA isccp_taumin / 0.3 /
115 tauchk = -1.*log(0.9999999)
125 dist_model_layertops(
j,:)=0
130 if(ilev.eq.1 .or. ilev.eq.nlev)
then
133 ztest=0.5*(zfull(
j,ilev)+zfull(
j,ilev-1))
142 & 1000*misr_cth_boundaries(loop+1) )
then
148 dist_model_layertops(
j,imisr_ztop)=
149 & dist_model_layertops(
j,imisr_ztop)+1
160 box_cloudy(
j,ibox)=.
false.
161 box_misr_ztop(
j,ibox)=0
164 thres_crossed_misr=0;
170 if (frac_out(
j,ibox,ilev).eq.1)
then
171 dtau = dtau_s(
j,ilev)
174 if (frac_out(
j,ibox,ilev).eq.2)
then
175 dtau = dtau_c(
j,ilev)
183 if(thres_crossed_misr .eq. 0 .and. dtau .gt. 0.)
then
190 if( thres_crossed_misr .lt. 99 .and.
191 & thres_crossed_misr .gt. 0 )
then
193 if( dtau .eq. 0.)
then
202 cloud_dtau=cloud_dtau+dtau
209 if( dtau.gt.0 .and. (cloud_dtau-dtau) .lt. 1)
then
211 if(dtau .lt. 1 .or. ilev.eq.1 .or. ilev.eq.nlev)
then
215 misr_penetration_height=zfull(
j,ilev)
219 misr_penetration_height=
220 & 0.5*(zfull(
j,ilev)+zfull(
j,ilev-1)) -
221 & 0.5*(zfull(
j,ilev-1)-zfull(
j,ilev+1))
225 box_misr_ztop(
j,ibox)=misr_penetration_height
230 if(dtau .gt. 1 .and. at(
j,ilev).gt.273 )
then
234 thres_crossed_misr=99
239 if(
tau(
j,ibox) .gt. 5)
then
241 thres_crossed_misr=99
251 if( thres_crossed_misr .eq. 1)
then
257 if(
tau(
j,ibox) .gt. 0.5)
then
261 elseif(
tau(
j,ibox) .gt. 0.2)
then
264 box_misr_ztop(
j,ibox)=-1
269 box_misr_ztop(
j,ibox)=0
296 if(box_misr_ztop(
j-1,1).gt.0 .and.
297 & box_misr_ztop(
j+1,1).gt.0 )
then
299 if( abs( box_misr_ztop(
j-1,1) -
300 & box_misr_ztop(
j+1,1) ) .lt. 500
302 & box_misr_ztop(
j,1) .lt.
303 & box_misr_ztop(
j+1,1) )
then
306 & box_misr_ztop(
j+1,1)
316 if(box_misr_ztop(1,ibox-1).gt.0 .and.
317 & box_misr_ztop(1,ibox+1).gt.0 )
then
319 if( abs( box_misr_ztop(1,ibox-1) -
320 & box_misr_ztop(1,ibox+1) ) .lt. 500
322 & box_misr_ztop(1,ibox) .lt.
323 & box_misr_ztop(1,ibox+1) )
then
325 box_misr_ztop(1,ibox) =
326 & box_misr_ztop(1,ibox+1)
339 boxarea=1./
real(ncol)
344 do ilev2=1,n_misr_cth
345 fq_misr_tau_v_cth(
j,ilev,ilev2)=0.
354 if (
tau(
j,ibox) .gt. (tauchk))
then
355 box_cloudy(
j,ibox)=.true.
360 if (box_cloudy(
j,ibox))
then
363 if (
tau(
j,ibox) .lt. isccp_taumin)
then
365 else if (
tau(
j,ibox) .ge. isccp_taumin
366 & .and.
tau(
j,ibox) .lt. 1.3)
then
368 else if (
tau(
j,ibox) .ge. 1.3
369 & .and.
tau(
j,ibox) .lt. 3.6)
then
371 else if (
tau(
j,ibox) .ge. 3.6
372 & .and.
tau(
j,ibox) .lt. 9.4)
then
374 else if (
tau(
j,ibox) .ge. 9.4
375 & .and.
tau(
j,ibox) .lt. 23.)
then
377 else if (
tau(
j,ibox) .ge. 23.
378 & .and.
tau(
j,ibox) .lt. 60.)
then
380 else if (
tau(
j,ibox) .ge. 60.)
then
390 if( box_misr_ztop(
j,ibox).eq.0)
then
395 elseif( box_misr_ztop(
j,ibox).eq.-1)
then
400 fq_misr_tau_v_cth(
j,itau,imisr_ztop)=
401 & fq_misr_tau_v_cth(
j,itau,imisr_ztop) + boxarea
413 if ( box_misr_ztop(
j,ibox) .gt.
414 & 1000*misr_cth_boundaries(loop+1) )
then
421 if(box_cloudy(
j,ibox))
then
424 fq_misr_tau_v_cth(
j,itau,imisr_ztop)=
425 & fq_misr_tau_v_cth(
j,itau,imisr_ztop) + boxarea
442 misr_mean_ztop(
j)=misr_mean_ztop(
j)+
443 & box_misr_ztop(
j,ibox)*boxarea
445 misr_cldarea(
j)=misr_cldarea(
j) + boxarea
453 if( misr_cldarea(
j) .gt. 0.)
then
454 misr_mean_ztop(
j)= misr_mean_ztop(
j) / misr_cldarea(
j)