Index: branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90
===================================================================
--- branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90	(revision 8215)
+++ branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90	(revision 8568)
@@ -83,5 +83,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )   CALL timing_start('zdf_ddm')
+      IF( ln_timing )   CALL timing_start('zdf_ddm')
       !
       !                                                ! ===============
@@ -170,5 +170,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('zdf_ddm')
+      IF( ln_timing )   CALL timing_stop('zdf_ddm')
       !
    END SUBROUTINE zdf_ddm
Index: branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfdrg.F90
===================================================================
--- branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfdrg.F90	(revision 8215)
+++ branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfdrg.F90	(revision 8568)
@@ -20,5 +20,5 @@
    !!----------------------------------------------------------------------
    USE oce            ! ocean dynamics and tracers variables
-   USE phycst   , ONLY: vkarmn
+   USE phycst  , ONLY : vkarmn
    USE dom_oce        ! ocean space and time domain variables
    USE zdf_oce        ! ocean vertical physics variables
@@ -109,5 +109,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('zdf_drg')
+      IF( ln_timing )   CALL timing_start('zdf_drg')
       !
       !
@@ -140,5 +140,5 @@
       IF(ln_ctl)   CALL prt_ctl( tab2d_1=pCdU, clinfo1=' Cd*U ')
       !
-      IF( nn_timing == 1 )  CALL timing_stop('zdf_drg')
+      IF( ln_timing )   CALL timing_stop('zdf_drg')
       !
    END SUBROUTINE zdf_drg
Index: branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90
===================================================================
--- branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90	(revision 8215)
+++ branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90	(revision 8568)
@@ -62,5 +62,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('zdf_evd')
+      IF( ln_timing )   CALL timing_start('zdf_evd')
       !
       IF( kt == nit000 ) THEN
@@ -121,5 +121,5 @@
       IF( l_trdtra ) CALL trd_tra( kt, 'TRA', jp_tem, jptra_evd, zavt_evd )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('zdf_evd')
+      IF( ln_timing )   CALL timing_stop('zdf_evd')
       !
    END SUBROUTINE zdf_evd
Index: branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90
===================================================================
--- branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 8215)
+++ branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 8568)
@@ -159,5 +159,5 @@
       !!--------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )   CALL timing_start('zdf_gls')
+      IF( ln_timing )   CALL timing_start('zdf_gls')
       !
       ! Preliminary computing
@@ -822,5 +822,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )   CALL timing_stop('zdf_gls')
+      IF( ln_timing )   CALL timing_stop('zdf_gls')
       !
    END SUBROUTINE zdf_gls
@@ -852,5 +852,5 @@
       !!----------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('zdf_gls_init')
+      IF( ln_timing )   CALL timing_start('zdf_gls_init')
       !
       REWIND( numnam_ref )              ! Namelist namzdf_gls in reference namelist : Vertical eddy diffivity and viscosity using gls turbulent closure scheme
@@ -1077,10 +1077,9 @@
          rl_sf = vkarmn
       ELSE
-         rl_sf = rc0 * SQRT(rc0/rcm_sf) * SQRT( ( (1._wp + 4._wp*rmm + 8._wp*rmm**2_wp)*rsc_tke          &
-                 &                                       + 12._wp * rsc_psi0*rpsi2 - (1._wp + 4._wp*rmm) &
-                 &                                                *SQRT(rsc_tke*(rsc_tke                 &
-                 &                                                   + 24._wp*rsc_psi0*rpsi2)) )         &
-                 &                                         /(12._wp*rnn**2.)                             &
-                 &                                       )
+         rl_sf = rc0 * SQRT(rc0/rcm_sf) * SQRT( ( (1._wp + 4._wp*rmm + 8._wp*rmm**2_wp) * rsc_tke        &
+            &                                            + 12._wp*rsc_psi0*rpsi2 - (1._wp + 4._wp*rmm)   &
+            &                                                     *SQRT(rsc_tke*(rsc_tke                 &
+            &                                                        + 24._wp*rsc_psi0*rpsi2)) )         &
+            &                                              /(12._wp*rnn**2.)                             )
       ENDIF
 
@@ -1130,5 +1129,5 @@
       CALL gls_rst( nit000, 'READ' )      ! (en, avt_k, avm_k, hmxl_n)
       !
-      IF( nn_timing == 1 )  CALL timing_stop('zdf_gls_init')
+      IF( ln_timing )   CALL timing_stop('zdf_gls_init')
       !
    END SUBROUTINE zdf_gls_init
