Index: /branches/DEV_r1784_3DF/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- /branches/DEV_r1784_3DF/NEMO/OPA_SRC/DIA/diawri.F90	(revision 2124)
+++ /branches/DEV_r1784_3DF/NEMO/OPA_SRC/DIA/diawri.F90	(revision 2125)
@@ -30,4 +30,7 @@
    USE limwri_2 
 #endif
+   USE dtatem
+   USE dtasal
+
    IMPLICIT NONE
    PRIVATE
@@ -489,6 +492,6 @@
 
       ! Write fields on T grid
-      CALL histwrite( nid_T, "votemper", it, tn            , ndim_T , ndex_T  )   ! temperature
-      CALL histwrite( nid_T, "vosaline", it, sn            , ndim_T , ndex_T  )   ! salinity
+      CALL histwrite( nid_T, "votemper", it, t_dta            , ndim_T , ndex_T  )   ! temperature
+      CALL histwrite( nid_T, "vosaline", it, s_dta            , ndim_T , ndex_T  )   ! salinity
       CALL histwrite( nid_T, "sosstsst", it, tn(:,:,1)     , ndim_hT, ndex_hT )   ! sea surface temperature
       CALL histwrite( nid_T, "sosaline", it, sn(:,:,1)     , ndim_hT, ndex_hT )   ! sea surface salinity
Index: /branches/DEV_r1784_3DF/NEMO/OPA_SRC/DTA/dtasal.F90
===================================================================
--- /branches/DEV_r1784_3DF/NEMO/OPA_SRC/DTA/dtasal.F90	(revision 2124)
+++ /branches/DEV_r1784_3DF/NEMO/OPA_SRC/DTA/dtasal.F90	(revision 2125)
@@ -114,7 +114,12 @@
              CALL ctl_stop( 'dta_sal: unable to allocate sf_sal structure' )   ;   RETURN
          ENDIF
-         ALLOCATE( sf_sal(1)%fnow(jpi,jpj,jpk) )
-         ALLOCATE( sf_sal(1)%fdta(jpi,jpj,jpk,2) )
-
+
+#if defined key_orca_lev10
+         ALLOCATE( sf_sal(1)%fnow(jpi,jpj,jpkdta)   )
+         IF( sn_sal%ln_tint ) ALLOCATE( sf_sal(1)%fdta(jpi,jpj,jpkdta,2) )
+#else
+         ALLOCATE( sf_sal(1)%fnow(jpi,jpj,jpk)   )
+         IF( sn_sal%ln_tint ) ALLOCATE( sf_sal(1)%fdta(jpi,jpj,jpk,2) )
+#endif
          ! fill sf_sal with sn_sal and control print
          CALL fld_fill( sf_sal, (/ sn_sal /), cn_dir, 'dta_sal', 'Salinity data', 'namdta_sal' )
Index: /branches/DEV_r1784_3DF/NEMO/OPA_SRC/DTA/dtatem.F90
===================================================================
--- /branches/DEV_r1784_3DF/NEMO/OPA_SRC/DTA/dtatem.F90	(revision 2124)
+++ /branches/DEV_r1784_3DF/NEMO/OPA_SRC/DTA/dtatem.F90	(revision 2125)
@@ -122,8 +122,8 @@
 #if defined key_orca_lev10
          ALLOCATE( sf_tem(1)%fnow(jpi,jpj,jpkdta)   )
-         ALLOCATE( sf_tem(1)%fdta(jpi,jpj,jpkdta,2) )
+         IF( sn_tem%ln_tint ) ALLOCATE( sf_tem(1)%fdta(jpi,jpj,jpkdta,2) )
 #else
          ALLOCATE( sf_tem(1)%fnow(jpi,jpj,jpk)   )
-         ALLOCATE( sf_tem(1)%fdta(jpi,jpj,jpk,2) )
+         IF( sn_tem%ln_tint ) ALLOCATE( sf_tem(1)%fdta(jpi,jpj,jpk,2) )
 #endif
          ! fill sf_tem with sn_tem and control print
