Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv.F90	(revision 13550)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv.F90	(revision 13551)
@@ -90,11 +90,8 @@
       REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts            ! active tracers and RHS of tracer equation
       !
-      ! TEMP: This change not necessary after trd_tra is tiled
-      INTEGER ::   itile
       INTEGER ::   ji, jj, jk   ! dummy loop index
       ! TEMP: This change not necessary and can be ST_2D(nn_hls) if using XIOS (subdomain support)
       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, SAVE :: zuu, zvv, zww   ! 3D workspace
-      ! TEMP: This change not necessary after trd_tra is tiled
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, SAVE :: ztrdt, ztrds
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ztrdt, ztrds
       ! TEMP: This change not necessary after extra haloes development
       LOGICAL :: lskip
@@ -108,9 +105,7 @@
       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
          ALLOCATE( zuu(jpi,jpj,jpk), zvv(jpi,jpj,jpk), zww(jpi,jpj,jpk) )
-         ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-         IF( l_trdtra ) ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) )
-      ENDIF
-
-      ! TEMP: These changes not necessary after extra haloes development (lbc_lnk removed from tra_adv_*, ldf_eiv_dia)
+      ENDIF
+
+      ! TEMP: These changes not necessary after extra haloes development (lbc_lnk removed from tra_adv_*)
       IF( nadv /= np_CEN .OR. (nadv == np_CEN .AND. nn_cen_h == 4) .OR. ln_ldfeiv_dia )  THEN
          IF( ln_tile ) THEN
@@ -123,7 +118,4 @@
       ENDIF
       IF( .NOT. lskip ) THEN
-
-         ! TEMP: This change not necessary after trd_tra is tiled
-         itile = ntile
          !                                         !==  effective transport  ==!
          ! TODO: NOT TESTED- requires waves
@@ -178,8 +170,7 @@
 
          IF( l_trdtra )   THEN                    !* Save ta and sa trends
-            DO_3D( 0, 0, 0, 0, 1, jpk )
-               ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs)
-               ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Krhs)
-            END_3D
+            ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) )
+            ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs)
+            ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs)
          ENDIF
          !
@@ -199,24 +190,15 @@
          END SELECT
          !
-         ! TEMP: These changes not necessary after trd_tra is tiled
          IF( l_trdtra )   THEN                      ! save the advective trends for further diagnostics
-            DO_3D( 0, 0, 0, 0, 1, jpk )
-               ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs) - ztrdt(ji,jj,jk)
-               ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Krhs) - ztrds(ji,jj,jk)
-            END_3D
-
-            IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-               ! TODO: TO BE TILED- trd_tra
-               CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_totad, ztrdt )
-               CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_totad, ztrds )
-               DEALLOCATE( ztrdt, ztrds )
-
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile )     ! Revert to tile domain
-            ENDIF
-         ENDIF
-
-         ! TEMP: This change not necessary after extra haloes development (lbc_lnk removed from tra_adv_*, ldf_eiv_dia)
+            DO jk = 1, jpkm1
+               ztrdt(:,:,jk) = pts(:,:,jk,jp_tem,Krhs) - ztrdt(:,:,jk)
+               ztrds(:,:,jk) = pts(:,:,jk,jp_sal,Krhs) - ztrds(:,:,jk)
+            END DO
+            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_totad, ztrdt )
+            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_totad, ztrds )
+            DEALLOCATE( ztrdt, ztrds )
+         ENDIF
+
+         ! TEMP: This change not necessary after extra haloes development (lbc_lnk removed from tra_adv_*)
          IF( ln_tile .AND. ntile == 0 ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 1 )
 
@@ -224,6 +206,5 @@
       !                                              ! print mean trends (used for debugging)
       IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=pts(:,:,:,jp_tem,Krhs), clinfo1=' adv  - Ta: ', mask1=tmask, &
-         &                                  tab3d_2=pts(:,:,:,jp_sal,Krhs), clinfo2=       ' Sa: ', mask2=tmask, &
-         &                                  clinfo3='tra' )
+         &                                  tab3d_2=pts(:,:,:,jp_sal,Krhs), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' )
 
       ! TEMP: This change not necessary if using XIOS (subdomain support)
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_cen.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_cen.F90	(revision 13550)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_cen.F90	(revision 13551)
@@ -12,6 +12,4 @@
    !!----------------------------------------------------------------------
    USE dom_oce        ! ocean space and time domain
-   ! TEMP: This change not necessary after trd_tra is tiled
-   USE domain, ONLY : dom_tile
    USE eosbn2         ! equation of state
    USE traadv_fct     ! acces to routine interp_4th_cpt 
@@ -73,5 +71,5 @@
       INTEGER                                  , INTENT(in   ) ::   kn_cen_h        ! =2/4 (2nd or 4th order scheme)
       INTEGER                                  , INTENT(in   ) ::   kn_cen_v        ! =2/4 (2nd or 4th order scheme)
-      ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
+      ! TEMP: This can be ST_2D(nn_hls) if using XIOS (subdomain support)
       REAL(wp), DIMENSION(jpi,jpj,jpk         ), INTENT(in   ) ::   pU, pV, pW      ! 3 ocean volume flux components
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::   pt              ! tracers and RHS of tracer equation
@@ -79,13 +77,7 @@
       INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
       INTEGER  ::   ierr             ! local integer
-      ! TEMP: This change not necessary after trd_tra is tiled
-      INTEGER  ::   itile
       REAL(wp) ::   zC2t_u, zC2t_v   ! local scalars
       REAL(wp), DIMENSION(ST_2D(nn_hls),jpk) ::   zwx, zwy, zwz, ztu, ztv, ztw, zltu, zltv
-      ! TEMP: This change not necessary after trd_tra is tiled
-      REAL(wp), DIMENSION(:,:,:,:), SAVE, ALLOCATABLE ::   ztrdx, ztrdy, ztrdz
       !!----------------------------------------------------------------------
-      ! TEMP: This change not necessary after trd_tra is tiled
-      itile = ntile
       !
       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
@@ -103,9 +95,4 @@
          IF(   cdtype == 'TRA' .AND. ( iom_use("uadv_heattr") .OR. iom_use("vadv_heattr") .OR. &
             &                          iom_use("uadv_salttr") .OR. iom_use("vadv_salttr")  ) )  l_hst = .TRUE.
-
-         ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-         IF( kt == kit000 .AND. l_trd ) THEN
-            ALLOCATE( ztrdx(jpi,jpj,jpk,jpts), ztrdy(jpi,jpj,jpk,jpts), ztrdz(jpi,jpj,jpk,jpts) )
-         ENDIF
       ENDIF
       !
@@ -187,22 +174,8 @@
          END_3D
          !                             ! trend diagnostics
-         ! TEMP: These changes not necessary after trd_tra is tiled
          IF( l_trd ) THEN
-            DO_3D( 1, 0, 1, 0, 1, jpk )
-               ztrdx(ji,jj,jk,jn) = zwx(ji,jj,jk)
-               ztrdy(ji,jj,jk,jn) = zwy(ji,jj,jk)
-               ztrdz(ji,jj,jk,jn) = zwz(ji,jj,jk)
-            END_3D
-
-            IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-               ! TODO: TO BE TILED- trd_tra
-               CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_xad, ztrdx(:,:,:,jn), pU, pt(:,:,:,jn,Kmm) )
-               CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_yad, ztrdy(:,:,:,jn), pV, pt(:,:,:,jn,Kmm) )
-               CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_zad, ztrdz(:,:,:,jn), pW, pt(:,:,:,jn,Kmm) )
-
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile )     ! Revert to tile domain
-            ENDIF
+            CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_xad, zwx, pU, pt(:,:,:,jn,Kmm) )
+            CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_yad, zwy, pV, pt(:,:,:,jn,Kmm) )
+            CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_zad, zwz, pW, pt(:,:,:,jn,Kmm) )
          ENDIF
          !                                 ! "Poleward" heat and salt transports
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_fct.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_fct.F90	(revision 13550)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_fct.F90	(revision 13551)
@@ -15,6 +15,4 @@
    USE oce            ! ocean dynamics and active tracers
    USE dom_oce        ! ocean space and time domain
