Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90	(revision 9102)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90	(revision 9104)
@@ -23,5 +23,4 @@
    USE prtctl         ! Print control
    USE lib_mpp        ! MPP library
-   USE timing         ! Timing
 
    IMPLICIT NONE
@@ -82,6 +81,4 @@
       REAL(wp), DIMENSION(jpi,jpj) ::   zrau, zmsks, zmskf, zmskd1, zmskd2, zmskd3
       !!----------------------------------------------------------------------
-      !
-      IF( ln_timing )   CALL timing_start('zdf_ddm')
       !
       !                                                ! ===============
@@ -170,6 +167,4 @@
       ENDIF
       !
-      IF( ln_timing )   CALL timing_stop('zdf_ddm')
-      !
    END SUBROUTINE zdf_ddm
    
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90	(revision 9102)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90	(revision 9104)
@@ -62,6 +62,4 @@
       !!----------------------------------------------------------------------
       !
-      IF( ln_timing )   CALL timing_start('zdf_evd')
-      !
       IF( kt == nit000 ) THEN
          IF(lwp) WRITE(numout,*)
@@ -121,6 +119,4 @@
       IF( l_trdtra ) CALL trd_tra( kt, 'TRA', jp_tem, jptra_evd, zavt_evd )
       !
-      IF( ln_timing )   CALL timing_stop('zdf_evd')
-      !
    END SUBROUTINE zdf_evd
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 9102)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 9104)
@@ -850,9 +850,9 @@
       REWIND( numnam_ref )              ! Namelist namzdf_gls in reference namelist : Vertical eddy diffivity and viscosity using gls turbulent closure scheme
       READ  ( numnam_ref, namzdf_gls, IOSTAT = ios, ERR = 901)