Index: /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/fldread.F90
===================================================================
--- /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/fldread.F90	(revision 2124)
+++ /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/fldread.F90	(revision 2125)
@@ -78,6 +78,6 @@
       INTEGER, DIMENSION(:,:,:), POINTER      ::   data_jpj     ! array of source integers
       REAL(wp), DIMENSION(:,:,:), POINTER     ::   data_wgt     ! array of weights on model grid
-      REAL(wp), DIMENSION(:,:,:), POINTER     ::   fly_dta      ! array of values on input grid
-      REAL(wp), DIMENSION(:,:,:), POINTER     ::   col2         ! temporary array for reading in columns
+      REAL(wp), DIMENSION(:,:,:), POINTER       ::   fly_dta      ! array of values on input grid
+      REAL(wp), DIMENSION(:,:,:), POINTER       ::   col2         ! temporary array for reading in columns
    END TYPE WGT
 
@@ -146,5 +146,5 @@
 !CDIR COLLAPSE
                sd(jf)%fdta(:,:,:,1) = sd(jf)%fdta(:,:,:,2)
-               sd(jf)%rotn(1)       = sd(jf)%rotn(2)
+               sd(jf)%rotn(1)     = sd(jf)%rotn(2)
             ENDIF
 
@@ -209,12 +209,24 @@
             IF( LEN(TRIM(sd(jf)%wgtname)) > 0 ) THEN
                CALL wgt_list( sd(jf), kw )
-               ipk =  SIZE(sd(jf)%fdta,3)
-               CALL fld_interp( sd(jf)%num, sd(jf)%clvar , kw , ipk, sd(jf)%fdta(:,:,:,2) , sd(jf)%nrec_a(1) )
+               ipk = SIZE(sd(jf)%fnow,3)
+               IF( sd(jf)%ln_tint ) THEN
+                  CALL fld_interp( sd(jf)%num, sd(jf)%clvar , kw , ipk, sd(jf)%fdta(:,:,:,2) , sd(jf)%nrec_a(1) )
+               ELSE
+                  CALL fld_interp( sd(jf)%num, sd(jf)%clvar , kw , ipk, sd(jf)%fnow(:,:,:)   , sd(jf)%nrec_a(1) )
+               ENDIF
             ELSE
-               SELECT CASE( SIZE(sd(jf)%fdta,3) )
-               CASE(1)
-                  CALL iom_get( sd(jf)%num, jpdom_data, sd(jf)%clvar, sd(jf)%fdta(:,:,1,2), sd(jf)%nrec_a(1) )
+               SELECT CASE( SIZE(sd(jf)%fnow,3) )
+               CASE(1)   
+                  IF( sd(jf)%ln_tint ) THEN
+                     CALL iom_get( sd(jf)%num, jpdom_data, sd(jf)%clvar, sd(jf)%fdta(:,:,1,2), sd(jf)%nrec_a(1) )
+                  ELSE
+                     CALL iom_get( sd(jf)%num, jpdom_data, sd(jf)%clvar, sd(jf)%fnow(:,:,1)  , sd(jf)%nrec_a(1) )
+                  ENDIF 
                CASE(jpk)
-                  CALL iom_get( sd(jf)%num, jpdom_data, sd(jf)%clvar, sd(jf)%fdta(:,:,:,2), sd(jf)%nrec_a(1) )
+                  IF( sd(jf)%ln_tint ) THEN
+                     CALL iom_get( sd(jf)%num, jpdom_data, sd(jf)%clvar, sd(jf)%fdta(:,:,:,2), sd(jf)%nrec_a(1) )
+                  ELSE
+                     CALL iom_get( sd(jf)%num, jpdom_data, sd(jf)%clvar, sd(jf)%fnow(:,:,:)  , sd(jf)%nrec_a(1) )
+                  ENDIF 
                END SELECT
             ENDIF