-   ! TEMP: This change not necessary after trd_tra is tiled
-   USE domain, ONLY : dom_tile
    USE trc_oce        ! share passive tracers/Ocean variables
    USE trd_oce        ! trends: ocean variables
@@ -81,23 +79,17 @@
       INTEGER                                  , INTENT(in   ) ::   kn_fct_v        ! order of the FCT scheme (=2 or 4)
       REAL(wp)                                 , INTENT(in   ) ::   p2dt            ! tracer time-step
-      ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
+      ! TEMP: This can be ST_2D(nn_hls) if using XIOS (subdomain support)
       REAL(wp), DIMENSION(jpi,jpj,jpk         ), INTENT(in   ) ::   pU, pV, pW      ! 3 ocean volume flux components
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::   pt              ! tracers and RHS of tracer equation
       !
-      INTEGER  ::   ji, jj, jk, jn                           ! dummy loop indices  
-      ! TEMP: This change not necessary after trd_tra is tiled
-      INTEGER  ::   itile
+      INTEGER  ::   ji, jj, jk, jn                           ! dummy loop indices
       REAL(wp) ::   ztra                                     ! local scalar
       REAL(wp) ::   zfp_ui, zfp_vj, zfp_wk, zC2t_u, zC4t_u   !   -      -
       REAL(wp) ::   zfm_ui, zfm_vj, zfm_wk, zC2t_v, zC4t_v   !   -      -
       REAL(wp), DIMENSION(ST_2D(nn_hls),jpk)        ::   zwi, zwx, zwy, zwz, ztu, ztv, zltu, zltv, ztw
-      ! TEMP: This change not necessary after trd_tra is tiled
-      REAL(wp), DIMENSION(:,:,:), SAVE, ALLOCATABLE ::   ztrdx, ztrdy, ztrdz
-      REAL(wp), DIMENSION(:,:,:)      , ALLOCATABLE ::   zptry
-      REAL(wp), DIMENSION(:,:,:)      , ALLOCATABLE ::   zwinf, zwdia, zwsup
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ztrdx, ztrdy, ztrdz, zptry
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   zwinf, zwdia, zwsup
       LOGICAL  ::   ll_zAimp                                 ! flag to apply adaptive implicit vertical advection
       !!----------------------------------------------------------------------
-      ! TEMP: This change not necessary after trd_tra is tiled
-      itile = ntile
       !
       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
@@ -107,14 +99,14 @@
             IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
          ENDIF
-      !! -- init to 0
-      zwi(:,:,:) = 0._wp
-      zwx(:,:,:) = 0._wp
-      zwy(:,:,:) = 0._wp
-      zwz(:,:,:) = 0._wp
-      ztu(:,:,:) = 0._wp
-      ztv(:,:,:) = 0._wp
-      zltu(:,:,:) = 0._wp
-      zltv(:,:,:) = 0._wp
-      ztw(:,:,:) = 0._wp
+         !! -- init to 0
+         zwi(:,:,:) = 0._wp
+         zwx(:,:,:) = 0._wp
+         zwy(:,:,:) = 0._wp
+         zwz(:,:,:) = 0._wp
+         ztu(:,:,:) = 0._wp
+         ztv(:,:,:) = 0._wp
+         zltu(:,:,:) = 0._wp
+         zltv(:,:,:) = 0._wp
+         ztw(:,:,:) = 0._wp
          !
          l_trd = .FALSE.            ! set local switches
@@ -127,11 +119,12 @@
             &                         iom_use("uadv_salttr") .OR. iom_use("vadv_salttr")  ) )  l_hst = .TRUE.
          !
-         ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-         IF( kt == kit000 .AND. (l_trd .OR. l_hst) )  THEN
-            ALLOCATE( ztrdx(jpi,jpj,jpk), ztrdy(jpi,jpj,jpk), ztrdz(jpi,jpj,jpk) )
-         ENDIF
       ENDIF
       !
-      IF( l_ptr ) THEN  
+      IF( l_trd .OR. l_hst )  THEN
+         ALLOCATE( ztrdx(ST_2D(nn_hls),jpk), ztrdy(ST_2D(nn_hls),jpk), ztrdz(ST_2D(nn_hls),jpk) )
+         ztrdx(:,:,:) = 0._wp   ;    ztrdy(:,:,:) = 0._wp   ;   ztrdz(:,:,:) = 0._wp
+      ENDIF
+      !
+      IF( l_ptr ) THEN
          ALLOCATE( zptry(ST_2D(nn_hls),jpk) )
          zptry(:,:,:) = 0._wp
@@ -218,10 +211,7 @@
             !
          END IF
-         !                
-         ! TEMP: This change not necessary after trd_tra is tiled
+         !
          IF( l_trd .OR. l_hst )  THEN             ! trend diagnostics (contribution of upstream fluxes)
-            DO_3D( 1, 0, 1, 0, 1, jpk )
-               ztrdx(ji,jj,jk) = zwx(ji,jj,jk)   ;   ztrdy(ji,jj,jk) = zwy(ji,jj,jk)   ;   ztrdz(ji,jj,jk) = zwz(ji,jj,jk)
-            END_3D
+            ztrdx(:,:,:) = zwx(:,:,:)   ;   ztrdy(:,:,:) = zwy(:,:,:)   ;   ztrdz(:,:,:) = zwz(:,:,:)
          END IF
          !                             ! "Poleward" heat and salt transports (contribution of upstream fluxes)
@@ -351,26 +341,16 @@
          END IF         
          !
-         ! TEMP: These changes not necessary after trd_tra is tiled
          IF( l_trd .OR. l_hst ) THEN   ! trend diagnostics // heat/salt transport
-            DO_3D( 1, 0, 1, 0, 1, jpk )
-               ztrdx(ji,jj,jk) = ztrdx(ji,jj,jk) + zwx(ji,jj,jk)  ! <<< add anti-diffusive fluxes
-               ztrdy(ji,jj,jk) = ztrdy(ji,jj,jk) + zwy(ji,jj,jk)  !     to upstream fluxes
-               ztrdz(ji,jj,jk) = ztrdz(ji,jj,jk) + zwz(ji,jj,jk)  !
-            END_3D
-            !
-            IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-               IF( l_trd ) THEN              ! trend diagnostics
-                  IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-                  ! TODO: TO BE TILED- trd_tra
-                  CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_xad, ztrdx, pU, pt(:,:,:,jn,Kmm) )
-                  CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_yad, ztrdy, pV, pt(:,:,:,jn,Kmm) )
-                  CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_zad, ztrdz, pW, pt(:,:,:,jn,Kmm) )
-
-                  IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile )     ! Revert to tile domain
-               ENDIF
+            ztrdx(:,:,:) = ztrdx(:,:,:) + zwx(:,:,:)  ! <<< add anti-diffusive fluxes
+            ztrdy(:,:,:) = ztrdy(:,:,:) + zwy(:,:,:)  !     to upstream fluxes
+            ztrdz(:,:,:) = ztrdz(:,:,:) + zwz(:,:,:)  !
+            !
+            IF( l_trd ) THEN              ! trend diagnostics
+               CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_xad, ztrdx, pU, pt(:,:,:,jn,Kmm) )
+               CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_yad, ztrdy, pV, pt(:,:,:,jn,Kmm) )
+               CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_zad, ztrdz, pW, pt(:,:,:,jn,Kmm) )
             ENDIF
             !                             ! heat/salt transport