-901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_gls in reference namelist', lwp )
+901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf_gls in reference namelist', lwp )
 
       REWIND( numnam_cfg )              ! Namelist namzdf_gls in configuration namelist : Vertical eddy diffivity and viscosity using gls turbulent closure scheme
       READ  ( numnam_cfg, namzdf_gls, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_gls in configuration namelist', lwp )
+902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf_gls in configuration namelist', lwp )
       IF(lwm) WRITE ( numond, namzdf_gls )
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfiwm.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfiwm.F90	(revision 9102)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfiwm.F90	(revision 9104)
@@ -22,4 +22,5 @@
    USE eosbn2         ! ocean equation of state
    USE phycst         ! physical constants
+   !
    USE prtctl         ! Print control
    USE in_out_manager ! I/O manager
@@ -27,5 +28,4 @@
    USE lib_mpp        ! MPP library
    USE wrk_nemo       ! work arrays
-   USE timing         ! Timing
    USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
 
@@ -138,6 +138,4 @@
       !!----------------------------------------------------------------------
       !
-      IF( ln_timing )   CALL timing_start('zdf_iwm')
-      !
       !                       !* Set to zero the 1st and last vertical levels of appropriate variables
       zemx_iwm (:,:,1) = 0._wp   ;   zemx_iwm (:,:,jpk) = 0._wp
@@ -370,6 +368,4 @@
       IF(ln_ctl)   CALL prt_ctl(tab3d_1=zav_wave , clinfo1=' iwm - av_wave: ', tab3d_2=avt, clinfo2=' avt: ', ovlap=1, kdim=jpk)
       !
-      IF( ln_timing )   CALL timing_stop('zdf_iwm')
-      !
    END SUBROUTINE zdf_iwm
 
@@ -409,13 +405,11 @@
       !!----------------------------------------------------------------------
       !
-      IF( ln_timing )   CALL timing_start('zdf_iwm_init')
-      !
       REWIND( numnam_ref )              ! Namelist namzdf_iwm in reference namelist : Wave-driven mixing
       READ  ( numnam_ref, namzdf_iwm_new, IOSTAT = ios, ERR = 901)
-901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_iwm in reference namelist', lwp )
+901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf_iwm in reference namelist', lwp )
       !
       REWIND( numnam_cfg )              ! Namelist namzdf_iwm in configuration namelist : Wave-driven mixing
       READ  ( numnam_cfg, namzdf_iwm_new, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_iwm in configuration namelist', lwp )
+902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf_iwm in configuration namelist', lwp )
       IF(lwm) WRITE ( numond, namzdf_iwm_new )
       !
@@ -479,6 +473,4 @@
       ENDIF
       !
-      IF( ln_timing )   CALL timing_stop('zdf_iwm_init')
-      !
    END SUBROUTINE zdf_iwm_init
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90	(revision 9102)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfmxl.F90	(revision 9104)
@@ -15,4 +15,5 @@
    USE trc_oce  , ONLY: l_offline         ! ocean space and time domain variables
    USE zdf_oce        ! ocean vertical physics
+   !
    USE in_out_manager ! I/O manager
    USE prtctl         ! Print control
@@ -20,5 +21,4 @@
    USE iom            ! I/O library
    USE lib_mpp        ! MPP library
-   USE timing         ! Timing
 
    IMPLICIT NONE
@@ -82,6 +82,4 @@
       !!----------------------------------------------------------------------
       !
-      IF( ln_timing )   CALL timing_start('zdf_mxl')
-      !
       IF( kt == nit000 ) THEN
          IF(lwp) WRITE(numout,*)
@@ -91,5 +89,5 @@
          IF( zdf_mxl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'zdf_mxl : unable to allocate arrays' )
       ENDIF
-
+      !
       ! w-level of the mixing and mixed layers
       nmln(:,:)  = nlb10               ! Initialization to the number of w ocean point
@@ -138,8 +136,6 @@
          ENDIF
       ENDIF
-      
+      !
       IF(ln_ctl)   CALL prt_ctl( tab2d_1=REAL(nmln,wp), clinfo1=' nmln : ', tab2d_2=hmlp, clinfo2=' hmlp : ', ovlap=1 )
-      !
-      IF( ln_timing )   CALL timing_stop('zdf_mxl')
       !
    END SUBROUTINE zdf_mxl
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfosm.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfosm.F90	(revision 9102)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfosm.F90	(revision 9104)
@@ -1280,12 +1280,7 @@
          END DO
      END DO
-
-
-     CALL lbc_lnk( p_avt, 'W', 1. )                      ! Lateral boundary conditions on p_avt  (sign unchanged)
-     CALL lbc_lnk( p_avm, 'W', 1. )                      ! Lateral boundary conditions on p_avm  (sign unchanged)
-
       ! Lateral boundary conditions on ghamu and ghamv, currently on W-grid  (sign unchanged), needed to caclulate gham[uv] on u and v grids
-      CALL lbc_lnk( ghamu(:,:,:), 'W', 1. )
-      CALL lbc_lnk( ghamv(:,:,:), 'W', 1. )
+     CALL lbc_lnk_multi( p_avt, 'W', 1. , p_avm, 'W', 1.   &
+      &                  ghamu, 'W', 1. , ghamv, 'W', 1. )
        DO jk = 2, jpkm1
            DO jj = 2, jpjm1
@@ -1303,9 +1298,7 @@
         END DO
         ! Lateral boundary conditions on final outputs for gham[ts],  on W-grid  (sign unchanged)
-       CALL lbc_lnk( ghamt(:,:,:), 'W', 1. )
-       CALL lbc_lnk( ghams(:,:,:), 'W', 1. )
-      ! Lateral boundary conditions on final outputs for gham[uv],  on [UV]-grid  (sign unchanged)
-       CALL lbc_lnk( ghamu(:,:,:), 'U', 1. )
-       CALL lbc_lnk( ghamv(:,:,:), 'V', 1. )
+        ! Lateral boundary conditions on final outputs for gham[uv],  on [UV]-grid  (sign unchanged)
+        CALL lbc_lnk_multi( ghamt, 'W', 1. , ghams, 'W', 1.   &
+         &                  ghamu, 'U', 1. , ghamv, 'V', 1. )
 
        IF(ln_dia_osm) THEN
@@ -1374,9 +1367,9 @@
      REWIND( numnam_ref )              ! Namelist namzdf_osm in reference namelist : Osmosis ML model
      READ  ( numnam_ref, namzdf_osm, IOSTAT = ios, ERR = 901)
-901    IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_osm in reference namelist', lwp )
+901  IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_osm in reference namelist', lwp )
 
      REWIND( numnam_cfg )              ! Namelist namzdf_tke in configuration namelist : Turbulent Kinetic Energy
      READ  ( numnam_cfg, namzdf_osm, IOSTAT = ios, ERR = 902 )
-902    IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_osm in configuration namelist', lwp )
+902  IF( ios >  0 ) CALL ctl_nam ( ios , 'namzdf_osm in configuration namelist', lwp )
      IF(lwm) WRITE ( numond, namzdf_osm )
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfphy.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfphy.F90	(revision 9102)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfphy.F90	(revision 9104)
@@ -83,6 +83,4 @@
       !!----------------------------------------------------------------------
       !
-      IF( ln_timing )   CALL timing_start('zdf_phy_init')
-      !
       !                           !==  Namelist  ==!
       REWIND( numnam_ref )              ! Namelist namzdf in reference namelist : Vertical mixing parameters
@@ -92,5 +90,5 @@
       REWIND( numnam_cfg )              ! Namelist namzdf in reference namelist : Vertical mixing parameters
       READ  ( numnam_cfg, namzdf, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namzdf in configuration namelist', lwp )
+902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namzdf in configuration namelist', lwp )
       IF(lwm)   WRITE ( numond, namzdf )
       !
@@ -206,6 +204,4 @@
       !!gm move it here ?
       !
-      IF( ln_timing )   CALL timing_stop('zdf_phy_init')
-      !
    END SUBROUTINE zdf_phy_init
 
@@ -293,14 +289,13 @@
       !                                         !* Lateral boundary conditions (sign unchanged)
       IF( l_zdfsh2 ) THEN
-         CALL lbc_lnk( avm_k, 'W', 1. )               ! needed to compute the shear production term
-         CALL lbc_lnk( avt_k, 'W', 1. )               !!gm a priori useless ==>> to be tested
-      ENDIF
-      CALL lbc_lnk( avm  , 'W', 1. )                  ! needed to compute avm at u- and v-points
-      CALL lbc_lnk( avt  , 'W', 1. )                  !!gm  a priori only avm_k and avm are required
-      CALL lbc_lnk( avs  , 'W', 1. )                  !!gm  for calculation, kept here for output only
+         CALL lbc_lnk_multi( avm_k, 'W', 1. , avt_k, 'W', 1.   &
+            &                avm  , 'W', 1. , avt  , 'W', 1. , avs , 'W', 1. )
+      ELSE
+         CALL lbc_lnk( avm  , 'W', 1. , avt  , 'W', 1. , avs , 'W', 1. )
+      ENDIF
       !
       IF( l_zdfdrg ) THEN     ! drag  have been updated (non-linear cases)
-         IF( ln_isfcav )   CALL lbc_lnk( rCdU_top, 'T', 1. )   ! top    drag
-                           CALL lbc_lnk( rCdU_bot, 'T', 1. )   ! bottom drag
+         IF( ln_isfcav ) THEN   ;  CALL lbc_lnk_multi( rCdU_top, 'T', 1. , rCdU_bot, 'T', 1. )   ! top & bot drag
+         ELSE                   ;  CALL lbc_lnk      ( rCdU_bot, 'T', 1. )                       ! bottom drag only
       ENDIF
       !
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90	(revision 9102)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90	(revision 9104)
@@ -28,5 +28,4 @@
    USE in_out_manager ! I/O manager
    USE iom            ! I/O manager library
-   USE timing         ! Timing
    USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
 
@@ -72,6 +71,6 @@
       !! ** Action  :   increase by 1 the nstop flag is setting problem encounter
       !!----------------------------------------------------------------------
-      INTEGER :: ji, jj, jk   ! dummy loop indices
-      INTEGER ::   ios        ! Local integer output status for namelist read
+      INTEGER ::   ji, jj, jk   ! dummy loop indices
+      INTEGER ::   ios          ! Local integer output status for namelist read
       !!
       NAMELIST/namzdf_ric/ rn_avmri, rn_alp   , nn_ric  , rn_ekmfc,  &
@@ -85,5 +84,5 @@
       REWIND( numnam_cfg )              ! Namelist namzdf_ric in configuration namelist : Vertical diffusion Kz depends on Richardson number
       READ  ( numnam_cfg, namzdf_ric, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_ric in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namzdf_ric in configuration namelist', lwp )
       IF(lwm) WRITE ( numond, namzdf_ric )
       !
@@ -157,6 +156,4 @@
       REAL(wp), DIMENSION(jpi,jpj) ::   zh_ekm  ! 2D workspace
       !!----------------------------------------------------------------------
-      !
-      IF( ln_timing )   CALL timing_start('zdf_ric')
       !
       !                       !==  avm and avt = F(Richardson number)  ==!
@@ -196,6 +193,4 @@
          END DO
       ENDIF
-      !
-      IF( ln_timing )   CALL timing_stop('zdf_ric')
       !
    END SUBROUTINE zdf_ric
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfsh2.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfsh2.F90	(revision 9102)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfsh2.F90	(revision 9104)
@@ -15,5 +15,4 @@
    USE in_out_manager ! I/O manager
    USE lib_mpp        ! MPP library
-   USE timing         ! Timing
 
    IMPLICIT NONE
@@ -56,6 +55,4 @@
       !!--------------------------------------------------------------------
       !
-      IF( ln_timing )   CALL timing_start('zdf_sh2')
-      !
       DO jk = 2, jpkm1
          DO jj = 1, jpjm1        !* 2 x shear production at uw- and vw-points (energy conserving form)
@@ -77,6 +74,4 @@
       END DO 
       !
-      IF( ln_timing )   CALL timing_stop('zdf_sh2')     
-      !
    END SUBROUTINE zdf_sh2
 
Index: branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 9102)
+++ branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 9104)
@@ -51,5 +51,4 @@
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
    USE prtctl         ! Print control
-   USE timing         ! Timing
    USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
 
@@ -205,6 +204,4 @@
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zpelc, zdiag, zd_up, zd_lw
       !!--------------------------------------------------------------------
-      !
-      IF( ln_timing )   CALL timing_start('tke_tke')
       !
       zbbrau = rn_ebb / rau0       ! Local constant initialisation
@@ -430,6 +427,4 @@
          END DO
       ENDIF
-      !
-      IF( ln_timing )   CALL timing_stop('tke_tke')
       !
    END SUBROUTINE tke_tke
@@ -483,6 +478,4 @@
       !!--------------------------------------------------------------------
       !
-      IF( ln_timing )   CALL timing_start('tke_avn')
-      !
       !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
       !                     !  Mixing length
@@ -625,6 +618,4 @@
       ENDIF
       !
-      IF( ln_timing )   CALL timing_stop('tke_avn')
-      !
    END SUBROUTINE tke_avn
 
@@ -661,5 +652,5 @@
       REWIND( numnam_cfg )              ! Namelist namzdf_tke in configuration namelist : Turbulent Kinetic Energy
       READ  ( numnam_cfg, namzdf_tke, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_tke in configuration namelist', lwp )
+902   IF( ios >  0 ) CALL ctl_nam ( ios , 'namzdf_tke in configuration namelist', lwp )
       IF(lwm) WRITE ( numond, namzdf_tke )
       !
@@ -767,5 +758,5 @@
             !
             IF( MIN( id1, id2, id3, id4 ) > 0 ) THEN      ! fields exist
-               CALL iom_get( numror, jpdom_autoglo, 'en', en )
+               CALL iom_get( numror, jpdom_autoglo, 'en'   , en    )
                CALL iom_get( numror, jpdom_autoglo, 'avt_k', avt_k )
                CALL iom_get( numror, jpdom_autoglo, 'avm_k', avm_k )
