Index: branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/closea.F90
===================================================================
--- branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/closea.F90	(revision 2224)
+++ branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/closea.F90	(revision 2236)
@@ -46,5 +46,5 @@
    !!  OPA 9.0 , LOCEAN-IPSL (2006) 
    !! $Id$
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence  (NEMOGCM/License_CeCILL.txt)
    !!----------------------------------------------------------------------
 
Index: branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/daymod.F90
===================================================================
--- branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/daymod.F90	(revision 2224)
+++ branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/daymod.F90	(revision 2236)
@@ -45,5 +45,5 @@
    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence  (NEMOGCM/License_CeCILL.txt)
    !!----------------------------------------------------------------------
 
@@ -67,4 +67,7 @@
       !!              - nmonth_len, nyear_len, nmonth_half, nmonth_end through day_mth
       !!----------------------------------------------------------------------
+      INTEGER :: inbday, irest
+      REAL(wp) :: zjul
+      !!----------------------------------------------------------------------
 
       ! all calendar staff is based on the fact that MOD( rday, rdttra(1) ) == 0
@@ -105,13 +108,23 @@
       ! day since january 1st
       nday_year = nday + SUM( nmonth_len(1:nmonth - 1) )
-      
+
+      !compute number of days between last monday and today      
+      IF( nn_leapy==1 )THEN
+         CALL ymds2ju( 1900, 01, 01, 0.0, zjul )  ! compute julian day value of 01.01.1900 (monday)
+         inbday = INT(fjulday) - NINT(zjul)       ! compute nb day between  01.01.1900 and current day fjulday 
+         irest = MOD(inbday,7)                    ! compute nb day between last monday and current day fjulday 
+         IF(irest==0 )irest = 7 
+      ENDIF
+
       ! number of seconds since the beginning of current year/month at the middle of the time-step
       nsec_year  = nday_year * nsecd - ndt05   ! 1 time step before the middle of the first time step
       nsec_month = nday      * nsecd - ndt05   ! because day will be called at the beginning of step
       nsec_day   =             nsecd - ndt05
+      nsec_week  = 0
+      IF( nn_leapy==1 ) nsec_week  = irest     * nsecd - ndt05
 
       ! control print
       IF(lwp) WRITE(numout,'(a,i6,a,i2,a,i2,a,i6)')' ==============>> 1/2 time step before the start of the run DATE Y/M/D = ',   &
-           &                   nyear, '/', nmonth, '/', nday, '  nsec_day:', nsec_day
+           &                   nyear, '/', nmonth, '/', nday, '  nsec_day:', nsec_day, '  nsec_week:', nsec_week
 
       ! Up to now, calendar parameters are related to the end of previous run (nit000-1)
@@ -200,4 +213,5 @@
       nsec_year  = nsec_year  + ndt 
       nsec_month = nsec_month + ndt                 
+      IF( nn_leapy==1 ) nsec_week  = nsec_week  + ndt
       nsec_day   = nsec_day   + ndt                
       adatrj  = adatrj  + rdttra(1) / rday
@@ -228,9 +242,14 @@
          ndastp = nyear * 10000 + nmonth * 100 + nday   ! NEW date
          !
+         !compute first day of the year in julian days
+         CALL ymds2ju( nyear, 01, 01, 0.0, fjulstartyear )
+         !
          IF(lwp) WRITE(numout,'(a,i8,a,i4.4,a,i2.2,a,i2.2,a,i3.3)') '======>> time-step =', kt,   &
               &   '      New day, DATE Y/M/D = ', nyear, '/', nmonth, '/', nday, '      nday_year = ', nday_year
          IF(lwp) WRITE(numout,'(a,i8,a,i7,a,i5)') '         nsec_year = ', nsec_year,   &
-              &   '   nsec_month = ', nsec_month, '   nsec_day = ', nsec_day
-      ENDIF
+              &   '   nsec_month = ', nsec_month, '   nsec_day = ', nsec_day, '   nsec_week = ', nsec_week
+      ENDIF
+
+      IF( nsec_week .GT. 7*86400 ) nsec_week = ndt05
       
       IF(ln_ctl) THEN
Index: branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/dom_oce.F90
===================================================================
--- branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 2224)
+++ branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 2236)
@@ -9,5 +9,5 @@
    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence  (NEMOGCM/License_CeCILL.txt)
    !!----------------------------------------------------------------------
    USE par_oce      ! ocean parameters