-            IF( l_hst )   CALL dia_ar5_hst( jn, 'adv', ztrdx(ST_2D(nn_hls),:), ztrdy(ST_2D(nn_hls),:) )
+            IF( l_hst )   CALL dia_ar5_hst( jn, 'adv', ztrdx(:,:,:), ztrdy(:,:,:) )
             !
          ENDIF
@@ -385,8 +365,7 @@
          DEALLOCATE( zwdia, zwinf, zwsup )
       ENDIF
-      ! TEMP: These changes not necessary after trd_tra is tiled
-!      IF( l_trd .OR. l_hst ) THEN
-!         DEALLOCATE( ztrdx, ztrdy, ztrdz )
-!      ENDIF
+      IF( l_trd .OR. l_hst ) THEN
+         DEALLOCATE( ztrdx, ztrdy, ztrdz )
+      ENDIF
       IF( l_ptr ) THEN 
          DEALLOCATE( zptry )
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_mus.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_mus.F90	(revision 13550)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_mus.F90	(revision 13551)
@@ -19,6 +19,4 @@
    USE trc_oce        ! share passive tracers/Ocean variables
    USE dom_oce        ! ocean space and time domain
-   ! TEMP: This change not necessary after trd_tra is tiled
-   USE domain, ONLY : dom_tile
    USE trd_oce        ! trends: ocean variables
    USE trdtra         ! tracers trends manager
@@ -83,10 +81,8 @@
       LOGICAL                                  , INTENT(in   ) ::   ld_msc_ups      ! use upstream scheme within muscl
       REAL(wp)                                 , INTENT(in   ) ::   p2dt            ! tracer time-step
-      ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
+      ! TEMP: This can be ST_2D(nn_hls) if using XIOS (subdomain support)
       REAL(wp), DIMENSION(jpi,jpj,jpk         ), INTENT(in   ) ::   pU, pV, pW      ! 3 ocean volume flux components
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::   pt              ! tracers and RHS of tracer equation
       !
-      ! TEMP: This change not necessary after trd_tra is tiled
-      INTEGER  ::   itile
       INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
       INTEGER  ::   ierr             ! local integer
@@ -95,9 +91,5 @@
       REAL(wp), DIMENSION(ST_2D(nn_hls),jpk) ::   zwx, zslpx   ! 3D workspace
       REAL(wp), DIMENSION(ST_2D(nn_hls),jpk) ::   zwy, zslpy   ! -      -
-      ! TEMP: This change not necessary after trd_tra is tiled
-      REAL(wp), DIMENSION(:,:,:), SAVE, ALLOCATABLE ::   ztrdx, ztrdy, ztrdz
       !!----------------------------------------------------------------------
-      ! TEMP: This change not necessary after trd_tra is tiled
-      itile = ntile
       !
       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
@@ -134,9 +126,4 @@
          IF(   cdtype == 'TRA' .AND. ( iom_use("uadv_heattr") .OR. iom_use("vadv_heattr") .OR. &
             &                          iom_use("uadv_salttr") .OR. iom_use("vadv_salttr")  ) ) l_hst = .TRUE.
-
-         ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-         IF( kt == kit000 .AND. l_trd ) THEN
-            ALLOCATE( ztrdx(jpi,jpj,jpk), ztrdy(jpi,jpj,jpk), ztrdz(jpi,jpj,jpk) )
-         ENDIF
       ENDIF
       !
@@ -197,20 +184,7 @@
          END_3D
          !                                ! trend diagnostics
-         ! TEMP: These changes not necessary after trd_tra is tiled
          IF( l_trd )  THEN
-            DO_3D( 1, 0, 1, 0, 1, jpk )
-               ztrdx(ji,jj,jk) = zwx(ji,jj,jk)
-               ztrdy(ji,jj,jk) = zwy(ji,jj,jk)
-            END_3D
-
-            IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-               ! TODO: TO BE TILED- trd_tra
-               CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_xad, ztrdx, pU, pt(:,:,:,jn,Kbb) )
-               CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_yad, ztrdy, pV, pt(:,:,:,jn,Kbb) )
-
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile )   ! Revert to tile domain
-            ENDIF
+            CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_xad, zwx, pU, pt(:,:,:,jn,Kbb) )
+            CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_yad, zwy, pV, pt(:,:,:,jn,Kbb) )
          END IF
          !                                 ! "Poleward" heat and salt transports 
@@ -264,19 +238,5 @@
          END_3D
          !                                ! send trends for diagnostic
-         ! TEMP: These changes not necessary after trd_tra is tiled
-         IF( l_trd ) THEN
-            DO_3D( 0, 0, 0, 0, 1, jpk )
-               ztrdz(ji,jj,jk) = zwx(ji,jj,jk)
-            END_3D
-
-            IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-               ! TODO: TO BE TILED- trd_tra
-               CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_zad, ztrdz, pW, pt(:,:,:,jn,Kbb) )
-
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile )     ! Revert to tile domain
-            ENDIF
-         ENDIF
+         IF( l_trd )  CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_zad, zwx, pW, pt(:,:,:,jn,Kbb) )
          !
       END DO                     ! end of tracer loop
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_qck.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_qck.F90	(revision 13550)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_qck.F90	(revision 13551)
@@ -17,6 +17,4 @@
    USE oce             ! ocean dynamics and active tracers
    USE dom_oce         ! ocean space and time domain
-   ! TEMP: This change not necessary after trd_tra is tiled
-   USE domain, ONLY : dom_tile
    USE trc_oce         ! share passive tracers/Ocean variables
    USE trd_oce         ! trends: ocean variables
@@ -93,5 +91,5 @@
       INTEGER                                  , INTENT(in   ) ::   kjpt            ! number of tracers
       REAL(wp)                                 , INTENT(in   ) ::   p2dt            ! tracer time-step
-      ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
+      ! TEMP: This can be ST_2D(nn_hls) if using XIOS (subdomain support)
       REAL(wp), DIMENSION(jpi,jpj,jpk         ), INTENT(in   ) ::   pU, pV, pW      ! 3 ocean volume transport components
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::   pt              ! tracers and RHS of tracer equation
@@ -132,25 +130,13 @@
       INTEGER                                  , INTENT(in   ) ::   kjpt       ! number of tracers
       REAL(wp)                                 , INTENT(in   ) ::   p2dt       ! tracer time-step
-      ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
+      ! TEMP: This can be ST_2D(nn_hls) if using XIOS (subdomain support)
       REAL(wp), DIMENSION(jpi,jpj,jpk         ), INTENT(in   ) ::   pU        ! i-velocity components
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::   pt              ! active tracers and RHS of tracer equation
       !!
-      ! TEMP: This change not necessary after trd_tra is tiled
-      INTEGER  ::   itile
       INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
       REAL(wp) ::   ztra, zbtr, zdir, zdx, zmsk   ! local scalars
       REAL(wp), DIMENSION(ST_2D(nn_hls),jpk) ::   zwx, zfu, zfc, zfd
-      ! TEMP: This change not necessary after trd_tra is tiled
-      REAL(wp), DIMENSION(:,:,:), SAVE, ALLOCATABLE ::   ztrdx
       !----------------------------------------------------------------------
-      ! TEMP: This change not necessary after trd_tra is tiled
-      itile = ntile
-      !
-      ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-      IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
-         IF( kt == nit000 .AND. l_trd ) THEN
-            ALLOCATE( ztrdx(jpi,jpj,jpk) )
-         ENDIF
-      ENDIF
+      !
       !                                                          ! ===========
       DO jn = 1, kjpt                                            ! tracer loop
@@ -218,19 +204,5 @@
          END_3D
          !                                 ! trend diagnostics
