Index: trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 6695)
+++ trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 6701)
@@ -111,4 +111,5 @@
          ELSE                                   ! No restart or restart not found: Euler forward time stepping
             zfact = 1._wp
+            sbc_tsc(:,:,:) = 0._wp
             sbc_tsc_b(:,:,:) = 0._wp
          ENDIF
Index: trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90
===================================================================
--- trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90	(revision 6695)
+++ trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90	(revision 6701)
@@ -100,9 +100,9 @@
             !                                                       ! ===========
             IF( l_trdtrc ) ztrtrd(:,:,:) = tra(:,:,:,jn)    ! save trends 
-            CALL trc_dta( kt, ztrcdta )   ! read tracer data at nit000
             !
             IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file
                !
                jl = n_trc_index(jn) 
+               CALL trc_dta( kt, sf_trcdta(jl), rf_trfac(jl), ztrcdta )   ! read tracer data at nit000
                !
                SELECT CASE ( nn_zdmp_tr )
@@ -112,5 +112,5 @@
                      DO jj = 2, jpjm1
                         DO ji = fs_2, fs_jpim1   ! vector opt.
-                           tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) * rf_trfac(jl)  - trb(ji,jj,jk,jn) )
+                           tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - trb(ji,jj,jk,jn) )
                         END DO
                      END DO
@@ -122,5 +122,5 @@
                         DO ji = fs_2, fs_jpim1   ! vector opt.
                            IF( avt(ji,jj,jk) <= 5.e-4_wp )  THEN 
-                              tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) * rf_trfac(jl) - trb(ji,jj,jk,jn) )
+                              tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - trb(ji,jj,jk,jn) )
                            ENDIF
                         END DO
@@ -133,5 +133,5 @@
                         DO ji = fs_2, fs_jpim1   ! vector opt.
                            IF( gdept_n(ji,jj,jk) >= hmlp (ji,jj) ) THEN
-                              tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) * rf_trfac(jl) - trb(ji,jj,jk,jn) )
+                              tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - trb(ji,jj,jk,jn) )
                            END IF
                         END DO
@@ -180,5 +180,5 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_dmp_init')
+      IF( nn_timing == 1 )  CALL timing_start('trc_dmp_ini')
       !
       REWIND( numnat_ref )              ! Namelist namtrc_dmp in reference namelist : Passive tracers newtonian damping
@@ -199,4 +199,6 @@
          WRITE(numout,*) '      Restoration coeff file    cn_resto_tr = ', cn_resto_tr
       ENDIF
+      !                          ! Allocate arrays
+      IF( trc_dmp_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'trc_dmp_ini: unable to allocate arrays' )
       !
       IF( lzoom .AND. .NOT.lk_c1d )   nn_zdmp_tr = 0           ! restoring to climatology at closed north or south boundaries
@@ -240,7 +242,7 @@
       INTEGER, INTENT( in ) ::   kt      ! ocean time-step index
       !
-      INTEGER :: ji , jj, jk, jn, jl, jc                     ! dummy loop indicesa
+      INTEGER :: ji , jj, jk, jn, jl, jc                    ! dummy loop indicesa
       INTEGER :: isrow                                      ! local index
-      REAL(wp), POINTER, DIMENSION(:,:,:,:) ::  ztrcdta   ! 3D  workspace
+      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrcdta       ! 3D  workspace
 
       !!----------------------------------------------------------------------
@@ -286,5 +288,5 @@
             nctsi1(8)   = 297  ; nctsj1(8)   = 270 - isrow
             nctsi2(8)   = 308  ; nctsj2(8)   = 293 - isrow
-                                
+            !                                        
             !                                           ! =======================
             CASE ( 2 )                                  !  ORCA_R2 configuration
@@ -354,16 +356,15 @@
          IF(lwp)  WRITE(numout,*)
          !
-         CALL wrk_alloc( jpi, jpj, jpk, nb_trcdta, ztrcdta )    ! Memory allocation
-         CALL trc_dta( kt, ztrcdta )   ! read tracer data at nit000
+         CALL wrk_alloc( jpi, jpj, jpk, ztrcdta )   ! Memory allocation
          !
          DO jn = 1, jptra
             IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file
                 jl = n_trc_index(jn)
