@@ -333,10 +333,17 @@ SUBROUTINE COSP_DIAG_WARMRAIN( Npoints, Ncolumns, Nlevels, & !! in
333333 real (wp), dimension (Npoints,Ncolumns,Nlevels) :: icod ! ! in-cloud optical depth (ICOD)
334334 logical :: octop, ocbtm, oslwc
335335 integer , dimension (Npoints,Ncolumns,Nlevels) :: fracout_int ! ! fracout (decimal to integer)
336- ! fracout_int(:,:,:) = NINT( fracout(:,:,:) ) !! assign an integer subpixcel ID (0=clear-sky; 1=St; 2=Cu)
336+ ! integer, dimension(Npoints,Ncolumns,Nlevels) :: fracout_int2 !! fracout (decimal to integer)
337+ fracout_int(:,:,:) = NINT ( fracout(:,:,:) ) ! ! assign an integer subpixcel ID (0=clear-sky; 1=St; 2=Cu)
338+ print * , " fracout(5:10,5:10,5:10):" , fracout(5 :10 ,5 :10 ,5 :10 )
339+ print * , " fracout_int(5:10,5:10,5:10):" , fracout_int(5 :10 ,5 :10 ,5 :10 )
337340 fracout_int(:,:,:) = 0
338- where (fracout(:,:,:) .eq. 1._wp ) fracout_int(:,:,:) = 1
339- where (fracout(:,:,:) .eq. 2._wp ) fracout_int(:,:,:) = 2
341+ where ((fracout(:,:,:) .ge. 0.5_wp ) .and. (fracout(:,:,:) .lt. 1.5_wp )) fracout_int(:,:,:) = 1
342+ where ((fracout(:,:,:) .ge. 1.5_wp ) .and. (fracout(:,:,:) .lt. 2.5_wp )) fracout_int(:,:,:) = 2
343+ ! where (fracout(:,:,:) .eq. 1._wp) fracout_int2(:,:,:) = 1
344+ ! where (fracout(:,:,:) .eq. 2._wp) fracout_int2(:,:,:) = 2
345+ ! print *, "fracout_int2(5:10,5:10,5:10):", fracout_int2(5:10,5:10,5:10)
346+ ! where (fracout /= fracout2) print *, fracout
340347 ! ! initialize
341348 do i = 1 , Npoints
342349 if ( lwp(i) .eq. R_UNDEF ) then ! for non-sunlit columns
0 commit comments