Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/MISR_simulator.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/MISR_simulator.F90	(revision 5160)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/MISR_simulator.F90	(revision 5185)
@@ -110,5 +110,5 @@
           DO ilev=1,nlev
              ! If there a cloud, start the counter and store this height
-             if(thres_crossed_MISR .eq. 0 .and. dtau(j,ibox,ilev) .gt. 0.) then
+             if(thres_crossed_MISR .eq. 0 .AND. dtau(j,ibox,ilev) .gt. 0.) then
                 ! First encountered a "cloud"
                 thres_crossed_MISR = 1  
@@ -116,5 +116,5 @@
              endif
 
-             if( thres_crossed_MISR .lt. 99 .and. thres_crossed_MISR .gt. 0 ) then
+             if( thres_crossed_MISR .lt. 99 .AND. thres_crossed_MISR .gt. 0 ) then
                 if( dtau(j,ibox,ilev) .eq. 0.) then
                    ! We have come to the end of the current cloud layer without yet 
@@ -129,5 +129,5 @@
                 ! current layer cloud top to the current level then MISR will like 
                 ! see a top below the top of the current layer.
-                if( dtau(j,ibox,ilev).gt.0 .and. (cloud_dtau-dtau(j,ibox,ilev)) .lt. 1) then
+                if( dtau(j,ibox,ilev).gt.0 .AND. (cloud_dtau-dtau(j,ibox,ilev)) .lt. 1) then
                    if(dtau(j,ibox,ilev) .lt. 1 .or. ilev.eq.1 .or. ilev.eq.nlev) then
                       ! MISR will likely penetrate to some point within this layer ... the middle
@@ -142,5 +142,5 @@
                 
                 ! Check for a distinctive water layer
-                if(dtau(j,ibox,ilev) .gt. 1 .and. at(j,ilev) .gt. 273 ) then
+                if(dtau(j,ibox,ilev) .gt. 1 .AND. at(j,ilev) .gt. 273 ) then
                    ! Must be a water cloud, take this as CTH level
                    thres_crossed_MISR=99
@@ -191,7 +191,7 @@
 !       ! Adjust based on neightboring points.
 !       do j=2,npoints-1   
