Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/TRA/trabbl.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/TRA/trabbl.F90	(revision 2143)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/OPA_SRC/TRA/trabbl.F90	(revision 2144)
@@ -138,5 +138,5 @@
 
 
-   SUBROUTINE tra_bbl_dif( ptrab, ptraa, kjpt )
+   SUBROUTINE tra_bbl_dif( ptb, pta, kjpt )
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE tra_bbl_dif  ***
@@ -155,5 +155,5 @@
       !!      convection is satified)
       !!
-      !! ** Action  :   ptraa   increased by the bbl diffusive trend
+      !! ** Action  :   pta   increased by the bbl diffusive trend
       !!
       !! References : Beckmann, A., and R. Doscher, 1997, J. Phys.Oceanogr., 581-591.
@@ -161,10 +161,11 @@
       !!----------------------------------------------------------------------  
       INTEGER                              , INTENT(in   ) ::   kjpt    ! number of tracers
-      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptrab   ! before and now tracer fields
-      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   ptraa   ! tracer trend 
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb   ! before and now tracer fields
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta   ! tracer trend 
       !!
       INTEGER  ::   ji, jj, jn   ! dummy loop indices
       INTEGER  ::   ik           ! local integers
       REAL(wp) ::   zbtr         ! local scalars
+      REAL(wp), DIMENSION(jpi,jpj) ::   zptb   ! temporary array 
       !!----------------------------------------------------------------------
       !
@@ -172,4 +173,16 @@
       DO jn = 1, kjpt                                     ! tracer loop
          !                                                ! ===========
+#  if defined key_vectopt_loop
+         DO jj = 1, 1   ! vector opt. (forced unrolling)
+            DO ji = 1, jpij
+#else
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+#endif
+               ik = mbkt(ji,jj)                        ! bottom T-level index
+               zptb(ji,jj) = ptb(ji,jj,ik,jn)              ! bottom before T and S
+            END DO
+         END DO
+         !                                                ! Compute the trend
 #  if defined key_vectopt_loop
          DO jj = 1, 1   ! vector opt. (forced unrolling)
@@ -179,11 +192,11 @@
             DO ji = 2, jpim1
 #  endif
-               ik = mbkt(ji,jj)                            ! bottom T-level index
-               zbtr = e1e2t_r(ji,jj)  / fse3t(ji,jj,ik)
-               ptraa(ji,jj,ik,jn) = ptraa(ji,jj,ik,jn)                                                         &
-                  &               + (   ahu_bbl(ji,jj) * ( ptrab(ji+1,jj  ,ik,jn) - ptrab(ji  ,jj  ,ik,jn) )   &
-                  &                   - ahu_bbl(ji,jj) * ( ptrab(ji  ,jj  ,ik,jn) - ptrab(ji-1,jj  ,ik,jn) )   &
-                  &                   + ahv_bbl(ji,jj) * ( ptrab(ji  ,jj+1,ik,jn) - ptrab(ji  ,jj  ,ik,jn) )   &
-                  &                   - ahv_bbl(ji,jj) * ( ptrab(ji  ,jj  ,ik,jn) - ptrab(ji  ,jj-1,ik,jn) )   ) * zbtr
+                ik = mbkt(ji,jj)                            ! bottom T-level index
+                zbtr = e1e2t_r(ji,jj)  / fse3t(ji,jj,ik)
+                pta(ji,jj,ik,jn) = pta(ji,jj,ik,jn)                                                         &
+                  &               + (   ahu_bbl(ji  ,jj  ) * ( zptb(ji+1,jj  ) - zptb(ji  ,jj  ) )   &
+                  &                   - ahu_bbl(ji-1,jj  ) * ( zptb(ji  ,jj  ) - zptb(ji-1,jj  ) )   &
+                  &                   + ahv_bbl(ji  ,jj  ) * ( zptb(ji  ,jj+1) - zptb(ji  ,jj  ) )   &
+                  &                   - ahv_bbl(ji  ,jj-1) * ( zptb(ji  ,jj  ) - zptb(ji  ,jj-1) )   ) * zbtr
             END DO
          END DO
@@ -194,5 +207,5 @@
    
 
-   SUBROUTINE tra_bbl_adv( ptrab, ptraa, kjpt )
+   SUBROUTINE tra_bbl_adv( ptb, pta, kjpt )
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE trc_bbl  ***
@@ -212,6 +225,6 @@
       !!----------------------------------------------------------------------  
       INTEGER                              , INTENT(in   ) ::   kjpt    ! number of tracers
