Index: branches/2011/DEV_r2739_STFC_dCSE/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilapg.F90
===================================================================
--- branches/2011/DEV_r2739_STFC_dCSE/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilapg.F90	(revision 2740)
+++ branches/2011/DEV_r2739_STFC_dCSE/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilapg.F90	(revision 3211)
@@ -30,4 +30,11 @@
 
    PUBLIC   tra_ldf_bilapg   ! routine called by step.F90
+
+   !! * Control permutation of array indices
+#  include "oce_ftrans.h90"
+#  include "dom_oce_ftrans.h90"
+#  include "ldftra_oce_ftrans.h90"
+#  include "ldfslp_ftrans.h90"
+#  include "trc_oce_ftrans.h90"
 
    !! * Substitutions
@@ -68,10 +75,18 @@
       USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
       USE wrk_nemo, ONLY:   wk1 => wrk_4d_1 , wk2 => wrk_4d_2     ! 4D workspace
+      !! DCSE_NEMO: need additional directives for renamed module variables
+!FTRANS wk1 wk2 :I :I :z :
       !
       INTEGER         , INTENT(in   )                      ::   kt       ! ocean time-step index
       CHARACTER(len=3), INTENT(in   )                      ::   cdtype   ! =TRA or TRC (tracer indicator)
       INTEGER         , INTENT(in   )                      ::   kjpt     ! number of tracers
-      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 
+
+      !! DCSE_NEMO: This style defeats ftrans
+!     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 
+!FTRANS ptb pta :I :I :z :
+      REAL(wp), INTENT(in   ) ::   ptb(jpi,jpj,jpk,kjpt)        ! before tracer fields
+      REAL(wp), INTENT(inout) ::   pta(jpi,jpj,jpk,kjpt)        ! tracer trend
+
       !
       INTEGER ::   ji, jj, jk, jn   ! dummy loop indices
@@ -105,7 +120,13 @@
       ! ---------------------------
       DO jn = 1, kjpt
+#if defined key_z_first
+         DO jj = 2, jpjm1
+            DO ji = 2, jpim1
+               DO jk = 1, jpkm1
+#else
          DO jj = 2, jpjm1
             DO jk = 1, jpkm1
                DO ji = 2, jpim1
+#endif
                   ! add it to the general tracer trends
                   pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + wk2(ji,jj,jk,jn)
@@ -119,4 +140,10 @@
    END SUBROUTINE tra_ldf_bilapg
 
+!! * Reset control of array index permutation
+#  include "oce_ftrans.h90"
+#  include "dom_oce_ftrans.h90"
+#  include "ldftra_oce_ftrans.h90"
+#  include "ldfslp_ftrans.h90"
+#  include "trc_oce_ftrans.h90"
 
    SUBROUTINE ldfght ( kt, cdtype, pt, plt, kjpt, kaht )
@@ -163,14 +190,27 @@
       USE wrk_nemo, ONLY:   zftw => wrk_xz_1 , zdit  => wrk_xz_2 
       USE wrk_nemo, ONLY:   zdjt => wrk_xz_3 , zdj1t => wrk_xz_4
-      !
-      INTEGER         , INTENT(in )                              ::  kt      ! ocean time-step index
-      CHARACTER(len=3), INTENT(in )                              ::  cdtype  ! =TRA or TRC (tracer indicator) 
-      INTEGER         , INTENT(in )                              ::  kjpt    !: dimension of 
-      REAL(wp)        , INTENT(in ), DIMENSION(jpi,jpj,jpk,kjpt) ::  pt      ! tracer fields ( before for 1st call
-      !                                                         ! and laplacian of these fields for 2nd call. 
-      REAL(wp)        , INTENT(out), DIMENSION(jpi,jpj,jpk,kjpt) ::  plt     !: partial harmonic operator applied to  pt  components except
-      !                                                             !: second order vertical derivative term  
-      INTEGER         , INTENT(in )                              ::  kaht    !: =1 multiply the laplacian by the eddy diffusivity coeff.
-      !                                                             !: =2 no multiplication 
+
+      !! DCSE_NEMO: need additional directives for renamed module variables
+!FTRANS zftv :I :I :z
+
+      !
+      INTEGER, INTENT(in )                               ::  kt      ! ocean time-step index
+      CHARACTER(len=3), INTENT(in )                      ::  cdtype  ! =TRA or TRC (tracer indicator) 
+      INTEGER, INTENT(in )                               ::  kjpt    !: dimension of 
+
+      !! DCSE_NEMO: This style defeats ftrans
+!     REAL(wp), INTENT(in ), DIMENSION(jpi,jpj,jpk,kjpt) ::  pt      ! tracer fields ( before for 1st call
+!     !                                                         ! and laplacian of these fields for 2nd call. 
+!     REAL(wp), INTENT(out), DIMENSION(jpi,jpj,jpk,kjpt) ::  plt     !: partial harmonic operator applied to  pt components except
+!     !                                                              !: second order vertical derivative term  
+
+!FTRANS pt plt :I :I :z :
+      REAL(wp), INTENT(in )  ::  pt(jpi,jpj,jpk,kjpt)      ! tracer fields ( before for 1st call
+      !                                                    ! and laplacian of these fields for 2nd call. 
+      REAL(wp), INTENT(out)  ::  plt(jpi,jpj,jpk,kjpt)     !: partial harmonic operator applied to  pt components except
+      !                                                    !: second order vertical derivative term  
+
+      INTEGER, INTENT(in )                               ::  kaht    !: =1 multiply the laplacian by the eddy diffusivity coeff.
+      !                                                              !: =2 no multiplication 
       !!
       INTEGER ::   ji, jj, jk,jn          ! dummy loop indices