Index: branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfiwm.F90
===================================================================
--- branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfiwm.F90	(revision 8215)
+++ branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfiwm.F90	(revision 8568)
@@ -141,5 +141,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )   CALL timing_start('zdf_iwm')
+      IF( ln_timing )   CALL timing_start('zdf_iwm')
       !
       !                      ! ----------------------------- !
@@ -366,5 +366,5 @@
       IF(ln_ctl)   CALL prt_ctl(tab3d_1=zav_wave , clinfo1=' iwm - av_wave: ', tab3d_2=avt, clinfo2=' avt: ', ovlap=1, kdim=jpk)
       !
-      IF( nn_timing == 1 )   CALL timing_stop('zdf_iwm')
+      IF( ln_timing )   CALL timing_stop('zdf_iwm')
       !
    END SUBROUTINE zdf_iwm
@@ -405,5 +405,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('zdf_iwm_init')
+      IF( ln_timing )   CALL timing_start('zdf_iwm_init')
       !
       REWIND( numnam_ref )              ! Namelist namzdf_iwm in reference namelist : Wave-driven mixing
@@ -483,5 +483,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('zdf_iwm_init')
+      IF( ln_timing )   CALL timing_stop('zdf_iwm_init')
       !
    END SUBROUTINE zdf_iwm_init
Index: branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90
===================================================================
--- branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90	(revision 8215)
+++ branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90	(revision 8568)
@@ -82,5 +82,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('zdf_mxl')
+      IF( ln_timing )   CALL timing_start('zdf_mxl')
       !
       IF( kt == nit000 ) THEN
@@ -141,5 +141,5 @@
       IF(ln_ctl)   CALL prt_ctl( tab2d_1=REAL(nmln,wp), clinfo1=' nmln : ', tab2d_2=hmlp, clinfo2=' hmlp : ', ovlap=1 )
       !
-      IF( nn_timing == 1 )  CALL timing_stop('zdf_mxl')
+      IF( ln_timing )   CALL timing_stop('zdf_mxl')
       !
    END SUBROUTINE zdf_mxl
Index: branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfphy.F90
===================================================================
--- branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfphy.F90	(revision 8215)
+++ branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfphy.F90	(revision 8568)
@@ -32,4 +32,5 @@
    USE lbclnk         ! lateral boundary conditions
    USE lib_mpp        ! distribued memory computing
+   USE timing         ! Timing
 
    IMPLICIT NONE
@@ -75,4 +76,6 @@
          &             rn_avm0, rn_avt0, nn_avb, nn_havtb                  ! coefficients
       !!----------------------------------------------------------------------
+      !
+      IF( ln_timing )   CALL timing_start('zdf_phy_init')
       !
       !                           !==  Namelist  ==!
@@ -193,4 +196,6 @@
       !!gm move it here ?
       !
+      IF( ln_timing )   CALL timing_stop('zdf_phy_init')
+      !
    END SUBROUTINE zdf_phy_init
 
@@ -213,4 +218,6 @@
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zsh2   ! shear production
       !! ---------------------------------------------------------------------
+      !
+      IF( ln_timing )   CALL timing_start('zdf_phy')
       !
       IF( l_zdfdrg ) THEN     !==  update top/bottom drag  ==!   (non-linear cases)
@@ -289,4 +296,6 @@
       ENDIF
       !
+      IF( ln_timing )   CALL timing_stop('zdf_phy')
+      !
    END SUBROUTINE zdf_phy
 
Index: branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90
===================================================================
--- branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90	(revision 8215)
+++ branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90	(revision 8568)
@@ -158,5 +158,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )   CALL timing_start('zdf_ric')
+      IF( ln_timing )   CALL timing_start('zdf_ric')
       !
       !                       !==  avm and avt = F(Richardson number)  ==!
@@ -197,5 +197,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )   CALL timing_stop('zdf_ric')
+      IF( ln_timing )   CALL timing_stop('zdf_ric')
       !
    END SUBROUTINE zdf_ric
Index: branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfsh2.F90
===================================================================
--- branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfsh2.F90	(revision 8215)
+++ branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfsh2.F90	(revision 8568)
@@ -56,5 +56,5 @@
       !!--------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('zdf_sh2')
+      IF( ln_timing )   CALL timing_start('zdf_sh2')
       !
       DO jk = 2, jpkm1
@@ -77,5 +77,5 @@
       END DO 
       !
-      IF( nn_timing == 1 )  CALL timing_stop('zdf_sh2')     
+      IF( ln_timing )   CALL timing_stop('zdf_sh2')     
       !
    END SUBROUTINE zdf_sh2
Index: branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
===================================================================
--- branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 8215)
+++ branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 8568)
@@ -159,7 +159,7 @@
       !!              Bruchard OM 2002
       !!----------------------------------------------------------------------