-         ! TEMP: These changes not necessary after trd_tra is tiled
-         IF( l_trd )  THEN
-            DO_3D( 1, 0, 1, 0, 1, jpk )
-               ztrdx(ji,jj,jk) = zwx(ji,jj,jk)
-            END_3D
-
-            IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-               ! TODO: TO BE TILED- trd_tra
-               CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_xad, ztrdx, pU, pt(:,:,:,jn,Kmm) )
-
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile )     ! Revert to tile domain
-            ENDIF
-         ENDIF
+         IF( l_trd )   CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_xad, zwx, pU, pt(:,:,:,jn,Kmm) )
          !
       END DO
@@ -248,25 +220,13 @@
       INTEGER                                  , INTENT(in   ) ::   kjpt       ! number of tracers
       REAL(wp)                                 , INTENT(in   ) ::   p2dt       ! tracer time-step
-      ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
+      ! TEMP: This can be ST_2D(nn_hls) if using XIOS (subdomain support)
       REAL(wp), DIMENSION(jpi,jpj,jpk         ), INTENT(in   ) ::   pV        ! j-velocity components
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::   pt              ! active tracers and RHS of tracer equation
       !!
-      ! TEMP: This change not necessary after trd_tra is tiled
-      INTEGER  ::   itile
       INTEGER  :: ji, jj, jk, jn                ! dummy loop indices
       REAL(wp) :: ztra, zbtr, zdir, zdx, zmsk   ! local scalars
       REAL(wp), DIMENSION(ST_2D(nn_hls),jpk) ::   zwy, zfu, zfc, zfd   ! 3D workspace
-      ! TEMP: This change not necessary after trd_tra is tiled
-      REAL(wp), DIMENSION(:,:,:), SAVE, ALLOCATABLE ::   ztrdy
       !----------------------------------------------------------------------
-      ! TEMP: This change not necessary after trd_tra is tiled
-      itile = ntile
-      !
-      ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-      IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
-         IF( kt == nit000 .AND. l_trd ) THEN
-            ALLOCATE( ztrdy(jpi,jpj,jpk) )
-         ENDIF
-      ENDIF
+      !
       !                                                          ! ===========
       DO jn = 1, kjpt                                            ! tracer loop
@@ -341,19 +301,5 @@
          END_3D
          !                                 ! trend diagnostics
-         ! TEMP: These changes not necessary after trd_tra is tiled
-         IF( l_trd )  THEN
-            DO_3D( 1, 0, 1, 0, 1, jpk )
-               ztrdy(ji,jj,jk) = zwy(ji,jj,jk)
-            END_3D
-
-            IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-               ! TODO: TO BE TILED- trd_tra
-               CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_yad, ztrdy, pV, pt(:,:,:,jn,Kmm) )
-
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile )     ! Revert to tile domain
-            ENDIF
-         ENDIF
+         IF( l_trd )   CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_yad, zwy, pV, pt(:,:,:,jn,Kmm) )
          !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
          IF( l_ptr )   CALL dia_ptr_hst( jn, 'adv', zwy(:,:,:) )
@@ -372,25 +318,12 @@
       CHARACTER(len=3)                         , INTENT(in   ) ::   cdtype   ! =TRA or TRC (tracer indicator)
       INTEGER                                  , INTENT(in   ) ::   kjpt     ! number of tracers
-      ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
+      ! TEMP: This can be ST_2D(nn_hls) if using XIOS (subdomain support)
       REAL(wp), DIMENSION(jpi,jpj,jpk         ), INTENT(in   ) ::   pW      ! vertical velocity
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::   pt              ! active tracers and RHS of tracer equation
       !
-      ! TEMP: This change not necessary after trd_tra is tiled
-      INTEGER  ::   itile
       INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
       REAL(wp), DIMENSION(ST_2D(nn_hls),jpk) ::   zwz   ! 3D workspace
-      ! TEMP: This change not necessary after trd_tra is tiled
-      REAL(wp), DIMENSION(:,:,:), SAVE, ALLOCATABLE ::   ztrdz
-      !!----------------------------------------------------------------------
-      ! TEMP: This change not necessary after trd_tra is tiled
-      itile = ntile
-      !
-      ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-      IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
-         IF( kt == nit000 .AND. l_trd ) THEN
-            ALLOCATE( ztrdz(jpi,jpj,jpk) )
-         ENDIF
-      ENDIF
-
+      !!----------------------------------------------------------------------
+      !
       zwz(:,:, 1 ) = 0._wp       ! surface & bottom values set to zero for all tracers
       zwz(:,:,jpk) = 0._wp
@@ -421,19 +354,5 @@
          END_3D
          !                                 ! Send trends for diagnostic
-         ! TEMP: These changes not necessary after trd_tra is tiled
-         IF( l_trd )  THEN
-            DO_3D( 0, 0, 0, 0, 1, jpk )
-               ztrdz(ji,jj,jk) = zwz(ji,jj,jk)
-            END_3D
-
-            IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-               ! TODO: TO BE TILED- trd_tra
-               CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_zad, ztrdz, pW, pt(:,:,:,jn,Kmm) )
-
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile )     ! Revert to tile domain
-            ENDIF
-         ENDIF
+         IF( l_trd )  CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_zad, zwz, pW, pt(:,:,:,jn,Kmm) )
          !
       END DO
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_ubs.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_ubs.F90	(revision 13550)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traadv_ubs.F90	(revision 13551)
@@ -14,6 +14,4 @@
    USE oce            ! ocean dynamics and active tracers
    USE dom_oce        ! ocean space and time domain
-   ! TEMP: This change not necessary after trd_tra is tiled
-   USE domain, ONLY : dom_tile
    USE trc_oce        ! share passive tracers/Ocean variables
    USE trd_oce        ! trends: ocean variables
@@ -94,10 +92,8 @@
       INTEGER                                  , INTENT(in   ) ::   kn_ubs_v        ! number of tracers
       REAL(wp)                                 , INTENT(in   ) ::   p2dt            ! tracer time-step
-      ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
+      ! TEMP: This can be ST_2D(nn_hls) if using XIOS (subdomain support)
       REAL(wp), DIMENSION(jpi,jpj,jpk         ), INTENT(in   ) ::   pU, pV, pW      ! 3 ocean volume transport components
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::   pt              ! tracers and RHS of tracer equation
       !
-      ! TEMP: This change not necessary after trd_tra is tiled
-      INTEGER  ::   itile
       INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
       REAL(wp) ::   ztra, zbtr, zcoef                       ! local scalars
@@ -105,9 +101,5 @@
       REAL(wp) ::   zfp_vj, zfm_vj, zcenvt, zeeu, zeev, z_hdivn    !   -      -
       REAL(wp), DIMENSION(ST_2D(nn_hls),jpk) ::   ztu, ztv, zltu, zltv, zti, ztw     ! 3D workspace
-      ! TEMP: This change not necessary after trd_tra is tiled
-      REAL(wp), DIMENSION(:,:,:), SAVE, ALLOCATABLE ::   ztrdx, ztrdy, ztrdz
-      !!----------------------------------------------------------------------
-      ! TEMP: This change not necessary after trd_tra is tiled
-      itile = ntile
+      !!----------------------------------------------------------------------
       !
       IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
@@ -125,9 +117,4 @@
          IF(   cdtype == 'TRA' .AND. ( iom_use("uadv_heattr") .OR. iom_use("vadv_heattr") .OR. &
             &                          iom_use("uadv_salttr") .OR. iom_use("vadv_salttr")  ) ) l_hst = .TRUE.
-
-         ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-         IF( kt == kit000 .AND. l_trd ) THEN
-            ALLOCATE( ztrdx(jpi,jpj,jpk), ztrdy(jpi,jpj,jpk), ztrdz(jpi,jpj,jpk) )
-         ENDIF
       ENDIF
       !
