Index: branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limcat_1D.F90
===================================================================
--- branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limcat_1D.F90	(revision 4045)
+++ branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limcat_1D.F90	(revision 4072)
@@ -40,5 +40,5 @@
       !! Local variables
       INTEGER  :: ji, jk, jl             ! dummy loop indices
-      INTEGER  :: zjpi, i_fill, jl0, ztest_1, ztest_2, ztest_3, ztest_4, ztests  
+      INTEGER  :: ijpij, i_fill, jl0, ztest_1, ztest_2, ztest_3, ztest_4, ztests  
       REAL(wp) :: zarg, zV, zconv
       REAL(wp), DIMENSION(:),   INTENT(in)    ::   zhti, zhts, zai    ! input ice/snow variables
@@ -50,15 +50,8 @@
       ! initialisation of variables
       !--------------------------------------------------------------------
-      !WRITE(numout,*) 'size(zht_i)=',SIZE(zht_i)
-      !WRITE(numout,*) 'size(zht_s)=',SIZE(zht_s)
-      !WRITE(numout,*) 'size(za_i)=',SIZE(za_i)
-      !WRITE(numout,*) 'size(zhti)=',SIZE(zhti)
-      !WRITE(numout,*) 'size(zhts)=',SIZE(zhts)
-      !WRITE(numout,*) 'size(zai)=',SIZE(zai)
-
-      zjpi = SIZE(zhti,1)
-      zht_i(1:zjpi,1:jpl) = 0.d0
-      zht_s(1:zjpi,1:jpl) = 0.d0
-      za_i (1:zjpi,1:jpl) = 0.d0
+      ijpij = SIZE(zhti,1)
+      zht_i(1:ijpij,1:jpl) = 0.d0
+      zht_s(1:ijpij,1:jpl) = 0.d0
+      za_i (1:ijpij,1:jpl) = 0.d0
 
       !------------------------------------------------------------------------------------
@@ -73,16 +66,9 @@
       !         fulfills ice volume concervation between input and output (ztests=4) 
       !--------------------------------------------------------------------------------------
