Index: /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 9555)
+++ /branches/2017/dev_merge_2017/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 9556)
@@ -186,6 +186,6 @@
       INTEGER  ::  jlibalt = jprstlib
       LOGICAL  ::  llok
-      REAL(wp) ::  zkt, zrdttrc1
-      REAL(wp) ::  zndastp
+      REAL(wp) ::  zrdttrc1, zkt, zndastp, zdayfrac, ksecs, ktime
+      INTEGER  ::   ihour, iminute
 
       ! Time domain : restart
@@ -222,12 +222,42 @@
             !                                          ! set the date in offline mode
             IF( ln_rsttr .AND. nn_rsttr == 2 ) THEN
-               CALL iom_get( numrtr, 'ndastp', zndastp ) 
+               CALL iom_get( numrtr, 'ndastp', zndastp )
                ndastp = NINT( zndastp )
                CALL iom_get( numrtr, 'adatrj', adatrj  )
+               CALL iom_get( numrtr, 'ntime' , ktime   )
+               nn_time0=INT(ktime)
+               ! calculate start time in hours and minutes
+               zdayfrac=adatrj-INT(adatrj)
+               ksecs = NINT(zdayfrac*86400)            ! Nearest second to catch rounding errors in adatrj              
+               ihour = INT(ksecs/3600)
+               iminute = ksecs/60-ihour*60
+                
+               ! Add to nn_time0
+               nhour   =   nn_time0 / 100
+               nminute = ( nn_time0 - nhour * 100 )
+               nminute=nminute+iminute
+               
+               IF( nminute >= 60 ) THEN
+                  nminute=nminute-60
+                  nhour=nhour+1
+               ENDIF
+               nhour=nhour+ihour
+               IF( nhour >= 24 ) THEN
+                  nhour=nhour-24
+                  adatrj=adatrj+1
+               ENDIF           
+               nn_time0 = nhour * 100 + nminute
+               adatrj = INT(adatrj)                    ! adatrj set to integer as nn_time0 updated            
              ELSE
-               ndastp = ndate0 - 1     ! ndate0 read in the namelist in dom_nam
-               adatrj = ( REAL( nittrc000-1, wp ) * rdt ) / rday
+               ! parameters corresponding to nit000 - 1 (as we start the step
+               ! loop with a call to day)
+               ndastp = ndate0        ! ndate0 read in the namelist in dom_nam
+               nhour   =   nn_time0 / 100
+               nminute = ( nn_time0 - nhour * 100 )
+               IF( nhour*3600+nminute*60-ndt05 .lt. 0 )  ndastp=ndastp-1      ! Start hour is specified in the namelist (default 0)
+               adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday
                ! note this is wrong if time step has changed during run
             ENDIF
+            IF( ABS(adatrj  - REAL(NINT(adatrj),wp)) < 0.1 / rday )   adatrj = REAL(NINT(adatrj),wp)   ! avoid truncation error
             !
             IF(lwp) THEN
@@ -235,4 +265,5 @@
               WRITE(numout,*) '   date ndastp                                      : ', ndastp
               WRITE(numout,*) '   number of elapsed days since the begining of run : ', adatrj
+              WRITE(numout,*) '   nn_time0                                         : ', nn_time0
               WRITE(numout,*)
             ENDIF
@@ -257,4 +288,5 @@
          CALL iom_rstput( kt, nitrst, numrtw, 'adatrj' , adatrj            )   ! number of elapsed days since
          !                                                                     ! the begining of the run [s]
+         CALL iom_rstput( kt, nitrst, numrtw, 'ntime'  , REAL( nn_time0, wp)) ! time
       ENDIF
 
Index: /branches/2017/dev_merge_2017/NEMOGCM/SETTE/sette.sh
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/SETTE/sette.sh	(revision 9555)
+++ /branches/2017/dev_merge_2017/NEMOGCM/SETTE/sette.sh	(revision 9556)
@@ -289,6 +289,6 @@
     set_namelist namelist_cfg cn_exp \"O2L3P_LONG\"
     set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 1000
-    set_namelist namelist_cfg nn_stock 500
+    set_namelist namelist_cfg nn_itend 1200
+    set_namelist namelist_cfg nn_stock 600
     set_namelist namelist_cfg jpni 4
     set_namelist namelist_cfg jpnj 8
@@ -322,7 +322,7 @@
     cd ${EXE_DIR}
     set_namelist namelist_cfg cn_exp \"O2L3P_SHORT\"
-    set_namelist namelist_cfg nn_it000 501
-    set_namelist namelist_cfg nn_itend 1000
-    set_namelist namelist_cfg nn_stock 500
+    set_namelist namelist_cfg nn_it000 601
+    set_namelist namelist_cfg nn_itend 1200
+    set_namelist namelist_cfg nn_stock 600
     set_namelist namelist_cfg ln_rstart .true.
     set_namelist namelist_cfg nn_rstctl 2
@@ -332,7 +332,7 @@
     set_namelist namelist_top_cfg ln_rsttr .true.
     set_namelist namelist_top_cfg nn_rsttr 2