@@ -187,20 +174,7 @@
          END_3D                                                     ! and/or in trend diagnostic (l_trd=T)
          !
-         ! TEMP: These changes not necessary after trd_tra is tiled
          IF( l_trd ) THEN                  ! trend diagnostics
-            DO_3D( 1, 0, 1, 0, 1, jpkm1 )
-               ztrdx(ji,jj,jk) = ztu(ji,jj,jk)
-               ztrdy(ji,jj,jk) = ztv(ji,jj,jk)
-            END_3D
-
-            IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-               ! TODO: TO BE TILED- trd_tra
-               CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_xad, ztrdx, pU, pt(:,:,:,jn,Kmm) )
-               CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_yad, ztrdy, pV, pt(:,:,:,jn,Kmm) )
-
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile )     ! Revert to tile domain
-            ENDIF
+             CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_xad, ztu, pU, pt(:,:,:,jn,Kmm) )
+             CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_yad, ztv, pV, pt(:,:,:,jn,Kmm) )
          END IF
          !     
@@ -278,20 +252,11 @@
          END_3D
          !
-         ! TEMP: These changes not necessary after trd_tra is tiled
          IF( l_trd )  THEN       ! vertical advective trend diagnostics
             DO_3D( 0, 0, 0, 0, 1, jpkm1 )
-               ztrdz(ji,jj,jk) = pt(ji,jj,jk,jn,Krhs) - zltv(ji,jj,jk)                          &
+               zltv(ji,jj,jk) = pt(ji,jj,jk,jn,Krhs) - zltv(ji,jj,jk)                          &
                   &           + pt(ji,jj,jk,jn,Kmm) * (  pW(ji,jj,jk) - pW(ji,jj,jk+1)  )   &
                   &                              * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm)
             END_3D
-
-            IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-               ! TODO: TO BE TILED- trd_tra
-               CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_zad, ztrdz )
-
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile )     ! Revert to tile domain
-            ENDIF
+            CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_zad, zltv )
          ENDIF
          !
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/trabbc.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/trabbc.F90	(revision 13550)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/trabbc.F90	(revision 13551)
@@ -17,6 +17,4 @@
    USE oce            ! ocean variables
    USE dom_oce        ! domain: ocean
-   ! TEMP: This change not necessary after trd_tra is tiled
-   USE domain, ONLY : dom_tile
    USE phycst         ! physical constants
    USE trd_oce        ! trends: ocean variables
@@ -83,6 +81,5 @@
       !
       INTEGER  ::   ji, jj, jk    ! dummy loop indices
-      ! TEMP: This change not necessary after trd_tra is tiled
-      REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ztrdt   ! 3D workspace
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrdt   ! 3D workspace
       !!----------------------------------------------------------------------
       !
@@ -90,12 +87,6 @@
       !
       IF( l_trdtra ) THEN           ! Save the input temperature trend
-         IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
-            ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-            ALLOCATE( ztrdt(jpi,jpj,jpk) )
-         ENDIF
-
-         DO_3D( 0, 0, 0, 0, 1, jpk )
-            ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs)
-         END_3D
+         ALLOCATE( ztrdt(jpi,jpj,jpk) )
+         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs)
       ENDIF
       !                             !  Add the geothermal trend on temperature
@@ -105,28 +96,14 @@
       END_2D
       !
-      ! TEMP: These changes not necessary after trd_tra is tiled, lbc_lnk not necessary if using XIOS (subdomain support, will not output haloes)
-      IF( l_trdtra ) THEN
-         DO_3D( 0, 0, 0, 0, 1, jpk )
-            ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs) - ztrdt(ji,jj,jk)
-         END_3D
+      IF( l_trdtra ) THEN        ! Send the trend for diagnostics
+         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:)
+         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_bbc, ztrdt )
+         DEALLOCATE( ztrdt )
       ENDIF
-
+      !
       IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-         !
-         IF( l_trdtra ) THEN        ! Send the trend for diagnostics
-            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-            ! TODO: TO BE TILED- trd_tra
-            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_bbc, ztrdt )
-            DEALLOCATE( ztrdt )
-
-            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = nijtile )   ! Revert to tile domain
-         ENDIF
-         !
          CALL iom_put ( "hfgeou" , rho0_rcp * qgh_trd0(:,:) )
       ENDIF
-
-      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=pts(:,:,:,jp_tem,Krhs), clinfo1=' bbc  - Ta: ', mask1=tmask, &
-         &                                  clinfo3='tra-ta' )
+      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=pts(:,:,:,jp_tem,Krhs), clinfo1=' bbc  - Ta: ', mask1=tmask, clinfo3='tra-ta' )
       !
       IF( ln_timing )   CALL timing_stop('tra_bbc')
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/trabbl.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/trabbl.F90	(revision 13550)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/trabbl.F90	(revision 13551)
@@ -26,6 +26,4 @@
    USE oce            ! ocean dynamics and active tracers
    USE dom_oce        ! ocean space and time domain
-   ! TEMP: This change not necessary after trd_tra is tiled
-   USE domain, ONLY : dom_tile
    USE phycst         ! physical constant
    USE eosbn2         ! equation of state
@@ -109,6 +107,5 @@
       !
       INTEGER  ::   ji, jj, jk   ! Dummy loop indices
-      ! TEMP: This change not necessary after trd_tra is tiled
-      REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ztrdt, ztrds
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrdt, ztrds
       !!----------------------------------------------------------------------
       !
@@ -116,13 +113,7 @@
       !
       IF( l_trdtra )   THEN                         !* Save the T-S input trends
-         IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
-            ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-            ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) )
-         ENDIF
-
-         DO_3D( 0, 0, 0, 0, 1, jpk )
-            ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs)
-            ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Krhs)
-         END_3D
+         ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) )
+         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs)
+         ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs)
       ENDIF
 
@@ -159,21 +150,10 @@
       ENDIF
 
-      ! TEMP: These changes not necessary after trd_tra is tiled
       IF( l_trdtra )   THEN                      ! send the trends for further diagnostics
-         DO_3D( 0, 0, 0, 0, 1, jpk )
-            ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs) - ztrdt(ji,jj,jk)
-            ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Krhs) - ztrds(ji,jj,jk)
-         END_3D
-
-         IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-            ! TODO: TO BE TILED- trd_tra
-            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_bbl, ztrdt )
-            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_bbl, ztrds )
-            DEALLOCATE( ztrdt, ztrds )
-
-            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = nijtile )   ! Revert to tile domain
-         ENDIF
+         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:)
+         ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) - ztrds(:,:,:)
+         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_bbl, ztrdt )
+         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_bbl, ztrds )
+         DEALLOCATE( ztrdt, ztrds )
       ENDIF
       !
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/tradmp.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/tradmp.F90	(revision 13550)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/tradmp.F90	(revision 13551)
@@ -24,6 +24,4 @@
    USE oce            ! ocean: variables
    USE dom_oce        ! ocean: domain variables
-   ! TEMP: This change not necessary after trd_tra is tiled
-   USE domain, ONLY : dom_tile
    USE c1d            ! 1D vertical configuration
    USE trd_oce        ! trends: ocean variables
@@ -98,6 +96,5 @@
       INTEGER ::   ji, jj, jk, jn   ! dummy loop indices
       REAL(wp), DIMENSION(ST_2D(nn_hls),jpk,jpts)     ::  zts_dta
-      ! TEMP: This change not necessary after trd_tra is tiled
-      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, SAVE ::  ztrdts
+      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::  ztrdts
       !!----------------------------------------------------------------------
       !
@@ -105,12 +102,6 @@
       !
       IF( l_trdtra )   THEN                    !* Save ta and sa trends