@@ -197,15 +197,17 @@
    !! calendar variables
    !! ---------------------------------------------------------------------
-   INTEGER , PUBLIC ::   nyear       !: current year
-   INTEGER , PUBLIC ::   nmonth      !: current month
-   INTEGER , PUBLIC ::   nday        !: current day of the month
-   INTEGER , PUBLIC ::   ndastp      !: time step date in yyyymmdd format
-   INTEGER , PUBLIC ::   nday_year   !: current day counted from jan 1st of the current year
-   INTEGER , PUBLIC ::   nsec_year   !: current time step counted in second since 00h jan 1st of the current year
-   INTEGER , PUBLIC ::   nsec_month  !: current time step counted in second since 00h 1st day of the current month
-   INTEGER , PUBLIC ::   nsec_day    !: current time step counted in second since 00h of the current day
-   REAL(wp), PUBLIC ::   fjulday     !: julian day 
-   REAL(wp), PUBLIC ::   adatrj      !: number of elapsed days since the begining of the whole simulation
-   !                                 !: (cumulative duration of previous runs that may have used different time-step size)
+   INTEGER , PUBLIC ::   nyear         !: current year
+   INTEGER , PUBLIC ::   nmonth        !: current month
+   INTEGER , PUBLIC ::   nday          !: current day of the month
+   INTEGER , PUBLIC ::   ndastp        !: time step date in yyyymmdd format
+   INTEGER , PUBLIC ::   nday_year     !: current day counted from jan 1st of the current year
+   INTEGER , PUBLIC ::   nsec_year     !: current time step counted in second since 00h jan 1st of the current year
+   INTEGER , PUBLIC ::   nsec_month    !: current time step counted in second since 00h 1st day of the current month
+   INTEGER , PUBLIC ::   nsec_week     !: current time step counted in second since 00h of last monday
+   INTEGER , PUBLIC ::   nsec_day      !: current time step counted in second since 00h of the current day
+   REAL(wp), PUBLIC ::   fjulday       !: current julian day 
+   REAL(wp), PUBLIC ::   fjulstartyear !: first day of the current year in julian days
+   REAL(wp), PUBLIC ::   adatrj        !: number of elapsed days since the begining of the whole simulation
+   !                                   !: (cumulative duration of previous runs that may have used different time-step size)
    INTEGER , PUBLIC, DIMENSION(0: 1) ::   nyear_len     !: length in days of the previous/current year
    INTEGER , PUBLIC, DIMENSION(0:13) ::   nmonth_len    !: length in days of the months of the current year
@@ -230,4 +232,13 @@
    LOGICAL, PUBLIC, PARAMETER ::   lk_agrif = .FALSE.   !: agrif flag
 
+   !!----------------------------------------------------------------------
+   !! mpp reproducibility
+   !!----------------------------------------------------------------------
+#if defined key_mpp_rep1 || defined key_mpp_re2
+   LOGICAL, PUBLIC, PARAMETER ::   lk_mpp_rep = .TRUE.    !: agrif flag
+#else
+   LOGICAL, PUBLIC, PARAMETER ::   lk_mpp_rep = .FALSE.   !: agrif flag
+#endif
+
 CONTAINS
    LOGICAL FUNCTION Agrif_Root()
@@ -239,5 +250,4 @@
    END FUNCTION Agrif_CFixed
 #endif
-
    !!======================================================================
 END MODULE dom_oce
Index: branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domain.F90	(revision 2224)
+++ branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domain.F90	(revision 2236)
@@ -43,5 +43,5 @@
    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$
-   !! Software is governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !! Software is governed by the CeCILL licence  (NEMOGCM/License_CeCILL.txt)
    !!-------------------------------------------------------------------------
 
Index: branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domcfg.F90
===================================================================
--- branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domcfg.F90	(revision 2224)
+++ branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domcfg.F90	(revision 2236)
@@ -24,5 +24,5 @@
    !! NEMO/OPA 3.2 , LODYC-IPSL  (2009)
    !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
+   !! Software governed by the CeCILL licence  (NEMOGCM/License_CeCILL.txt) 
    !!----------------------------------------------------------------------
 