@@ -251,5 +263,28 @@
                 IF( kf > 0 ) THEN
                    !! fields jf,kf are two components which need to be rotated together
-                   DO nf = 1,2
+                   IF( sd(jf)%ln_tint )THEN
+                      DO nf = 1,2
+                         !! check each time level of this pair
+                         IF( .NOT. sd(jf)%rotn(nf) .AND. .NOT. sd(kf)%rotn(nf) ) THEN
+                            utmp(:,:) = 0.0
+                            vtmp(:,:) = 0.0
+                            !
+                            ipk = SIZE( sd(kf)%fnow(:,:,:) ,3 )
+                            DO jk = 1,ipk
+                               CALL rot_rep( sd(jf)%fdta(:,:,jk,nf),sd(kf)%fdta(:,:,jk,nf),'T', 'en->i', utmp(:,:) )
+                               CALL rot_rep( sd(jf)%fdta(:,:,jk,nf),sd(kf)%fdta(:,:,jk,nf),'T', 'en->j', vtmp(:,:) )
+                               sd(jf)%fdta(:,:,jk,nf) = utmp(:,:)
+                               sd(kf)%fdta(:,:,jk,nf) = vtmp(:,:)
+                            ENDDO
+                            !
+                            sd(jf)%rotn(nf) = .TRUE.
+                            sd(kf)%rotn(nf) = .TRUE.
+                            IF( lwp .AND. kt == nit000 ) &
+                                      WRITE(numout,*) 'fld_read: vector pair (',  &
+                                                      TRIM(sd(jf)%clvar),',',TRIM(sd(kf)%clvar), &
+                                                      ') rotated on to model grid'
+                         ENDIF
+                      END DO
+                   ELSE 
                       !! check each time level of this pair
                       IF( .NOT. sd(jf)%rotn(nf) .AND. .NOT. sd(kf)%rotn(nf) ) THEN
@@ -257,11 +292,11 @@
                          vtmp(:,:) = 0.0
                          !
-                         ipk = SIZE( sd(kf)%fdta(:,:,:,nf) ,3 )
+                         ipk = SIZE( sd(kf)%fnow(:,:,:) ,3 )
                          DO jk = 1,ipk
-                            CALL rot_rep( sd(jf)%fdta(:,:,jk,nf),sd(kf)%fdta(:,:,jk,nf),'T', 'en->i', utmp(:,:) )
-                            CALL rot_rep( sd(jf)%fdta(:,:,jk,nf),sd(kf)%fdta(:,:,jk,nf),'T', 'en->j', vtmp(:,:) )
-                            sd(jf)%fdta(:,:,jk,nf) = utmp(:,:)
-                            sd(kf)%fdta(:,:,jk,nf) = vtmp(:,:)
-                         END DO
+                            CALL rot_rep( sd(jf)%fnow(:,:,jk),sd(kf)%fnow(:,:,jk),'T', 'en->i', utmp(:,:) )
+                            CALL rot_rep( sd(jf)%fnow(:,:,jk),sd(kf)%fnow(:,:,jk),'T', 'en->j', vtmp(:,:) )
+                            sd(jf)%fnow(:,:,jk) = utmp(:,:)
+                            sd(kf)%fnow(:,:,jk) = vtmp(:,:)
+                         ENDDO
                          !
                          sd(jf)%rotn(nf) = .TRUE.
@@ -272,5 +307,5 @@
                                                    ') rotated on to model grid'
                       ENDIF
-                   END DO
+                   ENDIF
                 ENDIF
              ENDIF
@@ -304,6 +339,4 @@
                ENDIF
 !CDIR COLLAPSE
-               sd(jf)%fnow(:,:,:) = sd(jf)%fdta(:,:,:,2)   ! piecewise constant field
- 
             ENDIF
             !
@@ -405,13 +438,28 @@
          IF( LEN(TRIM(sdjf%wgtname)) > 0 ) THEN
             CALL wgt_list( sdjf, kwgt )