-         IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
-            ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-            ALLOCATE( ztrdts(jpi,jpj,jpk,jpts) )
-         ENDIF
-
-         DO_3D( 0, 0, 0, 0, 1, jpk )
-            ztrdts(ji,jj,jk,:) = pts(ji,jj,jk,:,Krhs)
-         END_3D
+         ALLOCATE( ztrdts(jpi,jpj,jpk,jpts) )
+         ztrdts(:,:,:,:) = pts(:,:,:,:,Krhs)
       ENDIF
       !                           !==  input T-S data at kt  ==!
@@ -149,20 +140,9 @@
       END SELECT
       !
-      ! TEMP: These changes not necessary after trd_tra is tiled
       IF( l_trdtra )   THEN       ! trend diagnostic
-         DO_3D( 0, 0, 0, 0, 1, jpk )
-            ztrdts(ji,jj,jk,:) = pts(ji,jj,jk,:,Krhs) - ztrdts(ji,jj,jk,:)
-         END_3D
-
-         IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-            ! TODO: TO BE TILED- trd_tra
-            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_dmp, ztrdts(:,:,:,jp_tem) )
-            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_dmp, ztrdts(:,:,:,jp_sal) )
-            DEALLOCATE( ztrdts )
-
-            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = nijtile )   ! Revert to tile domain
-         ENDIF
+         ztrdts(:,:,:,:) = pts(:,:,:,:,Krhs) - ztrdts(:,:,:,:)
+         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_dmp, ztrdts(:,:,:,jp_tem) )
+         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_dmp, ztrdts(:,:,:,jp_sal) )
+         DEALLOCATE( ztrdts )
       ENDIF
       !                           ! Control print
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traldf.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traldf.F90	(revision 13550)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traldf.F90	(revision 13551)
@@ -17,5 +17,5 @@
    USE oce            ! ocean dynamics and tracers
    USE dom_oce        ! ocean space and time domain
-   ! TEMP: This change not necessary after trd_tra is tiled
+   ! TEMP: This change not necessary after extra haloes development (lbc_lnk removed from tra_ldf_blp, zps_hde*)
    USE domain, ONLY : dom_tile
    USE phycst         ! physical constants
@@ -40,6 +40,4 @@
    PUBLIC   tra_ldf_init   ! called by nemogcm.F90 
 
-   !! * Substitutions
-#  include "do_loop_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OCE 4.0 , NEMO Consortium (2018)
@@ -59,10 +57,6 @@
       REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts             ! active tracers and RHS of tracer equation
       !!
-      ! TEMP: This change not necessary after trd_tra is tiled
-      INTEGER ::   itile
-      INTEGER ::   ji, jj, jk    ! dummy loop indices
-      ! TEMP: This change not necessary after trd_tra is tiled
-      REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ztrdt, ztrds
-      ! TEMP: This change not necessary after extra haloes development
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrdt, ztrds
+      ! TEMP: This change not necessary after extra haloes development (lbc_lnk removed from tra_ldf_blp, zps_hde*)
       LOGICAL :: lskip
       !!----------------------------------------------------------------------
@@ -72,9 +66,8 @@
       lskip = .FALSE.
 
-      IF( l_trdtra ) THEN
-         IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
-            ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-            ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) )
-         ENDIF
+      IF( l_trdtra )   THEN                    !* Save ta and sa trends
+         ALLOCATE( ztrdt(jpi,jpj,jpk) , ztrds(jpi,jpj,jpk) )
+         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs)
+         ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs)
       ENDIF
 
@@ -90,14 +83,4 @@
       ENDIF
       IF( .NOT. lskip ) THEN
-
-         ! TEMP: This change not necessary after trd_tra is tiled
-         itile = ntile
-
-         IF( l_trdtra )   THEN                    !* Save ta and sa trends
-            DO_3D( 0, 0, 0, 0, 1, jpk )
-               ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs)
-               ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Krhs)
-            END_3D
-         ENDIF
          !
          SELECT CASE ( nldf_tra )                 !* compute lateral mixing trend and add it to the general trend
@@ -112,26 +95,14 @@
          END SELECT
          !
-         ! TEMP: These changes not necessary after trd_tra is tiled
          IF( l_trdtra )   THEN                    !* save the horizontal diffusive trends for further diagnostics
-            DO_3D( 0, 0, 0, 0, 1, jpk )
-               ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs) - ztrdt(ji,jj,jk)
-               ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Krhs) - ztrds(ji,jj,jk)
-            END_3D
-
-            IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-               ! TODO: TO BE TILED- trd_tra
-               CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_ldf, ztrdt )
-               CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_ldf, ztrds )
-               DEALLOCATE( ztrdt, ztrds )
-
-               IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = itile )     ! Revert to tile domain
-            ENDIF
+            ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:)
+            ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) - ztrds(:,:,:)
+            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_ldf, ztrdt )
+            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_ldf, ztrds )
+            DEALLOCATE( ztrdt, ztrds )
          ENDIF
 
          ! TEMP: This change not necessary after extra haloes development (lbc_lnk removed from tra_ldf_blp, zps_hde*)
          IF( ln_tile .AND. ntile == 0 ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 1 )
-
       ENDIF
       !                                        !* print mean trends (used for debugging)
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/tranpc.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/tranpc.F90	(revision 13550)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/tranpc.F90	(revision 13551)
@@ -17,5 +17,5 @@
    USE oce            ! ocean dynamics and active tracers
    USE dom_oce        ! ocean space and time domain
-   ! TEMP: This change not necessary after trd_tra is tiled and extra haloes development (lbc_lnk removed)
+   ! TEMP: This change not necessary after extra haloes development (lbc_lnk removed)
    USE domain, ONLY : dom_tile
    USE phycst         ! physical constants
@@ -77,6 +77,5 @@
       REAL(wp), DIMENSION(ST_2D(nn_hls),jpk     )   ::   zn2              ! N^2
       REAL(wp), DIMENSION(ST_2D(nn_hls),jpk,jpts)   ::   zab              ! alpha and beta
-      ! TEMP: This change not necessary after trd_tra is tiled
-      REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ztrdt, ztrds ! 3D workspace
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrdt, ztrds ! 3D workspace
       !
       LOGICAL, PARAMETER :: l_LB_debug = .FALSE. ! set to true if you want to follow what is
@@ -86,19 +85,11 @@
       !
       IF( ln_timing )   CALL timing_start('tra_npc')
-
-      IF( l_trdtra )   THEN
-         IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
-            ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-            ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) )
-         ENDIF
-      ENDIF
       !
       IF( MOD( kt, nn_npc ) == 0 ) THEN
          !
          IF( l_trdtra )   THEN                    !* Save initial after fields
-            DO_3D( 0, 0, 0, 0, 1, jpk )
-               ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Kaa)
-               ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Kaa)
-            END_3D
+            ALLOCATE( ztrdt(jpi,jpj,jpk) , ztrds(jpi,jpj,jpk) )
+            ztrdt(:,:,:) = pts(:,:,:,jp_tem,Kaa)
+            ztrds(:,:,:) = pts(:,:,:,jp_sal,Kaa)
          ENDIF
          !
@@ -314,26 +305,15 @@
          END_2D
          !
-         ! TEMP: These changes not necessary after trd_tra is tiled and extra haloes development (lbc_lnk removed)
-         IF( l_trdtra ) THEN
+         IF( l_trdtra ) THEN         ! send the Non penetrative mixing trends for diagnostic
             z1_rDt = 1._wp / (2._wp * rn_Dt)