-                IF(lwp)  WRITE(numout,*)
+                CALL trc_dta( kt, sf_trcdta(jl), rf_trfac(jl), ztrcdta )   ! read tracer data at nit000
                 DO jc = 1, npncts
                    DO jk = 1, jpkm1
                       DO jj = nctsj1(jc), nctsj2(jc)
                          DO ji = nctsi1(jc), nctsi2(jc)
-                            trn(ji,jj,jk,jn) = ztrcdta(ji,jj,jk,jl) * rf_trfac(jl)
+                            trn(ji,jj,jk,jn) = ztrcdta(ji,jj,jk)
                             trb(ji,jj,jk,jn) = trn(ji,jj,jk,jn)
                          ENDDO
@@ -373,6 +374,5 @@
              ENDIF
           ENDDO
-          CALL wrk_dealloc( jpi, jpj, jpk, nb_trcdta, ztrcdta )    ! Memory allocation
-          !
+          CALL wrk_dealloc( jpi, jpj, jpk, ztrcdta )
       ENDIF
       !
Index: trunk/NEMOGCM/NEMO/TOP_SRC/trcdta.F90
===================================================================
--- trunk/NEMOGCM/NEMO/TOP_SRC/trcdta.F90	(revision 6695)
+++ trunk/NEMOGCM/NEMO/TOP_SRC/trcdta.F90	(revision 6701)
@@ -123,5 +123,5 @@
                ENDIF
                WRITE(numout,*) ' '
-               WRITE(numout,'(a, i3,3a,e11.3)') ' Read IC file for tracer number :', &
+               WRITE(numout,'(a, i4,3a,e11.3)') ' Read IC file for tracer number :', &
                &            jn, ', name : ', TRIM(clndta), ', Multiplicative Scaling factor : ', zfact
             ENDIF
@@ -159,5 +159,5 @@
 
 
-   SUBROUTINE trc_dta( kt, ptrc )
+   SUBROUTINE trc_dta( kt, sf_trcdta, ptrfac, ptrc)
       !!----------------------------------------------------------------------
       !!                   ***  ROUTINE trc_dta  ***
@@ -171,10 +171,14 @@
       !! ** Action  :   sf_trcdta   passive tracer data on medl mesh and interpolated at time-step kt
       !!----------------------------------------------------------------------
-      INTEGER                       , INTENT(in   ) ::   kt     ! ocean time-step
-      REAL(wp), DIMENSION(jpi,jpj,jpk,nb_trcdta), INTENT(inout) ::   ptrc     ! array of information on the field to read
+      INTEGER                     , INTENT(in   ) ::   kt     ! ocean time-step
+      TYPE(FLD), DIMENSION(1)     , INTENT(inout) ::   sf_trcdta     ! array of information on the field to read
+      REAL(wp)                    , INTENT(in   ) ::   ptrfac  ! multiplication factor
+      REAL(wp), DIMENSION(jpi,jpj,jpk), OPTIONAL  , INTENT(out  ) ::   ptrc
       !
       INTEGER ::   ji, jj, jk, jl, jkk, ik    ! dummy loop indices
       REAL(wp)::   zl, zi
       REAL(wp), DIMENSION(jpk) ::  ztp                ! 1D workspace
+      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrcdta   ! 3D  workspace
+      CHARACTER(len=100) :: clndta
       !!----------------------------------------------------------------------
       !
@@ -183,9 +187,8 @@
       IF( nb_trcdta > 0 ) THEN
          !
+         CALL wrk_alloc( jpi, jpj, jpk, ztrcdta )    ! Memory allocation
+         !
          CALL fld_read( kt, 1, sf_trcdta )      !==   read data at kt time step   ==!
-         !
-         DO jl = 1, nb_trcdta
-            ptrc(:,:,:,jl) = sf_trcdta(jl)%fnow(:,:,:) * tmask(:,:,:)    ! Mask
-         ENDDO
+         ztrcdta(:,:,:) = sf_trcdta(1)%fnow(:,:,:) * tmask(:,:,:)    ! Mask
          !
          IF( ln_sco ) THEN                   !==   s- or mixed s-zps-coordinate   ==!
@@ -195,43 +198,44 @@
                WRITE(numout,*) 'trc_dta: interpolates passive tracer data onto the s- or mixed s-z-coordinate mesh'
             ENDIF
