Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 6159)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 6160)
@@ -76,30 +76,4 @@
          IF( nitrst > nitend )   nitrst = nitend   ! make sure we write a restart at the end of the run
       ENDIF
-      !! JPALM test - 
-      IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN
-         IF( nitrst <= nitend .AND. nitrst > 0 ) THEN
-            IF ( ln_rstdate ) THEN
-            WRITE(numout,*) 'JPALM - we want all informations for restart file name -- '
-            WRITE(numout,*) 'JPALM - 1 - conditions for openning rst file :'
-            WRITE(numout,*) 'JPALM - oce restart kt = ',kt,'==', nitrst - 1
-            WRITE(numout,*) 'JPALM - oce restart nstock = ',nstock,'== 1 '
-            WRITE(numout,*) 'JPALM - oce restart kt = ',kt,'==',nitend
-            WRITE(numout,*) 'JPALM - oce restart nitrst = ',nitrst,'<=',nitend,' and > 0'
-            WRITE(numout,*) '-----------------------------'
-            CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec )
-            WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday
-            WRITE(numout,*) 'JPALM - 2 - date calculated by ju2ymds: '
-            WRITE(numout,*) 'JPALM - oce restart fjulday = ',fjulday
-            WRITE(numout,*) 'JPALM - oce restart rdttra/rday  = ',rdttra(1)/rday
-            WRITE(numout,*) 'JPALM - oce restart rdttra  = ',rdttra(1)
-            WRITE(numout,*) 'JPALM - oce restart rday = ',rday
-            WRITE(numout,*) 'JPALM - oce restart iyear = ',iyear
-            WRITE(numout,*) 'JPALM - oce restart imonth = ',imonth
-            WRITE(numout,*) 'JPALM - oce restart iday = ',iday
-
-            ENDIF
-         ENDIF
-      ENDIF
-      !!
       ! to get better performances with NetCDF format:
       ! we open and define the ocean restart file one time step before writing the data (-> at nitrst - 1)
Index: /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
===================================================================
--- /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 6159)
+++ /branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 6160)
@@ -86,21 +86,17 @@
       IF( kt == nitrst - 2*nn_dttrc .OR. nstock == nn_dttrc .OR. ( kt == nitend - nn_dttrc .AND. .NOT. lrst_trc ) ) THEN
          IF ( ln_rstdate ) THEN
-            WRITE(numout,*) '-----------------------------'
-            WRITE(numout,*) 'JPALM - we want all informations for restart file name -- ' 
-            WRITE(numout,*) 'JPALM - 1 - conditions for openning rst file :'
-            WRITE(numout,*) 'JPALM - trc restart kt = ',kt,'==', nitrst - 2*nn_dttrc
-            WRITE(numout,*) 'JPALM - trc restart nstock = ',nstock,'==',nn_dttrc
-            WRITE(numout,*) 'JPALM - trc restart kt = ',kt,'==',nitend - nn_dttrc
-            WRITE(numout,*) '-----------------------------'
+            !! JPALM -- 22-12-2015 -- modif to get the good date on restart trc file name
+            !!                     -- the condition to open the rst file is not the same than for the dynamic rst.
+            !!                     -- here it - for an obscure reason - is open 2 time-step before the restart writing process
+            !!                     instead of 1.
+            !!                     -- i am not sure if someone forgot +1 in the if loop condition as
+            !!                     it is writen in all comments nitrst - 2*nn_dttrc + 1 and the condition is nitrst - 2*nn_dttrc
+            !!                     -- nevertheless we didn't wanted to broke something already working 
+            !!                     and just adapted the part we added.
+            !!                     -- So instead of calling ju2ymds( fjulday + (rdttra(1)) ....
+            !!                     we call ju2ymds( fjulday + (2*rdttra(1)) .....
+            !!--------------------------------------------------------------------      
             CALL ju2ymds( fjulday + (2*rdttra(1)) / rday, iyear, imonth, iday, zsec )
             WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday
-            WRITE(numout,*) 'JPALM - 2 - date calculated by ju2ymds: '
-            WRITE(numout,*) 'JPALM - trc restart fjulday = ',fjulday
-            WRITE(numout,*) 'JPALM - trc restart rdttra/rday  = ',rdttra(1)/rday
-            WRITE(numout,*) 'JPALM - trc restart rdttra  = ',rdttra(1)
-            WRITE(numout,*) 'JPALM - trc restart rday = ',rday
-            WRITE(numout,*) 'JPALM - trc restart iyear = ',iyear
-            WRITE(numout,*) 'JPALM - trc restart imonth = ',imonth
-            WRITE(numout,*) 'JPALM - trc restart iday = ',iday
          ELSE
             ! beware of the format used to write kt (default is i8.8, that should be large enough)