-
-            DO_3D( 0, 0, 0, 0, 1, jpk )
-               ztrdt(ji,jj,jk) = ( pts(ji,jj,jk,jp_tem,Kaa) - ztrdt(ji,jj,jk) ) * z1_rDt
-               ztrds(ji,jj,jk) = ( pts(ji,jj,jk,jp_sal,Kaa) - ztrds(ji,jj,jk) ) * z1_rDt
-            END_3D
+            ztrdt(:,:,:) = ( pts(:,:,:,jp_tem,Kaa) - ztrdt(:,:,:) ) * z1_rDt
+            ztrds(:,:,:) = ( pts(:,:,:,jp_sal,Kaa) - ztrds(:,:,:) ) * z1_rDt
+            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_npc, ztrdt )
+            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_npc, ztrds )
+            DEALLOCATE( ztrdt, ztrds )
          ENDIF
-
+         !
+         ! TEMP: This change not necessary after extra haloes development (lbc_lnk removed)
          IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-            IF( l_trdtra ) THEN         ! send the Non penetrative mixing trends for diagnostic
-               ! TODO: TO BE TILED- trd_tra
-               CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_npc, ztrdt )
-               CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_npc, ztrds )
-               DEALLOCATE( ztrdt, ztrds )
-            ENDIF
-
-            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = nijtile )   ! Revert to tile domain
-            !
             CALL lbc_lnk_multi( 'tranpc', pts(:,:,:,jp_tem,Kaa), 'T', 1.0_wp, pts(:,:,:,jp_sal,Kaa), 'T', 1.0_wp )
             !
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traqsr.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traqsr.F90	(revision 13550)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/traqsr.F90	(revision 13551)
@@ -115,6 +115,4 @@
       REAL(wp) ::   zCb, zCmax, zpsi, zpsimax, zrdpsi, zCze
       REAL(wp) ::   zlogc, zlogze, zlogCtot, zlogCze
-      ! TEMP: These changes not necessary after trd_tra is tiled
-      REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ztrdt
       REAL(wp), ALLOCATABLE, DIMENSION(:,:)   :: ze0, ze1, ze2, ze3
       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: ztrdt, zetot, ztmp3d
@@ -132,12 +130,6 @@
       !
       IF( l_trdtra ) THEN      ! trends diagnostic: save the input temperature trend
-         IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
-            ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-            ALLOCATE( ztrdt(jpi,jpj,jpk) )
-         ENDIF
-
-         DO_3D( 0, 0, 0, 0, 1, jpk )
-            ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs)
-         END_3D
+         ALLOCATE( ztrdt(jpi,jpj,jpk) )
+         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs)
       ENDIF
       !
@@ -236,7 +228,7 @@
             ! Convert chlorophyll value to attenuation coefficient look-up table index
             zlui = 41 + 20.*LOG10(zchl) + 1.e-15
-            DO_3D( 1, 1, 1, 1, 1, nksr + 1 )
-               ztmp3d(ji,jj,jk) = zlui
-            END_3D
+            DO jk = 1, nksr + 1
+               ztmp3d(:,:,jk) = zlui
+            END DO
          ENDIF
          !
@@ -325,19 +317,8 @@
       ENDIF
       !
-      ! TEMP: These changes not necessary after trd_tra is tiled
       IF( l_trdtra ) THEN     ! qsr tracers trends saved for diagnostics
-         DO_3D( 0, 0, 0, 0, 1, jpk )
-            ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs) - ztrdt(ji,jj,jk)
-         END_3D
-
-         IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-            ! TODO: TO BE TILED- trd_tra
-            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_qsr, ztrdt )
-            DEALLOCATE( ztrdt )
-
-            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = nijtile )   ! Revert to tile domain
-         ENDIF
+         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:)
+         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_qsr, ztrdt )
+         DEALLOCATE( ztrdt )
       ENDIF
       !                       ! print mean trends (used for debugging)
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/trasbc.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/trasbc.F90	(revision 13550)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/trasbc.F90	(revision 13551)
@@ -19,6 +19,4 @@
    USE sbc_oce        ! surface boundary condition: ocean
    USE dom_oce        ! ocean space domain variables
-   ! TEMP: This change not necessary after trd_tra is tiled
-   USE domain, ONLY : dom_tile
    USE phycst         ! physical constant
    USE eosbn2         ! Equation Of State
@@ -81,6 +79,5 @@
       INTEGER  ::   ikt, ikb                    ! local integers
       REAL(wp) ::   zfact, z1_e3t, zdep, ztim   ! local scalar
-      ! TEMP: This change not necessary after trd_tra is tiled
-      REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  ztrdt, ztrds
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::  ztrdt, ztrds
       !!----------------------------------------------------------------------
       !
@@ -96,13 +93,7 @@
       !
       IF( l_trdtra ) THEN                    !* Save ta and sa trends
-         IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
-            ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-            ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) )
-         ENDIF
-
-         DO_3D( 0, 0, 0, 0, 1, jpk )
-            ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs)
-            ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Krhs)
-         END_3D
+         ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) )
+         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs)
+         ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs)
       ENDIF
       !
@@ -160,5 +151,6 @@
       DO jn = 1, jpts               !==  update tracer trend  ==!
          DO_2D( 0, 0, 0, 0 )
-            pts(ji,jj,1,jn,Krhs) = pts(ji,jj,1,jn,Krhs) + zfact * ( sbc_tsc_b(ji,jj,jn) + sbc_tsc(ji,jj,jn) ) / e3t(ji,jj,1,Kmm)
+            pts(ji,jj,1,jn,Krhs) = pts(ji,jj,1,jn,Krhs) + zfact * ( sbc_tsc_b(ji,jj,jn) + sbc_tsc(ji,jj,jn) )    &
+               &                                                / e3t(ji,jj,1,Kmm)
          END_2D
       END DO
@@ -192,5 +184,5 @@
       ENDIF
 
-      IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
+      IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only on the last tile
          IF( iom_use('rnf_x_sst') )   CALL iom_put( "rnf_x_sst", rnf*pts(:,:,1,jp_tem,Kmm) )   ! runoff term on sst
          IF( iom_use('rnf_x_sss') )   CALL iom_put( "rnf_x_sss", rnf*pts(:,:,1,jp_sal,Kmm) )   ! runoff term on sss
@@ -223,21 +215,10 @@
 #endif
       !
-      ! TEMP: These changes not necessary after trd_tra is tiled
       IF( l_trdtra )   THEN                      ! save the horizontal diffusive trends for further diagnostics
-         DO_3D( 0, 0, 0, 0, 1, jpk )
-            ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs) - ztrdt(ji,jj,jk)
-            ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Krhs) - ztrds(ji,jj,jk)
-         END_3D
-
-         IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-            ! TODO: TO BE TILED- trd_tra
-            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_nsr, ztrdt )
-            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_nsr, ztrds )
-            DEALLOCATE( ztrdt , ztrds )
-
-            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = nijtile )   ! Revert to tile domain
-         ENDIF
+         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:)
+         ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) - ztrds(:,:,:)
+         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_nsr, ztrdt )
+         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_nsr, ztrds )
+         DEALLOCATE( ztrdt , ztrds )
       ENDIF
       !
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/trazdf.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/trazdf.F90	(revision 13550)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRA/trazdf.F90	(revision 13551)
@@ -13,7 +13,5 @@
    !!----------------------------------------------------------------------
    USE oce            ! ocean dynamics and tracers variables
-   USE dom_oce        ! ocean space and time domain variables 
-   ! TEMP: This change not necessary after trd_tra is tiled
-   USE domain, ONLY : dom_tile
+   USE dom_oce        ! ocean space and time domain variables
    USE domvvl         ! variable volume
    USE phycst         ! physical constant
@@ -58,6 +56,5 @@
       !
       INTEGER  ::   ji, jj, jk   ! Dummy loop indices