-            DO jl = 1, nb_trcdta
-               DO jj = 1, jpj                         ! vertical interpolation of T & S
-                  DO ji = 1, jpi
-                     DO jk = 1, jpk                        ! determines the intepolated T-S profiles at each (i,j) points
-                        zl = gdept_n(ji,jj,jk)
-                        IF(     zl < gdept_1d(1  ) ) THEN         ! above the first level of data
-                           ztp(jk) =  ptrc(ji,jj,1,jl)
-                        ELSEIF( zl > gdept_1d(jpk) ) THEN         ! below the last level of data
-                           ztp(jk) =  ptrc(ji,jj,jpkm1,jl)
-                        ELSE                                      ! inbetween : vertical interpolation between jkk & jkk+1
-                           DO jkk = 1, jpkm1                                  ! when  gdept(jkk) < zl < gdept(jkk+1)
-                              IF( (zl-gdept_1d(jkk)) * (zl-gdept_1d(jkk+1)) <= 0._wp ) THEN
-                                 zi = ( zl - gdept_1d(jkk) ) / (gdept_1d(jkk+1)-gdept_1d(jkk))
-                                 ztp(jk) = ptrc(ji,jj,jkk,jl) + ( ptrc(ji,jj,jkk+1,jl) - ptrc(ji,jj,jkk,jl) ) * zi 
-                              ENDIF
-                           END DO
-                        ENDIF
-                     END DO
-                     DO jk = 1, jpkm1
-                        ptrc(ji,jj,jk,jl) = ztp(jk) * tmask(ji,jj,jk)     ! mask required for mixed zps-s-coord
-                     END DO
-                     ptrc(ji,jj,jpk,jl) = 0._wp
+            DO jj = 1, jpj                         ! vertical interpolation of T & S
+               DO ji = 1, jpi
+                  DO jk = 1, jpk                        ! determines the intepolated T-S profiles at each (i,j) points
+                     zl = gdept_n(ji,jj,jk)
+                     IF(     zl < gdept_1d(1  ) ) THEN         ! above the first level of data
+                        ztp(jk) = ztrcdta(ji,jj,1)
+                     ELSEIF( zl > gdept_1d(jpk) ) THEN         ! below the last level of data
+                        ztp(jk) =  ztrcdta(ji,jj,jpkm1)
+                     ELSE                                      ! inbetween : vertical interpolation between jkk & jkk+1
+                        DO jkk = 1, jpkm1                                  ! when  gdept(jkk) < zl < gdept(jkk+1)
+                           IF( (zl-gdept_1d(jkk)) * (zl-gdept_1d(jkk+1)) <= 0._wp ) THEN
+                              zi = ( zl - gdept_1d(jkk) ) / (gdept_1d(jkk+1)-gdept_1d(jkk))
+                              ztp(jk) = ztrcdta(ji,jj,jkk) + ( ztrcdta(ji,jj,jkk+1) - &
+                                        ztrcdta(ji,jj,jkk) ) * zi 
+                           ENDIF
+                        END DO
+                     ENDIF
                   END DO
-               END DO
+                  DO jk = 1, jpkm1
+                    ztrcdta(ji,jj,jk) = ztp(jk) * tmask(ji,jj,jk)     ! mask required for mixed zps-s-coord
+                  END DO
+                  ztrcdta(ji,jj,jpk) = 0._wp
+                END DO
             END DO
             ! 
          ELSE                                !==   z- or zps- coordinate   ==!
-            !                             
+            !
             IF( ln_zps ) THEN                      ! zps-coordinate (partial steps) interpolation at the last ocean level
-               DO jl = 1, nb_trcdta
-                  !
-                  DO jj = 1, jpj
-                     DO ji = 1, jpi
-                        ik = mbkt(ji,jj) 
-                        IF( ik > 1 ) THEN
-                           zl = ( gdept_1d(ik) - gdept_n(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) )
-                           ptrc(ji,jj,ik,jl) = (1.-zl) * ptrc(ji,jj,ik,jl) + zl * ptrc(ji,jj,ik-1,jl)
-                        ENDIF
-                     END DO
+               DO jj = 1, jpj
+                  DO ji = 1, jpi
+                     ik = mbkt(ji,jj) 
+                     IF( ik > 1 ) THEN
+                        zl = ( gdept_1d(ik) - gdept_n(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) )
+                        ztrcdta(ji,jj,ik) = (1.-zl) * ztrcdta(ji,jj,ik) + zl * ztrcdta(ji,jj,ik-1)
+                     ENDIF
+                     ik = mikt(ji,jj)
+                     IF( ik > 1 ) THEN
+                        zl = ( gdept_n(ji,jj,ik) - gdept_1d(ik) ) / ( gdept_1d(ik+1) - gdept_1d(ik) )
+                        ztrcdta(ji,jj,ik) = (1.-zl) * ztrcdta(ji,jj,ik) + zl * ztrcdta(ji,jj,ik+1)
+                     ENDIF
                   END DO
               END DO