-      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptrab   ! before and now tracer fields
-      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   ptraa   ! tracer trend 
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb   ! before and now tracer fields
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta   ! tracer trend 
       !!
       INTEGER  ::   ji, jj, jk, jn           ! dummy loop indices
@@ -240,16 +253,16 @@
                   !                                               ! up  -slope T-point (shelf bottom point)
                   zbtr = e1e2t_r(iis,jj) / fse3t(iis,jj,ikus)
-                  ztra = zu_bbl * ( ptrab(iid,jj,ikus,jn) - ptrab(iis,jj,ikus,jn) ) * zbtr
-                  ptraa(iis,jj,ikus,jn) = ptraa(iis,jj,ikus,jn) + ztra
+                  ztra = zu_bbl * ( ptb(iid,jj,ikus,jn) - ptb(iis,jj,ikus,jn) ) * zbtr
+                  pta(iis,jj,ikus,jn) = pta(iis,jj,ikus,jn) + ztra
                   !                   
                   DO jk = ikus, ikud-1                            ! down-slope upper to down T-point (deep column)
                      zbtr = e1e2t_r(iid,jj) / fse3t(iid,jj,jk)
-                     ztra = zu_bbl * ( ptrab(iid,jj,jk+1,jn) - ptrab(iid,jj,jk,jn) ) * zbtr
-                     ptraa(iid,jj,jk,jn) = ptraa(iid,jj,jk,jn) + ztra
+                     ztra = zu_bbl * ( ptb(iid,jj,jk+1,jn) - ptb(iid,jj,jk,jn) ) * zbtr
+                     pta(iid,jj,jk,jn) = pta(iid,jj,jk,jn) + ztra
                   END DO
                   ! 
                   zbtr = e1e2t_r(iid,jj) / fse3t(iid,jj,ikud)
-                  ztra = zu_bbl * ( ptrab(iis,jj,ikus,jn) - ptrab(iid,jj,ikud,jn) ) * zbtr
-                  ptraa(iid,jj,ikud,jn) = ptraa(iid,jj,ikud,jn) + ztra
+                  ztra = zu_bbl * ( ptb(iis,jj,ikus,jn) - ptb(iid,jj,ikud,jn) ) * zbtr
+                  pta(iid,jj,ikud,jn) = pta(iid,jj,ikud,jn) + ztra
                ENDIF
                !
@@ -262,16 +275,16 @@
                   ! up  -slope T-point (shelf bottom point)
                   zbtr = e1e2t_r(ji,ijs) / fse3t(ji,ijs,ikvs)
-                  ztra = zv_bbl * ( ptrab(ji,ijd,ikvs,jn) - ptrab(ji,ijs,ikvs,jn) ) * zbtr
-                  ptraa(ji,ijs,ikvs,jn) = ptraa(ji,ijs,ikvs,jn) + ztra
+                  ztra = zv_bbl * ( ptb(ji,ijd,ikvs,jn) - ptb(ji,ijs,ikvs,jn) ) * zbtr
+                  pta(ji,ijs,ikvs,jn) = pta(ji,ijs,ikvs,jn) + ztra
                   !                   
                   DO jk = ikvs, ikvd-1                            ! down-slope upper to down T-point (deep column)
                      zbtr = e1e2t_r(ji,ijd) / fse3t(ji,ijd,jk)
-                     ztra = zv_bbl * ( ptrab(ji,ijd,jk+1,jn) - ptrab(ji,ijd,jk,jn) ) * zbtr
-                     ptraa(ji,ijd,jk,jn) = ptraa(ji,ijd,jk,jn)  + ztra
+                     ztra = zv_bbl * ( ptb(ji,ijd,jk+1,jn) - ptb(ji,ijd,jk,jn) ) * zbtr
+                     pta(ji,ijd,jk,jn) = pta(ji,ijd,jk,jn)  + ztra
                   END DO
                   !                                               ! down-slope T-point (deep bottom point)
                   zbtr = e1e2t_r(ji,ijd) / fse3t(ji,ijd,ikvd)
-                  ztra = zv_bbl * ( ptrab(ji,ijs,ikvs,jn) - ptrab(ji,ijd,ikvd,jn) ) * zbtr
-                  ptraa(ji,ijd,ikvd,jn) = ptraa(ji,ijd,ikvd,jn) + ztra
+                  ztra = zv_bbl * ( ptb(ji,ijs,ikvs,jn) - ptb(ji,ijd,ikvd,jn) ) * zbtr
+                  pta(ji,ijd,ikvd,jn) = pta(ji,ijd,ikvd,jn) + ztra
                ENDIF
             END DO