-            ipk = SIZE(sdjf%fdta,3)
-            CALL fld_interp( sdjf%num, sdjf%clvar, kwgt, ipk, sdjf%fdta(:,:,:,2), sdjf%nrec_a(1) )
+            ipk = SIZE(sdjf%fnow,3)
+            IF( sdjf%ln_tint ) THEN
+               CALL fld_interp( sdjf%num, sdjf%clvar, kwgt, ipk, sdjf%fdta(:,:,:,2), sdjf%nrec_a(1) )
+            ELSE
+               CALL fld_interp( sdjf%num, sdjf%clvar, kwgt, ipk, sdjf%fnow(:,:,:)  , sdjf%nrec_a(1) )
+            ENDIF
          ELSE
-            SELECT CASE ( SIZE(sdjf%fdta,3) )
+            write(narea+200,*)' sdjf%ln_tint SIZE(sdjf%fnow,3) ',sdjf%ln_tint,SIZE(sdjf%fnow,3) ; call flush(narea+200)
+            write(narea+200,*)' SIZE(sdjf%fdta,3)  SIZE(sdjf%fdta,4) ',SIZE(sdjf%fdta,3),SIZE(sdjf%fdta,4)  ; call flush(narea+200)
+            SELECT CASE( SIZE(sdjf%fnow,3) )
             CASE(1)
-                CALL iom_get( sdjf%num, jpdom_data, sdjf%clvar, sdjf%fdta(:,:,1,2), sdjf%nrec_b(1) )
+               IF( sdjf%ln_tint ) THEN
+                  CALL iom_get( sdjf%num, jpdom_data, sdjf%clvar, sdjf%fdta(:,:,1,2), sdjf%nrec_b(1) )
+               ELSE
+                  CALL iom_get( sdjf%num, jpdom_data, sdjf%clvar, sdjf%fnow(:,:,1)  , sdjf%nrec_b(1) )
+               ENDIF
             CASE(jpk)
-                CALL iom_get( sdjf%num, jpdom_data, sdjf%clvar, sdjf%fdta(:,:,:,2), sdjf%nrec_b(1) )
+               IF( sdjf%ln_tint ) THEN
+                  CALL iom_get( sdjf%num, jpdom_data, sdjf%clvar, sdjf%fdta(:,:,:,2), sdjf%nrec_b(1) )
+               ELSE
+                  CALL iom_get( sdjf%num, jpdom_data, sdjf%clvar, sdjf%fnow(:,:,:)  , sdjf%nrec_b(1) )
+               ENDIF
             END SELECT
+            write(narea+200,*)' test1 ok ' ; call flush(narea+200)
          ENDIF
          sdjf%rotn(2) = .FALSE.
@@ -629,4 +677,5 @@
                &                          ' pairing    : '    , TRIM( sdf(jf)%vcomp      ),   &
                &                          ' data type: '      ,       sdf(jf)%cltype
+            call flush(numout)
          END DO
       ENDIF
@@ -891,5 +940,5 @@
          ! SA: +3 stencil is a patch to avoid out-of-bound computation in some configuration. 
          ! a more robust solution will be given in next release
-         ipk =  SIZE(sd%fdta,3)
+         ipk =  SIZE(sd%fnow,3)
          ALLOCATE( ref_wgts(nxt_wgt)%fly_dta(ref_wgts(nxt_wgt)%jpiwgt+3, ref_wgts(nxt_wgt)%jpjwgt+3 ,ipk) )
          IF( ref_wgts(nxt_wgt)%cyclic ) ALLOCATE( ref_wgts(nxt_wgt)%col2(2,ref_wgts(nxt_wgt)%jpjwgt+3,ipk) )
@@ -912,17 +961,17 @@
       !! ** Method  :   
       !!----------------------------------------------------------------------