@@ -240,13 +244,15 @@
          ENDIF
          !
-      ENDIF
-      ! 
-      IF( .NOT.ln_trcdmp .AND. .NOT.ln_trcdmp_clo ) THEN      !== deallocate data structure   ==!
-        !                                                    (data used only for initialisation)
-        IF(lwp) WRITE(numout,*) 'trc_dta: deallocate data arrays as they are only used to initialize the run'
-        DO jl = 1, nb_trcdta
-                                        DEALLOCATE( sf_trcdta(jl)%fnow)     !  arrays in the structure
-           IF( sf_trcdta(jl)%ln_tint )  DEALLOCATE( sf_trcdta(jl)%fdta)
-        ENDDO
+         ! Add multiplicative factor
+         ztrcdta(:,:,:) = ztrcdta(:,:,:) * ptrfac
+         !
+         ! Data structure for trc_ini (and BFMv5.1 coupling)
+         IF( .NOT. PRESENT(ptrc) ) sf_trcdta(1)%fnow(:,:,:) = ztrcdta(:,:,:)
+         !
+         ! Data structure for trc_dmp
+         IF( PRESENT(ptrc) )  ptrc(:,:,:) = ztrcdta(:,:,:)
+         !
+         CALL wrk_dealloc( jpi, jpj, jpk, ztrcdta )
+         !
       ENDIF
       !
@@ -260,5 +266,5 @@
    !!----------------------------------------------------------------------
 CONTAINS
-   SUBROUTINE trc_dta( kt, sf_dta, zrf_trfac )        ! Empty routine
+   SUBROUTINE trc_dta( kt, sf_trcdta, ptrfac, ptrc)        ! Empty routine
       WRITE(*,*) 'trc_dta: You should not have seen this print! error?', kt
    END SUBROUTINE trc_dta
Index: trunk/NEMOGCM/NEMO/TOP_SRC/trcini.F90
===================================================================
--- trunk/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 6695)
+++ trunk/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 6701)
@@ -203,6 +203,5 @@
       USE trcdta          ! initialisation from files
       !
-      INTEGER ::   jk, jn, jl    ! dummy loop indices
-      REAL(wp), POINTER, DIMENSION(:,:,:,:) :: ztrcdta
+      INTEGER :: jn, jl   ! dummy loop indices
       !!----------------------------------------------------------------------
       !
@@ -220,18 +219,21 @@
         !
         IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN  ! Initialisation of tracer from a file that may also be used for damping
-            !
-            CALL wrk_alloc( jpi, jpj, jpk, nb_trcdta, ztrcdta )
-            !
-            CALL trc_dta( nit000, ztrcdta )   ! read tracer data at nit000
             !
             DO jn = 1, jptra
                IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file
                   jl = n_trc_index(jn) 
-                  trn(:,:,:,jn) = ztrcdta(:,:,:,jl) * rf_trfac(jl)
+                  CALL trc_dta( nit000, sf_trcdta(jl), rf_trfac(jl) )   ! read tracer data at nit000
+                  trn(:,:,:,jn) = sf_trcdta(jl)%fnow(:,:,:) 
+                  !
+                  IF( .NOT.ln_trcdmp .AND. .NOT.ln_trcdmp_clo ) THEN      !== deallocate data structure   ==!
+                     !                                                    (data used only for initialisation)
+                     IF(lwp) WRITE(numout,*) 'trc_dta: deallocate data arrays as they are only used to initialize the run'
+                                                  DEALLOCATE( sf_trcdta(jl)%fnow )     !  arrays in the structure
+                     IF( sf_trcdta(jl)%ln_tint )  DEALLOCATE( sf_trcdta(jl)%fdta )
+                     !
+                  ENDIF
                ENDIF
             ENDDO
             !
-            CALL wrk_dealloc( jpi, jpj, jpk, nb_trcdta, ztrcdta )
-            ! 
         ENDIF
         !