-      INTEGER                    , INTENT(in   ) ::   kt             ! ocean time step
+      INTEGER                   , INTENT(in   ) ::   kt             ! ocean time step
       REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   p_sh2          ! shear production term
-      REAL(wp), DIMENSION(:,:,:) , INTENT(inout) ::   p_avm, p_avt   !  momentum and tracer Kz (w-points)
+      REAL(wp), DIMENSION(:,:,:), INTENT(inout) ::   p_avm, p_avt   !  momentum and tracer Kz (w-points)
       !!----------------------------------------------------------------------
       !
@@ -194,4 +194,7 @@
       !!                a tridiagonal linear system by a "methode de chasse"
       !!              - increase TKE due to surface and internal wave breaking
+      !!             NB: when sea-ice is present, both LC parameterization 
+      !!                 and TKE penetration are turned off when the ice fraction 
+      !!                 is smaller than 0.25 
       !!
       !! ** Action  : - en : now turbulent kinetic energy)
@@ -217,5 +220,5 @@
       !!--------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('tke_tke')
+      IF( ln_timing )   CALL timing_start('tke_tke')
       !
       zbbrau = rn_ebb / rau0       ! Local constant initialisation
@@ -312,5 +315,5 @@
                   zwlc = zind * rn_lc * zus * SIN( rpi * pdepw(ji,jj,jk) / zhlc(ji,jj) )
                   !                                           ! TKE Langmuir circulation source term
-                  en(ji,jj,jk) = en(ji,jj,jk) + rdt * MAX(0.,1._wp - 2.*fr_i(ji,jj) ) * ( zwlc * zwlc * zwlc )   &
+                  en(ji,jj,jk) = en(ji,jj,jk) + rdt * MAX(0.,1._wp - 4.*fr_i(ji,jj) ) * ( zwlc * zwlc * zwlc )   &
                      &                              / zhlc(ji,jj) * wmask(ji,jj,jk) * tmask(ji,jj,1)
                END DO
@@ -415,5 +418,5 @@
                DO ji = fs_2, fs_jpim1   ! vector opt.
                   en(ji,jj,jk) = en(ji,jj,jk) + rn_efr * en(ji,jj,1) * EXP( -pdepw(ji,jj,jk) / htau(ji,jj) )   &
-                     &                                 * MAX(0.,1._wp - 2.*fr_i(ji,jj) )  * wmask(ji,jj,jk) * tmask(ji,jj,1)
+                     &                                 * MAX(0.,1._wp - 4.*fr_i(ji,jj) )  * wmask(ji,jj,jk) * tmask(ji,jj,1)
                END DO
             END DO
@@ -424,5 +427,5 @@
                jk = nmln(ji,jj)
                en(ji,jj,jk) = en(ji,jj,jk) + rn_efr * en(ji,jj,1) * EXP( -pdepw(ji,jj,jk) / htau(ji,jj) )   &
-                  &                                 * MAX(0.,1._wp - 2.*fr_i(ji,jj) )  * wmask(ji,jj,jk) * tmask(ji,jj,1)
+                  &                                 * MAX(0.,1._wp - 4.*fr_i(ji,jj) )  * wmask(ji,jj,jk) * tmask(ji,jj,1)
             END DO
          END DO
@@ -437,11 +440,11 @@
                   zdif = rhftau_scl * MAX( 0._wp, zdif + rhftau_add )  ! apply some modifications...
                   en(ji,jj,jk) = en(ji,jj,jk) + zbbrau * zdif * EXP( -pdepw(ji,jj,jk) / htau(ji,jj) )   &
-                     &                        * MAX(0.,1._wp - 2.*fr_i(ji,jj) ) * wmask(ji,jj,jk) * tmask(ji,jj,1)
-               END DO
-            END DO
-         END DO
-      ENDIF
-      !
-      IF( nn_timing == 1 )  CALL timing_stop('tke_tke')
+                     &                        * MAX(0.,1._wp - 4.*fr_i(ji,jj) ) * wmask(ji,jj,jk) * tmask(ji,jj,1)
+               END DO
+            END DO
+         END DO
+      ENDIF
+      !
+      IF( ln_timing )   CALL timing_stop('tke_tke')
       !
    END SUBROUTINE tke_tke
@@ -493,5 +496,5 @@
       !!--------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('tke_avn')
+      IF( ln_timing )   CALL timing_start('tke_avn')
 
       !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
@@ -636,5 +639,5 @@
       ENDIF
       !
-      IF( nn_timing == 1 )  CALL timing_stop('tke_avn')
+      IF( ln_timing )   CALL timing_stop('tke_avn')
       !
    END SUBROUTINE tke_avn