-      INTEGER,          INTENT(in)                           ::   num                 ! stream number
-      CHARACTER(LEN=*), INTENT(in)                           ::   clvar               ! variable name
-      INTEGER,          INTENT(in)                           ::   kw                  ! weights number
-      INTEGER,          INTENT(in)                           ::   kk                  ! vertical dimension of kk
-      REAL(wp),         INTENT(inout), DIMENSION(jpi,jpj,kk) ::   dta                 ! output field on model grid
-      INTEGER,          INTENT(in)                           ::   nrec                ! record number to read (ie time slice)
+      INTEGER,          INTENT(in)                        ::   num                 ! stream number
+      CHARACTER(LEN=*), INTENT(in)                        ::   clvar               ! variable name
+      INTEGER,          INTENT(in)                        ::   kw                  ! weights number
+      INTEGER,          INTENT(in)                        ::   kk                  ! vertical dimension of kk
+      REAL(wp),         INTENT(inout), DIMENSION(jpi,jpj,kk) ::   dta              ! output field on model grid
+      INTEGER,          INTENT(in)                        ::   nrec                ! record number to read (ie time slice)
       !! 
-      INTEGER, DIMENSION(3)                                  ::   rec1,recn           ! temporary arrays for start and length
-      INTEGER                                                ::  jk, jn, jm           ! loop counters
-      INTEGER                                                ::  ni, nj               ! lengths
-      INTEGER                                                ::  jpimin,jpiwid        ! temporary indices
-      INTEGER                                                ::  jpjmin,jpjwid        ! temporary indices
-      INTEGER                                                ::  jpi1,jpi2,jpj1,jpj2  ! temporary indices
+      INTEGER, DIMENSION(3)                               ::   rec1,recn           ! temporary arrays for start and length
+      INTEGER                                             ::  jk, jn, jm           ! loop counters
+      INTEGER                                             ::  ni, nj               ! lengths
+      INTEGER                                             ::  jpimin,jpiwid        ! temporary indices
+      INTEGER                                             ::  jpjmin,jpjwid        ! temporary indices
+      INTEGER                                             ::  jpi1,jpi2,jpj1,jpj2  ! temporary indices
       !!----------------------------------------------------------------------
       !
Index: /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcblk_clio.F90
===================================================================
--- /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcblk_clio.F90	(revision 2124)
+++ /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcblk_clio.F90	(revision 2125)
@@ -129,4 +129,5 @@
          &                          sn_ccov, sn_tair, sn_prec
       !!---------------------------------------------------------------------
+      write(narea+200,*)'clio : '; call flush(narea+200)
 
       !                                         ! ====================== !
@@ -160,11 +161,8 @@
             CALL ctl_stop( 'sbc_blk_clio: unable to allocate sf structure' )   ;   RETURN
          ENDIF
-
          DO ifpr= 1, jpfld
             ALLOCATE( sf(ifpr)%fnow(jpi,jpj,1) )
-            ALLOCATE( sf(ifpr)%fdta(jpi,jpj,1,2) )
-         END DO
-
-
+            IF( slf_i(ifpr)%ln_tint ) ALLOCATE( sf(ifpr)%fdta(jpi,jpj,1,2) )
+         END DO
          ! fill sf with slf_i and control print
          CALL fld_fill( sf, slf_i, cn_dir, 'sbc_blk_clio', 'flux formulation for ocean surface boundary condition', 'namsbc_clio' )
Index: /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcblk_core.F90
===================================================================
--- /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 2124)
+++ /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 2125)
@@ -165,5 +165,5 @@
          DO ifpr= 1, jfld
             ALLOCATE( sf(ifpr)%fnow(jpi,jpj,1) )
-            ALLOCATE( sf(ifpr)%fdta(jpi,jpj,1,2) )
+            IF( slf_i(ifpr)%ln_tint ) ALLOCATE( sf(ifpr)%fdta(jpi,jpj,1,2) )
          END DO
          !
Index: /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcflx.F90
===================================================================
--- /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 2124)
+++ /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 2125)
@@ -127,5 +127,5 @@
          DO ji= 1, jpfld
             ALLOCATE( sf(ji)%fnow(jpi,jpj,1) )