-    set_namelist namelist_cfg cn_ocerst_in \"O2L3P_LONG_00000500_restart\"
-    set_namelist namelist_top_cfg cn_trcrst_in \"O2L3P_LONG_00000500_restart_trc\"
-    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3P_LONG_00000500_restart_ice\"
+    set_namelist namelist_cfg cn_ocerst_in \"O2L3P_LONG_00000600_restart\"
+    set_namelist namelist_top_cfg cn_trcrst_in \"O2L3P_LONG_00000600_restart_trc\"
+    set_namelist namelist_ice_cfg cn_icerst_in \"O2L3P_LONG_00000600_restart_ice\"
     # put ln_ironsed, ln_river, ln_ndepo, ln_dust
     # if not you need input files, and for tests is not necessary
@@ -351,8 +351,8 @@
         L_NPROC=$(( $i - 1 ))
         L_NPROC=`printf "%04d\n" ${L_NPROC}`
-        ln -sf ../LONG/O2L3P_LONG_00000500_restart_${L_NPROC}.nc .
-        ln -sf ../LONG/O2L3P_LONG_00000500_restart_trc_${L_NPROC}.nc .
-        ln -sf ../LONG/O2L3P_LONG_00000500_restart_ice_${L_NPROC}.nc .
-        ln -sf ../LONG/O2L3P_LONG_icebergs_00000500_restart_${L_NPROC}.nc O2L3P_LONG_00000500_restart_icebergs_${L_NPROC}.nc
+        ln -sf ../LONG/O2L3P_LONG_00000600_restart_${L_NPROC}.nc .
+        ln -sf ../LONG/O2L3P_LONG_00000600_restart_trc_${L_NPROC}.nc .
+        ln -sf ../LONG/O2L3P_LONG_00000600_restart_ice_${L_NPROC}.nc .
+        ln -sf ../LONG/O2L3P_LONG_icebergs_00000600_restart_${L_NPROC}.nc O2L3P_LONG_00000600_restart_icebergs_${L_NPROC}.nc
     done
     if [ ${USING_MPMD} == "yes" ] ; then
@@ -379,5 +379,5 @@
     set_namelist namelist_cfg cn_exp \"O2L3P_48\"
     set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 450
+    set_namelist namelist_cfg nn_itend 1200
     set_namelist namelist_cfg jpni 4
     set_namelist namelist_cfg jpnj 8
@@ -416,5 +416,5 @@
     set_namelist namelist_cfg cn_exp \"O2L3P_84\"
     set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 450
+    set_namelist namelist_cfg nn_itend 1200
     set_namelist namelist_cfg jpni 8
     set_namelist namelist_cfg jpnj 4
@@ -463,6 +463,6 @@
     set_namelist namelist_cfg cn_exp \"OFFP_LONG\"
     set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 40
-    set_namelist namelist_cfg nn_stock 20
+    set_namelist namelist_cfg nn_itend 360
+    set_namelist namelist_cfg nn_stock 180
     set_namelist namelist_cfg jpni 4
     set_namelist namelist_cfg jpnj 8
@@ -495,7 +495,7 @@
     cd ${EXE_DIR}
     set_namelist namelist_cfg cn_exp \"OFFP_SHORT\"
-    set_namelist namelist_cfg nn_it000 21
-    set_namelist namelist_cfg nn_itend 40
-    set_namelist namelist_cfg nn_stock 20
+    set_namelist namelist_cfg nn_it000 181
+    set_namelist namelist_cfg nn_itend 360
+    set_namelist namelist_cfg nn_stock 180
     set_namelist namelist_cfg jpni 4
     set_namelist namelist_cfg jpnj 8
@@ -503,9 +503,9 @@
     set_namelist namelist_top_cfg ln_rsttr .true.
     set_namelist namelist_top_cfg nn_rsttr 2
-    set_namelist namelist_top_cfg cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\"
+    set_namelist namelist_top_cfg cn_trcrst_in \"OFFP_LONG_000000180_restart_trc\"
     for (( i=1; i<=$NPROC; i++)) ; do
         L_NPROC=$(( $i - 1 ))
         L_NPROC=`printf "%04d\n" ${L_NPROC}`
-        ln -sf ../LONG/OFFP_LONG_00000020_restart_trc_${L_NPROC}.nc .
+        ln -sf ../LONG/OFFP_LONG_000000180_restart_trc_${L_NPROC}.nc .
     done
     # put ln_ironsed, ln_river, ln_ndepo, ln_dust
@@ -545,5 +545,5 @@
     set_namelist namelist_cfg cn_exp \"OFFP_48\"
     set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 40
+    set_namelist namelist_cfg nn_itend 360
     set_namelist namelist_cfg jpni 4
     set_namelist namelist_cfg jpnj 8
@@ -582,5 +582,5 @@
     set_namelist namelist_cfg cn_exp \"OFFP_84\"
     set_namelist namelist_cfg nn_it000 1
-    set_namelist namelist_cfg nn_itend 40
+    set_namelist namelist_cfg nn_itend 360
     set_namelist namelist_cfg jpni 8
     set_namelist namelist_cfg jpnj 4
