Index: NEMO/branches/2020/dev_r12527_Gurvan_ShallowWater/src/OCE/SBC/sbcblk_algo_coare3p6.F90
===================================================================
--- NEMO/branches/2020/dev_r12527_Gurvan_ShallowWater/src/OCE/SBC/sbcblk_algo_coare3p6.F90	(revision 12529)
+++ NEMO/branches/2020/dev_r12527_Gurvan_ShallowWater/src/OCE/SBC/sbcblk_algo_coare3p6.F90	(revision 13151)
@@ -194,6 +194,5 @@
       IF( kt == nit000 ) CALL SBCBLK_ALGO_COARE3P6_INIT(l_use_cs, l_use_wl)
 
-      l_zt_equal_zu = .FALSE.
-      IF( ABS(zu - zt) < 0.01_wp )   l_zt_equal_zu = .TRUE.    ! testing "zu == zt" is risky with double precision
+      l_zt_equal_zu = ( ABS(zu - zt) < 0.01_wp ) ! testing "zu == zt" is risky with double precision
       IF( .NOT. l_zt_equal_zu )  ALLOCATE( zeta_t(jpi,jpj) )
 
@@ -432,26 +431,26 @@
       !
       DO_2D_11_11
-         !
-         zta = pzeta(ji,jj)
-         !
-         zphi_m = ABS(1. - 15.*zta)**.25    !!Kansas unstable
-         !
-         zpsi_k = 2.*LOG((1. + zphi_m)/2.) + LOG((1. + zphi_m*zphi_m)/2.)   &
-            & - 2.*ATAN(zphi_m) + 0.5*rpi
-         !
-         zphi_c = ABS(1. - 10.15*zta)**.3333                   !!Convective
-         !
-         zpsi_c = 1.5*LOG((1. + zphi_c + zphi_c*zphi_c)/3.) &
-            &     - 1.7320508*ATAN((1. + 2.*zphi_c)/1.7320508) + 1.813799447
-         !
-         zf = zta*zta
-         zf = zf/(1. + zf)
-         zc = MIN(50._wp, 0.35_wp*zta)
-         zstab = 0.5 + SIGN(0.5_wp, zta)
-         !
-         psi_m_coare(ji,jj) = (1. - zstab) * ( (1. - zf)*zpsi_k + zf*zpsi_c ) & ! (zta < 0)
-            &                -   zstab     * ( 1. + 1.*zta     &                ! (zta > 0)
-            &                         + 0.6667*(zta - 14.28)/EXP(zc) + 8.525 )   !     "
-         !
+      !
+      zta = pzeta(ji,jj)
+      !
+      zphi_m = ABS(1. - 15.*zta)**.25    !!Kansas unstable
+      !
+      zpsi_k = 2.*LOG((1. + zphi_m)/2.) + LOG((1. + zphi_m*zphi_m)/2.)   &
+         & - 2.*ATAN(zphi_m) + 0.5*rpi
+      !
+      zphi_c = ABS(1. - 10.15*zta)**.3333                   !!Convective
+      !
+      zpsi_c = 1.5*LOG((1. + zphi_c + zphi_c*zphi_c)/3.) &
+         &     - 1.7320508*ATAN((1. + 2.*zphi_c)/1.7320508) + 1.813799447
+      !
+      zf = zta*zta
+      zf = zf/(1. + zf)
+      zc = MIN(50._wp, 0.35_wp*zta)
+      zstab = 0.5 + SIGN(0.5_wp, zta)
+      !
+      psi_m_coare(ji,jj) = (1. - zstab) * ( (1. - zf)*zpsi_k + zf*zpsi_c ) & ! (zta < 0)
+         &                -   zstab     * ( 1. + 1.*zta     &                ! (zta > 0)
+         &                         + 0.6667*(zta - 14.28)/EXP(zc) + 8.525 )   !     "
+      !
       END_2D
       !
@@ -483,25 +482,25 @@
       !
       DO_2D_11_11
-         !
-         zta = pzeta(ji,jj)
-         !
-         zphi_h = (ABS(1. - 15.*zta))**.5  !! Kansas unstable   (zphi_h = zphi_m**2 when unstable, zphi_m when stable)
-         !
-         zpsi_k = 2.*LOG((1. + zphi_h)/2.)
-         !
-         zphi_c = (ABS(1. - 34.15*zta))**.3333   !! Convective
-         !
-         zpsi_c = 1.5*LOG((1. + zphi_c + zphi_c*zphi_c)/3.) &
-            &    -1.7320508*ATAN((1. + 2.*zphi_c)/1.7320508) + 1.813799447
-         !
-         zf = zta*zta
-         zf = zf/(1. + zf)
-         zc = MIN(50._wp,0.35_wp*zta)
-         zstab = 0.5 + SIGN(0.5_wp, zta)
-         !
-         psi_h_coare(ji,jj) = (1. - zstab) * ( (1. - zf)*zpsi_k + zf*zpsi_c ) &
-            &                -   zstab     * ( (ABS(1. + 2.*zta/3.))**1.5     &
-            &                           + .6667*(zta - 14.28)/EXP(zc) + 8.525 )
-         !
+      !
+      zta = pzeta(ji,jj)
+      !
+      zphi_h = (ABS(1. - 15.*zta))**.5  !! Kansas unstable   (zphi_h = zphi_m**2 when unstable, zphi_m when stable)
+      !
+      zpsi_k = 2.*LOG((1. + zphi_h)/2.)
+      !
+      zphi_c = (ABS(1. - 34.15*zta))**.3333   !! Convective
+      !
+      zpsi_c = 1.5*LOG((1. + zphi_c + zphi_c*zphi_c)/3.) &
+         &    -1.7320508*ATAN((1. + 2.*zphi_c)/1.7320508) + 1.813799447
+      !
+      zf = zta*zta
+      zf = zf/(1. + zf)
+      zc = MIN(50._wp,0.35_wp*zta)
+      zstab = 0.5 + SIGN(0.5_wp, zta)
+      !
+      psi_h_coare(ji,jj) = (1. - zstab) * ( (1. - zf)*zpsi_k + zf*zpsi_c ) &
+         &                -   zstab     * ( (ABS(1. + 2.*zta/3.))**1.5     &
+         &                           + .6667*(zta - 14.28)/EXP(zc) + 8.525 )
+      !
       END_2D
       !