-            ALLOCATE( sf(ji)%fdta(jpi,jpj,1,2) )
+            IF( slf_i(ji)%ln_tint ) ALLOCATE( sf(ji)%fdta(jpi,jpj,1,2) )
          END DO
 
Index: /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcice_if.F90
===================================================================
--- /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcice_if.F90	(revision 2124)
+++ /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcice_if.F90	(revision 2125)
@@ -82,5 +82,5 @@
          ENDIF
          ALLOCATE( sf_ice(1)%fnow(jpi,jpj,1) )
-         ALLOCATE( sf_ice(1)%fdta(jpi,jpj,1,2) )
+         IF( sn_ice%ln_tint ) ALLOCATE( sf_ice(1)%fdta(jpi,jpj,1,2) )
 
 
Index: /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcrnf.F90
===================================================================
--- /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 2124)
+++ /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 2125)
@@ -75,8 +75,10 @@
                CALL ctl_stop( 'sbc_rnf: unable to allocate sf_rnf structure' )   ;   RETURN
             ENDIF
+         ENDIF
+         CALL sbc_rnf_init(sf_rnf)
+         IF( .NOT. ln_rnf_emp ) THEN
             ALLOCATE( sf_rnf(1)%fnow(jpi,jpj,1) )
-            ALLOCATE( sf_rnf(1)%fdta(jpi,jpj,1,2) )
-         ENDIF
-         CALL sbc_rnf_init(sf_rnf)
+            IF( sf_rnf(1)%ln_tint ) ALLOCATE( sf_rnf(1)%fdta(jpi,jpj,1,2) )
+         ENDIF
       ENDIF
 
Index: /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcssr.F90
===================================================================
--- /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 2124)
+++ /branches/DEV_r1784_3DF/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 2125)
@@ -116,8 +116,8 @@
             ENDIF
             ALLOCATE( sf_sst(1)%fnow(jpi,jpj,1) )
-            ALLOCATE( sf_sst(1)%fdta(jpi,jpj,1,2) )
             !
             ! fill sf_sst with sn_sst and control print
             CALL fld_fill( sf_sst, (/ sn_sst /), cn_dir, 'sbc_ssr', 'SST restoring term toward SST data', 'namsbc_ssr' )
+            IF( sf_sst(1)%ln_tint ) ALLOCATE( sf_sst(1)%fdta(jpi,jpj,1,2) )
          ENDIF
          !
@@ -129,8 +129,8 @@
             ENDIF
             ALLOCATE( sf_sss(1)%fnow(jpi,jpj,1) )
-            ALLOCATE( sf_sss(1)%fdta(jpi,jpj,1,2) )
             !
             ! fill sf_sss with sn_sss and control print
             CALL fld_fill( sf_sss, (/ sn_sss /), cn_dir, 'sbc_ssr', 'SSS restoring term toward SSS data', 'namsbc_ssr' )
+            IF( sf_sss(1)%ln_tint )ALLOCATE( sf_sss(1)%fdta(jpi,jpj,1,2) )
          ENDIF
          !
Index: /branches/DEV_r1784_3DF/NEMO/OPA_SRC/TRA/traqsr.F90
===================================================================
--- /branches/DEV_r1784_3DF/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 2124)
+++ /branches/DEV_r1784_3DF/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 2125)
@@ -335,5 +335,5 @@
                ENDIF
                ALLOCATE( sf_chl(1)%fnow(jpi,jpj,1)   )
-               ALLOCATE( sf_chl(1)%fdta(jpi,jpj,1,2) )
+               IF( sn_chl%ln_tint )ALLOCATE( sf_chl(1)%fdta(jpi,jpj,1,2) )
                !                                        ! fill sf_chl with sn_chl and control print
                CALL fld_fill( sf_chl, (/ sn_chl /), cn_dir, 'tra_qsr_init',   &