Index: branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domhgr.F90
===================================================================
--- branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domhgr.F90	(revision 2224)
+++ branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domhgr.F90	(revision 2236)
@@ -40,5 +40,5 @@
    !!   OPA 9.0 , LOCEAN-IPSL (2005) 
    !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence  (NEMOGCM/License_CeCILL.txt)
    !!----------------------------------------------------------------------
 
Index: branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/dommsk.F90
===================================================================
--- branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 2224)
+++ branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 2236)
@@ -44,5 +44,5 @@
    !! NEMO/OPA 3.2 , LODYC-IPSL  (2009)
    !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
+   !! Software governed by the CeCILL licence  (NEMOGCM/License_CeCILL.txt) 
    !!----------------------------------------------------------------------
 
Index: branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domngb.F90
===================================================================
--- branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domngb.F90	(revision 2224)
+++ branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domngb.F90	(revision 2236)
@@ -21,5 +21,5 @@
    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2008) 
    !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence  (NEMOGCM/License_CeCILL.txt)
    !!----------------------------------------------------------------------
 
Index: branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domstp.F90
===================================================================
--- branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domstp.F90	(revision 2224)
+++ branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domstp.F90	(revision 2236)
@@ -29,5 +29,5 @@
    !!   OPA 9.0 , LOCEAN-IPSL (2005) 
    !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence  (NEMOGCM/License_CeCILL.txt)
    !!----------------------------------------------------------------------
 
Index: branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domvvl.F90
===================================================================
--- branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 2224)
+++ branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 2236)
@@ -38,5 +38,5 @@
    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence  (NEMOGCM/License_CeCILL.txt)
    !!----------------------------------------------------------------------
 
Index: branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domzgr.F90
===================================================================
--- branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 2224)
+++ branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 2236)
@@ -34,5 +34,4 @@
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
    USE closea          ! closed seas
-   USE c1d             ! 1D configuration
 
    IMPLICIT NONE
@@ -59,5 +58,5 @@
    !! NEMO/OPA 3.0 , LOCEAN-IPSL (2008) 
    !! $Id$
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence  (NEMOGCM/License_CeCILL.txt)
    !!----------------------------------------------------------------------
 
@@ -482,7 +481,9 @@
       !                                               ! =============== !
 
-      !                                               ! =================== !
-      IF( .NOT. lk_c1d )   CALL zgr_bat_ctl           !   Bathymetry check  !
-      !                                               ! =================== !
+#if ! defined key_c1d
+      !                          ! =================== !
+      CALL zgr_bat_ctl           !   Bathymetry check  !
+      !                          ! =================== !
+#endif
    END SUBROUTINE zgr_bat
 
@@ -984,7 +985,9 @@
       !                                               ! =============== !
 
-      !                                               ! =================== !
-      IF( .NOT. lk_c1d )   CALL zgr_bat_ctl           !   Bathymetry check  !
-      !                                               ! =================== !
+#if ! defined key_c1d
+      !                          ! =================== !
+      CALL zgr_bat_ctl           !   Bathymetry check  !
+      !                          ! =================== !
+#endif
    END SUBROUTINE zgr_zps
 
@@ -1476,7 +1479,9 @@
       !                                               ! ===========
 
-      !                                               ! =================== !
-      IF( .NOT. lk_c1d )   CALL zgr_bat_ctl           !   Bathymetry check  !
-      !                                               ! =================== !
+#if ! defined key_c1d
+      !                          ! =================== !
+      CALL zgr_bat_ctl           !   Bathymetry check  !
+      !                          ! =================== !
+#endif
 
       !                                               ! =============
Index: branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domzgr_substitute.h90
===================================================================
--- branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domzgr_substitute.h90	(revision 2224)
+++ branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/domzgr_substitute.h90	(revision 2236)
@@ -108,4 +108,4 @@
    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence  (NEMOGCM/License_CeCILL.txt)
    !!----------------------------------------------------------------------
Index: branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/phycst.F90
===================================================================
--- branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/phycst.F90	(revision 2224)
+++ branches/DEV_r2106_LOCEAN2010/NEMO/OPA_SRC/DOM/phycst.F90	(revision 2236)
@@ -83,5 +83,5 @@
    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) 
    !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence  (NEMOGCM/License_CeCILL.txt)
    !!----------------------------------------------------------------------
    
