Index: /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/ice.F90
===================================================================
--- /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/ice.F90	(revision 8318)
+++ /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/ice.F90	(revision 8319)
@@ -285,8 +285,5 @@
 
    !                                     !!** some other parameters 
-   INTEGER , PUBLIC ::   nstart           !: iteration number of the begining of the run 
-   INTEGER , PUBLIC ::   nlast            !: iteration number of the end of the run 
-   INTEGER , PUBLIC ::   nitrun           !: number of iteration
-   INTEGER , PUBLIC ::   numit            !: iteration number
+   INTEGER , PUBLIC ::   kt_ice           !: iteration number
    REAL(wp), PUBLIC ::   rdt_ice          !: ice time step
    REAL(wp), PUBLIC ::   r1_rdtice        !: = 1. / rdt_ice
Index: /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limctl.F90
===================================================================
--- /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limctl.F90	(revision 8318)
+++ /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limctl.F90	(revision 8319)
@@ -297,5 +297,4 @@
                WRITE(numout,*) ' masks s,u,v   : ', tmask(ji,jj,1), umask(ji,jj,1), vmask(ji,jj,1)
                WRITE(numout,*) ' lat - long    : ', gphit(ji,jj), glamt(ji,jj)
-               WRITE(numout,*) ' Time step     : ', numit
                WRITE(numout,*) ' - Ice drift   '
                WRITE(numout,*) '   ~~~~~~~~~~~ '
@@ -348,5 +347,4 @@
                WRITE(numout,*) ' Exhaustive state '
                WRITE(numout,*) ' lat - long ', gphit(ji,jj), glamt(ji,jj)
-               WRITE(numout,*) ' Time step ', numit
                WRITE(numout,*) 
                WRITE(numout,*) ' - Cell values '
@@ -412,5 +410,4 @@
                WRITE(numout,*) '   ~~~~~~~~~~~~~~~~ '
                WRITE(numout,*) ' lat - long ', gphit(ji,jj), glamt(ji,jj)
-               WRITE(numout,*) ' Time step ', numit
                WRITE(numout,*)
                WRITE(numout,*) ' - Heat fluxes at bottom interface ***'
Index: /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limdiahsb.F90
===================================================================
--- /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limdiahsb.F90	(revision 8318)
+++ /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limdiahsb.F90	(revision 8319)
@@ -130,5 +130,5 @@
       IF( iom_use('sbgheat_tot') )  CALL iom_put( 'sbgheat_tot' , zbg_stem     )   ! snow heat content                 (1.e20 J)
       !
-      IF( lrst_ice )   CALL lim_diahsb_rst( numit, 'WRITE' )
+      IF( lrst_ice )   CALL lim_diahsb_rst( 'WRITE', kt_ice )
       !
       IF( nn_timing == 1 )   CALL timing_stop('lim_diahsb')
@@ -169,9 +169,9 @@
       ENDIF
 
-      CALL lim_diahsb_rst( nstart, 'READ' )  !* read or initialize all required files
+      CALL lim_diahsb_rst( 'READ' )  !* read or initialize all required files
       !
    END SUBROUTINE lim_diahsb_init
 
-   SUBROUTINE lim_diahsb_rst( kt, cdrw )
+   SUBROUTINE lim_diahsb_rst( cdrw, kt )
      !!---------------------------------------------------------------------
      !!                   ***  ROUTINE limdia_rst  ***
@@ -181,6 +181,8 @@
      !! ** Method  :   use of IOM library
      !!----------------------------------------------------------------------
-     INTEGER         , INTENT(in) ::   kt     ! ice time-step
      CHARACTER(len=*), INTENT(in) ::   cdrw   ! "READ"/"WRITE" flag
+     INTEGER         , INTENT(in), OPTIONAL ::   kt     ! ice time-step
+     REAL(wp)                     ::   ziter
+     INTEGER                      ::   iter
      !
      !!----------------------------------------------------------------------
@@ -189,6 +191,7 @@
         IF( ln_rstart ) THEN                   !* Read the restart file
            !
-           IF(lwp) WRITE(numout,*) '~~~~~~~'
-           IF(lwp) WRITE(numout,*) ' lim_diahsb_rst read at it= ', kt,' date= ', ndastp
+           CALL iom_get( numrir, 'kt_ice' , ziter )
+           IF(lwp) WRITE(numout,*)
+           IF(lwp) WRITE(numout,*) ' lim_diahsb_rst read at time step = ', ziter
            IF(lwp) WRITE(numout,*) '~~~~~~~'
            CALL iom_get( numrir, 'frc_voltop' , frc_voltop  )
@@ -201,5 +204,5 @@
            CALL iom_get( numrir, jpdom_autoglo, 'sal_loc_ini', sal_loc_ini )
         ELSE
-           IF(lwp) WRITE(numout,*) '~~~~~~~'
+           IF(lwp) WRITE(numout,*)
            IF(lwp) WRITE(numout,*) ' lim_diahsb at initial state '
            IF(lwp) WRITE(numout,*) '~~~~~~~'
@@ -219,15 +222,22 @@
      ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN   ! Create restart file
         !                                   ! -------------------