-!          if(box_MISR_ztop(j-1,1) .gt. 0                             .and. &
-!             box_MISR_ztop(j+1,1) .gt. 0                             .and. &
-!             abs(box_MISR_ztop(j-1,1)-box_MISR_ztop(j+1,1)) .lt. 500 .and. &
+!          if(box_MISR_ztop(j-1,1) .gt. 0                             .AND. &
+!             box_MISR_ztop(j+1,1) .gt. 0                             .AND. &
+!             abs(box_MISR_ztop(j-1,1)-box_MISR_ztop(j+1,1)) .lt. 500 .AND. &
 !             box_MISR_ztop(j,1) .lt. box_MISR_ztop(j+1,1)) then
 !             box_MISR_ztop(j,1) = box_MISR_ztop(j+1,1)    
@@ -202,7 +202,7 @@
 !       do j=1,npoints
 !          do ibox=2,ncol-1  
-!                 if(box_MISR_ztop(j,ibox-1) .gt. 0                                .and. &
-!                 box_MISR_ztop(j,ibox+1) .gt. 0                                .and. &
-!                 abs(box_MISR_ztop(j,ibox-1)-box_MISR_ztop(j,ibox+1)) .lt. 500 .and. &
+!                 if(box_MISR_ztop(j,ibox-1) .gt. 0                                .AND. &
+!                 box_MISR_ztop(j,ibox+1) .gt. 0                                .AND. &
+!                 abs(box_MISR_ztop(j,ibox-1)-box_MISR_ztop(j,ibox+1)) .lt. 500 .AND. &
 !                 box_MISR_ztop(j,ibox) .lt. box_MISR_ztop(j,ibox+1)) then
 !                 box_MISR_ztop(j,ibox) = box_MISR_ztop(j,ibox+1)    
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp.F90	(revision 5160)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp.F90	(revision 5185)
@@ -381,5 +381,5 @@
     ! 1) Determine if using full inputs or subset
     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-    if (present(start_idx) .and. present(stop_idx)) then
+    if (present(start_idx) .AND. present(stop_idx)) then
        ij=start_idx
        ik=stop_idx
@@ -932,5 +932,5 @@
 
        ! Check if there is any value slightly greater than 1
-       where ((cospOUT%isccp_totalcldarea > 1.0-1.e-5) .and.                             &
+       where ((cospOUT%isccp_totalcldarea > 1.0-1.e-5) .AND.                             &
               (cospOUT%isccp_totalcldarea < 1.0+1.e-5))
               cospOUT%isccp_totalcldarea = 1.0
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_optics.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_optics.F90	(revision 5160)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_optics.F90	(revision 5185)
@@ -306,9 +306,9 @@
     ! Do we need to generate optical inputs for Parasol simulator?
     lparasol = .false.
-    if (present(tautot_S_liq) .and. present(tautot_S_ice)) lparasol = .true.
+    if (present(tautot_S_liq) .AND. present(tautot_S_ice)) lparasol = .true.
     
     ! Are optical-depths and backscatter coefficients for ice and liquid requested?
     lphaseoptics=.false.
-    if (present(betatot_ice) .and. present(betatot_liq) .and. present(tautot_liq) .and. &
+    if (present(betatot_ice) .AND. present(betatot_liq) .AND. present(tautot_liq) .AND. &
          present(tautot_ice)) lphaseoptics=.true.
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_stats.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_stats.F90	(revision 5160)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_stats.F90	(revision 5185)
@@ -217,5 +217,5 @@
           DO j=1,Nlevels
              sc_ratio = beta_tot(pr,i,j)/beta_mol(pr,j)
-             if ((sc_ratio .le. s_att) .and. (flag_sat .eq. 0)) flag_sat = j
+             if ((sc_ratio .le. s_att) .AND. (flag_sat .eq. 0)) flag_sat = j
              if (Ze_tot(pr,i,j) .lt. -30.) then  !radar can't detect cloud
                 if ( (sc_ratio .gt. s_cld) .or. (flag_sat .eq. j) ) then  !lidar sense cloud
@@ -267,5 +267,5 @@
     
     DO ij=2,Nbins+1
-       hist1D(ij-1) = count(var .ge. bins(ij-1) .and. var .lt. bins(ij))
+       hist1D(ij-1) = count(var .ge. bins(ij-1) .AND. var .lt. bins(ij))
        if (count(var .eq. R_GROUND) .ge. 1) hist1D(ij-1)=R_UNDEF
     enddo
@@ -300,6 +300,6 @@
     DO ij=2,nbin1+1
        DO ik=2,nbin2+1
-          jointHist(ij-1,ik-1)=count(var1 .ge. bin1(ij-1) .and. var1 .lt. bin1(ij) .and. &
-               var2 .ge. bin2(ik-1) .and. var2 .lt. bin2(ik))        
+          jointHist(ij-1,ik-1)=count(var1 .ge. bin1(ij-1) .AND. var1 .lt. bin1(ij) .AND. &
+               var2 .ge. bin2(ik-1) .AND. var2 .lt. bin2(ik))
        enddo
     enddo
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_utils.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_utils.F90	(revision 5160)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/cosp_utils.F90	(revision 5185)
@@ -85,6 +85,6 @@
                         mxratio(i,j,k)=mxratio(i,j,k)/rho
                         ! Compute effective radius
-!                        if ((reff(i,j,k) <= 0._wp).and.(flux(i,k) /= 0._wp)) then
-                         if ((reff(i,j,k) <= 0._wp).and.(flux(i,k) > seuil)) then
+!                        if ((reff(i,j,k) <= 0._wp).AND.(flux(i,k) /= 0._wp)) then
+                         if ((reff(i,j,k) <= 0._wp).AND.(flux(i,k) > seuil)) then
                            lambda_x = (a_x*c_x*((rho0/rho)**g_x)*n_ax*gamma1/flux(i,k))**(1._wp/delta)
                            reff(i,j,k) = gamma_4_3_2/lambda_x
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/icarus.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/icarus.F90	(revision 5160)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/icarus.F90	(revision 5185)
@@ -232,6 +232,6 @@
 
        DO ilev=1,nlev
-          where(pfull(1:npoints,ilev) .lt. 40000. .and. &
-                pfull(1:npoints,ilev) .gt.  5000. .and. &
+          where(pfull(1:npoints,ilev) .lt. 40000. .AND. &
+                pfull(1:npoints,ilev) .gt.  5000. .AND. &
                 at(1:npoints,ilev)    .lt. attropmin(1:npoints))
              ptrop(1:npoints)     = pfull(1:npoints,ilev)
@@ -244,5 +244,5 @@
        DO ilev=1,nlev
           atmax(1:npoints) = merge(at(1:npoints,ilev),atmax(1:npoints),&
-               at(1:npoints,ilev) .gt. atmax(1:npoints) .and. ilev  .ge. itrop(1:npoints))
+               at(1:npoints,ilev) .gt. atmax(1:npoints) .AND. ilev  .ge. itrop(1:npoints))
        enddo
     end if
@@ -350,5 +350,5 @@
           if (isccp_top_height .eq. 1) then
              DO j=1,npoints
-                if (transmax(j) .gt. 0.001 .and.  transmax(j) .le. 0.9999999) then
+                if (transmax(j) .gt. 0.001 .AND.  transmax(j) .le. 0.9999999) then
                    fluxtopinit(j) = fluxtop(j,ibox)
                    tauir(j) = tau(j,ibox)/2.13_wp
@@ -358,5 +358,5 @@
                 DO j=1,npoints
                    if (tau(j,ibox) .gt. (tauchk)) then 
-                      if (transmax(j) .gt. 0.001 .and.  transmax(j) .le. 0.9999999) then
+                      if (transmax(j) .gt. 0.001 .AND.  transmax(j) .le. 0.9999999) then
                          emcld(j,ibox) = 1._wp - exp(-1._wp * tauir(j)  )
                          fluxtop(j,ibox) = fluxtopinit(j) - ((1.-emcld(j,ibox))*fluxtop_clrsky(j))
@@ -375,5 +375,5 @@
           where(tau(1:npoints,ibox) .gt. tauchk)
              tb(1:npoints,ibox)= 1307.27_wp/ (log(1. + (1._wp/fluxtop(1:npoints,ibox))))
-             where (isccp_top_height .eq. 1 .and. tauir(1:npoints) .lt. taumin(1:npoints))
+             where (isccp_top_height .eq. 1 .AND. tauir(1:npoints) .lt. taumin(1:npoints))
                 tb(1:npoints,ibox) = attrop(1:npoints) - 5._wp 
                 tau(1:npoints,ibox) = 2.13_wp*taumin(1:npoints)
@@ -406,8 +406,8 @@
              ilev = merge(nlev-k1,k1,isccp_top_height_direction .eq. 2)        
              DO j=1,npoints
-                if (ilev           .ge. itrop(j)     .and. &
-                     ((at(j,ilev)  .ge. tb(j,ibox)   .and. &  
+                if (ilev           .ge. itrop(j)     .AND. &
+                     ((at(j,ilev)  .ge. tb(j,ibox)   .AND. &
                       at(j,ilev+1) .le. tb(j,ibox))  .or.  &
-                      (at(j,ilev)  .le. tb(j,ibox)   .and. &
+                      (at(j,ilev)  .le. tb(j,ibox)   .AND. &
                       at(j,ilev+1) .ge. tb(j,ibox)))) then 
                    nmatch(j)=nmatch(j)+1
@@ -441,5 +441,5 @@
           ptop(1:npoints,ibox)=0.
           DO ilev=1,nlev
-             where((ptop(1:npoints,ibox) .eq. 0. ) .and.(frac_out(1:npoints,ibox,ilev) .ne. 0))
+             where((ptop(1:npoints,ibox) .eq. 0. ) .AND.(frac_out(1:npoints,ibox,ilev) .ne. 0))
                 ptop(1:npoints,ibox)=phalf(1:npoints,ilev)
                 levmatch(1:npoints,ibox)=ilev
@@ -460,5 +460,5 @@
     DO ibox=1,ncol
        DO j=1,npoints
-          if (tau(j,ibox) .gt. (tauchk) .and. ptop(j,ibox) .gt. 0.) then
+          if (tau(j,ibox) .gt. (tauchk) .AND. ptop(j,ibox) .gt. 0.) then
              if (sunlit(j).eq.1 .or. isccp_top_height .eq. 3) then
                 boxtau(j,ibox) = tau(j,ibox)
@@ -561,5 +561,5 @@
     DO j=1,npoints
        ! Subcolumns that are cloudy(true) and not(false)
-       box_cloudy2(1:ncol) = merge(.true.,.false.,boxtau(j,1:ncol) .gt. tauchk .and. boxptop(j,1:ncol) .gt. 0.)
+       box_cloudy2(1:ncol) = merge(.true.,.false.,boxtau(j,1:ncol) .gt. tauchk .AND. boxptop(j,1:ncol) .gt. 0.)
 
        ! Compute joint histogram and column quantities for points that are sunlit and cloudy
@@ -572,10 +572,10 @@
           
           ! Column cloud area
-          totalcldarea(j) = real(count(box_cloudy2(1:ncol) .and. boxtau(j,1:ncol) .gt. isccp_taumin))/ncol
+          totalcldarea(j) = real(count(box_cloudy2(1:ncol) .AND. boxtau(j,1:ncol) .gt. isccp_taumin))/ncol
              
           ! Subcolumn cloud albedo
           !albedocld(j,1:ncol) = merge((boxtau(j,1:ncol)**0.895_wp)/((boxtau(j,1:ncol)**0.895_wp)+6.82_wp),&
-          !     0._wp,box_cloudy2(1:ncol) .and. boxtau(j,1:ncol) .gt. isccp_taumin)
-          where(box_cloudy2(1:ncol) .and. boxtau(j,1:ncol) .gt. isccp_taumin)
+          !     0._wp,box_cloudy2(1:ncol) .AND. boxtau(j,1:ncol) .gt. isccp_taumin)
+          where(box_cloudy2(1:ncol) .AND. boxtau(j,1:ncol) .gt. isccp_taumin)
              albedocld(j,1:ncol) = (boxtau(j,1:ncol)**0.895_wp)/((boxtau(j,1:ncol)**0.895_wp)+6.82_wp)
           elsewhere
@@ -587,5 +587,5 @@
           
           ! Column cloud top pressure
-          meanptop(j) = sum(boxptop(j,1:ncol),box_cloudy2(1:ncol) .and. boxtau(j,1:ncol) .gt. isccp_taumin)/ncol
+          meanptop(j) = sum(boxptop(j,1:ncol),box_cloudy2(1:ncol) .AND. boxtau(j,1:ncol) .gt. isccp_taumin)/ncol
        endif
     enddo
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lidar_simulator.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lidar_simulator.F90	(revision 5160)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lidar_simulator.F90	(revision 5185)
@@ -152,5 +152,5 @@
     ! Phase optics?
     lphaseoptics=.false.
-    if (present(betatot_ice) .and. present(betatot_liq) .and. present(tautot_liq) .and. &
+    if (present(betatot_ice) .AND. present(betatot_liq) .AND. present(tautot_liq) .AND. &
          present(tautot_ice)) lphaseoptics=.true.
     
@@ -400,5 +400,5 @@
        DO ic = 1, ncol
           pnorm_c = pnormFlip(:,ic,:)
-          where ((pnorm_c .lt. xmax) .and. (betamolFlip(:,1,:) .lt. xmax) .and.          &
+          where ((pnorm_c .lt. xmax) .AND. (betamolFlip(:,1,:) .lt. xmax) .AND.          &
                 (betamolFlip(:,1,:) .gt. 0.0 ))
              x3d_c = pnorm_c/betamolFlip(:,1,:)
@@ -429,5 +429,5 @@
        DO ic = 1, ncol
           pnorm_c = pnorm(:,ic,:)
-          where ((pnorm_c.lt.xmax) .and. (pmol.lt.xmax) .and. (pmol.gt. 0.0 ))
+          where ((pnorm_c.lt.xmax) .AND. (pmol.lt.xmax) .AND. (pmol.gt. 0.0 ))
              x3d_c = pnorm_c/pmol
           elsewhere
@@ -650,5 +650,5 @@
     DO k=1,Nlevels
        ! Cloud detection at subgrid-scale:
-       where ((x(:,:,k) .gt. S_cld) .and. (x(:,:,k) .ne. undef) )
+       where ((x(:,:,k) .gt. S_cld) .AND. (x(:,:,k) .ne. undef) )
           cldy(:,:,k)=1._wp
        elsewhere
@@ -657,5 +657,5 @@
        
        ! Number of usefull sub-columns:
-       where ((x(:,:,k) .gt. S_att) .and. (x(:,:,k) .ne. undef) )
+       where ((x(:,:,k) .gt. S_att) .AND. (x(:,:,k) .ne. undef) )
           srok(:,:,k)=1._wp
        elsewhere
@@ -679,5 +679,5 @@
              if(srok(ip,ic,k).gt.0.)then
                 DO itemp=1,Ntemp
-                   if( (tmp(ip,k).ge.tempmod(itemp)).and.(tmp(ip,k).lt.tempmod(itemp+1)) )then
+                   if( (tmp(ip,k).ge.tempmod(itemp)).AND.(tmp(ip,k).lt.tempmod(itemp+1)) )then
                       lidarcldtempind(ip,itemp)=lidarcldtempind(ip,itemp)+1._wp
                    endif
@@ -687,5 +687,5 @@
              if(cldy(ip,ic,k).eq.1.)then
                 DO itemp=1,Ntemp
-                   if( (tmp(ip,k) .ge. tempmod(itemp)).and.(tmp(ip,k) .lt. tempmod(itemp+1)) )then
+                   if( (tmp(ip,k) .ge. tempmod(itemp)).AND.(tmp(ip,k) .lt. tempmod(itemp+1)) )then
                       lidarcldtemp(ip,itemp,1)=lidarcldtemp(ip,itemp,1)+1._wp
                    endif
@@ -695,7 +695,7 @@
              iz=1
              p1 = pplay(ip,k)
-             if ( p1.gt.0. .and. p1.lt.(440._wp*100._wp)) then ! high clouds
+             if ( p1.gt.0. .AND. p1.lt.(440._wp*100._wp)) then ! high clouds
                 iz=3
-             else if(p1.ge.(440._wp*100._wp) .and. p1.lt.(680._wp*100._wp)) then ! mid clouds
+             else if(p1.ge.(440._wp*100._wp) .AND. p1.lt.(680._wp*100._wp)) then ! mid clouds
                 iz=2
              endif
@@ -748,5 +748,5 @@
 
              ! Avoid zero values
-             if( (cldy(i,ncol,nlev).eq.1.) .and. (ATBperp(i,ncol,nlev).gt.0.) )then
+             if( (cldy(i,ncol,nlev).eq.1.) .AND. (ATBperp(i,ncol,nlev).gt.0.) )then
                 ! Computation of the ATBperp along the phase discrimination line
                 ATBperp_tmp = (ATB(i,ncol,nlev)**5)*alpha50 + (ATB(i,ncol,nlev)**4)*beta50 + &
@@ -767,7 +767,7 @@
                                                                               ! to classify the phase cloud
                       cldlayphase(i,ncol,4,2) = 1. ! tot cloud
-                      if (p1 .gt. 0. .and. p1.lt.(440._wp*100._wp)) then ! high cloud
+                      if (p1 .gt. 0. .AND. p1.lt.(440._wp*100._wp)) then ! high cloud
                          cldlayphase(i,ncol,3,2) = 1._wp
-                      else if(p1 .ge. (440._wp*100._wp) .and. p1 .lt. (680._wp*100._wp)) then ! mid cloud
+                      else if(p1 .ge. (440._wp*100._wp) .AND. p1 .lt. (680._wp*100._wp)) then ! mid cloud
                          cldlayphase(i,ncol,2,2) = 1._wp
                       else ! low cloud
@@ -776,8 +776,8 @@
                       cldlayphase(i,ncol,4,5) = 1._wp ! tot cloud
                       ! High cloud
-                      if (p1 .gt. 0. .and. p1 .lt. (440._wp*100._wp)) then 
+                      if (p1 .gt. 0. .AND. p1 .lt. (440._wp*100._wp)) then
                          cldlayphase(i,ncol,3,5) = 1._wp
                       ! Middle cloud
-                      else if(p1 .ge. (440._wp*100._wp) .and. p1 .lt. (680._wp*100._wp)) then
+                      else if(p1 .ge. (440._wp*100._wp) .AND. p1 .lt. (680._wp*100._wp)) then
                          cldlayphase(i,ncol,2,5) = 1._wp
                       ! Low cloud
@@ -791,8 +791,8 @@
                       cldlayphase(i,ncol,4,1) = 1._wp ! tot cloud 
                       ! High cloud
-                      if (p1 .gt. 0. .and. p1 .lt. (440._wp*100._wp)) then 
+                      if (p1 .gt. 0. .AND. p1 .lt. (440._wp*100._wp)) then
                          cldlayphase(i,ncol,3,1) = 1._wp
                       ! Middle cloud   
-                      else if(p1 .ge. (440._wp*100._wp) .and. p1 .lt. (680._wp*100._wp)) then 
+                      else if(p1 .ge. (440._wp*100._wp) .AND. p1 .lt. (680._wp*100._wp)) then
                          cldlayphase(i,ncol,2,1) = 1._wp
                       ! Low cloud
@@ -811,8 +811,8 @@
                       cldlayphase(i,ncol,4,2) = 1._wp ! tot cloud
                       ! High cloud
-                      if (p1 .gt. 0. .and. p1 .lt. (440._wp*100._wp)) then
+                      if (p1 .gt. 0. .AND. p1 .lt. (440._wp*100._wp)) then
                          cldlayphase(i,ncol,3,2) = 1._wp
                       ! Middle cloud   
-                      else if(p1 .ge. (440._wp*100._wp) .and. p1 .lt. (680._wp*100._wp)) then
+                      else if(p1 .ge. (440._wp*100._wp) .AND. p1 .lt. (680._wp*100._wp)) then
                          cldlayphase(i,ncol,2,2) = 1._wp
                       ! Low cloud   
@@ -827,8 +827,8 @@
                       cldlayphase(i,ncol,4,4) = 1._wp ! tot cloud
                       ! High cloud
-                      if (p1 .gt. 0. .and. p1 .lt. (440._wp*100._wp)) then
+                      if (p1 .gt. 0. .AND. p1 .lt. (440._wp*100._wp)) then
                          cldlayphase(i,ncol,3,4) = 1._wp
                       ! Middle cloud   
-                      else if(p1 .ge. (440._wp*100._wp) .and. p1 .lt. (680._wp*100._wp)) then
+                      else if(p1 .ge. (440._wp*100._wp) .AND. p1 .lt. (680._wp*100._wp)) then
                          cldlayphase(i,ncol,2,4) = 1._wp
                       ! Low cloud
@@ -838,8 +838,8 @@
                       cldlayphase(i,ncol,4,1) = 1._wp ! tot cloud
                       ! High cloud
-                      if (p1 .gt. 0. .and. p1 .lt. (440._wp*100._wp)) then
+                      if (p1 .gt. 0. .AND. p1 .lt. (440._wp*100._wp)) then
                          cldlayphase(i,ncol,3,1) = 1._wp
                       ! Middle cloud   
-                      else if(p1 .ge. (440._wp*100._wp) .and. p1 .lt. (680._wp*100._wp)) then
+                      else if(p1 .ge. (440._wp*100._wp) .AND. p1 .lt. (680._wp*100._wp)) then
                          cldlayphase(i,ncol,2,1) = 1._wp
                       ! Low cloud   
@@ -859,5 +859,5 @@
              p1 = pplay(i,nlev)
 
-             if((cldy(i,ncol,nlev) .eq. 1.) .and. (ATBperp(i,ncol,nlev) .gt. 0.) )then
+             if((cldy(i,ncol,nlev) .eq. 1.) .AND. (ATBperp(i,ncol,nlev) .gt. 0.) )then
                 ! Computation of the ATBperp of the phase discrimination line
                 ATBperp_tmp = (ATB(i,ncol,nlev)**5)*alpha50 + (ATB(i,ncol,nlev)**4)*beta50 + &
@@ -875,8 +875,8 @@
                       cldlayphase(i,ncol,4,2) = 1._wp ! tot cloud
                       ! High cloud
-                      if (p1 .gt. 0. .and. p1 .lt. (440._wp*100._wp)) then 
+                      if (p1 .gt. 0. .AND. p1 .lt. (440._wp*100._wp)) then
                          cldlayphase(i,ncol,3,2) = 1._wp
                       ! Middle cloud   
-                      else if(p1 .ge. (440._wp*100._wp) .and. p1 .lt. (680._wp*100._wp)) then 
+                      else if(p1 .ge. (440._wp*100._wp) .AND. p1 .lt. (680._wp*100._wp)) then
                          cldlayphase(i,ncol,2,2) = 1._wp
                       ! Low cloud
@@ -887,8 +887,8 @@
                       cldlayphase(i,ncol,4,5) = 1. ! tot cloud
                       ! High cloud
-                      if (p1 .gt. 0. .and. p1 .lt. (440._wp*100._wp)) then
+                      if (p1 .gt. 0. .AND. p1 .lt. (440._wp*100._wp)) then
                          cldlayphase(i,ncol,3,5) = 1._wp
                       ! Middle cloud   
-                      else if(p1 .ge. (440._wp*100._wp) .and. p1 .lt. (680._wp*100._wp)) then
+                      else if(p1 .ge. (440._wp*100._wp) .AND. p1 .lt. (680._wp*100._wp)) then
                          cldlayphase(i,ncol,2,5) = 1._wp
                       ! Low cloud   
@@ -902,8 +902,8 @@
                       cldlayphase(i,ncol,4,1) = 1._wp ! tot cloud
                       ! High cloud
-                      if (p1 .gt. 0. .and. p1 .lt. (440._wp*100._wp)) then
+                      if (p1 .gt. 0. .AND. p1 .lt. (440._wp*100._wp)) then
                          cldlayphase(i,ncol,3,1) = 1._wp
                       ! Middle cloud   
-                      else if(p1 .ge. (440._wp*100._wp) .and. p1 .lt.(680._wp*100._wp)) then
+                      else if(p1 .ge. (440._wp*100._wp) .AND. p1 .lt.(680._wp*100._wp)) then
                          cldlayphase(i,ncol,2,1) = 1._wp
                       ! Low cloud   
@@ -923,8 +923,8 @@
                       cldlayphase(i,ncol,4,2) = 1._wp ! tot cloud
                       ! High cloud
-                      if (p1 .gt. 0. .and. p1 .lt. (440._wp*100._wp)) then
+                      if (p1 .gt. 0. .AND. p1 .lt. (440._wp*100._wp)) then
                          cldlayphase(i,ncol,3,2) = 1._wp
                       ! Middle cloud   
-                      else if(p1 .ge. (440._wp*100._wp) .and. p1 .lt. (680._wp*100._wp)) then
+                      else if(p1 .ge. (440._wp*100._wp) .AND. p1 .lt. (680._wp*100._wp)) then
                          cldlayphase(i,ncol,2,2) = 1._wp
                       ! Low cloud   
@@ -939,8 +939,8 @@
                       cldlayphase(i,ncol,4,4) = 1._wp ! tot cloud
                       ! High cloud
-                      if (p1 .gt. 0. .and. p1 .lt. (440._wp*100._wp)) then
+                      if (p1 .gt. 0. .AND. p1 .lt. (440._wp*100._wp)) then
                          cldlayphase(i,ncol,3,4) = 1._wp
                       ! Middle   
-                      else if(p1 .ge. (440._wp*100._wp) .and. p1 .lt. (680._wp*100._wp)) then
+                      else if(p1 .ge. (440._wp*100._wp) .AND. p1 .lt. (680._wp*100._wp)) then
                          cldlayphase(i,ncol,2,4) = 1._wp
                       ! Low cloud   
@@ -951,8 +951,8 @@
                       cldlayphase(i,ncol,4,1) = 1._wp ! tot cloud
                       ! High cloud
-                      if (p1 .gt. 0. .and. p1 .lt. (440._wp*100._wp)) then
+                      if (p1 .gt. 0. .AND. p1 .lt. (440._wp*100._wp)) then
                          cldlayphase(i,ncol,3,1) = 1._wp
                       ! Middle cloud   
-                      else if(p1 .ge. (440._wp*100._wp) .and. p1 .lt. (680._wp*100._wp)) then
+                      else if(p1 .ge. (440._wp*100._wp) .AND. p1 .lt. (680._wp*100._wp)) then
                          cldlayphase(i,ncol,2,1) = 1._wp
                       ! Low cloud   
@@ -986,8 +986,8 @@
                    cldlayphase(i,ncol,4,3) = 1._wp ! tot cloud
                    ! High cloud
-                   if (p1 .gt. 0. .and. p1 .lt. (440._wp*100._wp)) then
+                   if (p1 .gt. 0. .AND. p1 .lt. (440._wp*100._wp)) then
                       cldlayphase(i,ncol,3,3) = 1._wp
                    ! Middle cloud   
-                   else if(p1 .ge. (440._wp*100._wp) .and. p1 .lt. (680._wp*100._wp)) then
+                   else if(p1 .ge. (440._wp*100._wp) .AND. p1 .lt. (680._wp*100._wp)) then
                       cldlayphase(i,ncol,2,3) = 1._wp
                    ! Low cloud   
@@ -1087,13 +1087,13 @@
              DO itemp=1,Ntemp
                 if(tmpi(i,ncol,nlev).gt.0.)then
-                   if((tmpi(i,ncol,nlev) .ge. tempmod(itemp)) .and. (tmpi(i,ncol,nlev) .lt. tempmod(itemp+1)) )then
+                   if((tmpi(i,ncol,nlev) .ge. tempmod(itemp)) .AND. (tmpi(i,ncol,nlev) .lt. tempmod(itemp+1)) )then
                       lidarcldtemp(i,itemp,2)=lidarcldtemp(i,itemp,2)+1._wp
                    endif
                 elseif(tmpl(i,ncol,nlev) .gt. 0.)then
-                   if((tmpl(i,ncol,nlev) .ge. tempmod(itemp)) .and. (tmpl(i,ncol,nlev) .lt. tempmod(itemp+1)) )then
+                   if((tmpl(i,ncol,nlev) .ge. tempmod(itemp)) .AND. (tmpl(i,ncol,nlev) .lt. tempmod(itemp+1)) )then
                       lidarcldtemp(i,itemp,3)=lidarcldtemp(i,itemp,3)+1._wp
                    endif
                 elseif(tmpu(i,ncol,nlev) .gt. 0.)then
-                   if((tmpu(i,ncol,nlev) .ge. tempmod(itemp)) .and. (tmpu(i,ncol,nlev) .lt. tempmod(itemp+1)) )then
+                   if((tmpu(i,ncol,nlev) .ge. tempmod(itemp)) .AND. (tmpu(i,ncol,nlev) .lt. tempmod(itemp+1)) )then
                       lidarcldtemp(i,itemp,4)=lidarcldtemp(i,itemp,4)+1._wp
                    endif
@@ -1193,5 +1193,5 @@
     DO k=1,Nlevels
        ! Cloud detection at subgrid-scale:
-       where ((x(:,:,k) .gt. S_cld) .and. (x(:,:,k) .ne. undef) )
+       where ((x(:,:,k) .gt. S_cld) .AND. (x(:,:,k) .ne. undef) )
           cldy(:,:,k)=1._wp
        elsewhere
@@ -1200,5 +1200,5 @@
        
        ! Number of usefull sub-columns:
-       where ((x(:,:,k) .gt. S_att) .and. (x(:,:,k) .ne. undef) )
+       where ((x(:,:,k) .gt. S_att) .AND. (x(:,:,k) .ne. undef) )
           srok(:,:,k)=1._wp
        elsewhere
@@ -1216,7 +1216,7 @@
              iz=1
              p1 = pplay(ip,k)
-             if ( p1.gt.0. .and. p1.lt.(440._wp*100._wp)) then ! high clouds
+             if ( p1.gt.0. .AND. p1.lt.(440._wp*100._wp)) then ! high clouds
                 iz=3
-             else if(p1.ge.(440._wp*100._wp) .and. p1.lt.(680._wp*100._wp)) then ! mid clouds
+             else if(p1.ge.(440._wp*100._wp) .AND. p1.lt.(680._wp*100._wp)) then ! mid clouds
                 iz=2
              endif
@@ -1344,5 +1344,5 @@
     DO k=1,Nlevels
        ! Cloud detection at subgrid-scale:
-       where ( (x(:,:,k) .gt. S_cld) .and. (x(:,:,k) .ne. undef) )
+       where ( (x(:,:,k) .gt. S_cld) .AND. (x(:,:,k) .ne. undef) )
           cldy(:,:,k)=1._wp
        elsewhere
@@ -1350,5 +1350,5 @@
        endwhere
        ! Fully attenuated layer detection at subgrid-scale:
-       where ( (x(:,:,k) .lt. S_att_opaq) .and. (x(:,:,k) .ge. 0.) .and. (x(:,:,k) .ne. undef) ) !DEBUG
+       where ( (x(:,:,k) .lt. S_att_opaq) .AND. (x(:,:,k) .ge. 0.) .AND. (x(:,:,k) .ne. undef) ) !DEBUG
           cldyopaq(:,:,k)=1._wp
        elsewhere
@@ -1358,5 +1358,5 @@
 
        ! Number of usefull sub-column layers:
-       where ( (x(:,:,k) .gt. S_att) .and. (x(:,:,k) .ne. undef) )
+       where ( (x(:,:,k) .gt. S_att) .AND. (x(:,:,k) .ne. undef) )
           srok(:,:,k)=1._wp
        elsewhere
@@ -1364,5 +1364,5 @@
        endwhere
        ! Number of usefull sub-columns layers for z_opaque 3D fraction:
-       where ( (x(:,:,k) .ge. 0.) .and. (x(:,:,k) .ne. undef) ) !DEBUG
+       where ( (x(:,:,k) .ge. 0.) .AND. (x(:,:,k) .ne. undef) ) !DEBUG
           srokopaq(:,:,k)=1._wp
        elsewhere
@@ -1397,5 +1397,5 @@
 
      ! Declaring non-opaque cloudy profiles as thin cloud profiles
-       if ( cldlay(ip,ic,4).gt. 0. .and. cldlay(ip,ic,1) .eq. 0. ) then
+       if ( cldlay(ip,ic,4).gt. 0. .AND. cldlay(ip,ic,1) .eq. 0. ) then
           cldlay(ip,ic,2)  =  1._wp
         endif
@@ -1410,5 +1410,5 @@
      ! Declaring z_opaque altitude and opaque cloud fraction for 3D and 2D variables
      ! From SFC-2-TOA ( actually from vgrid_z(SFC+1) = vgrid_z(Nlevels-1) )
-             if ( cldy(ip,ic,Nlevels-k) .eq. 1. .and. zopac .eq. 0. ) then
+             if ( cldy(ip,ic,Nlevels-k) .eq. 1. .AND. zopac .eq. 0. ) then
             lidarcldtype(ip,Nlevels-k + 1,3) = lidarcldtype(ip,Nlevels-k + 1,3) + 1._wp
             cldlay(ip,ic,3)                  = vgrid_z(Nlevels-k+1)      ! z_opaque altitude
@@ -1442,9 +1442,9 @@
      ! Declaring thin cloud fraction for 3D variable
      ! From TOA-2-SFC
-                 if ( cldy(ip,ic,k) .eq. 1. .and. topcloud .eq. 1. ) then
+                 if ( cldy(ip,ic,k) .eq. 1. .AND. topcloud .eq. 1. ) then
                     lidarcldtype(ip,k,2) = lidarcldtype(ip,k,2) + 1._wp
             z_base = k ! bottom cloud layer
                  endif
-             if ( cldy(ip,ic,k) .eq. 1. .and. topcloud .eq. 0. ) then
+             if ( cldy(ip,ic,k) .eq. 1. .AND. topcloud .eq. 0. ) then
                     lidarcldtype(ip,k,2) = lidarcldtype(ip,k,2) + 1._wp
             z_top = k  ! top cloud layer
@@ -1458,5 +1458,5 @@
           cloudemis = 0._wp
                DO k=z_base+1,Nlevels
-             if (  (x(ip,ic,k) .gt. S_att_opaq) .and. (x(ip,ic,k) .lt. 1.0) .and. (x(ip,ic,k) .ne. undef)  ) then
+             if (  (x(ip,ic,k) .gt. S_att_opaq) .AND. (x(ip,ic,k) .lt. 1.0) .AND. (x(ip,ic,k) .ne. undef)  ) then
             srmean = srmean + x(ip,ic,k)
             srcount = srcount + 1.
@@ -1502,5 +1502,5 @@
     DO ip = 1, Npoints
          DO k = 2, Nlevels
-            if ( (lidarcldtype(ip,k,3) .ne. undef) .and. (lidarcldtype(ip,k-1,4) .ne. undef) ) then
+            if ( (lidarcldtype(ip,k,3) .ne. undef) .AND. (lidarcldtype(ip,k-1,4) .ne. undef) ) then
             lidarcldtype(ip,k,4) = lidarcldtype(ip,k,3) + lidarcldtype(ip,k-1,4)
         else
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_interface.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_interface.F90	(revision 5160)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_interface.F90	(revision 5185)
@@ -311,5 +311,5 @@
 
 !!! Ici on modifie les cles logiques pour les outputs selon les champs actives dans les .xml
-  if ((itap.ge.1).and.(first_write))then
+  if ((itap.ge.1).AND.(first_write))then
     IF (using_xios) call read_xiosfieldactive(cfg)
     first_write=.false.
@@ -344,5 +344,5 @@
     cfg%Lisccp, cfg%Lmisr, cfg%Lmodis, cfg%Lrttov
 
-  endif !(itap.gt.1).and.(first_write)
+  endif !(itap.gt.1).AND.(first_write)
 
   time_bnds(1) = dtime-dtime/2.
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_output_write_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_output_write_mod.F90	(revision 5160)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_output_write_mod.F90	(revision 5185)
@@ -389,5 +389,5 @@
 !    do k=1,PARASOL_NREFL
 !     do ip=1, Npoints
-!      if (stlidar%cldlayer(ip,4).gt.1.and.stlidar%parasolrefl(ip,k).ne.missing_val) then
+!      if (stlidar%cldlayer(ip,4).gt.1.AND.stlidar%parasolrefl(ip,k).ne.missing_val) then
 !        parasolcrefl(ip,k)=(stlidar%parasolrefl(ip,k)-0.03*(1.-stlidar%cldlayer(ip,4)/100.))/ &
 !                             (stlidar%cldlayer(ip,4)/100.)
@@ -470,5 +470,5 @@
 
 !!! Sorties combinees Cloudsat et Calipso
- if (cfg%Lcalipso .and. cfg%Lcloudsat) then
+ if (cfg%Lcalipso .AND. cfg%Lcloudsat) then
 
    if (cfg%Lclcalipso2) then
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_subsample_and_optics_mod.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_subsample_and_optics_mod.F90	(revision 5160)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/lmdz_cosp_subsample_and_optics_mod.F90	(revision 5185)
@@ -361,5 +361,5 @@
        DO i=1,nPoints
           DO j=1,nLevels
-             if (cospIN%rcfg_cloudsat%use_gas_abs == 1 .or. (cospIN%rcfg_cloudsat%use_gas_abs == 2 .and. j .eq. 1)) then
+             if (cospIN%rcfg_cloudsat%use_gas_abs == 1 .or. (cospIN%rcfg_cloudsat%use_gas_abs == 2 .AND. j .eq. 1)) then
                 g_vol(i,j) = gases(cospstateIN%pfull(i,j), cospstateIN%at(i,j),cospstateIN%qv(i,j),cospIN%rcfg_cloudsat%freq)
              endif
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/modis_simulator.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/modis_simulator.F90	(revision 5160)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/modis_simulator.F90	(revision 5185)
@@ -223,5 +223,5 @@
        end if
     end do
-    where((retrievedSize(1:nSubCols) < 0.).and.(retrievedSize(1:nSubCols) /= R_UNDEF)) &
+    where((retrievedSize(1:nSubCols) < 0.).AND.(retrievedSize(1:nSubCols) /= R_UNDEF)) &
          retrievedSize(1:nSubCols) = 1.0e-06_wp*re_fill
 
@@ -229,5 +229,5 @@
     ! mimics what MODIS does to first order. 
     ! Of course, ISCCP cloud top pressures are in mb.   
-    where(cloudMask(1:nSubCols) .and. retrievedCloudTopPressure(1:nSubCols) > CO2Slicing_PressureLimit) &
+    where(cloudMask(1:nSubCols) .AND. retrievedCloudTopPressure(1:nSubCols) > CO2Slicing_PressureLimit) &
          retrievedCloudTopPressure(1:nSubCols) = isccpCloudTopPressure! * 100._wp
     
@@ -297,9 +297,9 @@
     ! ########################################################################################
     validRetrievalMask(1:nPoints,1:nSubCols) = particle_size(1:nPoints,1:nSubCols) > 0.
-    cloudMask(1:nPoints,1:nSubCols) = phase(1:nPoints,1:nSubCols) /= phaseIsNone .and.       &
+    cloudMask(1:nPoints,1:nSubCols) = phase(1:nPoints,1:nSubCols) /= phaseIsNone .AND.       &
          validRetrievalMask(1:nPoints,1:nSubCols)
-    waterCloudMask(1:nPoints,1:nSubCols) = phase(1:nPoints,1:nSubCols) == phaseIsLiquid .and. &
+    waterCloudMask(1:nPoints,1:nSubCols) = phase(1:nPoints,1:nSubCols) == phaseIsLiquid .AND. &
          validRetrievalMask(1:nPoints,1:nSubCols)
-    iceCloudMask(1:nPoints,1:nSubCols)   = phase(1:nPoints,1:nSubCols) == phaseIsIce .and.    &
+    iceCloudMask(1:nPoints,1:nSubCols)   = phase(1:nPoints,1:nSubCols) == phaseIsIce .AND.    &
          validRetrievalMask(1:nPoints,1:nSubCols)
     
@@ -310,7 +310,7 @@
     Cloud_Fraction_Water_Mean(1:nPoints) = real(count(waterCloudMask, dim = 2))
     Cloud_Fraction_Ice_Mean(1:nPoints)   = real(count(iceCloudMask,   dim = 2))
-    Cloud_Fraction_High_Mean(1:nPoints)  = real(count(cloudMask .and. cloud_top_pressure <=          &
+    Cloud_Fraction_High_Mean(1:nPoints)  = real(count(cloudMask .AND. cloud_top_pressure <=          &
                                            highCloudPressureLimit, dim = 2)) 
-    Cloud_Fraction_Low_Mean(1:nPoints)   = real(count(cloudMask .and. cloud_top_pressure >           &
+    Cloud_Fraction_Low_Mean(1:nPoints)   = real(count(cloudMask .AND. cloud_top_pressure >           &
                                            lowCloudPressureLimit,  dim = 2)) 
     Cloud_Fraction_Mid_Mean(1:nPoints)   = Cloud_Fraction_Total_Mean(1:nPoints) - Cloud_Fraction_High_Mean(1:nPoints)&
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/parasol.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/parasol.F90	(revision 5160)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/parasol.F90	(revision 5185)
@@ -118,5 +118,5 @@
     DO it=1,PARASOL_NREFL
        DO ny=1,PARASOL_NTAU-1
-          WHERE (tautot_S(1:npoints) .ge. PARASOL_TAU(ny).and. &
+          WHERE (tautot_S(1:npoints) .ge. PARASOL_TAU(ny).AND. &
                  tautot_S(1:npoints) .le. PARASOL_TAU(ny+1))
              rlumA_mod(1:npoints,it) = aA(it,ny)*tautot_S(1:npoints) + bA(it,ny)
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/prec_scops.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/prec_scops.F90	(revision 5160)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/prec_scops.F90	(revision 5185)
@@ -200,5 +200,5 @@
           endif
         enddo ! loop over ncol
-        if ((flag_ls .eq. 0) .and. (ilev .lt. nlev)) then ! possibility THREE
+        if ((flag_ls .eq. 0) .AND. (ilev .lt. nlev)) then ! possibility THREE
         DO ibox=1,ncol
         if (frac_out(j,ibox,ilev+1) .eq. 1) then 
@@ -236,5 +236,5 @@
         endif
        enddo ! loop over ncol
-        if ((flag_cv .eq. 0) .and. (ilev .lt. nlev)) then ! possibility THREE
+        if ((flag_cv .eq. 0) .AND. (ilev .lt. nlev)) then ! possibility THREE
         DO ibox=1,ncol
         if (frac_out(j,ibox,ilev+1) .eq. 2) then 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/quickbeam.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/quickbeam.F90	(revision 5160)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/quickbeam.F90	(revision 5185)
@@ -179,5 +179,5 @@
           
           ! Attenuation due to gaseous absorption between radar and volume
-          if ((rcfg%use_gas_abs == 1) .or. (rcfg%use_gas_abs == 2 .and. pr .eq. 1)) then
+          if ((rcfg%use_gas_abs == 1) .or. (rcfg%use_gas_abs == 2 .AND. pr .eq. 1)) then
              if (d_gate==1) then
                 if (k>1) then
@@ -402,6 +402,6 @@
        DO pr=1,Ncolumns
           ! 1) Compute the PIA in all profiles containing hydrometeors
-          if ( (Ze_non_out(i,pr,cloudsat_preclvl).gt.-100) .and. (Ze_out(i,pr,cloudsat_preclvl).gt.-100) ) then
-             if ( (Ze_non_out(i,pr,cloudsat_preclvl).lt.100) .and. (Ze_out(i,pr,cloudsat_preclvl).lt.100) ) then
+          if ( (Ze_non_out(i,pr,cloudsat_preclvl).gt.-100) .AND. (Ze_out(i,pr,cloudsat_preclvl).gt.-100) ) then
+             if ( (Ze_non_out(i,pr,cloudsat_preclvl).lt.100) .AND. (Ze_out(i,pr,cloudsat_preclvl).lt.100) ) then
                 cloudsat_precip_pia(i,pr) = Ze_non_out(i,pr,cloudsat_preclvl) - Ze_out(i,pr,cloudsat_preclvl)
              endif
@@ -419,5 +419,5 @@
                    cloudsat_pflag(i,pr) = pClass_Snow2                   ! TSL: Snow certain
                 endif
-                if(Ze_non_out(i,pr,cloudsat_preclvl).gt.Zenonbinval(4).and. &
+                if(Ze_non_out(i,pr,cloudsat_preclvl).gt.Zenonbinval(4).AND. &
                      Ze_non_out(i,pr,cloudsat_preclvl).le.Zenonbinval(2)) then
                    cloudsat_pflag(i,pr) = pClass_Snow1                   ! TSL: Snow possible
@@ -426,9 +426,9 @@
              
              ! Mixed
-             if(fracPrecipIce(i,pr).gt.0.1.and.fracPrecipIce(i,pr).le.0.9) then
+             if(fracPrecipIce(i,pr).gt.0.1.AND.fracPrecipIce(i,pr).le.0.9) then
                 if(Ze_non_out(i,pr,cloudsat_preclvl).gt.Zenonbinval(2)) then
                    cloudsat_pflag(i,pr) = pClass_Mixed2                  ! TSL: Mixed certain
                 endif
-                if(Ze_non_out(i,pr,cloudsat_preclvl).gt.Zenonbinval(4).and. &
+                if(Ze_non_out(i,pr,cloudsat_preclvl).gt.Zenonbinval(4).AND. &
                      Ze_non_out(i,pr,cloudsat_preclvl).le.Zenonbinval(2)) then
                    cloudsat_pflag(i,pr) = pClass_Mixed1                  ! TSL: Mixed possible
@@ -441,9 +441,9 @@
                    cloudsat_pflag(i,pr) = pClass_Rain3                   ! TSL: Rain certain
                 endif
-                if(Ze_non_out(i,pr,cloudsat_preclvl).gt.Zenonbinval(3).and. &
+                if(Ze_non_out(i,pr,cloudsat_preclvl).gt.Zenonbinval(3).AND. &
                      Ze_non_out(i,pr,cloudsat_preclvl).le.Zenonbinval(1)) then
                    cloudsat_pflag(i,pr) = pClass_Rain2                   ! TSL: Rain probable
                 endif
-                if(Ze_non_out(i,pr,cloudsat_preclvl).gt.Zenonbinval(4).and. &
+                if(Ze_non_out(i,pr,cloudsat_preclvl).gt.Zenonbinval(4).AND. &
                      Ze_non_out(i,pr,cloudsat_preclvl).le.Zenonbinval(3)) then
                    cloudsat_pflag(i,pr) = pClass_Rain1                   ! TSL: Rain possible
@@ -472,5 +472,5 @@
                    cloudsat_pflag(i,pr) = pClass_Snow2                      ! JEK: Snow certain
                 endif
-                if(Ze_out(i,pr,cloudsat_preclvl) .gt. Zbinvallnd(6) .and. &
+                if(Ze_out(i,pr,cloudsat_preclvl) .gt. Zbinvallnd(6) .AND. &
                      Ze_out(i,pr,cloudsat_preclvl).le.Zbinvallnd(5)) then
                    cloudsat_pflag(i,pr) = pClass_Snow1                      ! JEK: Snow possible
@@ -479,11 +479,11 @@
              
              ! Mized phase (273<T<275)
-             if(t2m(i) .ge. 273._wp .and. t2m(i) .le. 275._wp) then
-                if ((Zmax .gt. Zbinvallnd(1) .and. cloudsat_precip_pia(i,pr).gt.30) .or. &
+             if(t2m(i) .ge. 273._wp .AND. t2m(i) .le. 275._wp) then
+                if ((Zmax .gt. Zbinvallnd(1) .AND. cloudsat_precip_pia(i,pr).gt.30) .or. &
                      (Ze_out(i,pr,cloudsat_preclvl) .gt. Zbinvallnd(4))) then
                    cloudsat_pflag(i,pr) = pClass_Mixed2                     ! JEK: Mixed certain
                 endif
-                if ((Ze_out(i,pr,cloudsat_preclvl) .gt. Zbinvallnd(6)  .and. &
-                     Ze_out(i,pr,cloudsat_preclvl) .le. Zbinvallnd(4)) .and. &
+                if ((Ze_out(i,pr,cloudsat_preclvl) .gt. Zbinvallnd(6)  .AND. &
+                     Ze_out(i,pr,cloudsat_preclvl) .le. Zbinvallnd(4)) .AND. &
                      (Zmax .gt. Zbinvallnd(5)) ) then
                    cloudsat_pflag(i,pr) = pClass_Mixed1                     ! JEK: Mixed possible
@@ -493,13 +493,13 @@
              ! Rain (T>275)
              if(t2m(i) .gt. 275) then
-                if ((Zmax .gt. Zbinvallnd(1) .and. cloudsat_precip_pia(i,pr).gt.30) .or. &
+                if ((Zmax .gt. Zbinvallnd(1) .AND. cloudsat_precip_pia(i,pr).gt.30) .or. &
                      (Ze_out(i,pr,cloudsat_preclvl) .gt. Zbinvallnd(2))) then
                    cloudsat_pflag(i,pr) = pClass_Rain3                      ! JEK: Rain certain
                 endif
-                if((Ze_out(i,pr,cloudsat_preclvl) .gt. Zbinvallnd(6)) .and. &
+                if((Ze_out(i,pr,cloudsat_preclvl) .gt. Zbinvallnd(6)) .AND. &
                      (Zmax .gt. Zbinvallnd(3))) then
                    cloudsat_pflag(i,pr) = pClass_Rain2                      ! JEK: Rain probable
                 endif
-                if((Ze_out(i,pr,cloudsat_preclvl) .gt. Zbinvallnd(6)) .and. &
+                if((Ze_out(i,pr,cloudsat_preclvl) .gt. Zbinvallnd(6)) .AND. &
                      (Zmax.lt.Zbinvallnd(3))) then
                    cloudsat_pflag(i,pr) = pClass_Rain1                      ! JEK: Rain possible
@@ -536,7 +536,7 @@
   
     ! Normalize by number of subcolumns
-    where ((cloudsat_precip_cover /= R_UNDEF).and.(cloudsat_precip_cover /= 0.0)) &
+    where ((cloudsat_precip_cover /= R_UNDEF).AND.(cloudsat_precip_cover /= 0.0)) &
          cloudsat_precip_cover = cloudsat_precip_cover / Ncolumns
-    where ((cloudsat_pia/= R_UNDEF).and.(cloudsat_pia/= 0.0)) &
+    where ((cloudsat_pia/= R_UNDEF).AND.(cloudsat_pia/= 0.0)) &
          cloudsat_pia = cloudsat_pia / Ncolumns 
 
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/quickbeam_optics.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/quickbeam_optics.F90	(revision 5160)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/quickbeam_optics.F90	(revision 5185)
@@ -145,5 +145,5 @@
           hydro = .false.
           DO j=1,rcfg%nhclass
-             if ((hm_matrix(pr,k,j) > 1E-12) .and. (sd%dtype(j) > 0)) then
+             if ((hm_matrix(pr,k,j) > 1E-12) .AND. (sd%dtype(j) > 0)) then
                 hydro = .true.
                 exit
@@ -217,5 +217,5 @@
                 ! Use Ze_scaled, Zr_scaled, and kr_scaled ... if know them
                 ! if not we will calculate Ze, Zr, and Kr from the distribution parameters
-!                if( rcfg%Z_scale_flag(tp,itt,iRe_type) .and. .not. DO_LUT_TEST)  then
+!                if( rcfg%Z_scale_flag(tp,itt,iRe_type) .AND. .not. DO_LUT_TEST)  then
 !                   ! can use z scaling
 !                   scale_factor=rho_a*hm_matrix(pr,k,tp)
@@ -272,5 +272,5 @@
                    else
                       ! I assume here that water phase droplets are spheres.
-                      ! sd%rho should be ~ 1000  or sd%apm=524 .and. sd%bpm=3
+                      ! sd%rho should be ~ 1000  or sd%apm=524 .AND. sd%bpm=3
                       Deq = Di
                    endif
@@ -292,5 +292,5 @@
                    ! NOTE: if .not. DO_LUT_TEST, then you are checking the LUT approximation 
                    ! not just the DSD representation given by Ni
-                   if(Np_matrix(pr,k,tp)>0 .and. DO_NP_TEST ) then
+                   if(Np_matrix(pr,k,tp)>0 .AND. DO_NP_TEST ) then
                       Np = path_integral(Ni,Di,1,ns-1)/rho_a*1.E6_wp
                       ! Note: Representation is not great or small Re < 2 
@@ -305,5 +305,5 @@
                    ! LUT test code
                    ! This segment of code compares full calculation to scaling result
-                   if ( rcfg%Z_scale_flag(tp,itt,iRe_type) .and. DO_LUT_TEST )  then
+                   if ( rcfg%Z_scale_flag(tp,itt,iRe_type) .AND. DO_LUT_TEST )  then
                       scale_factor=rho_a*hm_matrix(pr,k,tp)
                       ! if more than 2 dBZe difference print error message/parameters.
@@ -398,5 +398,5 @@
     
     ! If density is constant, set equivalent values for apm and bpm
-    if ((rho_c > 0) .and. (apm < 0)) then
+    if ((rho_c > 0) .AND. (apm < 0)) then
        apm = (pi/6)*rho_c
        bpm = 3._wp
@@ -405,5 +405,5 @@
     ! Exponential is same as modified gamma with vu =1
     ! if Np is specified then we will just treat as modified gamma
-    if(dtype .eq. 2 .and. Np .gt. 0) then
+    if(dtype .eq. 2 .AND. Np .gt. 0) then
        local_dtype = 1
        local_p3    = 1
@@ -441,5 +441,5 @@
        endif
        
-       if( Np.eq.0 .and. p2+1 > 1E-8) then     ! use default value for MEAN diameter as first default  
+       if( Np.eq.0 .AND. p2+1 > 1E-8) then     ! use default value for MEAN diameter as first default
           dm = p2             ! by definition, should have units of microns
           D0 = gamma(vu)/gamma(vu+1)*dm
@@ -525,5 +525,5 @@
        
        ! get rg ... 
-       if( Np.eq.0 .and. (abs(p2+1) > 1E-8) ) then ! use default value of rg
+       if( Np.eq.0 .AND. (abs(p2+1) > 1E-8) ) then ! use default value of rg
           rg = p2     
        else
@@ -640,5 +640,5 @@
     
     ! If density is constant, store equivalent values for apm and bpm
-    if ((rho_c > 0) .and. (apm < 0)) then
+    if ((rho_c > 0) .AND. (apm < 0)) then
        apm = (pi/6)*rho_c
        bpm = 3._wp
@@ -648,5 +648,5 @@
     ! if only Np given then calculate Re
     ! if neigher than use other defaults (p1,p2,p3) following quickbeam documentation
-    if(Re==0 .and. Np>0) then
+    if(Re==0 .AND. Np>0) then
        call calc_Re(Q,Np,rho_a,dtype,apm,bpm,rho_c,p1,p2,p3,Re)
     endif
@@ -754,5 +754,5 @@
           if (tc < -30) then
              bhp = -1.75_wp+0.09_wp*((tc+273._wp)-243.16_wp)
-          elseif ((tc >= -30) .and. (tc < -9)) then
+          elseif ((tc >= -30) .AND. (tc < -9)) then
              bhp = -3.25_wp-0.06_wp*((tc+273._wp)-265.66_wp)
           else
@@ -764,7 +764,7 @@
           if (tc < -35) then
              bhp = -1.75_wp+0.09_wp*((tc+273._wp)-243.16_wp)
-          elseif ((tc >= -35) .and. (tc < -17.5)) then
+          elseif ((tc >= -35) .AND. (tc < -17.5)) then
              bhp = -2.65_wp+0.09_wp*((tc+273._wp)-255.66_wp)
-          elseif ((tc >= -17.5) .and. (tc < -9)) then
+          elseif ((tc >= -17.5) .AND. (tc < -9)) then
              bhp = -3.25_wp-0.06_wp*((tc+273._wp)-265.66_wp)
           else
@@ -969,5 +969,5 @@
        
        correct_for_rho = 0
-       if ((ice == 1) .and. (minval(rho_e) >= 0)) correct_for_rho = 1
+       if ((ice == 1) .AND. (minval(rho_e) >= 0)) correct_for_rho = 1
        
        ! Correct refractive index for ice density if needed
Index: LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/scops.F90
===================================================================
--- LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/scops.F90	(revision 5160)
+++ LMDZ6/branches/Amaury_dev/libf/phylmd/cospv2/scops.F90	(revision 5185)
@@ -75,5 +75,5 @@
 
     ! Test for valid input overlap assumption
-    if (overlap .ne. 1 .and. overlap .ne. 2 .and. overlap .ne. 3) then
+    if (overlap .ne. 1 .AND. overlap .ne. 2 .AND. overlap .ne. 3) then
        overlap=default_overlap
        call errorMessage('ERROR(scops): Invalid overlap assumption provided. Using default overlap assumption (max/ran)')
@@ -180,15 +180,15 @@
              !threshold_min(1:npoints,ibox) = max(conv(1:npoints,ilev),min(tca(1:npoints,ilev-1),tca(1:npoints,ilev)))
              !maxosc(1:npoints,ibox) = merge(1,0,threshold(1:npoints,ibox) .lt. &
-             !     min(tca(1:npoints,ilev-1),tca(1:npoints,ilev)) .and. &
+             !     min(tca(1:npoints,ilev-1),tca(1:npoints,ilev)) .AND. &
              !     (threshold(1:npoints,ibox).gt.conv(1:npoints,ilev)))
              if (ilev .ne. 1) then
                 threshold_min(1:npoints,ibox) = max(conv(1:npoints,ilev),min(tca(1:npoints,ilev-1),tca(1:npoints,ilev)))
                 maxosc(1:npoints,ibox) = merge(1,0,threshold(1:npoints,ibox) .lt. &
-                     min(tca(1:npoints,ilev-1),tca(1:npoints,ilev)) .and. &
+                     min(tca(1:npoints,ilev-1),tca(1:npoints,ilev)) .AND. &
                      (threshold(1:npoints,ibox).gt.conv(1:npoints,ilev)))
              else
                 threshold_min(1:npoints,ibox) = max(conv(1:npoints,ilev),min(0._wp,tca(1:npoints,ilev)))
                 maxosc(1:npoints,ibox) = merge(1,0,threshold(1:npoints,ibox) .lt. &
-                     min(0._wp,tca(1:npoints,ilev)) .and. &
+                     min(0._wp,tca(1:npoints,ilev)) .AND. &
                      (threshold(1:npoints,ibox).gt.conv(1:npoints,ilev)))
              endif
@@ -208,5 +208,5 @@
           
           ! Code to partition boxes into startiform and convective parts goes here
-          where(threshold(1:npoints,ibox).le.conv(1:npoints,ilev) .and. conv(1:npoints,ilev).gt.0.) frac_out(1:npoints,ibox,ilev)=2
+          where(threshold(1:npoints,ibox).le.conv(1:npoints,ilev) .AND. conv(1:npoints,ilev).gt.0.) frac_out(1:npoints,ibox,ilev)=2
        ENDDO ! ibox
        
