Index: trunk/NEMO/OPA_SRC/SBC/fldread.F90
===================================================================
--- trunk/NEMO/OPA_SRC/SBC/fldread.F90	(revision 2312)
+++ trunk/NEMO/OPA_SRC/SBC/fldread.F90	(revision 2323)
@@ -123,4 +123,5 @@
       INTEGER  ::   ireclast   ! last record to be read in the current year file
       INTEGER  ::   isecend    ! number of second since Jan. 1st 00h of nit000 year at nitend
+      INTEGER  ::   isecsbc    ! number of seconds between Jan. 1st 00h of nit000 year and the middle of sbc time step
       LOGICAL  ::   llnxtyr    ! open next year  file?
       LOGICAL  ::   llnxtmth   ! open next month file?
@@ -132,12 +133,14 @@
       !
       imf = SIZE( sd )
+      isecsbc = nsec_year + nsec1jan000 + NINT(0.5 * REAL(kn_fsbc - 1,wp) * rdttra(1))   ! centrered in the middle of sbc time step
+      !
       !                                         ! ===================== !
       DO jf = 1, imf                            !    LOOP OVER FIELD    !
          !                                      ! ===================== !
          !
-         IF( kt == nit000 )   CALL fld_init( sd(jf) )
+         IF( kt == nit000 )   CALL fld_init( kn_fsbc, sd(jf) )
          !
          ! read/update the after data?
-         IF( nsec_year + nsec1jan000 > sd(jf)%nswap_sec ) THEN 
+         IF( isecsbc > sd(jf)%nswap_sec ) THEN 
 
             IF( sd(jf)%ln_tint ) THEN         ! time interpolation: swap before record field
@@ -148,5 +151,5 @@
 
             ! update record informations
-            CALL fld_rec( sd(jf) )
+            CALL fld_rec( kn_fsbc, sd(jf) )
 
             ! do we have to change the year/month/day of the forcing field?? 
@@ -277,5 +280,5 @@
                ENDIF
                !
-               ztinta =  REAL( nsec_year + nsec1jan000 - sd(jf)%nrec_b(2), wp ) / REAL( sd(jf)%nrec_a(2) - sd(jf)%nrec_b(2), wp )
+               ztinta =  REAL( isecsbc - sd(jf)%nrec_b(2), wp ) / REAL( sd(jf)%nrec_a(2) - sd(jf)%nrec_b(2), wp )
                ztintb =  1. - ztinta
 !CDIR COLLAPSE
@@ -302,5 +305,5 @@
 
 
-   SUBROUTINE fld_init( sdjf )
+   SUBROUTINE fld_init( kn_fsbc, sdjf )
       !!---------------------------------------------------------------------
       !!                    ***  ROUTINE fld_init  ***
@@ -311,4 +314,5 @@
       !! ** Method  :   
       !!----------------------------------------------------------------------
+      INTEGER  , INTENT(in   ) ::   kn_fsbc     ! sbc computation period (in time step) 
       TYPE(FLD), INTENT(inout) ::   sdjf        ! input field related variables
       !!
@@ -331,5 +335,7 @@
             
       ! define record informations
-      CALL fld_rec( sdjf )
+      CALL fld_rec( kn_fsbc, sdjf )
+
+      ! Note: shifting time to be centrered in the middle of sbc time step impacts only nsec_* variables of the calendar 
 
       IF( sdjf%ln_tint ) THEN ! we need to read the previous record and we will put it in the current record structure
@@ -406,5 +412,5 @@
 
 
-   SUBROUTINE fld_rec( sdjf )
+   SUBROUTINE fld_rec( kn_fsbc, sdjf )
       !!---------------------------------------------------------------------
       !!                    ***  ROUTINE fld_rec  ***
@@ -414,4 +420,5 @@
       !! ** Method  :   
       !!----------------------------------------------------------------------
+      INTEGER  , INTENT(in   ) ::   kn_fsbc     ! sbc computation period (in time step) 
       TYPE(FLD), INTENT(inout) ::   sdjf        ! input field related variables
       !!
@@ -421,4 +428,6 @@
       INTEGER  ::   ifreq_sec   ! frequency mean (in seconds)
       !!----------------------------------------------------------------------
+      !
+      ! Note: shifting time to be centrered in the middle of sbc time step impacts only nsec_* variables of the calendar 
       !
       IF( sdjf%nfreqh == -1 ) THEN      ! monthly mean
@@ -458,4 +467,6 @@
          ELSE                                      ;   ztmp = REAL(nsec_year ,wp)   ! since 00h on Jan 1 of the current year
          ENDIF
+         ztmp = ztmp + 0.5 * REAL(kn_fsbc - 1, wp) * rdttra(1)   ! shift time to be centrered in the middle of sbc time step
+         ztmp = ztmp + 0.01 * rdttra(1)                          ! add 0.01 time step to avoid truncation error 
          IF( sdjf%ln_tint ) THEN                ! time interpolation, shift by 1/2 record
             !
@@ -471,5 +482,5 @@
             !       forcing record :  1     2     3
             !                   
-            ztmp= ztmp / ifreq_sec + 0.5
+            ztmp = ztmp / REAL(ifreq_sec, wp) + 0.5
          ELSE                 
             !
@@ -485,5 +496,5 @@
             !       forcing record :  1     2     3
             !                            
-            ztmp= ztmp / ifreq_sec
+            ztmp = ztmp / REAL(ifreq_sec, wp)
          ENDIF
          irec = 1 + INT( ztmp )
