Index: NEMO/trunk/src/TOP/trcdta.F90
===================================================================
--- NEMO/trunk/src/TOP/trcdta.F90	(revision 11536)
+++ NEMO/trunk/src/TOP/trcdta.F90	(revision 12377)
@@ -39,4 +39,6 @@
 !$AGRIF_END_DO_NOT_TREAT
 
+   !! Substitutions
+#include "do_loop_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 4.0 , NEMO Consortium (2018)
@@ -98,8 +100,6 @@
       ENDIF
       !
-      REWIND( numnat_ref )              ! Namelist namtrc_dta in reference namelist : Passive tracer input data
       READ  ( numnat_ref, namtrc_dta, IOSTAT = ios, ERR = 901)
 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtrc_dta_ini in reference namelist' )
-      REWIND( numnat_cfg )              ! Namelist namtrc_dta in configuration namelist : Passive tracer input data
       READ  ( numnat_cfg, namtrc_dta, IOSTAT = ios, ERR = 902 )
 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namtrc_dta_ini in configuration namelist' )
@@ -154,5 +154,5 @@
 
 
-   SUBROUTINE trc_dta( kt, sf_trcdta, ptrcfac, ptrcdta)
+   SUBROUTINE trc_dta( kt, Kmm, sf_trcdta, ptrcfac, ptrcdta)
       !!----------------------------------------------------------------------
       !!                   ***  ROUTINE trc_dta  ***
@@ -167,4 +167,5 @@
       !!----------------------------------------------------------------------
       INTEGER                          , INTENT(in   )   ::   kt         ! ocean time-step
+      INTEGER                          , INTENT(in   )   ::   Kmm        ! time level index
       TYPE(FLD), DIMENSION(1)          , INTENT(inout)   ::   sf_trcdta  ! array of information on the field to read
       REAL(wp)                         , INTENT(in   )   ::   ptrcfac    ! multiplication factor
@@ -178,4 +179,10 @@
       !
       IF( ln_timing )   CALL timing_start('trc_dta')
+      !
+      IF( kt == nit000 .AND. lwp) THEN
+         WRITE(numout,*)
+         WRITE(numout,*) 'trc_dta : passive tracers data for IC'
+         WRITE(numout,*) '~~~~~~~ '
+      ENDIF
       !
       IF( nb_trcdta > 0 ) THEN
@@ -191,27 +198,25 @@
                WRITE(numout,*) 'trc_dta: interpolates passive tracer data onto the s- or mixed s-z-coordinate mesh'
             ENDIF
-            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) = ptrcdta(ji,jj,1)
-                     ELSEIF( zl > gdept_1d(jpk) ) THEN         ! below the last level of data
-                        ztp(jk) = ptrcdta(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) = ptrcdta(ji,jj,jkk) + ( ptrcdta(ji,jj,jkk+1) - ptrcdta(ji,jj,jkk) ) * zi
-                           ENDIF
-                        END DO
-                     ENDIF
-                  END DO
-                  DO jk = 1, jpkm1
-                     ptrcdta(ji,jj,jk) = ztp(jk) * tmask(ji,jj,jk)     ! mask required for mixed zps-s-coord
-                  END DO
-                  ptrcdta(ji,jj,jpk) = 0._wp
-                END DO
-            END DO
+            DO_2D_11_11
+               DO jk = 1, jpk                        ! determines the intepolated T-S profiles at each (i,j) points
+                  zl = gdept(ji,jj,jk,Kmm)
+                  IF(     zl < gdept_1d(1  ) ) THEN         ! above the first level of data
+                     ztp(jk) = ptrcdta(ji,jj,1)
+                  ELSEIF( zl > gdept_1d(jpk) ) THEN         ! below the last level of data
+                     ztp(jk) = ptrcdta(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) = ptrcdta(ji,jj,jkk) + ( ptrcdta(ji,jj,jkk+1) - ptrcdta(ji,jj,jkk) ) * zi
+                        ENDIF
+                     END DO
+                  ENDIF
+               END DO
+               DO jk = 1, jpkm1
+                  ptrcdta(ji,jj,jk) = ztp(jk) * tmask(ji,jj,jk)     ! mask required for mixed zps-s-coord
+               END DO
+               ptrcdta(ji,jj,jpk) = 0._wp
+            END_2D
             ! 
          ELSE                                !==   z- or zps- coordinate   ==!