-        IF(lwp) WRITE(numout,*) '~~~~~~~'
-        IF(lwp) WRITE(numout,*) ' lim_diahsb_rst write at it= ', kt,' date= ', ndastp
-        IF(lwp) WRITE(numout,*) '~~~~~~~'
-        CALL iom_rstput( kt, nitrst, numriw, 'frc_voltop' , frc_voltop  )
-        CALL iom_rstput( kt, nitrst, numriw, 'frc_volbot' , frc_volbot  )
-        CALL iom_rstput( kt, nitrst, numriw, 'frc_temtop' , frc_temtop  )
-        CALL iom_rstput( kt, nitrst, numriw, 'frc_tembot' , frc_tembot  )
-        CALL iom_rstput( kt, nitrst, numriw, 'frc_sal'    , frc_sal     )
-        CALL iom_rstput( kt, nitrst, numriw, 'vol_loc_ini', vol_loc_ini )
-        CALL iom_rstput( kt, nitrst, numriw, 'tem_loc_ini', tem_loc_ini )
-        CALL iom_rstput( kt, nitrst, numriw, 'sal_loc_ini', sal_loc_ini )
+        iter = kt + nn_fsbc - 1   ! ice restarts are written at kt == nitrst - nn_fsbc + 1
+
+        IF( iter == nitrst ) THEN
+           IF(lwp) WRITE(numout,*)
+           IF(lwp) WRITE(numout,*) ' lim_diahsb_rst write at time step = ', kt
+           IF(lwp) WRITE(numout,*) '~~~~~~~'
+        ENDIF
+
+        ! Write in numriw (if iter == nitrst)
+        ! ------------------ 
+        CALL iom_rstput( iter, nitrst, numriw, 'frc_voltop' , frc_voltop  )
+        CALL iom_rstput( iter, nitrst, numriw, 'frc_volbot' , frc_volbot  )
+        CALL iom_rstput( iter, nitrst, numriw, 'frc_temtop' , frc_temtop  )
+        CALL iom_rstput( iter, nitrst, numriw, 'frc_tembot' , frc_tembot  )
+        CALL iom_rstput( iter, nitrst, numriw, 'frc_sal'    , frc_sal     )
+        CALL iom_rstput( iter, nitrst, numriw, 'vol_loc_ini', vol_loc_ini )
+        CALL iom_rstput( iter, nitrst, numriw, 'tem_loc_ini', tem_loc_ini )
+        CALL iom_rstput( iter, nitrst, numriw, 'sal_loc_ini', sal_loc_ini )
         !
      ENDIF
Index: /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90
===================================================================
--- /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90	(revision 8318)
+++ /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90	(revision 8319)
@@ -945,5 +945,5 @@
       IF ( ksmooth == 2 ) THEN
 
-         IF ( numit == nit000 + nn_fsbc - 1 ) THEN
+         IF ( kt_ice == nit000 ) THEN
             zstrp1(:,:) = 0._wp
             zstrp2(:,:) = 0._wp
Index: /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90
===================================================================
--- /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90	(revision 8318)
+++ /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90	(revision 8319)
@@ -746,9 +746,6 @@
       ! lie on the charge ellipse. See Bouillon et al. 08 for more details
       IF(ln_ctl) THEN
-         CALL prt_ctl_info('lim_rhg  : numit  :',ivar1=numit)
-         CALL prt_ctl_info('lim_rhg  : nwrite :',ivar1=nwrite)
-         CALL prt_ctl_info('lim_rhg  : MOD    :',ivar1=MOD(numit,nwrite))
-         IF( MOD(numit,nwrite) .EQ. 0 ) THEN
-            WRITE(charout,FMT="('lim_rhg  :', I4, I6, I1, I1, A10)") 1000, numit, 0, 0, ' ch. ell. '
+         IF( MOD(kt_ice+nn_fsbc-1,nwrite) == 0 ) THEN
+            WRITE(charout,FMT="('lim_rhg  :', I4, I6, I1, I1, A10)") 1000, kt_ice, 0, 0, ' ch. ell. '
             CALL prt_ctl_info(charout)
             DO jj = 2, jpjm1
@@ -762,5 +759,5 @@
                END DO
             END DO
-            WRITE(charout,FMT="('lim_rhg  :', I4, I6, I1, I1, A10)") 2000, numit, 0, 0, ' ch. ell. '
+            WRITE(charout,FMT="('lim_rhg  :', I4, I6, I1, I1, A10)") 2000, kt_ice, 0, 0, ' ch. ell. '
             CALL prt_ctl_info(charout)
          ENDIF
Index: /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90
===================================================================
--- /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90	(revision 8318)
+++ /branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90	(revision 8319)
@@ -123,4 +123,7 @@
       !-----------------------!
       IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN
+         
+         ! Ice model time step
+         kt_ice = kt
 
 # if defined key_agrif
@@ -165,6 +168,4 @@
          ! --- ice dynamics and transport (except in 1D case) ---!
          !-------------------------------------------------------!
-         numit = numit + nn_fsbc                  ! Ice model time step
-         !
                                       CALL sbc_lim_diag0       ! set diag of mass, heat and salt fluxes to 0
                                       CALL lim_rst_opn( kt )   ! Open Ice restart file
@@ -325,10 +326,7 @@
       !                                ! Initial sea-ice state
       IF( .NOT. ln_rstart ) THEN              ! start from rest: sea-ice deduced from sst
-         numit = 0
-         numit = nit000 - 1
          CALL lim_istate
       ELSE                                    ! start from a restart file
          CALL lim_rst_read
-         numit = nit000 - 1
       ENDIF
       CALL lim_var_agg(2)
@@ -349,10 +347,4 @@
          END DO
       END DO
-      !
-      nstart = numit  + nn_fsbc
-      nitrun = nitend - nit000 + 1
-      nlast  = numit  + nitrun
-      !
-      IF( nstock == 0 )   nstock = nlast + 1
       !
    END SUBROUTINE sbc_lim_init