-      IF(lwp) THEN
-         !WRITE(numout,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '
-         !WRITE(numout,*) 'lim_cat_1D : Distribute ice categories '
-         !WRITE(numout,*) '  of thick. = ', ( hi_max(jl), jl = 0, jpl )
-         !WRITE(numout,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '
-         !WRITE(numout,*) 'zjpi=',zjpi
-      END IF
  
       ! ----------------------------------------
       ! distribution over the jpl ice categories
       ! ----------------------------------------
-      DO ji = 1, zjpi
+      DO ji = 1, ijpij
         ! snow thickness in each category 
          zht_s(ji,1:jpl) = zhts(ji)
@@ -181,8 +167,4 @@
       END DO ! i loop
 
-      !WRITE(numout,*) 'clem zai=',MAXVAL(zai)
-      !WRITE(numout,*) 'clem za_i(:,jpl)=',(MAXVAL(za_i(:,jl)),jl=1,jpl)
-      !WRITE(numout,*) 'clem zhti=',MAXVAL(zhti)
-      !WRITE(numout,*) 'clem zht_i(:,jpl)=',(MAXVAL(zht_i(:,jl)),jl=1,jpl)
       IF( nn_timing == 1 )  CALL timing_stop('limcat_1D')
      
Index: branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limcat_2D.F90
===================================================================
--- branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limcat_2D.F90	(revision 4045)
+++ branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limcat_2D.F90	(revision 4072)
@@ -39,5 +39,5 @@
       !! Local variables
       INTEGER  :: ji, jj, jk, jl             ! dummy loop indices
-      INTEGER  :: zjpi, zjpj, i_fill, jl0, ztest_1, ztest_2, ztest_3, ztest_4, ztests  
+      INTEGER  :: ijpi, ijpj, i_fill, jl0, ztest_1, ztest_2, ztest_3, ztest_4, ztests  
       REAL(wp) :: zarg, zV, zconv
       REAL(wp), DIMENSION(:,:),   INTENT(in)  ::   zhti, zhts, zai    ! input ice/snow variables
@@ -48,9 +48,9 @@
       ! initialisation of variables
       !--------------------------------------------------------------------
-      zjpi = SIZE(zhti,1)
-      zjpj = SIZE(zhti,2)
-      zht_i(1:zjpi,1:zjpj,1:jpl) = 0.d0
-      zht_s(1:zjpi,1:zjpj,1:jpl) = 0.d0
-      za_i (1:zjpi,1:zjpj,1:jpl) = 0.d0
+      ijpi = SIZE(zhti,1)
+      ijpj = SIZE(zhti,2)
+      zht_i(1:ijpi,1:ijpj,1:jpl) = 0.d0
+      zht_s(1:ijpi,1:ijpj,1:jpl) = 0.d0
+      za_i (1:ijpi,1:ijpj,1:jpl) = 0.d0
 
       !------------------------------------------------------------------------------------
@@ -65,18 +65,10 @@
       !         fulfills ice volume concervation between input and output (ztests=4) 
       !--------------------------------------------------------------------------------------
-      IF(lwp) THEN
-         WRITE(numout,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '
-         WRITE(numout,*) 'lim_cat_2D : Distribute ice categories '
-         WRITE(numout,*) '  of thick. = ', ( hi_max(jl), jl = 0, jpl )
-         WRITE(numout,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ '
-      END IF
-      !WRITE(numout,*) ' * zht_i_ini : ', ( zht_i_ini(1,1,jl), jl = 1, jpl )
-      !WRITE(numout,*) ' * za_i_ini :  ', ( za_i_ini(1,1,jl), jl = 1, jpl )
  
       ! ----------------------------------------
       ! distribution over the jpl ice categories
       ! ----------------------------------------
-      DO jj = 1, zjpj
-         DO ji = 1, zjpi
+      DO jj = 1, ijpj
+         DO ji = 1, ijpi
 
             ! snow thickness in each category 
Index: branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limdyn.F90
===================================================================
--- branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limdyn.F90	(revision 4045)
+++ branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limdyn.F90	(revision 4072)
@@ -29,4 +29,5 @@
    USE prtctl           ! Print control
    USE lib_fortran      ! glob_sum
+   USE timing          ! Timing
 
    IMPLICIT NONE
@@ -68,4 +69,6 @@
       REAL(wp) :: zchk_vmin, zchk_amin, zchk_amax ! Check errors (C Rousset)
      !!---------------------------------------------------------------------
+
+      IF( nn_timing == 1 )  CALL timing_start('limdyn')
 
       CALL wrk_alloc( jpi, jpj, zu_io, zv_io )
@@ -249,4 +252,6 @@
       CALL wrk_dealloc( jpj, zind, zmsk )
       !
+      IF( nn_timing == 1 )  CALL timing_stop('limdyn')
+
    END SUBROUTINE lim_dyn
 
Index: branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90
===================================================================
--- branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90	(revision 4045)
+++ branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90	(revision 4072)
@@ -32,4 +32,5 @@
    USE lib_fortran     ! glob_sum
    USE limdiahsb
+   USE timing          ! Timing
 
    IMPLICIT NONE
@@ -149,4 +150,5 @@
       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zviold, zvsold, zsmvold   ! old ice volume...
       !!-----------------------------------------------------------------------------
+      IF( nn_timing == 1 )  CALL timing_start('limitd_me')
 
       CALL wrk_alloc( jpi, jpj, closing_net, divu_adv, opning, closing_gross, msnow_mlt, esnow_mlt, vt_i_init, vt_i_final )
@@ -555,4 +557,5 @@
       CALL wrk_dealloc( jpi, jpj, jpl, zviold, zvsold, zsmvold )   ! clem
       !
+      IF( nn_timing == 1 )  CALL timing_stop('limitd_me')
    END SUBROUTINE lim_itd_me
 
Index: branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limitd_th.F90
===================================================================
--- branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limitd_th.F90	(revision 4045)
+++ branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limitd_th.F90	(revision 4072)
@@ -34,4 +34,5 @@
    USE wrk_nemo         ! work arrays
    USE lib_fortran      ! to use key_nosignedzero
+   USE timing          ! Timing
 
    IMPLICIT NONE
@@ -69,4 +70,6 @@
       REAL(wp) :: zchk_vmin, zchk_amin, zchk_amax ! Check errors (C Rousset)
       !!------------------------------------------------------------------
+      IF( nn_timing == 1 )  CALL timing_start('limitd_th')
+
       ! -------------------------------
       !- check conservation (C Rousset)
@@ -189,4 +192,5 @@
       IF( num_sal == 2 )   smv_i(:,:,:) = old_smv_i(:,:,:)
       !
+      IF( nn_timing == 1 )  CALL timing_stop('limitd_th')
    END SUBROUTINE lim_itd_th
    !
Index: branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90
===================================================================
--- branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90	(revision 4045)
+++ branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90	(revision 4072)
@@ -41,4 +41,5 @@
    USE prtctl         ! Print control
    USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
+   USE timing         ! Timing
 
    IMPLICIT NONE
@@ -96,4 +97,5 @@
       REAL(wp) :: zchk_vmin, zchk_amin, zchk_amax ! Check errors (C Rousset)
       !!-------------------------------------------------------------------
+      IF( nn_timing == 1 )  CALL timing_start('limthd')
 
       CALL wrk_alloc( jpi, jpj, zqlbsbq )
@@ -488,4 +490,5 @@
       CALL wrk_dealloc( jpi, jpj, zqlbsbq )
       !
+      IF( nn_timing == 1 )  CALL timing_stop('limthd')
    END SUBROUTINE lim_thd
 
Index: branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limthd_ent.F90
===================================================================
--- branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limthd_ent.F90	(revision 4045)
+++ branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limthd_ent.F90	(revision 4072)
@@ -412,6 +412,5 @@
                ii                 = MOD( npb(ji) - 1, jpi ) + 1
                ij                 = ( npb(ji) - 1 ) / jpi + 1
-               WRITE(numout,*) ' violation of heat conservation : ',             &
-                  ABS ( zqts_in(ji) - zqts_fin(ji) ) * r1_rdtice
+               WRITE(numout,*) ' violation of heat conservation : ', ABS ( zqts_in(ji) - zqts_fin(ji) ) * r1_rdtice
                WRITE(numout,*) ' ji, jj   : ', ii, ij
                WRITE(numout,*) ' ht_s_b   : ', ht_s_b(ji)
@@ -622,21 +621,23 @@
       END DO
       !
-      DO ji = kideb, kiut
-         IF ( ABS ( zqti_in(ji) - zqti_fin(ji) ) * r1_rdtice  >  1.0e-6 ) THEN
-            ii                 = MOD( npb(ji) - 1, jpi ) + 1
-            ij                 = ( npb(ji) - 1 ) / jpi + 1
-            WRITE(numout,*) ' violation of heat conservation : ', ABS ( zqti_in(ji) - zqti_fin(ji) ) * r1_rdtice
-            WRITE(numout,*) ' ji, jj   : ', ii, ij
-            WRITE(numout,*) ' ht_i_b   : ', ht_i_b(ji)
-            WRITE(numout,*) ' zqti_in  : ', zqti_in (ji) * r1_rdtice
-            WRITE(numout,*) ' zqti_fin : ', zqti_fin(ji) * r1_rdtice
-            WRITE(numout,*) ' dh_i_bott: ', dh_i_bott(ji)
-            WRITE(numout,*) ' dh_i_surf: ', dh_i_surf(ji)
-            WRITE(numout,*) ' dh_snowice:', dh_snowice(ji)
-            WRITE(numout,*) ' icsuswi  : ', icsuswi(ji)
-            WRITE(numout,*) ' icboswi  : ', icboswi(ji)
-            WRITE(numout,*) ' snicswi  : ', snicswi(ji)
-         ENDIF
-      END DO
+      IF ( con_i ) THEN
+         DO ji = kideb, kiut
+            IF ( ABS ( zqti_in(ji) - zqti_fin(ji) ) * r1_rdtice  >  1.0e-6 ) THEN
+               ii                 = MOD( npb(ji) - 1, jpi ) + 1
+               ij                 = ( npb(ji) - 1 ) / jpi + 1
+               WRITE(numout,*) ' violation of heat conservation : ', ABS ( zqti_in(ji) - zqti_fin(ji) ) * r1_rdtice
+               WRITE(numout,*) ' ji, jj   : ', ii, ij
+               WRITE(numout,*) ' ht_i_b   : ', ht_i_b(ji)
+               WRITE(numout,*) ' zqti_in  : ', zqti_in (ji) * r1_rdtice
+               WRITE(numout,*) ' zqti_fin : ', zqti_fin(ji) * r1_rdtice
+               WRITE(numout,*) ' dh_i_bott: ', dh_i_bott(ji)
+               WRITE(numout,*) ' dh_i_surf: ', dh_i_surf(ji)
+               WRITE(numout,*) ' dh_snowice:', dh_snowice(ji)
+               WRITE(numout,*) ' icsuswi  : ', icsuswi(ji)
+               WRITE(numout,*) ' icboswi  : ', icboswi(ji)
+               WRITE(numout,*) ' snicswi  : ', snicswi(ji)
+            ENDIF
+         END DO
+      ENDIF
 
       !----------------------
Index: branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90
===================================================================
--- branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90	(revision 4045)
+++ branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limtrp.F90	(revision 4072)
@@ -29,4 +29,5 @@
    USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
    USE limvar          ! clem for ice thickness correction
+   USE timing          ! Timing
 
    IMPLICIT NONE
@@ -87,4 +88,5 @@
       REAL(wp) :: zdv, zda, zvi, zvs, zsmv
       !!---------------------------------------------------------------------
+      IF( nn_timing == 1 )  CALL timing_start('limtrp')
 
       CALL wrk_alloc( jpi, jpj, zui_u, zvi_v, zsm, zs0at, zs0ow )
@@ -569,4 +571,5 @@
       CALL wrk_dealloc( jpi,jpj,jpl,zaiold, zhimax )   ! clem
       !
+      IF( nn_timing == 1 )  CALL timing_stop('limtrp')
    END SUBROUTINE lim_trp
 
Index: branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limupdate1.F90
===================================================================
--- branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limupdate1.F90	(revision 4045)
+++ branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limupdate1.F90	(revision 4072)
@@ -42,4 +42,5 @@
    USE iom              ! I/O manager
    USE lib_mpp          ! MPP library
+   USE timing          ! Timing
 
    IMPLICIT NONE
@@ -98,4 +99,5 @@
       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zviold, zvsold, zsmvold   ! old ice volume...
       !!-------------------------------------------------------------------
+      IF( nn_timing == 1 )  CALL timing_start('limupdate1')
 
       CALL wrk_alloc( jkmax, zthick0, zqm0 )
@@ -538,4 +540,5 @@
       CALL wrk_dealloc( jpi,jpj,jpl,zviold, zvsold, zsmvold )   ! clem
 
+      IF( nn_timing == 1 )  CALL timing_stop('limupdate1')
    END SUBROUTINE lim_update1
 #else
Index: branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limupdate2.F90
===================================================================
--- branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limupdate2.F90	(revision 4045)
+++ branches/2013/dev_r4028_CNRS_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limupdate2.F90	(revision 4072)
@@ -39,4 +39,5 @@
    USE wrk_nemo         ! work arrays
    USE lib_fortran     ! glob_sum
+   USE timing          ! Timing
 
    IMPLICIT NONE
@@ -95,4 +96,5 @@
       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zviold, zvsold, zsmvold   ! old ice volume...
       !!-------------------------------------------------------------------
+      IF( nn_timing == 1 )  CALL timing_start('limupdate2')
 
       CALL wrk_alloc( jpi,jpj,jpl, internal_melt )   ! integer
@@ -558,5 +560,5 @@
       !------------
       DO jj = 2, jpjm1
-         DO ji = fs_2, fs_jpim1
+         DO ji = 2, jpim1
             IF ( at_i(ji,jj) .EQ. 0.0 ) THEN ! what to do if there is no ice
                IF ( at_i(ji+1,jj) .EQ. 0.0 ) u_ice(ji,jj)   = 0.0 ! right side
@@ -567,10 +569,10 @@
          END DO
       END DO
+      !lateral boundary conditions
+      CALL lbc_lnk( u_ice(:,:), 'U', -1. )
+      CALL lbc_lnk( v_ice(:,:), 'V', -1. )
       !mask velocities
       u_ice(:,:) = u_ice(:,:) * tmu(:,:)
       v_ice(:,:) = v_ice(:,:) * tmv(:,:)
-      !lateral boundary conditions
-      CALL lbc_lnk( u_ice(:,:), 'U', -1. )
-      CALL lbc_lnk( v_ice(:,:), 'V', -1. )
  
       !--------------------------------
@@ -687,4 +689,5 @@
       CALL wrk_dealloc( jpi,jpj,jpl,zviold, zvsold, zsmvold )   ! clem
 
+      IF( nn_timing == 1 )  CALL timing_stop('limupdate2')
    END SUBROUTINE lim_update2
 #else