-      ! TEMP: This change not necessary after trd_tra is tiled
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, SAVE ::   ztrdt, ztrds   ! 3D workspace
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ztrdt, ztrds   ! 3D workspace
       !!---------------------------------------------------------------------
       !
@@ -73,13 +70,7 @@
       !
       IF( l_trdtra )   THEN                  !* Save ta and sa trends
-         IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
-            ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-            ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) )
-         ENDIF
-
-         DO_3D( 0, 0, 0, 0, 1, jpk )
-            ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Kaa)
-            ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Kaa)
-         END_3D
+         ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) )
+         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Kaa)
+         ztrds(:,:,:) = pts(:,:,:,jp_sal,Kaa)
       ENDIF
       !
@@ -94,23 +85,18 @@
 !!gm
 
-      ! TEMP: These changes not necessary after trd_tra is tiled
       IF( l_trdtra )   THEN                      ! save the vertical diffusive trends for further diagnostics
-         DO_3D( 0, 0, 0, 0, 1, jpk )
-            ztrdt(ji,jj,jk) = ( ( pts(ji,jj,jk,jp_tem,Kaa)*e3t(ji,jj,jk,Kaa) - pts(ji,jj,jk,jp_tem,Kbb)*e3t(ji,jj,jk,Kbb) ) &
-               &          / (e3t(ji,jj,jk,Kmm)*rDt) ) - ztrdt(ji,jj,jk)
-            ztrds(ji,jj,jk) = ( ( pts(ji,jj,jk,jp_sal,Kaa)*e3t(ji,jj,jk,Kaa) - pts(ji,jj,jk,jp_sal,Kbb)*e3t(ji,jj,jk,Kbb) ) &
-              &           / (e3t(ji,jj,jk,Kmm)*rDt) ) - ztrds(ji,jj,jk)
-         END_3D
-
-         IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
-            ! TODO: TO BE TILED- trd_tra
-            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_zdf, ztrdt )
-            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_zdf, ztrds )
-            DEALLOCATE( ztrdt , ztrds )
-
-            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = nijtile )   ! Revert to tile domain
-         ENDIF
+         DO jk = 1, jpk
+            ztrdt(:,:,jk) = (   (  pts(:,:,jk,jp_tem,Kaa)*e3t(:,:,jk,Kaa)     &
+               &                 - pts(:,:,jk,jp_tem,Kbb)*e3t(:,:,jk,Kbb)  )  &
+               &              / (  e3t(:,:,jk,Kmm)*rDt  )   )                 &
+               &          - ztrdt(:,:,jk)
+            ztrds(:,:,jk) = (   (  pts(:,:,jk,jp_sal,Kaa)*e3t(:,:,jk,Kaa)     &
+               &                 - pts(:,:,jk,jp_sal,Kbb)*e3t(:,:,jk,Kbb)  )  &
+               &             / (   e3t(:,:,jk,Kmm)*rDt  )   )                 &
+               &          - ztrds(:,:,jk)
+         END DO
+         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_zdf, ztrdt )
+         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_zdf, ztrds )
+         DEALLOCATE( ztrdt , ztrds )
       ENDIF
       !                                          ! print mean trends (used for debugging)
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRD/trdini.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRD/trdini.F90	(revision 13550)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/TRD/trdini.F90	(revision 13551)
@@ -11,4 +11,5 @@
    !!----------------------------------------------------------------------
    USE dom_oce        ! ocean domain
+   USE domain, ONLY : dom_tile
    USE trd_oce        ! trends: ocean variables
    USE trdken         ! trends: 3D kinetic   energy
@@ -88,5 +89,11 @@
       !
 !      IF( .NOT.ln_linssh .AND. ( l_trdtra .OR. l_trddyn ) )  CALL ctl_stop( 'trend diagnostics with variable volume not validated' )
-      
+
+      IF( ln_tile .AND. ( l_trdtra .OR. l_trddyn ) ) THEN
+         CALL ctl_warn('Tiling is not yet implemented for the trends diagnostics; ln_tile is forced to FALSE')
+         ln_tile = .FALSE.
+         CALL dom_tile( ntsi, ntsj, ntei, ntej )
+      ENDIF
+
 !!gm  : Potential BUG : 3D output only for vector invariant form!  add a ctl_stop or code the flux form case
 !!gm  : bug/pb for vertical advection of tracer in vvl case: add T.dt[eta] in the output... 
Index: NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/ZDF/zdfosm.F90
===================================================================
--- NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/ZDF/zdfosm.F90	(revision 13550)
+++ NEMO/branches/2020/dev_r13383_HPC-02_Daley_Tiling/src/OCE/ZDF/zdfosm.F90	(revision 13551)
@@ -44,6 +44,4 @@
                       ! uses ww from previous time step (which is now wb) to calculate hbl
    USE dom_oce        ! ocean space and time domain
-   ! TEMP: This change not necessary after trd_tra is tiled
-   USE domain, ONLY : dom_tile
    USE zdf_oce        ! ocean vertical physics
    USE sbc_oce        ! surface boundary condition: ocean
@@ -1545,6 +1543,5 @@
       !! ** Method  :   ???
       !!----------------------------------------------------------------------
-      ! TEMP: This change not necessary after trd_tra is tiled
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, SAVE ::   ztrdt, ztrds   ! 3D workspace
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ztrdt, ztrds   ! 3D workspace
       !!----------------------------------------------------------------------
       INTEGER                                  , INTENT(in)    :: kt        ! time step index
@@ -1563,13 +1560,6 @@
 
       IF( l_trdtra )   THEN                    !* Save ta and sa trends
-         IF( ntile == 0 .OR. ntile == 1 )  THEN                       ! Do only on the first tile
-            ! TEMP: This can be ST_2D(nn_hls) after trd_tra is tiled
-            ALLOCATE( ztrdt(jpi,jpj,jpk), ztrds(jpi,jpj,jpk) )
-         ENDIF
-
-         DO_3D( 0, 0, 0, 0, 1, jpk )
-            ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs)
-            ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Krhs)
-         END_3D
+         ALLOCATE( ztrdt(jpi,jpj,jpk) )   ;    ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs)
+         ALLOCATE( ztrds(jpi,jpj,jpk) )   ;    ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs)
       ENDIF
 
@@ -1584,23 +1574,13 @@
       END_3D
 
-      ! TEMP: These changes not necessary after trd_tra is tiled
+
       ! save the non-local tracer flux trends for diagnostic
       IF( l_trdtra )   THEN
-         DO_3D( 0, 0, 0, 0, 1, jpk )
-            ztrdt(ji,jj,jk) = pts(ji,jj,jk,jp_tem,Krhs) - ztrdt(ji,jj,jk)
-            ztrds(ji,jj,jk) = pts(ji,jj,jk,jp_sal,Krhs) - ztrds(ji,jj,jk)
-         END_3D
-
-         IF( ntile == 0 .OR. ntile == nijtile )  THEN                ! Do only for the full domain
-            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = 0 )         ! Use full domain
-
+         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:)
+         ztrds(:,:,:) = pts(:,:,:,jp_sal,Krhs) - ztrds(:,:,:)
 !!bug gm jpttdzdf ==> jpttosm
-            ! TODO: TO BE TILED- trd_tra
-            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_zdf, ztrdt )
-            CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_zdf, ztrds )
-            DEALLOCATE( ztrdt )      ;     DEALLOCATE( ztrds )
-
-            IF( ln_tile ) CALL dom_tile( ntsi, ntsj, ntei, ntej, ktile = nijtile )   ! Revert to tile domain
-         ENDIF
+         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_tem, jptra_zdf, ztrdt )
+         CALL trd_tra( kt, Kmm, Krhs, 'TRA', jp_sal, jptra_zdf, ztrds )
+         DEALLOCATE( ztrdt )      ;     DEALLOCATE( ztrds )
       ENDIF
 
