Index: /NEMO/trunk/cfgs/C1D_PAPA/MY_SRC/usrdef_zgr.F90
===================================================================
--- /NEMO/trunk/cfgs/C1D_PAPA/MY_SRC/usrdef_zgr.F90	(revision 13294)
+++ /NEMO/trunk/cfgs/C1D_PAPA/MY_SRC/usrdef_zgr.F90	(revision 13295)
@@ -160,5 +160,5 @@
       END DO
       ! bottom scale factors and depth at T- and W-points
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ik = k_bot(ji,jj)
          pdepw(ji,jj,ik+1) = MIN( zht(ji,jj) , pdepw_1d(ik+1) )
Index: /NEMO/trunk/src/ABL/ablmod.F90
===================================================================
--- /NEMO/trunk/src/ABL/ablmod.F90	(revision 13294)
+++ /NEMO/trunk/src/ABL/ablmod.F90	(revision 13295)
@@ -127,5 +127,5 @@
       !! needed for surface boundary condition of TKE
       !! pwndm contains | U10m - U_oce | (see blk_oce_1 in sbcblk)
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zzoce         = pCd_du    (ji,jj) * pwndm    (ji,jj)
 #if defined key_si3
@@ -245,5 +245,5 @@
             !
             ! Advance u_abl & v_abl to time n+1
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                zcff = ( fft_abl(ji,jj) * rDt_abl )*( fft_abl(ji,jj) * rDt_abl )  ! (f dt)**2
 
@@ -483,5 +483,5 @@
          DO jk = 2, jpka    ! outer loop
          !-------------
-            DO_2D_01_01
+            DO_2D( 0, 1, 0, 1 )
                zcff1 = pblh( ji, jj )
                zsig  = ght_abl(jk) / MAX( jp_pblh_min,  MIN(  jp_pblh_max, zcff1  ) )
@@ -506,5 +506,5 @@
       DO jk = 2, jpka    ! outer loop
       !-------------
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             zcff1 = pblh( ji, jj )
             zsig  = ght_abl(jk) / MAX( jp_pblh_min,  MIN(  jp_pblh_max, zcff1  ) )
@@ -580,5 +580,5 @@
       !                            !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ztemp          =  tq_abl( ji, jj, 2, nt_a, jp_ta )
          zhumi          =  tq_abl( ji, jj, 2, nt_a, jp_qa )
@@ -589,5 +589,5 @@
       END_2D
 
-      DO_2D_01_01
+      DO_2D( 0, 1, 0, 1 )
          zwnd_i(ji,jj) = u_abl(ji  ,jj,2,nt_a) - 0.5_wp * ( pssu(ji  ,jj) + pssu(ji-1,jj) )  
          zwnd_j(ji,jj) = v_abl(ji,jj  ,2,nt_a) - 0.5_wp * ( pssv(ji,jj  ) + pssv(ji,jj-1) ) 
@@ -597,5 +597,5 @@
       !
       ! ... scalar wind ( = | U10m - U_oce | ) at T-point (masked)
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zcff          = SQRT(  zwnd_i(ji,jj) * zwnd_i(ji,jj)   &
             &                 + zwnd_j(ji,jj) * zwnd_j(ji,jj) )   ! * msk_abl(ji,jj)
@@ -610,5 +610,5 @@
       !     Note the use of 0.5*(2-umask) in order to unmask the stress along coastlines
       !     Note the use of MAX(tmask(i,j),tmask(i+1,j) is to mask tau over ice shelves
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zcff  = 0.5_wp * ( 2._wp - msk_abl(ji,jj)*msk_abl(ji+1,jj) )
          zztmp = MAX(msk_abl(ji,jj),msk_abl(ji+1,jj))
@@ -633,5 +633,5 @@
       !    Wind stress relative to the moving ice ( U10m - U_ice )   !
       ! ------------------------------------------------------------ !
-      DO_2D_00_00           
+      DO_2D( 0, 0, 0, 0 )           
          ptaui_ice(ji,jj) = 0.5_wp * ( rhoa(ji+1,jj) * pCd_du_ice(ji+1,jj) + rhoa(ji,jj) * pCd_du_ice(ji,jj)      )   &
             &                      * ( 0.5_wp * ( u_abl(ji+1,jj,2,nt_a) + u_abl(ji,jj,2,nt_a) ) - pssu_ice(ji,jj) )
@@ -646,5 +646,5 @@
       !    Wind stress relative to the moving ice ( U10m - U_ice )   !
       ! ------------------------------------------------------------ !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
 
          zztmp1 = 0.5_wp * ( u_abl(ji+1,jj  ,2,nt_a) + u_abl(ji,jj,2,nt_a) )
@@ -1259,15 +1259,15 @@
       smth_b = 1._wp / 4._wp
       !
-      DO_2D_11_10
+      DO_2D( 1, 1, 1, 0 )
          zumsk = msk(ji,jj) * msk(ji+1,jj)
          zdX ( ji, jj ) = ( pvar2d( ji+1,jj ) - pvar2d( ji  ,jj ) ) * zumsk
       END_2D
 
-      DO_2D_10_11
+      DO_2D( 1, 0, 1, 1 )
          zvmsk = msk(ji,jj) * msk(ji,jj+1)
          zdY ( ji, jj ) = ( pvar2d( ji, jj+1 ) - pvar2d( ji  ,jj ) ) * zvmsk
       END_2D
 
-      DO_2D_10_00
+      DO_2D( 1, 0, 0, 0 )
          zFY ( ji, jj  ) =   zdY ( ji, jj   )                        &
             & +  smth_a*  ( (zdX ( ji, jj+1 ) - zdX( ji-1, jj+1 ))   &
@@ -1275,5 +1275,5 @@
       END_2D
 
-      DO_2D_00_10
+      DO_2D( 0, 0, 1, 0 )
          zFX( ji, jj  ) =    zdX( ji, jj   )                         &
            &    + smth_a*(  (zdY( ji+1, jj ) - zdY( ji+1, jj-1))     &
@@ -1281,5 +1281,5 @@
       END_2D
 
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          pvar2d( ji  ,jj ) = pvar2d( ji  ,jj )              &
   &         + msk(ji,jj) * smth_b * (                       &
Index: /NEMO/trunk/src/ICE/icealb.F90
===================================================================
--- /NEMO/trunk/src/ICE/icealb.F90	(revision 13294)
+++ /NEMO/trunk/src/ICE/icealb.F90	(revision 13295)
@@ -119,5 +119,5 @@
       !
       DO jl = 1, jpl
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             !                       !--- Specific snow, ice and pond fractions (for now, we prevent melt ponds and snow at the same time)
             IF( ph_snw(ji,jj,jl) == 0._wp ) THEN
Index: /NEMO/trunk/src/ICE/icecor.F90
===================================================================
--- /NEMO/trunk/src/ICE/icecor.F90	(revision 13294)
+++ /NEMO/trunk/src/ICE/icecor.F90	(revision 13295)
@@ -88,5 +88,5 @@
          zzc = rhoi * r1_Dt_ice
          DO jl = 1, jpl
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                zsal = sv_i(ji,jj,jl)
                sv_i(ji,jj,jl) = MIN(  MAX( rn_simin*v_i(ji,jj,jl) , sv_i(ji,jj,jl) ) , rn_simax*v_i(ji,jj,jl)  )
@@ -106,5 +106,5 @@
       !                             !-----------------------------------------------------
       IF( kn == 2 ) THEN            !  Ice drift case: Corrections to avoid wrong values !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             IF ( at_i(ji,jj) == 0._wp ) THEN    ! what to do if there is no ice
                IF ( at_i(ji+1,jj) == 0._wp )   u_ice(ji  ,jj) = 0._wp   ! right side
Index: /NEMO/trunk/src/ICE/icectl.F90
===================================================================
--- /NEMO/trunk/src/ICE/icectl.F90	(revision 13294)
+++ /NEMO/trunk/src/ICE/icectl.F90	(revision 13295)
@@ -368,5 +368,5 @@
       cl_alname(ialert_id) = ' Incompat vol and con         '    ! name of the alert
       DO jl = 1, jpl
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF(  v_i(ji,jj,jl) /= 0._wp   .AND.   a_i(ji,jj,jl) == 0._wp   ) THEN
                WRITE(numout,*) ' ALERTE 2 :   Incompatible volume and concentration '
@@ -380,5 +380,5 @@
       cl_alname(ialert_id) = ' Very thick ice               ' ! name of the alert
       jl = jpl 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          IF(   h_i(ji,jj,jl)  >  50._wp   ) THEN
             WRITE(numout,*) ' ALERTE 3 :   Very thick ice'
@@ -391,5 +391,5 @@
       ialert_id = 4 ! reference number of this alert
       cl_alname(ialert_id) = ' Very fast ice               ' ! name of the alert
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          IF(   MAX( ABS( u_ice(ji,jj) ), ABS( v_ice(ji,jj) ) ) > 2.  .AND.  &
             &  at_i(ji,jj) > 0._wp   ) THEN
@@ -403,5 +403,5 @@
       ialert_id = 5 ! reference number of this alert
       cl_alname(ialert_id) = ' High salt flux               ' ! name of the alert
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          IF( ABS( sfx (ji,jj) ) > 1.0e-2 ) THEN  ! = 1 psu/day for 1m ocean depth
             WRITE(numout,*) ' ALERTE 5 :   High salt flux'
@@ -414,5 +414,5 @@
       ialert_id = 6 ! reference number of this alert
       cl_alname(ialert_id) = ' Ice on continents           ' ! name of the alert
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          IF(   tmask(ji,jj,1) <= 0._wp   .AND.   at_i(ji,jj) > 0._wp   ) THEN 
             WRITE(numout,*) ' ALERTE 6 :   Ice on continents'
@@ -427,5 +427,5 @@
       cl_alname(ialert_id) = ' Very fresh ice               ' ! name of the alert
       DO jl = 1, jpl
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF( s_i(ji,jj,jl) < 0.1 .AND. a_i(ji,jj,jl) > 0._wp ) THEN
                WRITE(numout,*) ' ALERTE 7 :   Very fresh ice'
@@ -439,5 +439,5 @@
       ialert_id = 8 ! reference number of this alert
       cl_alname(ialert_id) = ' fnsolar very big             ' ! name of the alert
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          IF( ABS( qns(ji,jj) ) > 1500._wp .AND. at_i(ji,jj) > 0._wp ) THEN
             !
@@ -454,5 +454,5 @@
       cl_alname(ialert_id) = ' Very old   ice               ' ! name of the alert
       DO jl = 1, jpl
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF ( ( ( ABS( o_i(ji,jj,jl) ) > rDt_ice ) .OR. &
                    ( ABS( o_i(ji,jj,jl) ) < 0._wp) ) .AND. &
@@ -470,5 +470,5 @@
       inb_alp(ialert_id) = 0
       DO jl = 1, jpl
-         DO_3D_11_11( 1, nlay_i )
+         DO_3D( 1, 1, 1, 1, 1, nlay_i )
             ztmelts    =  -rTmlt * sz_i(ji,jj,jk,jl) + rt0
             IF( t_i(ji,jj,jk,jl) > ztmelts  .AND.  v_i(ji,jj,jl) > 1.e-10   &
Index: /NEMO/trunk/src/ICE/icedyn.F90
===================================================================
--- /NEMO/trunk/src/ICE/icedyn.F90	(revision 13294)
+++ /NEMO/trunk/src/ICE/icedyn.F90	(revision 13295)
@@ -126,5 +126,5 @@
          ! CFL = 0.5 at a distance from the bound of 1/6 of the basin length
          ! Then for dx = 2m and dt = 1s => rn_uice = u (1/6th) = 1m/s 
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             zcoefu = ( REAL(jpiglo+1)*0.5 - REAL(ji+nimpp-1) ) / ( REAL(jpiglo+1)*0.5 - 1. )
             zcoefv = ( REAL(jpjglo+1)*0.5 - REAL(jj+njmpp-1) ) / ( REAL(jpjglo+1)*0.5 - 1. )
@@ -155,5 +155,5 @@
 
             ALLOCATE( zdivu_i(jpi,jpj) )
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zdivu_i(ji,jj) = ( e2u(ji,jj) * u_ice(ji,jj) - e2u(ji-1,jj) * u_ice(ji-1,jj)   &
                   &             + e1v(ji,jj) * v_ice(ji,jj) - e1v(ji,jj-1) * v_ice(ji,jj-1) ) * r1_e1e2t(ji,jj)
Index: /NEMO/trunk/src/ICE/icedyn_adv_pra.F90
===================================================================
--- /NEMO/trunk/src/ICE/icedyn_adv_pra.F90	(revision 13294)
+++ /NEMO/trunk/src/ICE/icedyn_adv_pra.F90	(revision 13295)
@@ -102,5 +102,5 @@
       ! --- Record max of the surrounding 9-pts ice thick. (for call Hbig) --- !
       DO jl = 1, jpl
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zhip_max(ji,jj,jl) = MAX( epsi20, ph_ip(ji,jj,jl), ph_ip(ji+1,jj  ,jl), ph_ip(ji  ,jj+1,jl), &
                &                                               ph_ip(ji-1,jj  ,jl), ph_ip(ji  ,jj-1,jl), &
@@ -250,5 +250,5 @@
          ! derive open water from ice concentration
          zati2(:,:) = SUM( pa_i(:,:,:), dim=3 )
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pato_i(ji,jj) = pato_i(ji,jj) - ( zati2(ji,jj) - zati1(ji,jj) ) &                        !--- open water
                &                          - ( zudy(ji,jj) - zudy(ji-1,jj) + zvdx(ji,jj) - zvdx(ji,jj-1) ) * r1_e1e2t(ji,jj) * zdt
@@ -305,5 +305,5 @@
          !
          ! Limitation of moments.                                           
-         DO_2D_00_11
+         DO_2D( 0, 0, 1, 1 )
             !  Initialize volumes of boxes  (=area if adv_x first called, =psm otherwise)                                     
             psm (ji,jj,jl) = MAX( pcrh * e1e2t(ji,jj) + ( 1.0 - pcrh ) * psm(ji,jj,jl) , epsi20 )
@@ -325,5 +325,5 @@
 
          !  Calculate fluxes and moments between boxes i<-->i+1              
-         DO_2D_00_11
+         DO_2D( 0, 0, 1, 1 )
             zbet(ji,jj)  =  MAX( 0._wp, SIGN( 1._wp, put(ji,jj) ) )
             zalf         =  MAX( 0._wp, put(ji,jj) ) * pdt / psm(ji,jj,jl)
@@ -350,5 +350,5 @@
          END_2D
 
-         DO_2D_00_10
+         DO_2D( 0, 0, 1, 0 )
             zalf          = MAX( 0._wp, -put(ji,jj) ) * pdt / psm(ji+1,jj,jl) 
             zalg  (ji,jj) = zalf
@@ -369,5 +369,5 @@
          END_2D
 
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zbt  =       zbet(ji-1,jj)
             zbt1 = 1.0 - zbet(ji-1,jj)
@@ -383,5 +383,5 @@
 
          !   Put the temporary moments into appropriate neighboring boxes.    
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zbt  =       zbet(ji-1,jj)
             zbt1 = 1.0 - zbet(ji-1,jj)
@@ -403,5 +403,5 @@
          END_2D
 
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zbt  =       zbet(ji,jj)
             zbt1 = 1.0 - zbet(ji,jj)
@@ -462,5 +462,5 @@
          !
          ! Limitation of moments.
-         DO_2D_11_00
+         DO_2D( 1, 1, 0, 0 )
             !  Initialize volumes of boxes (=area if adv_x first called, =psm otherwise)
             psm(ji,jj,jl) = MAX(  pcrh * e1e2t(ji,jj) + ( 1.0 - pcrh ) * psm(ji,jj,jl) , epsi20  )
@@ -482,5 +482,5 @@
  
          !  Calculate fluxes and moments between boxes j<-->j+1              
-         DO_2D_11_00
+         DO_2D( 1, 1, 0, 0 )
             zbet(ji,jj)  =  MAX( 0._wp, SIGN( 1._wp, pvt(ji,jj) ) )
             zalf         =  MAX( 0._wp, pvt(ji,jj) ) * pdt / psm(ji,jj,jl)
@@ -507,5 +507,5 @@
          END_2D
          !
-         DO_2D_10_00
+         DO_2D( 1, 0, 0, 0 )
             zalf          = MAX( 0._wp, -pvt(ji,jj) ) * pdt / psm(ji,jj+1,jl) 
             zalg  (ji,jj) = zalf
@@ -527,5 +527,5 @@
 
          !  Readjust moments remaining in the box. 
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zbt  =         zbet(ji,jj-1)
             zbt1 = ( 1.0 - zbet(ji,jj-1) )
@@ -541,5 +541,5 @@
 
          !   Put the temporary moments into appropriate neighboring boxes.    
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zbt  =       zbet(ji,jj-1)
             zbt1 = 1.0 - zbet(ji,jj-1)
@@ -562,5 +562,5 @@
          END_2D
 
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zbt  =       zbet(ji,jj)
             zbt1 = 1.0 - zbet(ji,jj)
@@ -618,5 +618,5 @@
       DO jl = 1, jpl
 
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF ( pv_i(ji,jj,jl) > 0._wp ) THEN
                !
@@ -684,5 +684,5 @@
       ! -- check snow load -- !
       DO jl = 1, jpl
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF ( pv_i(ji,jj,jl) > 0._wp ) THEN
                !
Index: /NEMO/trunk/src/ICE/icedyn_adv_umx.F90
===================================================================
--- /NEMO/trunk/src/ICE/icedyn_adv_umx.F90	(revision 13294)
+++ /NEMO/trunk/src/ICE/icedyn_adv_umx.F90	(revision 13295)
@@ -107,5 +107,5 @@
       ! --- Record max of the surrounding 9-pts ice thick. (for call Hbig) --- !
       DO jl = 1, jpl
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zhip_max(ji,jj,jl) = MAX( epsi20, ph_ip(ji,jj,jl), ph_ip(ji+1,jj  ,jl), ph_ip(ji  ,jj+1,jl), &
                &                                               ph_ip(ji-1,jj  ,jl), ph_ip(ji  ,jj-1,jl), &
@@ -150,5 +150,5 @@
       !
       ! --- define velocity for advection: u*grad(H) --- !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          IF    ( pu_ice(ji,jj) * pu_ice(ji-1,jj) <= 0._wp ) THEN   ;   zcu_box(ji,jj) = 0._wp
          ELSEIF( pu_ice(ji,jj)                   >  0._wp ) THEN   ;   zcu_box(ji,jj) = pu_ice(ji-1,jj)
@@ -183,5 +183,5 @@
             IF( .NOT. ALLOCATED(jmsk_small) )   ALLOCATE( jmsk_small(jpi,jpj,jpl) ) 
             DO jl = 1, jpl
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   zvi_cen = 0.5_wp * ( pv_i(ji+1,jj,jl) + pv_i(ji,jj,jl) )
                   IF( zvi_cen < epsi06) THEN   ;   imsk_small(ji,jj,jl) = 0
@@ -332,5 +332,5 @@
          !== Open water area ==!
          zati2(:,:) = SUM( pa_i(:,:,:), dim=3 )
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pato_i(ji,jj) = pato_i(ji,jj) - ( zati2(ji,jj) - zati1(ji,jj) ) & 
                &                          - ( zudy(ji,jj) - zudy(ji-1,jj) + zvdx(ji,jj) - zvdx(ji,jj-1) ) * r1_e1e2t(ji,jj) * zdt
@@ -441,5 +441,5 @@
       IF( pamsk == 0._wp ) THEN
          DO jl = 1, jpl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                IF( ABS( pu(ji,jj) ) > epsi10 ) THEN
                   zfu_ho (ji,jj,jl) = zfu_ho (ji,jj,jl) * puc    (ji,jj,jl) / pu(ji,jj)
@@ -463,5 +463,5 @@
          ! thus we calculate the upstream solution and apply a limiter again
          DO jl = 1, jpl
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                ztra = - ( zfu_ups(ji,jj,jl) - zfu_ups(ji-1,jj,jl) + zfv_ups(ji,jj,jl) - zfv_ups(ji,jj-1,jl) )
                !
@@ -484,5 +484,5 @@
       IF( PRESENT( pua_ho ) ) THEN
          DO jl = 1, jpl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                pua_ho (ji,jj,jl) = zfu_ho (ji,jj,jl) ; pva_ho (ji,jj,jl) = zfv_ho (ji,jj,jl)
                pua_ups(ji,jj,jl) = zfu_ups(ji,jj,jl) ; pva_ups(ji,jj,jl) = zfv_ups(ji,jj,jl)
@@ -494,5 +494,5 @@
       ! ---------------------------------
       DO jl = 1, jpl
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ztra = - ( zfu_ho(ji,jj,jl) - zfu_ho(ji-1,jj,jl) + zfv_ho(ji,jj,jl) - zfv_ho(ji,jj-1,jl) )  
             !
@@ -528,5 +528,5 @@
          !
          DO jl = 1, jpl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                pfu_ups(ji,jj,jl) = MAX( pu(ji,jj), 0._wp ) * pt(ji,jj,jl) + MIN( pu(ji,jj), 0._wp ) * pt(ji+1,jj,jl)
                pfv_ups(ji,jj,jl) = MAX( pv(ji,jj), 0._wp ) * pt(ji,jj,jl) + MIN( pv(ji,jj), 0._wp ) * pt(ji,jj+1,jl)
@@ -539,5 +539,5 @@
             !
             DO jl = 1, jpl              !-- flux in x-direction
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   pfu_ups(ji,jj,jl) = MAX( pu(ji,jj), 0._wp ) * pt(ji,jj,jl) + MIN( pu(ji,jj), 0._wp ) * pt(ji+1,jj,jl)
                END_2D
@@ -545,5 +545,5 @@
             !
             DO jl = 1, jpl              !-- first guess of tracer from u-flux
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   ztra = - ( pfu_ups(ji,jj,jl) - pfu_ups(ji-1,jj,jl) )              &
                      &   + ( pu     (ji,jj   ) - pu     (ji-1,jj   ) ) * pt(ji,jj,jl) * (1.-pamsk)
@@ -555,5 +555,5 @@
             !
             DO jl = 1, jpl              !-- flux in y-direction
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   pfv_ups(ji,jj,jl) = MAX( pv(ji,jj), 0._wp ) * zpt(ji,jj,jl) + MIN( pv(ji,jj), 0._wp ) * zpt(ji,jj+1,jl)
                END_2D
@@ -563,5 +563,5 @@
             !
             DO jl = 1, jpl              !-- flux in y-direction
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   pfv_ups(ji,jj,jl) = MAX( pv(ji,jj), 0._wp ) * pt(ji,jj,jl) + MIN( pv(ji,jj), 0._wp ) * pt(ji,jj+1,jl)
                END_2D
@@ -569,5 +569,5 @@
             !
             DO jl = 1, jpl              !-- first guess of tracer from v-flux
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   ztra = - ( pfv_ups(ji,jj,jl) - pfv_ups(ji,jj-1,jl) )  &
                      &   + ( pv     (ji,jj   ) - pv     (ji,jj-1   ) ) * pt(ji,jj,jl) * (1.-pamsk)
@@ -579,5 +579,5 @@
             !
             DO jl = 1, jpl              !-- flux in x-direction
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   pfu_ups(ji,jj,jl) = MAX( pu(ji,jj), 0._wp ) * zpt(ji,jj,jl) + MIN( pu(ji,jj), 0._wp ) * zpt(ji+1,jj,jl)
                END_2D
@@ -589,5 +589,5 @@
       !
       DO jl = 1, jpl                    !-- after tracer with upstream scheme
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ztra = - (   pfu_ups(ji,jj,jl) - pfu_ups(ji-1,jj  ,jl)   &
                &       + pfv_ups(ji,jj,jl) - pfv_ups(ji  ,jj-1,jl) ) &
@@ -628,5 +628,5 @@
          !
          DO jl = 1, jpl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                pfu_ho(ji,jj,jl) = 0.5_wp * pu(ji,jj) * ( pt(ji,jj,jl) + pt(ji+1,jj  ,jl) )
                pfv_ho(ji,jj,jl) = 0.5_wp * pv(ji,jj) * ( pt(ji,jj,jl) + pt(ji  ,jj+1,jl) )
@@ -646,5 +646,5 @@
             !
             DO jl = 1, jpl              !-- flux in x-direction
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   pfu_ho(ji,jj,jl) = 0.5_wp * pu(ji,jj) * ( pt(ji,jj,jl) + pt(ji+1,jj,jl) )
                END_2D
@@ -653,5 +653,5 @@
 
             DO jl = 1, jpl              !-- first guess of tracer from u-flux
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   ztra = - ( pfu_ho(ji,jj,jl) - pfu_ho(ji-1,jj,jl) )              &
                      &   + ( pu    (ji,jj   ) - pu    (ji-1,jj   ) ) * pt(ji,jj,jl) * (1.-pamsk)
@@ -663,5 +663,5 @@
 
             DO jl = 1, jpl              !-- flux in y-direction
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   pfv_ho(ji,jj,jl) = 0.5_wp * pv(ji,jj) * ( zpt(ji,jj,jl) + zpt(ji,jj+1,jl) )
                END_2D
@@ -672,5 +672,5 @@
             !
             DO jl = 1, jpl              !-- flux in y-direction
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   pfv_ho(ji,jj,jl) = 0.5_wp * pv(ji,jj) * ( pt(ji,jj,jl) + pt(ji,jj+1,jl) )
                END_2D
@@ -679,5 +679,5 @@
             !
             DO jl = 1, jpl              !-- first guess of tracer from v-flux
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   ztra = - ( pfv_ho(ji,jj,jl) - pfv_ho(ji,jj-1,jl) )  &
                      &   + ( pv    (ji,jj   ) - pv    (ji,jj-1   ) ) * pt(ji,jj,jl) * (1.-pamsk)
@@ -689,5 +689,5 @@
             !
             DO jl = 1, jpl              !-- flux in x-direction
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   pfu_ho(ji,jj,jl) = 0.5_wp * pu(ji,jj) * ( zpt(ji,jj,jl) + zpt(ji+1,jj,jl) )
                END_2D
@@ -737,5 +737,5 @@
          !                                                        !--  advective form update in zpt  --!
          DO jl = 1, jpl
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zpt(ji,jj,jl) = ( pt(ji,jj,jl) - (  pubox(ji,jj   ) * ( zt_u(ji,jj,jl) - zt_u(ji-1,jj,jl) ) * r1_e1t  (ji,jj) &
                   &                              + pt   (ji,jj,jl) * ( pu  (ji,jj   ) - pu  (ji-1,jj   ) ) * r1_e1e2t(ji,jj) &
@@ -764,5 +764,5 @@
          !                                                        !--  advective form update in zpt  --!
          DO jl = 1, jpl
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zpt(ji,jj,jl) = ( pt(ji,jj,jl) - (  pvbox(ji,jj   ) * ( zt_v(ji,jj,jl) - zt_v(ji,jj-1,jl) ) * r1_e2t  (ji,jj) &
                   &                              + pt   (ji,jj,jl) * ( pv  (ji,jj   ) - pv  (ji,jj-1   ) ) * r1_e1e2t(ji,jj) &
@@ -846,5 +846,5 @@
          !        
          DO jl = 1, jpl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                pt_u(ji,jj,jl) = 0.5_wp * umask(ji,jj,1) * (                                pt(ji+1,jj,jl) + pt(ji,jj,jl)   &
                   &                                         - SIGN( 1._wp, pu(ji,jj) ) * ( pt(ji+1,jj,jl) - pt(ji,jj,jl) ) )
@@ -855,5 +855,5 @@
          !
          DO jl = 1, jpl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zcu  = pu(ji,jj) * r1_e2u(ji,jj) * pdt * r1_e1u(ji,jj)
                pt_u(ji,jj,jl) = 0.5_wp * umask(ji,jj,1) * (                                pt(ji+1,jj,jl) + pt(ji,jj,jl)   &
@@ -865,5 +865,5 @@
          !
          DO jl = 1, jpl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zcu  = pu(ji,jj) * r1_e2u(ji,jj) * pdt * r1_e1u(ji,jj)
                zdx2 = e1u(ji,jj) * e1u(ji,jj)
@@ -879,5 +879,5 @@
          !
          DO jl = 1, jpl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zcu  = pu(ji,jj) * r1_e2u(ji,jj) * pdt * r1_e1u(ji,jj)
                zdx2 = e1u(ji,jj) * e1u(ji,jj)
@@ -893,5 +893,5 @@
          !
          DO jl = 1, jpl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zcu  = pu(ji,jj) * r1_e2u(ji,jj) * pdt * r1_e1u(ji,jj)
                zdx2 = e1u(ji,jj) * e1u(ji,jj)
@@ -914,5 +914,5 @@
       IF( ll_neg ) THEN
          DO jl = 1, jpl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                IF( pt_u(ji,jj,jl) < 0._wp .OR. ( imsk_small(ji,jj,jl) == 0 .AND. pamsk == 0. ) ) THEN
                   pt_u(ji,jj,jl) = 0.5_wp * umask(ji,jj,1) * (                                pt(ji+1,jj,jl) + pt(ji,jj,jl)   &
@@ -924,5 +924,5 @@
       !                                                     !-- High order flux in i-direction  --!
       DO jl = 1, jpl
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             pfu_ho(ji,jj,jl) = pu(ji,jj) * pt_u(ji,jj,jl)
          END_2D
@@ -957,8 +957,8 @@
       !                                                     !--  Laplacian in j-direction  --!
       DO jl = 1, jpl
-         DO_2D_10_00
+         DO_2D( 1, 0, 0, 0 )
             ztv1(ji,jj,jl) = ( pt(ji,jj+1,jl) - pt(ji,jj,jl) ) * r1_e2v(ji,jj) * vmask(ji,jj,1)
          END_2D
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ztv2(ji,jj,jl) = ( ztv1(ji,jj,jl) - ztv1(ji,jj-1,jl) ) * r1_e2t(ji,jj)
          END_2D
@@ -968,8 +968,8 @@
       !                                                     !--  BiLaplacian in j-direction  --!
       DO jl = 1, jpl
-         DO_2D_10_00
+         DO_2D( 1, 0, 0, 0 )
             ztv3(ji,jj,jl) = ( ztv2(ji,jj+1,jl) - ztv2(ji,jj,jl) ) * r1_e2v(ji,jj) * vmask(ji,jj,1)
          END_2D
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ztv4(ji,jj,jl) = ( ztv3(ji,jj,jl) - ztv3(ji,jj-1,jl) ) * r1_e2t(ji,jj)
          END_2D
@@ -982,5 +982,5 @@
       CASE( 1 )                                                !==  1st order central TIM  ==! (Eq. 21)
          DO jl = 1, jpl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                pt_v(ji,jj,jl) = 0.5_wp * vmask(ji,jj,1) * (                                pt(ji,jj+1,jl) + pt(ji,jj,jl)   &
                   &                                         - SIGN( 1._wp, pv(ji,jj) ) * ( pt(ji,jj+1,jl) - pt(ji,jj,jl) ) )
@@ -990,5 +990,5 @@
       CASE( 2 )                                                !==  2nd order central TIM  ==! (Eq. 23)
          DO jl = 1, jpl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zcv  = pv(ji,jj) * r1_e1v(ji,jj) * pdt * r1_e2v(ji,jj)
                pt_v(ji,jj,jl) = 0.5_wp * vmask(ji,jj,1) * (                                pt(ji,jj+1,jl) + pt(ji,jj,jl)   &
@@ -999,5 +999,5 @@
       CASE( 3 )                                                !==  3rd order central TIM  ==! (Eq. 24)
          DO jl = 1, jpl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zcv  = pv(ji,jj) * r1_e1v(ji,jj) * pdt * r1_e2v(ji,jj)
                zdy2 = e2v(ji,jj) * e2v(ji,jj)
@@ -1012,5 +1012,5 @@
       CASE( 4 )                                                !==  4th order central TIM  ==! (Eq. 27)
          DO jl = 1, jpl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zcv  = pv(ji,jj) * r1_e1v(ji,jj) * pdt * r1_e2v(ji,jj)
                zdy2 = e2v(ji,jj) * e2v(ji,jj)
@@ -1025,5 +1025,5 @@
       CASE( 5 )                                                !==  5th order central TIM  ==! (Eq. 29)
          DO jl = 1, jpl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zcv  = pv(ji,jj) * r1_e1v(ji,jj) * pdt * r1_e2v(ji,jj)
                zdy2 = e2v(ji,jj) * e2v(ji,jj)
@@ -1046,5 +1046,5 @@
       IF( ll_neg ) THEN
          DO jl = 1, jpl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                IF( pt_v(ji,jj,jl) < 0._wp .OR. ( jmsk_small(ji,jj,jl) == 0 .AND. pamsk == 0. ) ) THEN
                   pt_v(ji,jj,jl) = 0.5_wp * vmask(ji,jj,1) * (                              ( pt(ji,jj+1,jl) + pt(ji,jj,jl) )  &
@@ -1056,5 +1056,5 @@
       !                                                     !-- High order flux in j-direction  --!
       DO jl = 1, jpl
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             pfv_ho(ji,jj,jl) = pv(ji,jj) * pt_v(ji,jj,jl)
          END_2D
@@ -1092,5 +1092,5 @@
       ! --------------------------------------------------
       DO jl = 1, jpl
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             pfu_ho(ji,jj,jl) = pfu_ho(ji,jj,jl) - pfu_ups(ji,jj,jl)
             pfv_ho(ji,jj,jl) = pfv_ho(ji,jj,jl) - pfv_ups(ji,jj,jl)
@@ -1109,5 +1109,5 @@
          
          DO jl = 1, jpl
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zti_ups(ji,jj,jl)= pt_ups(ji+1,jj  ,jl)
                ztj_ups(ji,jj,jl)= pt_ups(ji  ,jj+1,jl)
@@ -1117,5 +1117,5 @@
 
          DO jl = 1, jpl
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                IF ( pfu_ho(ji,jj,jl) * ( pt_ups(ji+1,jj  ,jl) - pt_ups(ji,jj,jl) ) <= 0._wp .AND.  &
                   & pfv_ho(ji,jj,jl) * ( pt_ups(ji  ,jj+1,jl) - pt_ups(ji,jj,jl) ) <= 0._wp ) THEN
@@ -1146,5 +1146,5 @@
       DO jl = 1, jpl
          
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF    ( pt(ji,jj,jl) <= 0._wp .AND. pt_ups(ji,jj,jl) <= 0._wp ) THEN
                zbup(ji,jj) = -zbig
@@ -1162,5 +1162,5 @@
          END_2D
 
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             !
             zup  = MAX( zbup(ji,jj), zbup(ji-1,jj), zbup(ji+1,jj), zbup(ji,jj-1), zbup(ji,jj+1) )  ! search max/min in neighbourhood
@@ -1199,5 +1199,5 @@
       ! ---------------------------------
       DO jl = 1, jpl
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zau = MIN( 1._wp , zbetdo(ji,jj,jl) , zbetup(ji+1,jj,jl) )
             zbu = MIN( 1._wp , zbetup(ji,jj,jl) , zbetdo(ji+1,jj,jl) )
@@ -1210,5 +1210,5 @@
          END_2D
 
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zav = MIN( 1._wp , zbetdo(ji,jj,jl) , zbetup(ji,jj+1,jl) )
             zbv = MIN( 1._wp , zbetup(ji,jj,jl) , zbetdo(ji,jj+1,jl) )
@@ -1244,5 +1244,5 @@
       !
       DO jl = 1, jpl
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zslpx(ji,jj,jl) = ( pt(ji+1,jj,jl) - pt(ji,jj,jl) ) * umask(ji,jj,1)
          END_2D
@@ -1251,5 +1251,5 @@
       
       DO jl = 1, jpl
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             uCFL = pdt * ABS( pu(ji,jj) ) * r1_e1e2t(ji,jj)
             
@@ -1335,5 +1335,5 @@
       !
       DO jl = 1, jpl
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zslpy(ji,jj,jl) = ( pt(ji,jj+1,jl) - pt(ji,jj,jl) ) * vmask(ji,jj,1)
          END_2D
@@ -1342,5 +1342,5 @@
 
       DO jl = 1, jpl
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             vCFL = pdt * ABS( pv(ji,jj) ) * r1_e1e2t(ji,jj)
 
@@ -1436,5 +1436,5 @@
       DO jl = 1, jpl
 
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF ( pv_i(ji,jj,jl) > 0._wp ) THEN
                !
@@ -1502,5 +1502,5 @@
       ! -- check snow load -- !
       DO jl = 1, jpl
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF ( pv_i(ji,jj,jl) > 0._wp ) THEN
                !
Index: /NEMO/trunk/src/ICE/icedyn_rdgrft.F90
===================================================================
--- /NEMO/trunk/src/ICE/icedyn_rdgrft.F90	(revision 13294)
+++ /NEMO/trunk/src/ICE/icedyn_rdgrft.F90	(revision 13295)
@@ -161,5 +161,5 @@
       npti = 0   ;   nptidx(:) = 0
       ipti = 0   ;   iptidx(:) = 0
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          IF ( at_i(ji,jj) > epsi10 ) THEN
             npti           = npti + 1
@@ -774,5 +774,5 @@
       !                              !--------------------------------------------------!
       CASE( 1 )               !--- Spatial smoothing
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             IF ( SUM( a_i(ji,jj,:) ) > 0._wp ) THEN 
                zworka(ji,jj) = ( 4.0 * strength(ji,jj)              &
@@ -785,5 +785,5 @@
          END_2D
          
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             strength(ji,jj) = zworka(ji,jj)
          END_2D
@@ -796,5 +796,5 @@
          ENDIF
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             IF ( SUM( a_i(ji,jj,:) ) > 0._wp ) THEN 
                itframe = 1 ! number of time steps for the running mean
Index: /NEMO/trunk/src/ICE/icedyn_rhg_evp.F90
===================================================================
--- /NEMO/trunk/src/ICE/icedyn_rhg_evp.F90	(revision 13294)
+++ /NEMO/trunk/src/ICE/icedyn_rhg_evp.F90	(revision 13295)
@@ -181,5 +181,5 @@
       !------------------------------------------------------------------------------!
       ! ocean/land mask
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          zfmask(ji,jj) = tmask(ji,jj,1) * tmask(ji+1,jj,1) * tmask(ji,jj+1,1) * tmask(ji+1,jj+1,1)
       END_2D
@@ -188,5 +188,5 @@
       ! Lateral boundary conditions on velocity (modify zfmask)
       zwf(:,:) = zfmask(:,:)
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          IF( zfmask(ji,jj) == 0._wp ) THEN
             zfmask(ji,jj) = rn_ishlat * MIN( 1._wp , MAX( zwf(ji+1,jj), zwf(ji,jj+1), zwf(ji-1,jj), zwf(ji,jj-1) ) )
@@ -254,5 +254,5 @@
       zsshdyn(:,:) = ice_var_sshdyn( ssh_m, snwice_mass, snwice_mass_b)
 
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
 
          ! ice fraction at U-V points
@@ -305,5 +305,5 @@
       !
       IF( ln_landfast_L16 ) THEN         !-- Lemieux 2016
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ! ice thickness at U-V points
             zvU = 0.5_wp * ( vt_i(ji,jj) * e1e2t(ji,jj) + vt_i(ji+1,jj) * e1e2t(ji+1,jj) ) * r1_e1e2u(ji,jj) * umask(ji,jj,1)
@@ -322,5 +322,5 @@
          !
       ELSE                               !-- no landfast
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ztaux_base(ji,jj) = 0._wp
             ztauy_base(ji,jj) = 0._wp
@@ -345,5 +345,5 @@
 
          ! --- divergence, tension & shear (Appendix B of Hunke & Dukowicz, 2002) --- !
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
 
             ! shear at F points
@@ -355,5 +355,5 @@
          CALL lbc_lnk( 'icedyn_rhg_evp', zds, 'F', 1.0_wp )
 
-         DO_2D_01_01
+         DO_2D( 0, 1, 0, 1 )
 
             ! shear**2 at T points (doc eq. A16)
@@ -397,5 +397,5 @@
          CALL lbc_lnk( 'icedyn_rhg_evp', zp_delt, 'T', 1.0_wp )
 
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
 
             ! alpha & beta for aEVP
@@ -415,5 +415,5 @@
 
          ! --- Ice internal stresses (Appendix C of Hunke and Dukowicz, 2002) --- !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             !                   !--- U points
             zfU(ji,jj) = 0.5_wp * ( ( zs1(ji+1,jj) - zs1(ji,jj) ) * e2u(ji,jj)                                             &
@@ -443,5 +443,5 @@
          IF( MOD(jter,2) == 0 ) THEN ! even iterations
             !
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                !                 !--- tau_io/(v_oce - v_ice)
                zTauO = zaV(ji,jj) * zrhoco * SQRT( ( v_ice (ji,jj) - v_oce (ji,jj) ) * ( v_ice (ji,jj) - v_oce (ji,jj) )  &
@@ -492,5 +492,5 @@
             IF( ln_bdy )   CALL bdy_ice_dyn( 'V' )
             !
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                !                 !--- tau_io/(u_oce - u_ice)
                zTauO = zaU(ji,jj) * zrhoco * SQRT( ( u_ice (ji,jj) - u_oce (ji,jj) ) * ( u_ice (ji,jj) - u_oce (ji,jj) )  &
@@ -543,5 +543,5 @@
          ELSE ! odd iterations
             !
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                !                 !--- tau_io/(u_oce - u_ice)
                zTauO = zaU(ji,jj) * zrhoco * SQRT( ( u_ice (ji,jj) - u_oce (ji,jj) ) * ( u_ice (ji,jj) - u_oce (ji,jj) )  &
@@ -592,5 +592,5 @@
             IF( ln_bdy )   CALL bdy_ice_dyn( 'U' )
             !
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                !                 !--- tau_io/(v_oce - v_ice)
                zTauO = zaV(ji,jj) * zrhoco * SQRT( ( v_ice (ji,jj) - v_oce (ji,jj) ) * ( v_ice (ji,jj) - v_oce (ji,jj) )  &
@@ -658,5 +658,5 @@
       ! 4) Recompute delta, shear and div (inputs for mechanical redistribution) 
       !------------------------------------------------------------------------------!
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
 
          ! shear at F points
@@ -667,5 +667,5 @@
       END_2D
       
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          
          ! tension**2 at T points
@@ -706,5 +706,5 @@
       ! 5) diagnostics
       !------------------------------------------------------------------------------!
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zmsk00(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice, 0 if no ice
       END_2D
@@ -735,5 +735,5 @@
          ALLOCATE( zsig1(jpi,jpj) , zsig2(jpi,jpj) , zsig3(jpi,jpj) )
          !         
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zdum1 = ( zmsk00(ji-1,jj) * pstress12_i(ji-1,jj) + zmsk00(ji  ,jj-1) * pstress12_i(ji  ,jj-1) +  &  ! stress12_i at T-point
                &      zmsk00(ji  ,jj) * pstress12_i(ji  ,jj) + zmsk00(ji-1,jj-1) * pstress12_i(ji-1,jj-1) )  &
@@ -786,5 +786,5 @@
             &      zdiag_xmtrp_snw(jpi,jpj) , zdiag_ymtrp_snw(jpi,jpj) , zdiag_xatrp(jpi,jpj) , zdiag_yatrp(jpi,jpj) )
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ! 2D ice mass, snow mass, area transport arrays (X, Y)
             zfac_x = 0.5 * u_ice(ji,jj) * e2u(ji,jj) * zmsk00(ji,jj)
Index: /NEMO/trunk/src/ICE/iceistate.F90
===================================================================
--- /NEMO/trunk/src/ICE/iceistate.F90	(revision 13294)
+++ /NEMO/trunk/src/ICE/iceistate.F90	(revision 13295)
@@ -288,5 +288,5 @@
             ! select ice covered grid points
             npti = 0 ; nptidx(:) = 0
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                IF ( zht_i_ini(ji,jj) > 0._wp ) THEN
                   npti         = npti  + 1
@@ -338,5 +338,5 @@
             CALL ice_var_salprof ! for sz_i
             DO jl = 1, jpl
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   v_i (ji,jj,jl) = h_i(ji,jj,jl) * a_i(ji,jj,jl)
                   v_s (ji,jj,jl) = h_s(ji,jj,jl) * a_i(ji,jj,jl)
@@ -346,5 +346,5 @@
             !
             DO jl = 1, jpl
-               DO_3D_11_11( 1, nlay_s )
+               DO_3D( 1, 1, 1, 1, 1, nlay_s )
                   t_s(ji,jj,jk,jl) = zts_3d(ji,jj,jl)
                   e_s(ji,jj,jk,jl) = zswitch(ji,jj) * v_s(ji,jj,jl) * r1_nlay_s * &
@@ -354,5 +354,5 @@
             !
             DO jl = 1, jpl
-               DO_3D_11_11( 1, nlay_i )
+               DO_3D( 1, 1, 1, 1, 1, nlay_i )
                   t_i (ji,jj,jk,jl) = zti_3d(ji,jj,jl) 
                   ztmelts          = - rTmlt * sz_i(ji,jj,jk,jl) + rt0 ! melting temperature in K
Index: /NEMO/trunk/src/ICE/iceitd.F90
===================================================================
--- /NEMO/trunk/src/ICE/iceitd.F90	(revision 13294)
+++ /NEMO/trunk/src/ICE/iceitd.F90	(revision 13295)
@@ -98,5 +98,5 @@
       !
       npti = 0   ;   nptidx(:) = 0
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          IF ( at_i(ji,jj) > epsi10 ) THEN
             npti = npti + 1
@@ -611,5 +611,5 @@
          !                    !---------------------------------------
          npti = 0   ;   nptidx(:) = 0
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF( a_i(ji,jj,jl) > 0._wp .AND. v_i(ji,jj,jl) > (a_i(ji,jj,jl) * hi_max(jl)) ) THEN
                npti = npti + 1
@@ -650,5 +650,5 @@
          !                    !-----------------------------------------
          npti = 0 ; nptidx(:) = 0
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF( a_i(ji,jj,jl+1) > 0._wp .AND. v_i(ji,jj,jl+1) <= (a_i(ji,jj,jl+1) * hi_max(jl)) ) THEN
                npti = npti + 1
Index: /NEMO/trunk/src/ICE/icesbc.F90
===================================================================
--- /NEMO/trunk/src/ICE/icesbc.F90	(revision 13294)
+++ /NEMO/trunk/src/ICE/icesbc.F90	(revision 13295)
@@ -82,5 +82,5 @@
       IF( ln_mixcpl) THEN                                                        ! Case of a mixed Bulk/Coupled formulation
                                    CALL sbc_cpl_ice_tau( zutau_ice , zvtau_ice )
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             utau_ice(ji,jj) = utau_ice(ji,jj) * xcplmask(ji,jj,0) + zutau_ice(ji,jj) * ( 1. - xcplmask(ji,jj,0) )
             vtau_ice(ji,jj) = vtau_ice(ji,jj) * xcplmask(ji,jj,0) + zvtau_ice(ji,jj) * ( 1. - xcplmask(ji,jj,0) )
Index: /NEMO/trunk/src/ICE/icethd.F90
===================================================================
--- /NEMO/trunk/src/ICE/icethd.F90	(revision 13294)
+++ /NEMO/trunk/src/ICE/icethd.F90	(revision 13295)
@@ -109,5 +109,5 @@
          zu_io(:,:) = u_ice(:,:) - ssu_m(:,:)
          zv_io(:,:) = v_ice(:,:) - ssv_m(:,:)
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zfric(ji,jj) = rn_cio * ( 0.5_wp *  &
                &                    (  zu_io(ji,jj) * zu_io(ji,jj) + zu_io(ji-1,jj) * zu_io(ji-1,jj)   &
@@ -115,5 +115,5 @@
          END_2D
       ELSE      !  if no ice dynamics => transmit directly the atmospheric stress to the ocean
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zfric(ji,jj) = r1_rho0 * SQRT( 0.5_wp *  &
                &                         (  utau(ji,jj) * utau(ji,jj) + utau(ji-1,jj) * utau(ji-1,jj)   &
@@ -126,5 +126,5 @@
       ! Partial computation of forcing for the thermodynamic sea ice model
       !--------------------------------------------------------------------!
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          rswitch  = tmask(ji,jj,1) * MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi10 ) ) ! 0 if no ice
          !
@@ -196,5 +196,5 @@
          ! select ice covered grid points
          npti = 0 ; nptidx(:) = 0
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF ( a_i(ji,jj,jl) > epsi10 ) THEN     
                npti         = npti  + 1
Index: /NEMO/trunk/src/ICE/icethd_do.F90
===================================================================
--- /NEMO/trunk/src/ICE/icethd_do.F90	(revision 13294)
+++ /NEMO/trunk/src/ICE/icethd_do.F90	(revision 13295)
@@ -145,5 +145,5 @@
          zgamafr = 0.03
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             IF ( qlead(ji,jj) < 0._wp .AND. tau_icebfr(ji,jj) == 0._wp ) THEN ! activated if cooling and no landfast
                ! -- Wind stress -- !
@@ -202,5 +202,5 @@
       ! Identify grid points where new ice forms
       npti = 0   ;   nptidx(:) = 0
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          IF ( qlead(ji,jj)  <  0._wp .AND. tau_icebfr(ji,jj) == 0._wp ) THEN
             npti = npti + 1
Index: /NEMO/trunk/src/ICE/iceupdate.F90
===================================================================
--- /NEMO/trunk/src/ICE/iceupdate.F90	(revision 13294)
+++ /NEMO/trunk/src/ICE/iceupdate.F90	(revision 13295)
@@ -113,5 +113,5 @@
       ENDIF
       
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
 
          ! Solar heat flux reaching the ocean = zqsr (W.m-2) 
@@ -332,5 +332,5 @@
       !
       IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN     !==  Ice time-step only  ==!   (i.e. surface module time-step)
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             !                                               ! 2*(U_ice-U_oce) at T-point
             zu_t = u_ice(ji,jj) + u_ice(ji-1,jj) - u_oce(ji,jj) - u_oce(ji-1,jj)   
@@ -351,5 +351,5 @@
       !                                      !==  every ocean time-step  ==!
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          ! ice area at u and v-points 
          zat_u  = ( at_i(ji,jj) * tmask(ji,jj,1) + at_i (ji+1,jj    ) * tmask(ji+1,jj  ,1) )  &
Index: /NEMO/trunk/src/ICE/icevar.F90
===================================================================
--- /NEMO/trunk/src/ICE/icevar.F90	(revision 13294)
+++ /NEMO/trunk/src/ICE/icevar.F90	(revision 13295)
@@ -243,5 +243,5 @@
       zlay_i   = REAL( nlay_i , wp )    ! number of layers
       DO jl = 1, jpl
-         DO_3D_11_11( 1, nlay_i )
+         DO_3D( 1, 1, 1, 1, 1, nlay_i )
             IF ( v_i(ji,jj,jl) > epsi20 ) THEN     !--- icy area 
                !
@@ -347,5 +347,5 @@
          z1_dS = 1._wp / ( zsi1 - zsi0 )
          DO jl = 1, jpl
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                zalpha(ji,jj,jl) = MAX(  0._wp , MIN( ( zsi1 - s_i(ji,jj,jl) ) * z1_dS , 1._wp )  )
                !                             ! force a constant profile when SSS too low (Baltic Sea)
@@ -356,5 +356,5 @@
          ! Computation of the profile
          DO jl = 1, jpl
-            DO_3D_11_11( 1, nlay_i )
+            DO_3D( 1, 1, 1, 1, 1, nlay_i )
                !                          ! linear profile with 0 surface value
                zs0 = z_slope_s(ji,jj,jl) * ( REAL(jk,wp) - 0.5_wp ) * h_i(ji,jj,jl) * r1_nlay_i
@@ -486,5 +486,5 @@
          ! Zap ice energy and use ocean heat to melt ice
          !-----------------------------------------------------------------
-         DO_3D_11_11( 1, nlay_i )
+         DO_3D( 1, 1, 1, 1, 1, nlay_i )
             ! update exchanges with ocean
             hfx_res(ji,jj)   = hfx_res(ji,jj) - (1._wp - zswitch(ji,jj) ) * e_i(ji,jj,jk,jl) * r1_Dt_ice ! W.m-2 <0
@@ -493,5 +493,5 @@
          END_3D
          !
-         DO_3D_11_11( 1, nlay_s )
+         DO_3D( 1, 1, 1, 1, 1, nlay_s )
             ! update exchanges with ocean
             hfx_res(ji,jj)   = hfx_res(ji,jj) - (1._wp - zswitch(ji,jj) ) * e_s(ji,jj,jk,jl) * r1_Dt_ice ! W.m-2 <0
@@ -503,5 +503,5 @@
          ! zap ice and snow volume, add water and salt to ocean
          !-----------------------------------------------------------------
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ! update exchanges with ocean
             sfx_res(ji,jj)  = sfx_res(ji,jj) + (1._wp - zswitch(ji,jj) ) * sv_i(ji,jj,jl)   * rhoi * r1_Dt_ice
@@ -574,5 +574,5 @@
          ! zap ice energy and send it to the ocean
          !----------------------------------------
-         DO_3D_11_11( 1, nlay_i )
+         DO_3D( 1, 1, 1, 1, 1, nlay_i )
             IF( pe_i(ji,jj,jk,jl) < 0._wp .OR. pa_i(ji,jj,jl) <= 0._wp ) THEN
                hfx_res(ji,jj)   = hfx_res(ji,jj) - pe_i(ji,jj,jk,jl) * z1_dt ! W.m-2 >0
@@ -581,5 +581,5 @@
          END_3D
          !
-         DO_3D_11_11( 1, nlay_s )
+         DO_3D( 1, 1, 1, 1, 1, nlay_s )
             IF( pe_s(ji,jj,jk,jl) < 0._wp .OR. pa_i(ji,jj,jl) <= 0._wp ) THEN
                hfx_res(ji,jj)   = hfx_res(ji,jj) - pe_s(ji,jj,jk,jl) * z1_dt ! W.m-2 <0
@@ -591,5 +591,5 @@
          ! zap ice and snow volume, add water and salt to ocean
          !-----------------------------------------------------
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF( pv_i(ji,jj,jl) < 0._wp .OR. pa_i(ji,jj,jl) <= 0._wp ) THEN
                wfx_res(ji,jj)    = wfx_res(ji,jj) + pv_i (ji,jj,jl) * rhoi * z1_dt
Index: /NEMO/trunk/src/ICE/icewri.F90
===================================================================
--- /NEMO/trunk/src/ICE/icewri.F90	(revision 13294)
+++ /NEMO/trunk/src/ICE/icewri.F90	(revision 13295)
@@ -71,5 +71,5 @@
 
       ! tresholds for outputs
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zmsk00(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06  ) ) ! 1 if ice    , 0 if no ice
          zmsk05(ji,jj) = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 0.05_wp ) ) ! 1 if 5% ice , 0 if less
@@ -78,5 +78,5 @@
       END_2D
       DO jl = 1, jpl
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             zmsk00l(ji,jj,jl)  = MAX( 0._wp , SIGN( 1._wp , a_i(ji,jj,jl) - epsi06 ) )
             zmsksnl(ji,jj,jl)  = MAX( 0._wp , SIGN( 1._wp , v_s(ji,jj,jl) - epsi06 ) )
@@ -130,5 +130,5 @@
       !
       IF( iom_use('icevel') .OR. iom_use('fasticepres') ) THEN                                                              ! module of ice velocity
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             z2da  = u_ice(ji,jj) + u_ice(ji-1,jj)
             z2db  = v_ice(ji,jj) + v_ice(ji,jj-1)
Index: /NEMO/trunk/src/NST/agrif_oce_sponge.F90
===================================================================
--- /NEMO/trunk/src/NST/agrif_oce_sponge.F90	(revision 13294)
+++ /NEMO/trunk/src/NST/agrif_oce_sponge.F90	(revision 13295)
@@ -271,5 +271,5 @@
          fspu(:,:) = 0._wp
          fspv(:,:) = 0._wp
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             fspu(ji,jj) = 0.5_wp * ( ztabramp(ji,jj) + ztabramp(ji+1,jj  ) ) * ssumask(ji,jj)
             fspv(ji,jj) = 0.5_wp * ( ztabramp(ji,jj) + ztabramp(ji  ,jj+1) ) * ssvmask(ji,jj)
@@ -281,5 +281,5 @@
          fspt(:,:) = 0._wp
          fspf(:,:) = 0._wp
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             fspt(ji,jj) = ztabramp(ji,jj) * ssmask(ji,jj)
             fspf(ji,jj) = 0.25_wp * ( ztabramp(ji  ,jj  ) + ztabramp(ji  ,jj+1)   &
@@ -305,5 +305,5 @@
 #if defined key_vertical
       ! Remove vertical interpolation where not needed:
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          IF ((fspu(ji-1,jj)==0._wp).AND.(fspu(ji,jj)==0._wp).AND. &
          &   (fspv(ji,jj-1)==0._wp).AND.(fspv(ji,jj)==0._wp)) mbkt_parent(ji,jj) = 0
Index: /NEMO/trunk/src/NST/agrif_user.F90
===================================================================
--- /NEMO/trunk/src/NST/agrif_user.F90	(revision 13294)
+++ /NEMO/trunk/src/NST/agrif_user.F90	(revision 13295)
@@ -257,15 +257,15 @@
       ! TODO: Switch to linear interpolation of bathymetry in the s-coordinate case
       !       and no refinement
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          mbku_parent(ji,jj) = MIN( mbkt_parent(ji+1,jj  ), mbkt_parent(ji,jj) )
          mbkv_parent(ji,jj) = MIN( mbkt_parent(ji  ,jj+1), mbkt_parent(ji,jj) )
       END_2D
       IF ( ln_sco.AND.Agrif_Parent(ln_sco) ) THEN 
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             hu0_parent(ji,jj) = 0.5_wp * ( ht0_parent(ji,jj)+ht0_parent(ji+1,jj) )
             hv0_parent(ji,jj) = 0.5_wp * ( ht0_parent(ji,jj)+ht0_parent(ji,jj+1) )
          END_2D
       ELSE
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             hu0_parent(ji,jj) = MIN( ht0_parent(ji,jj), ht0_parent(ji+1,jj) )
             hv0_parent(ji,jj) = MIN( ht0_parent(ji,jj), ht0_parent(ji,jj+1) )
@@ -274,10 +274,10 @@
       !
       CALL lbc_lnk_multi( 'Agrif_Init_Domain', hu0_parent, 'U', 1.0_wp, hv0_parent, 'V', 1.0_wp )
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zk(ji,jj) = REAL( mbku_parent(ji,jj), wp )
       END_2D
       CALL lbc_lnk( 'Agrif_InitValues_cont', zk, 'U', 1.0_wp )
       mbku_parent(:,:) = MAX( NINT( zk(:,:) ), 1 )
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zk(ji,jj) = REAL( mbkv_parent(ji,jj), wp )
       END_2D
Index: /NEMO/trunk/src/OCE/ASM/asminc.F90
===================================================================
--- /NEMO/trunk/src/OCE/ASM/asminc.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ASM/asminc.F90	(revision 13295)
@@ -414,5 +414,5 @@
             DO jk = 1, jpkm1           ! zhdiv = e1e1 * div
                zhdiv(:,:) = 0._wp
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   zhdiv(ji,jj) = (  e2u(ji  ,jj) * e3u(ji  ,jj,jk,Kmm) * u_bkginc(ji  ,jj,jk)    &
                      &            - e2u(ji-1,jj) * e3u(ji-1,jj,jk,Kmm) * u_bkginc(ji-1,jj,jk)    &
@@ -423,5 +423,5 @@
                CALL lbc_lnk( 'asminc', zhdiv, 'T', 1.0_wp )   ! lateral boundary cond. (no sign change)
                !
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   u_bkginc(ji,jj,jk) = u_bkginc(ji,jj,jk)                         &
                      &               + 0.2_wp * ( zhdiv(ji+1,jj) - zhdiv(ji  ,jj) ) * r1_e1u(ji,jj) * umask(ji,jj,jk)
Index: /NEMO/trunk/src/OCE/C1D/dtauvd.F90
===================================================================
--- /NEMO/trunk/src/OCE/C1D/dtauvd.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/C1D/dtauvd.F90	(revision 13295)
@@ -158,5 +158,5 @@
          ENDIF
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             DO jk = 1, jpk
                zl = gdept(ji,jj,jk,Kmm)
@@ -193,5 +193,5 @@
          !
          IF( ln_zps ) THEN                ! zps-coordinate (partial steps) interpolation at the last ocean level
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                ik = mbkt(ji,jj) 
                IF( ik > 1 ) THEN
Index: /NEMO/trunk/src/OCE/C1D/dyncor_c1d.F90
===================================================================
--- /NEMO/trunk/src/OCE/C1D/dyncor_c1d.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/C1D/dyncor_c1d.F90	(revision 13295)
@@ -77,10 +77,10 @@
       !
       IF( ln_stcor ) THEN
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) + ff_t(ji,jj) * (pvv(ji,jj,jk,Kmm) + vsd(ji,jj,jk))
             pvv(ji,jj,jk,Krhs) = pvv(ji,jj,jk,Krhs) - ff_t(ji,jj) * (puu(ji,jj,jk,Kmm) + usd(ji,jj,jk))
          END_3D
       ELSE
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) + ff_t(ji,jj) * pvv(ji,jj,jk,Kmm)
             pvv(ji,jj,jk,Krhs) = pvv(ji,jj,jk,Krhs) - ff_t(ji,jj) * puu(ji,jj,jk,Kmm)
Index: /NEMO/trunk/src/OCE/C1D/dyndmp.F90
===================================================================
--- /NEMO/trunk/src/OCE/C1D/dyndmp.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/C1D/dyndmp.F90	(revision 13295)
@@ -165,5 +165,5 @@
       !
       CASE( 0 )                   ! Newtonian damping throughout the water column
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zua = resto_uv(ji,jj,jk) * ( zuv_dta(ji,jj,jk,1) - puu(ji,jj,jk,Kbb) )
             zva = resto_uv(ji,jj,jk) * ( zuv_dta(ji,jj,jk,2) - pvv(ji,jj,jk,Kbb) )
@@ -175,5 +175,5 @@
          !
       CASE ( 1 )                  ! no damping above the turbocline (avt > 5 cm2/s)
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             IF( avt(ji,jj,jk) <= avt_c ) THEN
                zua = resto_uv(ji,jj,jk) * ( zuv_dta(ji,jj,jk,1) - puu(ji,jj,jk,Kbb) )
@@ -190,5 +190,5 @@
          !
       CASE ( 2 )                  ! no damping in the mixed layer
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             IF( gdept(ji,jj,jk,Kmm) >= hmlp (ji,jj) ) THEN
                zua = resto_uv(ji,jj,jk) * ( zuv_dta(ji,jj,jk,1) - puu(ji,jj,jk,Kbb) )
Index: /NEMO/trunk/src/OCE/CRS/crsfld.F90
===================================================================
--- /NEMO/trunk/src/OCE/CRS/crsfld.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/CRS/crsfld.F90	(revision 13295)
@@ -120,5 +120,5 @@
       !
       zt(:,:,:) = 0._wp     ;    zs(:,:,:) = 0._wp  ;   zt_crs(:,:,:) = 0._wp   ;    zs_crs(:,:,:) = 0._wp
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          zt(ji,jj,jk)  = uu(ji,jj,jk,Kmm) * 0.5 * ( ts(ji,jj,jk,jp_tem,Kmm) + ts(ji+1,jj,jk,jp_tem,Kmm) ) 
          zs(ji,jj,jk)  = uu(ji,jj,jk,Kmm) * 0.5 * ( ts(ji,jj,jk,jp_sal,Kmm) + ts(ji+1,jj,jk,jp_sal,Kmm) ) 
@@ -135,5 +135,5 @@
       !                                                                                 
       zt(:,:,:) = 0._wp     ;    zs(:,:,:) = 0._wp  ;   zt_crs(:,:,:) = 0._wp   ;    zs_crs(:,:,:) = 0._wp
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          zt(ji,jj,jk)  = vv(ji,jj,jk,Kmm) * 0.5 * ( ts(ji,jj,jk,jp_tem,Kmm) + ts(ji,jj+1,jk,jp_tem,Kmm) ) 
          zs(ji,jj,jk)  = vv(ji,jj,jk,Kmm) * 0.5 * ( ts(ji,jj,jk,jp_sal,Kmm) + ts(ji,jj+1,jk,jp_sal,Kmm) ) 
@@ -148,5 +148,5 @@
       IF( iom_use( "eken") ) THEN     !      kinetic energy
          z3d(:,:,jk) = 0._wp 
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zztmp  = r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm)
             z3d(ji,jj,jk) = 0.25_wp * zztmp * (                                    &
Index: /NEMO/trunk/src/OCE/DIA/diaar5.F90
===================================================================
--- /NEMO/trunk/src/OCE/DIA/diaar5.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DIA/diaar5.F90	(revision 13295)
@@ -110,5 +110,5 @@
       !
       IF( iom_use( 'e3tb' ) )  THEN    ! bottom layer thickness
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ikb = mbkt(ji,jj)
             z2d(ji,jj) = e3t(ji,jj,ikb,Kmm)
@@ -195,5 +195,5 @@
           !                                         ! Mean density anomalie, temperature and salinity
           ztsn(:,:,:,:) = 0._wp                    ! ztsn(:,:,1,jp_tem/sal) is used here as 2D Workspace for temperature & salinity
-          DO_3D_11_11( 1, jpkm1 )
+          DO_3D( 1, 1, 1, 1, 1, jpkm1 )
              zztmp = e1e2t(ji,jj) * e3t(ji,jj,jk,Kmm)
              ztsn(ji,jj,1,jp_tem) = ztsn(ji,jj,1,jp_tem) + zztmp * ts(ji,jj,jk,jp_tem,Kmm)
@@ -255,5 +255,5 @@
              IF( iom_use( 'tosmint_pot') ) THEN
                z2d(:,:) = 0._wp
-               DO_3D_11_11( 1, jpkm1 )
+               DO_3D( 1, 1, 1, 1, 1, jpkm1 )
                   z2d(ji,jj) = z2d(ji,jj) + rho0 * e3t(ji,jj,jk,Kmm) *  ztpot(ji,jj,jk)
                END_3D
@@ -276,5 +276,5 @@
          zpe(:,:) = 0._wp
          IF( ln_zdfddm ) THEN
-            DO_3D_11_11( 2, jpk )
+            DO_3D( 1, 1, 1, 1, 2, jpk )
                IF( rn2(ji,jj,jk) > 0._wp ) THEN
                   zrw = ( gdept(ji,jj,jk,Kmm) - gdepw(ji,jj,jk,Kmm) ) / e3w(ji,jj,jk,Kmm)
@@ -289,5 +289,5 @@
             END_3D
           ELSE
-            DO_3D_11_11( 1, jpk )
+            DO_3D( 1, 1, 1, 1, 1, jpk )
                zpe(ji,jj) = zpe(ji,jj) + avt(ji,jj,jk) * MIN(0._wp,rn2(ji,jj,jk)) * rho0 * e3w(ji,jj,jk,Kmm)
             END_3D
@@ -324,5 +324,5 @@
     
       z2d(:,:) = puflx(:,:,1) 
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          z2d(ji,jj) = z2d(ji,jj) + puflx(ji,jj,jk) 
       END_3D
@@ -338,5 +338,5 @@
        !
        z2d(:,:) = pvflx(:,:,1) 
-       DO_3D_00_00( 1, jpkm1 )
+       DO_3D( 0, 0, 0, 0, 1, jpkm1 )
           z2d(ji,jj) = z2d(ji,jj) + pvflx(ji,jj,jk) 
        END_3D
@@ -385,5 +385,5 @@
          zvol0 (:,:) = 0._wp
          thick0(:,:) = 0._wp
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             idep = tmask(ji,jj,jk) * e3t_0(ji,jj,jk)
             zvol0 (ji,jj) = zvol0 (ji,jj) +  idep * e1e2t(ji,jj)
@@ -403,5 +403,5 @@
             sn0(:,:,:) = sn0(:,:,:) * tmask(:,:,:)
             IF( ln_zps ) THEN               ! z-coord. partial steps
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   ik = mbkt(ji,jj)
                   IF( ik > 1 ) THEN
Index: /NEMO/trunk/src/OCE/DIA/diacfl.F90
===================================================================
--- /NEMO/trunk/src/OCE/DIA/diacfl.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DIA/diacfl.F90	(revision 13295)
@@ -60,5 +60,5 @@
       IF( ln_timing )   CALL timing_start('dia_cfl')
       !
-      DO_3D_11_11( 1, jpk )
+      DO_3D( 1, 1, 1, 1, 1, jpk )
          zCu_cfl(ji,jj,jk) = ABS( uu(ji,jj,jk,Kmm) ) * rDt / e1u  (ji,jj)      ! for i-direction
          zCv_cfl(ji,jj,jk) = ABS( vv(ji,jj,jk,Kmm) ) * rDt / e2v  (ji,jj)      ! for j-direction
Index: /NEMO/trunk/src/OCE/DIA/diahth.F90
===================================================================
--- /NEMO/trunk/src/OCE/DIA/diahth.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DIA/diahth.F90	(revision 13295)
@@ -130,5 +130,5 @@
             zdepinv(:,:) = 0._wp  
             zmaxdzT(:,:) = 0._wp  
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                zztmp = gdepw(ji,jj,mbkt(ji,jj)+1,Kmm) 
                hth     (ji,jj) = zztmp
@@ -139,5 +139,5 @@
             END_2D
             IF( nla10 > 1 ) THEN 
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   zztmp = gdepw(ji,jj,mbkt(ji,jj)+1,Kmm) 
                   zrho0_3(ji,jj) = zztmp
@@ -148,5 +148,5 @@
             ! Preliminary computation
             ! computation of zdelr = (dr/dT)(T,S,10m)*(-0.2 degC)
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                IF( tmask(ji,jj,nla10) == 1. ) THEN
                   zu  =  1779.50 + 11.250 * ts(ji,jj,nla10,jp_tem,Kmm) - 3.80   * ts(ji,jj,nla10,jp_sal,Kmm)  &
@@ -170,5 +170,5 @@
             ! MLD: rho = rho(1) + zrho1                                     !
             ! ------------------------------------------------------------- !
-            DO_3DS_11_11( jpkm1, 2, -1 )
+            DO_3DS( 1, 1, 1, 1, jpkm1, 2, -1 )
                !
                zzdep = gdepw(ji,jj,jk,Kmm)
@@ -207,5 +207,5 @@
             ! depth of temperature inversion                                !
             ! ------------------------------------------------------------- !
-            DO_3DS_11_11( jpkm1, nlb10, -1 )
+            DO_3DS( 1, 1, 1, 1, jpkm1, nlb10, -1 )
                !
                zzdep = gdepw(ji,jj,jk,Kmm) * tmask(ji,jj,1)
@@ -305,5 +305,5 @@
       ! --------------------------------------- !
       iktem(:,:) = 1
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zztmp = ts(ji,jj,jk,jp_tem,Kmm)
          IF( zztmp >= ptem )   iktem(ji,jj) = jk
@@ -313,5 +313,5 @@
       !  Depth of ptem isotherm         !
       ! ------------------------------- !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !
          zzdep = gdepw(ji,jj,mbkt(ji,jj)+1,Kmm)       ! depth of the ocean bottom
@@ -351,5 +351,5 @@
       !
       ilevel(:,:) = 1
-      DO_3D_11_11( 2, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 2, jpkm1 )
          IF( ( gdept(ji,jj,jk,Kmm) < pdep ) .AND. ( tmask(ji,jj,jk) == 1 ) ) THEN
              ilevel(ji,jj) = jk
@@ -359,5 +359,5 @@
       END_3D
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ik = ilevel(ji,jj)
          zthick(ji,jj) = pdep - zthick(ji,jj)   !   remaining thickness to reach depht pdep
Index: /NEMO/trunk/src/OCE/DIA/diaptr.F90
===================================================================
--- /NEMO/trunk/src/OCE/DIA/diaptr.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DIA/diaptr.F90	(revision 13295)
@@ -119,5 +119,5 @@
             zmask(:,:,:) = 0._wp
             zts(:,:,:,:) = 0._wp
-            DO_3D_10_11( 1, jpkm1 )
+            DO_3D( 1, 0, 1, 1, 1, jpkm1 )
                zvfc = e1v(ji,jj) * e3v(ji,jj,jk,Kmm)
                zmask(ji,jj,jk)      = vmask(ji,jj,jk)      * zvfc
@@ -190,5 +190,5 @@
          zts(:,:,:,:) = 0._wp
          IF( iom_use( 'zotem' ) .OR. iom_use( 'zosal' ) .OR. iom_use( 'zosrf' )  ) THEN    ! i-mean i-k-surface 
-            DO_3D_11_11( 1, jpkm1 )
+            DO_3D( 1, 1, 1, 1, 1, jpkm1 )
                zsfc = e1t(ji,jj) * e3t(ji,jj,jk,Kmm)
                zmask(ji,jj,jk)      = tmask(ji,jj,jk)      * zsfc
@@ -280,5 +280,5 @@
          IF( iom_use( 'sopstvtr' ) .OR. iom_use( 'sophtvtr' ) ) THEN
             zts(:,:,:,:) = 0._wp
-            DO_3D_10_11( 1, jpkm1 )
+            DO_3D( 1, 0, 1, 1, 1, jpkm1 )
                zvfc = e1v(ji,jj) * e3v(ji,jj,jk,Kmm)
                zts(ji,jj,jk,jp_tem) = (ts(ji,jj,jk,jp_tem,Kmm)+ts(ji,jj+1,jk,jp_tem,Kmm)) * 0.5 * zvfc  !Tracers averaged onto V grid
@@ -505,5 +505,5 @@
       ijpj = jpj
       p_fval(:) = 0._wp
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          p_fval(jj) = p_fval(jj) + pvflx(ji,jj,jk) * pmsk(ji,jj) * tmask_i(ji,jj)
       END_3D
@@ -538,5 +538,5 @@
       ijpj = jpj
       p_fval(:) = 0._wp
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          p_fval(jj) = p_fval(jj) + pvflx(ji,jj) * pmsk(ji,jj) * tmask_i(ji,jj)
       END_2D
@@ -567,5 +567,5 @@
       p_fval(:,:) = 0._wp
       DO jc = 1, jpnj ! looping over all processors in j axis
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             p_fval(ji,jj) = p_fval(ji,jj-1) + pva(ji,jj) * tmask_i(ji,jj)
          END_2D
@@ -606,5 +606,5 @@
       p_fval(:,:) = 0._wp
       !
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          p_fval(jj,jk) = p_fval(jj,jk) + pta(ji,jj,jk) * pmsk(ji,jj) * tmask_i(ji,jj)
       END_3D
Index: /NEMO/trunk/src/OCE/DIA/diawri.F90
===================================================================
--- /NEMO/trunk/src/OCE/DIA/diawri.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DIA/diawri.F90	(revision 13295)
@@ -175,5 +175,5 @@
       CALL iom_put(  "sst", ts(:,:,1,jp_tem,Kmm) )    ! surface temperature
       IF ( iom_use("sbt") ) THEN
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ikbot = mbkt(ji,jj)
             z2d(ji,jj) = ts(ji,jj,ikbot,jp_tem,Kmm)
@@ -185,5 +185,5 @@
       CALL iom_put(  "sss", ts(:,:,1,jp_sal,Kmm) )    ! surface salinity
       IF ( iom_use("sbs") ) THEN
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ikbot = mbkt(ji,jj)
             z2d(ji,jj) = ts(ji,jj,ikbot,jp_sal,Kmm)
@@ -199,5 +199,5 @@
          zztmp = rho0 * 0.25
          z2d(:,:) = 0._wp
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zztmp2 = (  ( rCdU_bot(ji+1,jj)+rCdU_bot(ji  ,jj) ) * uu(ji  ,jj,mbku(ji  ,jj),Kmm)  )**2   &
                &   + (  ( rCdU_bot(ji  ,jj)+rCdU_bot(ji-1,jj) ) * uu(ji-1,jj,mbku(ji-1,jj),Kmm)  )**2   &
@@ -214,5 +214,5 @@
       CALL iom_put(  "ssu", uu(:,:,1,Kmm) )            ! surface i-current
       IF ( iom_use("sbu") ) THEN
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ikbot = mbku(ji,jj)
             z2d(ji,jj) = uu(ji,jj,ikbot,Kmm)
@@ -224,5 +224,5 @@
       CALL iom_put(  "ssv", vv(:,:,1,Kmm) )            ! surface j-current
       IF ( iom_use("sbv") ) THEN
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ikbot = mbkv(ji,jj)
             z2d(ji,jj) = vv(ji,jj,ikbot,Kmm)
@@ -254,5 +254,5 @@
 
       IF ( iom_use("sstgrad") .OR. iom_use("sstgrad2") ) THEN
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zztmp  = ts(ji,jj,1,jp_tem,Kmm)
             zztmpx = ( ts(ji+1,jj,1,jp_tem,Kmm) - zztmp ) * r1_e1u(ji,jj) + ( zztmp - ts(ji-1,jj  ,1,jp_tem,Kmm) ) * r1_e1u(ji-1,jj)
@@ -270,5 +270,5 @@
       IF( iom_use("heatc") ) THEN
          z2d(:,:)  = 0._wp 
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + e3t(ji,jj,jk,Kmm) * ts(ji,jj,jk,jp_tem,Kmm) * tmask(ji,jj,jk)
          END_3D
@@ -278,5 +278,5 @@
       IF( iom_use("saltc") ) THEN
          z2d(:,:)  = 0._wp 
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + e3t(ji,jj,jk,Kmm) * ts(ji,jj,jk,jp_sal,Kmm) * tmask(ji,jj,jk)
          END_3D
@@ -286,5 +286,5 @@
       IF ( iom_use("eken") ) THEN
          z3d(:,:,jpk) = 0._wp 
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zztmp  = 0.25_wp * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm)
             z3d(ji,jj,jk) = zztmp * (  uu(ji-1,jj,jk,Kmm)**2 * e2u(ji-1,jj) * e3u(ji-1,jj,jk,Kmm)   &
@@ -312,5 +312,5 @@
       IF( iom_use("u_heattr") ) THEN
          z2d(:,:) = 0._wp 
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * ( ts(ji,jj,jk,jp_tem,Kmm) + ts(ji+1,jj,jk,jp_tem,Kmm) )
          END_3D
@@ -321,5 +321,5 @@
       IF( iom_use("u_salttr") ) THEN
          z2d(:,:) = 0.e0 
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * ( ts(ji,jj,jk,jp_sal,Kmm) + ts(ji+1,jj,jk,jp_sal,Kmm) )
          END_3D
@@ -339,5 +339,5 @@
       IF( iom_use("v_heattr") ) THEN
          z2d(:,:) = 0.e0 
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * ( ts(ji,jj,jk,jp_tem,Kmm) + ts(ji,jj+1,jk,jp_tem,Kmm) )
          END_3D
@@ -348,5 +348,5 @@
       IF( iom_use("v_salttr") ) THEN
          z2d(:,:) = 0._wp 
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * ( ts(ji,jj,jk,jp_sal,Kmm) + ts(ji,jj+1,jk,jp_sal,Kmm) )
          END_3D
@@ -357,5 +357,5 @@
       IF( iom_use("tosmint") ) THEN
          z2d(:,:) = 0._wp
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + e3t(ji,jj,jk,Kmm) *  ts(ji,jj,jk,jp_tem,Kmm)
          END_3D
@@ -365,5 +365,5 @@
       IF( iom_use("somint") ) THEN
          z2d(:,:)=0._wp
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + e3t(ji,jj,jk,Kmm) * ts(ji,jj,jk,jp_sal,Kmm)
          END_3D
Index: /NEMO/trunk/src/OCE/DIU/diu_bulk.F90
===================================================================
--- /NEMO/trunk/src/OCE/DIU/diu_bulk.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DIU/diu_bulk.F90	(revision 13295)
@@ -130,5 +130,5 @@
       ! If not done already, calculate the solar fraction
       IF ( kt==nit000 ) THEN
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF(  ( x_solfrac(ji,jj) == 0._wp ) .AND. ( tmask(ji,jj,1) == 1._wp ) ) &
                &   x_solfrac(ji,jj) = solfrac( zcoolthick(ji,jj),zthick(ji,jj) )
@@ -199,5 +199,5 @@
       INTEGER :: ji,jj
                      
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          
          ! Only calculate outside tmask
Index: /NEMO/trunk/src/OCE/DIU/diu_coolskin.F90
===================================================================
--- /NEMO/trunk/src/OCE/DIU/diu_coolskin.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DIU/diu_coolskin.F90	(revision 13295)
@@ -97,5 +97,5 @@
       IF( .NOT. ln_blk )   CALL ctl_stop("diu_coolskin.f90: diurnal flux processing only implemented for bulk forcing")
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !
          ! Calcualte wind speed from wind stress and friction velocity
Index: /NEMO/trunk/src/OCE/DOM/dommsk.F90
===================================================================
--- /NEMO/trunk/src/OCE/DOM/dommsk.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DOM/dommsk.F90	(revision 13295)
@@ -131,5 +131,5 @@
       !
       tmask(:,:,:) = 0._wp
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          iktop = k_top(ji,jj)
          ikbot = k_bot(ji,jj)
@@ -149,5 +149,5 @@
          CALL iom_get ( inum, jpdom_global, 'bdy_msk', bdytmask(:,:) )
          CALL iom_close( inum )
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             tmask(ji,jj,jk) = tmask(ji,jj,jk) * bdytmask(ji,jj)
          END_3D
@@ -157,5 +157,5 @@
       ! ----------------------------------------
       ! NB: at this point, fmask is designed for free slip lateral boundary condition
-      DO_3D_00_00( 1, jpk )
+      DO_3D( 0, 0, 0, 0, 1, jpk )
          umask(ji,jj,jk) = tmask(ji,jj  ,jk) * tmask(ji+1,jj  ,jk)
          vmask(ji,jj,jk) = tmask(ji,jj  ,jk) * tmask(ji  ,jj+1,jk)
@@ -199,5 +199,5 @@
          DO jk = 1, jpk
             zwf(:,:) = fmask(:,:,jk)         
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                IF( fmask(ji,jj,jk) == 0._wp ) THEN
                   fmask(ji,jj,jk) = rn_shlat * MIN( 1._wp , MAX( zwf(ji+1,jj), zwf(ji,jj+1),   &
Index: /NEMO/trunk/src/OCE/DOM/domqco.F90
===================================================================
--- /NEMO/trunk/src/OCE/DOM/domqco.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DOM/domqco.F90	(revision 13295)
@@ -149,5 +149,5 @@
       !
       IF( ln_dynadv_vec ) THEN                     !- Vector Form   (thickness weighted averaging)
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pr3u(ji,jj) = 0.5_wp * (  e1e2t(ji  ,jj) * pssh(ji  ,jj)  &
                &                    + e1e2t(ji+1,jj) * pssh(ji+1,jj)  ) * r1_hu_0(ji,jj) * r1_e1e2u(ji,jj)
@@ -156,5 +156,5 @@
          END_2D
       ELSE                                         !- Flux Form   (simple averaging)
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pr3u(ji,jj) = 0.5_wp * (  pssh(ji  ,jj) + pssh(ji+1,jj)  ) * r1_hu_0(ji,jj)
             pr3v(ji,jj) = 0.5_wp * (  pssh(ji,jj  ) + pssh(ji,jj+1)  ) * r1_hv_0(ji,jj)
@@ -169,5 +169,5 @@
          !
          IF( ln_dynadv_vec )   THEN                !- Vector Form   (thickness weighted averaging)
-            DO_2D_10_10                               ! start from 1 since lbc_lnk('F') doesn't update the 1st row/line
+            DO_2D( 1, 0, 1, 0 )                               ! start from 1 since lbc_lnk('F') doesn't update the 1st row/line
                pr3f(ji,jj) = 0.25_wp * (  e1e2t(ji  ,jj  ) * pssh(ji  ,jj  )  &
                   &                     + e1e2t(ji+1,jj  ) * pssh(ji+1,jj  )  &
@@ -176,5 +176,5 @@
             END_2D
          ELSE                                      !- Flux Form   (simple averaging)
-            DO_2D_10_10                               ! start from 1 since lbc_lnk('F') doesn't update the 1st row/line
+            DO_2D( 1, 0, 1, 0 )                               ! start from 1 since lbc_lnk('F') doesn't update the 1st row/line
                pr3f(ji,jj) = 0.25_wp * (  pssh(ji  ,jj  ) + pssh(ji+1,jj  )  &
                   &                     + pssh(ji  ,jj+1) + pssh(ji+1,jj+1)  ) * r1_hf_0(ji,jj)
@@ -264,5 +264,5 @@
                   ssh(:,:,Kbb) = -ssh_ref
                   !
-                  DO_2D_11_11
+                  DO_2D( 1, 1, 1, 1 )
                      IF( ht_0(ji,jj)-ssh_ref <  rn_wdmin1 ) THEN ! if total depth is less than min depth
                         ssh(ji,jj,Kbb) = rn_wdmin1 - (ht_0(ji,jj) )
Index: /NEMO/trunk/src/OCE/DOM/domvvl.F90
===================================================================
--- /NEMO/trunk/src/OCE/DOM/domvvl.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DOM/domvvl.F90	(revision 13295)
@@ -202,5 +202,5 @@
       gdept(:,:,1,Kbb) = 0.5_wp * e3w(:,:,1,Kbb)
       gdepw(:,:,1,Kbb) = 0.0_wp
-      DO_3D_11_11( 2, jpk )
+      DO_3D( 1, 1, 1, 1, 2, jpk )
          !    zcoef = tmask - wmask    ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt
          !                             ! 1 everywhere from mbkt to mikt + 1 or 1 (if no isf)
@@ -250,5 +250,5 @@
          ENDIF
          IF ( ln_vvl_zstar_at_eqtor ) THEN   ! use z-star in vicinity of the Equator
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
 !!gm  case |gphi| >= 6 degrees is useless   initialized just above by default
                IF( ABS(gphit(ji,jj)) >= 6.) THEN
@@ -419,5 +419,5 @@
          zwu(:,:) = 0._wp
          zwv(:,:) = 0._wp
-         DO_3D_10_10( 1, jpkm1 )
+         DO_3D( 1, 0, 1, 0, 1, jpkm1 )
             un_td(ji,jj,jk) = rn_ahe3 * umask(ji,jj,jk) * e2_e1u(ji,jj)           &
                &            * ( tilde_e3t_b(ji,jj,jk) - tilde_e3t_b(ji+1,jj  ,jk) )
@@ -427,9 +427,9 @@
             zwv(ji,jj) = zwv(ji,jj) + vn_td(ji,jj,jk)
          END_3D
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             un_td(ji,jj,mbku(ji,jj)) = un_td(ji,jj,mbku(ji,jj)) - zwu(ji,jj)
             vn_td(ji,jj,mbkv(ji,jj)) = vn_td(ji,jj,mbkv(ji,jj)) - zwv(ji,jj)
          END_2D
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             tilde_e3t_a(ji,jj,jk) = tilde_e3t_a(ji,jj,jk) + (   un_td(ji-1,jj  ,jk) - un_td(ji,jj,jk)    &
                &                                          +     vn_td(ji  ,jj-1,jk) - vn_td(ji,jj,jk)    &
@@ -659,5 +659,5 @@
       gdepw(:,:,1,Kmm) = 0.0_wp
       gde3w(:,:,1) = gdept(:,:,1,Kmm) - ssh(:,:,Kmm)
-      DO_3D_11_11( 2, jpk )
+      DO_3D( 1, 1, 1, 1, 2, jpk )
         !    zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk))   ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt
                                                            ! 1 for jk = mikt
@@ -714,5 +714,5 @@
          !
       CASE( 'U' )                   !* from T- to U-point : hor. surface weighted mean
-         DO_3D_10_10( 1, jpk )
+         DO_3D( 1, 0, 1, 0, 1, jpk )
             pe3_out(ji,jj,jk) = 0.5_wp * (  umask(ji,jj,jk) * (1.0_wp - zlnwd) + zlnwd ) * r1_e1e2u(ji,jj)   &
                &                       * (   e1e2t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) )     &
@@ -723,5 +723,5 @@
          !
       CASE( 'V' )                   !* from T- to V-point : hor. surface weighted mean
-         DO_3D_10_10( 1, jpk )
+         DO_3D( 1, 0, 1, 0, 1, jpk )
             pe3_out(ji,jj,jk) = 0.5_wp * ( vmask(ji,jj,jk)  * (1.0_wp - zlnwd) + zlnwd ) * r1_e1e2v(ji,jj)   &
                &                       * (   e1e2t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) )     &
@@ -732,5 +732,5 @@
          !
       CASE( 'F' )                   !* from U-point to F-point : hor. surface weighted mean
-         DO_3D_10_10( 1, jpk )
+         DO_3D( 1, 0, 1, 0, 1, jpk )
             pe3_out(ji,jj,jk) = 0.5_wp * (  umask(ji,jj,jk) * umask(ji,jj+1,jk) * (1.0_wp - zlnwd) + zlnwd ) &
                &                       *    r1_e1e2f(ji,jj)                                                  &
@@ -899,5 +899,5 @@
                   ssh(:,:,Kbb) = -ssh_ref
 
-                  DO_2D_11_11
+                  DO_2D( 1, 1, 1, 1 )
                      IF( ht_0(ji,jj)-ssh_ref <  rn_wdmin1 ) THEN ! if total depth is less than min depth
                         ssh(ji,jj,Kbb) = rn_wdmin1 - (ht_0(ji,jj) )
@@ -915,5 +915,5 @@
                e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm)
 
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   IF ( ht_0(ji,jj) .LE. 0.0 .AND. NINT( ssmask(ji,jj) ) .EQ. 1) THEN
                      CALL ctl_stop( 'dom_vvl_rst: ht_0 must be positive at potentially wet points' )
Index: /NEMO/trunk/src/OCE/DOM/domwri.F90
===================================================================
--- /NEMO/trunk/src/OCE/DOM/domwri.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DOM/domwri.F90	(revision 13295)
@@ -94,15 +94,15 @@
       
       CALL dom_uniq( zprw, 'T' )
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zprt(ji,jj) = ssmask(ji,jj) * zprw(ji,jj)                        !    ! unique point mask
       END_2D
       CALL iom_rstput( 0, 0, inum, 'tmaskutil', zprt, ktype = jp_i1 )  
       CALL dom_uniq( zprw, 'U' )
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zprt(ji,jj) = ssumask(ji,jj) * zprw(ji,jj)                        !    ! unique point mask
       END_2D
       CALL iom_rstput( 0, 0, inum, 'umaskutil', zprt, ktype = jp_i1 )  
       CALL dom_uniq( zprw, 'V' )
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zprt(ji,jj) = ssvmask(ji,jj) * zprw(ji,jj)                        !    ! unique point mask
       END_2D
Index: /NEMO/trunk/src/OCE/DOM/domzgr.F90
===================================================================
--- /NEMO/trunk/src/OCE/DOM/domzgr.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DOM/domzgr.F90	(revision 13295)
@@ -168,5 +168,5 @@
       !
       !                                ! ice shelf draft and bathymetry
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ikt = mikt(ji,jj)
          ikb = mbkt(ji,jj)
@@ -331,5 +331,5 @@
       !                                    ! N.B.  top     k-index of W-level = mikt
       !                                    !       bottom  k-index of W-level = mbkt+1
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          miku(ji,jj) = MAX(  mikt(ji+1,jj  ) , mikt(ji,jj)  )
          mikv(ji,jj) = MAX(  mikt(ji  ,jj+1) , mikt(ji,jj)  )
Index: /NEMO/trunk/src/OCE/DOM/dtatsd.F90
===================================================================
--- /NEMO/trunk/src/OCE/DOM/dtatsd.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DOM/dtatsd.F90	(revision 13295)
@@ -186,5 +186,5 @@
          ENDIF
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             DO jk = 1, jpk                        ! determines the intepolated T-S profiles at each (i,j) points
                zl = gdept_0(ji,jj,jk)
@@ -219,5 +219,5 @@
          !
          IF( ln_zps ) THEN                      ! zps-coordinate (partial steps) interpolation at the last ocean level
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                ik = mbkt(ji,jj) 
                IF( ik > 1 ) THEN
Index: /NEMO/trunk/src/OCE/DOM/istate.F90
===================================================================
--- /NEMO/trunk/src/OCE/DOM/istate.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DOM/istate.F90	(revision 13295)
@@ -126,5 +126,5 @@
                ! Apply minimum wetdepth criterion
                !
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   IF( ht_0(ji,jj) + ssh(ji,jj,Kbb)  < rn_wdmin1 ) THEN
                      ssh(ji,jj,Kbb) = tmask(ji,jj,1)*( rn_wdmin1 - (ht_0(ji,jj)) )
@@ -181,5 +181,5 @@
       !
 !!gm  the use of umsak & vmask is not necessary below as uu(:,:,:,Kmm), vv(:,:,:,Kmm), uu(:,:,:,Kbb), vv(:,:,:,Kbb) are always masked
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          uu_b(ji,jj,Kmm) = uu_b(ji,jj,Kmm) + e3u(ji,jj,jk,Kmm) * uu(ji,jj,jk,Kmm) * umask(ji,jj,jk)
          vv_b(ji,jj,Kmm) = vv_b(ji,jj,Kmm) + e3v(ji,jj,jk,Kmm) * vv(ji,jj,jk,Kmm) * vmask(ji,jj,jk)
Index: /NEMO/trunk/src/OCE/DYN/divhor.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/divhor.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/divhor.F90	(revision 13295)
@@ -77,5 +77,5 @@
       ENDIF
       !
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          hdiv(ji,jj,jk) = (  e2u(ji  ,jj) * e3u(ji  ,jj,jk,Kmm) * uu(ji  ,jj,jk,Kmm)      &
             &               - e2u(ji-1,jj) * e3u(ji-1,jj,jk,Kmm) * uu(ji-1,jj,jk,Kmm)      &
Index: /NEMO/trunk/src/OCE/DYN/dynadv_cen2.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/dynadv_cen2.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/dynadv_cen2.F90	(revision 13295)
@@ -72,5 +72,5 @@
          zfu(:,:,jk) = 0.25_wp * e2u(:,:) * e3u(:,:,jk,Kmm) * puu(:,:,jk,Kmm)
          zfv(:,:,jk) = 0.25_wp * e1v(:,:) * e3v(:,:,jk,Kmm) * pvv(:,:,jk,Kmm)
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zfu_t(ji+1,jj  ,jk) = ( zfu(ji,jj,jk) + zfu(ji+1,jj,jk) ) * ( puu(ji,jj,jk,Kmm) + puu(ji+1,jj  ,jk,Kmm) )
             zfv_f(ji  ,jj  ,jk) = ( zfv(ji,jj,jk) + zfv(ji+1,jj,jk) ) * ( puu(ji,jj,jk,Kmm) + puu(ji  ,jj+1,jk,Kmm) )
@@ -78,5 +78,5 @@
             zfv_t(ji  ,jj+1,jk) = ( zfv(ji,jj,jk) + zfv(ji,jj+1,jk) ) * ( pvv(ji,jj,jk,Kmm) + pvv(ji  ,jj+1,jk,Kmm) )
          END_2D
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) - (  zfu_t(ji+1,jj,jk) - zfu_t(ji,jj  ,jk)    &
                &                           + zfv_f(ji  ,jj,jk) - zfv_f(ji,jj-1,jk)  ) * r1_e1e2u(ji,jj)   &
@@ -98,10 +98,10 @@
       !                             !==  Vertical advection  ==!
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zfu_uw(ji,jj,jpk) = 0._wp   ;   zfv_vw(ji,jj,jpk) = 0._wp
          zfu_uw(ji,jj, 1 ) = 0._wp   ;   zfv_vw(ji,jj, 1 ) = 0._wp
       END_2D
       IF( ln_linssh ) THEN                ! linear free surface: advection through the surface
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zfu_uw(ji,jj,1) = 0.5_wp * ( e1e2t(ji,jj) * ww(ji,jj,1) + e1e2t(ji+1,jj) * ww(ji+1,jj,1) ) * puu(ji,jj,1,Kmm)
             zfv_vw(ji,jj,1) = 0.5_wp * ( e1e2t(ji,jj) * ww(ji,jj,1) + e1e2t(ji,jj+1) * ww(ji,jj+1,1) ) * pvv(ji,jj,1,Kmm)
@@ -109,13 +109,13 @@
       ENDIF
       DO jk = 2, jpkm1                    ! interior advective fluxes
-         DO_2D_01_01
+         DO_2D( 0, 1, 0, 1 )
             zfw(ji,jj,jk) = 0.25_wp * e1e2t(ji,jj) * ww(ji,jj,jk)
          END_2D
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zfu_uw(ji,jj,jk) = ( zfw(ji,jj,jk) + zfw(ji+1,jj  ,jk) ) * ( puu(ji,jj,jk,Kmm) + puu(ji,jj,jk-1,Kmm) )
             zfv_vw(ji,jj,jk) = ( zfw(ji,jj,jk) + zfw(ji  ,jj+1,jk) ) * ( pvv(ji,jj,jk,Kmm) + pvv(ji,jj,jk-1,Kmm) )
          END_2D
       END DO
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) - ( zfu_uw(ji,jj,jk) - zfu_uw(ji,jj,jk+1) ) * r1_e1e2u(ji,jj)   &
             &                                      / e3u(ji,jj,jk,Kmm)
Index: /NEMO/trunk/src/OCE/DYN/dynadv_ubs.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/dynadv_ubs.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/dynadv_ubs.F90	(revision 13295)
@@ -108,5 +108,5 @@
          zfv(:,:,jk) = e1v(:,:) * e3v(:,:,jk,Kmm) * pvv(:,:,jk,Kmm)
          !            
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zlu_uu(ji,jj,jk,1) = ( puu (ji+1,jj  ,jk,Kbb) - 2.*puu (ji,jj,jk,Kbb) + puu (ji-1,jj  ,jk,Kbb) ) * umask(ji,jj,jk)
             zlv_vv(ji,jj,jk,1) = ( pvv (ji  ,jj+1,jk,Kbb) - 2.*pvv (ji,jj,jk,Kbb) + pvv (ji  ,jj-1,jk,Kbb) ) * vmask(ji,jj,jk)
@@ -136,5 +136,5 @@
          zfv(:,:,jk) = 0.25_wp * e1v(:,:) * e3v(:,:,jk,Kmm) * pvv(:,:,jk,Kmm)
          !
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zui = ( puu(ji,jj,jk,Kmm) + puu(ji+1,jj  ,jk,Kmm) )
             zvj = ( pvv(ji,jj,jk,Kmm) + pvv(ji  ,jj+1,jk,Kmm) )
@@ -168,5 +168,5 @@
                &                * ( pvv(ji,jj,jk,Kmm) + pvv(ji+1,jj  ,jk,Kmm) - gamma1 * zl_v )
          END_2D
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) - (  zfu_t(ji+1,jj,jk) - zfu_t(ji,jj  ,jk)    &
                &                           + zfv_f(ji  ,jj,jk) - zfv_f(ji,jj-1,jk)  ) * r1_e1e2u(ji,jj)   &
@@ -187,5 +187,5 @@
       !                                      !  Vertical advection  !
       !                                      ! ==================== !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zfu_uw(ji,jj,jpk) = 0._wp
          zfv_vw(ji,jj,jpk) = 0._wp
@@ -194,5 +194,5 @@
       END_2D
       IF( ln_linssh ) THEN                         ! constant volume : advection through the surface
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zfu_uw(ji,jj,1) = 0.5_wp * ( e1e2t(ji,jj) * ww(ji,jj,1) + e1e2t(ji+1,jj) * ww(ji+1,jj,1) ) * puu(ji,jj,1,Kmm)
             zfv_vw(ji,jj,1) = 0.5_wp * ( e1e2t(ji,jj) * ww(ji,jj,1) + e1e2t(ji,jj+1) * ww(ji,jj+1,1) ) * pvv(ji,jj,1,Kmm)
@@ -200,13 +200,13 @@
       ENDIF
       DO jk = 2, jpkm1                          ! interior fluxes
-         DO_2D_01_01
+         DO_2D( 0, 1, 0, 1 )
             zfw(ji,jj,jk) = 0.25_wp * e1e2t(ji,jj) * ww(ji,jj,jk)
          END_2D
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zfu_uw(ji,jj,jk) = ( zfw(ji,jj,jk)+ zfw(ji+1,jj,jk) ) * ( puu(ji,jj,jk,Kmm) + puu(ji,jj,jk-1,Kmm) )
             zfv_vw(ji,jj,jk) = ( zfw(ji,jj,jk)+ zfw(ji,jj+1,jk) ) * ( pvv(ji,jj,jk,Kmm) + pvv(ji,jj,jk-1,Kmm) )
          END_2D
       END DO
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          puu(ji,jj,jk,Krhs) =  puu(ji,jj,jk,Krhs) - ( zfu_uw(ji,jj,jk) - zfu_uw(ji,jj,jk+1) ) * r1_e1e2u(ji,jj)   &
             &                                       / e3u(ji,jj,jk,Kmm)
Index: /NEMO/trunk/src/OCE/DYN/dynatf.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/dynatf.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/dynatf.F90	(revision 13295)
@@ -197,5 +197,5 @@
          IF( ln_linssh ) THEN             ! Fixed volume !
             !                             ! =============!
-            DO_3D_11_11( 1, jpkm1 )
+            DO_3D( 1, 1, 1, 1, 1, jpkm1 )
                puu(ji,jj,jk,Kmm) = puu(ji,jj,jk,Kmm) + rn_atfp * ( puu(ji,jj,jk,Kbb) - 2._wp * puu(ji,jj,jk,Kmm) + puu(ji,jj,jk,Kaa) )
                pvv(ji,jj,jk,Kmm) = pvv(ji,jj,jk,Kmm) + rn_atfp * ( pvv(ji,jj,jk,Kbb) - 2._wp * pvv(ji,jj,jk,Kmm) + pvv(ji,jj,jk,Kaa) )
@@ -233,5 +233,5 @@
                CALL dom_vvl_interpol( pe3t(:,:,:,Kmm), pe3u(:,:,:,Kmm), 'U' )
                CALL dom_vvl_interpol( pe3t(:,:,:,Kmm), pe3v(:,:,:,Kmm), 'V' )
-               DO_3D_11_11( 1, jpkm1 )
+               DO_3D( 1, 1, 1, 1, 1, jpkm1 )
                   puu(ji,jj,jk,Kmm) = puu(ji,jj,jk,Kmm) + rn_atfp * ( puu(ji,jj,jk,Kbb) - 2._wp * puu(ji,jj,jk,Kmm) + puu(ji,jj,jk,Kaa) )
                   pvv(ji,jj,jk,Kmm) = pvv(ji,jj,jk,Kmm) + rn_atfp * ( pvv(ji,jj,jk,Kbb) - 2._wp * pvv(ji,jj,jk,Kmm) + pvv(ji,jj,jk,Kaa) )
@@ -244,5 +244,5 @@
                CALL dom_vvl_interpol( pe3t(:,:,:,Kmm), ze3u_f, 'U' )
                CALL dom_vvl_interpol( pe3t(:,:,:,Kmm), ze3v_f, 'V' )
-               DO_3D_11_11( 1, jpkm1 )
+               DO_3D( 1, 1, 1, 1, 1, jpkm1 )
                   zue3a = pe3u(ji,jj,jk,Kaa) * puu(ji,jj,jk,Kaa)
                   zve3a = pe3v(ji,jj,jk,Kaa) * pvv(ji,jj,jk,Kaa)
Index: /NEMO/trunk/src/OCE/DYN/dynatf_qco.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/dynatf_qco.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/dynatf_qco.F90	(revision 13295)
@@ -140,5 +140,5 @@
          IF( ln_linssh ) THEN             ! Fixed volume !
             !                             ! =============!
-            DO_3D_11_11( 1, jpkm1 )
+            DO_3D( 1, 1, 1, 1, 1, jpkm1 )
                puu(ji,jj,jk,Kmm) = puu(ji,jj,jk,Kmm) + rn_atfp * ( puu(ji,jj,jk,Kbb) - 2._wp * puu(ji,jj,jk,Kmm) + puu(ji,jj,jk,Kaa) )
                pvv(ji,jj,jk,Kmm) = pvv(ji,jj,jk,Kmm) + rn_atfp * ( pvv(ji,jj,jk,Kbb) - 2._wp * pvv(ji,jj,jk,Kmm) + pvv(ji,jj,jk,Kaa) )
@@ -150,5 +150,5 @@
             IF( ln_dynadv_vec ) THEN      ! Asselin filter applied on velocity
                ! Before filtered scale factor at (u/v)-points
-               DO_3D_11_11( 1, jpkm1 )
+               DO_3D( 1, 1, 1, 1, 1, jpkm1 )
                   puu(ji,jj,jk,Kmm) = puu(ji,jj,jk,Kmm) + rn_atfp * ( puu(ji,jj,jk,Kbb) - 2._wp * puu(ji,jj,jk,Kmm) + puu(ji,jj,jk,Kaa) )
                   pvv(ji,jj,jk,Kmm) = pvv(ji,jj,jk,Kmm) + rn_atfp * ( pvv(ji,jj,jk,Kbb) - 2._wp * pvv(ji,jj,jk,Kmm) + pvv(ji,jj,jk,Kaa) )
@@ -157,5 +157,5 @@
             ELSE                          ! Asselin filter applied on thickness weighted velocity
                !
-               DO_3D_11_11( 1, jpkm1 )
+               DO_3D( 1, 1, 1, 1, 1, jpkm1 )
                   zue3a = ( 1._wp + r3u(ji,jj,Kaa) * umask(ji,jj,jk) ) * puu(ji,jj,jk,Kaa)
                   zve3a = ( 1._wp + r3v(ji,jj,Kaa) * vmask(ji,jj,jk) ) * pvv(ji,jj,jk,Kaa)
Index: /NEMO/trunk/src/OCE/DYN/dynhpg.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/dynhpg.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/dynhpg.F90	(revision 13295)
@@ -257,5 +257,5 @@
 
       ! Surface value
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zcoef1 = zcoef0 * e3w(ji,jj,1,Kmm)
          ! hydrostatic pressure gradient
@@ -269,5 +269,5 @@
       !
       ! interior value (2=<jk=<jpkm1)
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          zcoef1 = zcoef0 * e3w(ji,jj,jk,Kmm)
          ! hydrostatic pressure gradient
@@ -319,5 +319,5 @@
 
       !  Surface value (also valid in partial step case)
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zcoef1 = zcoef0 * e3w(ji,jj,1,Kmm)
          ! hydrostatic pressure gradient
@@ -330,5 +330,5 @@
 
       ! interior value (2=<jk=<jpkm1)
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          zcoef1 = zcoef0 * e3w(ji,jj,jk,Kmm)
          ! hydrostatic pressure gradient
@@ -346,5 +346,5 @@
 
       ! partial steps correction at the last level  (use zgru & zgrv computed in zpshde.F90)
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          iku = mbku(ji,jj)
          ikv = mbkv(ji,jj)
@@ -411,5 +411,5 @@
       !
       IF( ln_wd_il ) THEN
-        DO_2D_00_00
+        DO_2D( 0, 0, 0, 0 )
           ll_tmp1 = MIN(  ssh(ji,jj,Kmm)               ,  ssh(ji+1,jj,Kmm) ) >                &
                &    MAX( -ht_0(ji,jj)               , -ht_0(ji+1,jj) ) .AND.            &
@@ -452,5 +452,5 @@
 
       ! Surface value
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          ! hydrostatic pressure gradient along s-surfaces
          zhpi(ji,jj,1) =   &
@@ -481,5 +481,5 @@
 
       ! interior value (2=<jk=<jpkm1)
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          ! hydrostatic pressure gradient along s-surfaces
          zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1) + zcoef0 * r1_e1u(ji,jj)   &
@@ -563,5 +563,5 @@
 !===== Compute surface value ===================================================== 
 !==================================================================================
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          ikt    = mikt(ji,jj)
          iktp1i = mikt(ji+1,jj)
@@ -592,5 +592,5 @@
 !==================================================================================
       ! interior value (2=<jk=<jpkm1)
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          ! hydrostatic pressure gradient along s-surfaces
          zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1) + zcoef0 / e1u(ji,jj)   &
@@ -643,5 +643,5 @@
       IF( ln_wd_il ) THEN
          ALLOCATE( zcpx(jpi,jpj) , zcpy(jpi,jpj) )
-        DO_2D_00_00
+        DO_2D( 0, 0, 0, 0 )
           ll_tmp1 = MIN(  ssh(ji,jj,Kmm)              ,  ssh(ji+1,jj,Kmm) ) >                &
                &    MAX( -ht_0(ji,jj)              , -ht_0(ji+1,jj) ) .AND.            &
@@ -699,5 +699,5 @@
 !!bug gm   Not a true bug, but... dzz=e3w  for dzx, dzy verify what it is really
 
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          drhoz(ji,jj,jk) = rhd    (ji  ,jj  ,jk) - rhd    (ji,jj,jk-1)
          dzz  (ji,jj,jk) = gde3w(ji  ,jj  ,jk) - gde3w(ji,jj,jk-1)
@@ -716,5 +716,5 @@
 !!bug  gm  idem for drhox, drhoy et ji=jpi and jj=jpj
 
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          cffw = 2._wp * drhoz(ji  ,jj  ,jk) * drhoz(ji,jj,jk-1)
 
@@ -784,5 +784,5 @@
 !          true if gde3w(:,:,:) is really defined as the sum of the e3w scale factors as, it seems to me, it should be
 
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          rho_k(ji,jj,1) = -grav * ( e3w(ji,jj,1,Kmm) - gde3w(ji,jj,1) )               &
             &                   * (  rhd(ji,jj,1)                                     &
@@ -795,5 +795,5 @@
 !!bug gm    : optimisation: 1/10 and 1/12 the division should be done before the loop
 
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
 
          rho_k(ji,jj,jk) = zcoef0 * ( rhd    (ji,jj,jk) + rhd    (ji,jj,jk-1) )                                   &
@@ -830,5 +830,5 @@
       !  Surface value
       ! ---------------
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zhpi(ji,jj,1) = ( rho_k(ji+1,jj  ,1) - rho_k(ji,jj,1) - rho_i(ji,jj,1) ) * r1_e1u(ji,jj)
          zhpj(ji,jj,1) = ( rho_k(ji  ,jj+1,1) - rho_k(ji,jj,1) - rho_j(ji,jj,1) ) * r1_e2v(ji,jj)
@@ -845,5 +845,5 @@
       !  interior value   (2=<jk=<jpkm1)
       ! ----------------
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          ! hydrostatic pressure gradient along s-surfaces
          zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1)                                &
@@ -911,5 +911,5 @@
       IF( ln_wd_il ) THEN
          ALLOCATE( zcpx(jpi,jpj) , zcpy(jpi,jpj) )
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
           ll_tmp1 = MIN(  ssh(ji,jj,Kmm)              ,  ssh(ji+1,jj,Kmm) ) >                &
                &    MAX( -ht_0(ji,jj)              , -ht_0(ji+1,jj) ) .AND.            &
@@ -960,5 +960,5 @@
 
       ! Preparing vertical density profile "zrhh(:,:,:)" for hybrid-sco coordinate
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
        jk = mbkt(ji,jj)
        IF(     jk <=  1   ) THEN   ;   zrhh(ji,jj,    :   ) = 0._wp
@@ -973,9 +973,9 @@
 
       ! Transfer the depth of "T(:,:,:)" to vertical coordinate "zdept(:,:,:)"
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zdept(ji,jj,1) = 0.5_wp * e3w(ji,jj,1,Kmm) - ssh(ji,jj,Kmm) * znad
       END_2D
 
-      DO_3D_11_11( 2, jpk )
+      DO_3D( 1, 1, 1, 1, 2, jpk )
          zdept(ji,jj,jk) = zdept(ji,jj,jk-1) + e3w(ji,jj,jk,Kmm)
       END_3D
@@ -990,5 +990,5 @@
 
       ! Integrate the hydrostatic pressure "zhpi(:,:,:)" at "T(ji,jj,1)"
-      DO_2D_01_01
+      DO_2D( 0, 1, 0, 1 )
        zrhdt1 = zrhh(ji,jj,1) - interp3( zdept(ji,jj,1), asp(ji,jj,1), bsp(ji,jj,1),  &
           &                                              csp(ji,jj,1), dsp(ji,jj,1) ) * 0.25_wp * e3w(ji,jj,1,Kmm)
@@ -999,5 +999,5 @@
 
       ! Calculate the pressure "zhpi(:,:,:)" at "T(ji,jj,2:jpkm1)"
-      DO_3D_01_01( 2, jpkm1 )
+      DO_3D( 0, 1, 0, 1, 2, jpkm1 )
       zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1) +                                  &
          &             integ_spline( zdept(ji,jj,jk-1), zdept(ji,jj,jk),   &
@@ -1009,5 +1009,5 @@
 
       ! Prepare zsshu_n and zsshv_n
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
 !!gm BUG ?    if it is ssh at u- & v-point then it should be:
 !          zsshu_n(ji,jj) = (e1e2t(ji,jj) * ssh(ji,jj,Kmm) + e1e2t(ji+1,jj) * ssh(ji+1,jj,Kmm)) * &
@@ -1024,20 +1024,20 @@
       CALL lbc_lnk_multi ('dynhpg', zsshu_n, 'U', 1.0_wp, zsshv_n, 'V', 1.0_wp )
 
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
        zu(ji,jj,1) = - ( e3u(ji,jj,1,Kmm) - zsshu_n(ji,jj) * znad) 
        zv(ji,jj,1) = - ( e3v(ji,jj,1,Kmm) - zsshv_n(ji,jj) * znad)
       END_2D
 
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
       zu(ji,jj,jk) = zu(ji,jj,jk-1) - e3u(ji,jj,jk,Kmm)
       zv(ji,jj,jk) = zv(ji,jj,jk-1) - e3v(ji,jj,jk,Kmm)
       END_3D
 
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
       zu(ji,jj,jk) = zu(ji,jj,jk) + 0.5_wp * e3u(ji,jj,jk,Kmm)
       zv(ji,jj,jk) = zv(ji,jj,jk) + 0.5_wp * e3v(ji,jj,jk,Kmm)
       END_3D
 
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
       zu(ji,jj,jk) = MIN(  zu(ji,jj,jk) , MAX( -zdept(ji,jj,jk) , -zdept(ji+1,jj,jk) )  )
       zu(ji,jj,jk) = MAX(  zu(ji,jj,jk) , MIN( -zdept(ji,jj,jk) , -zdept(ji+1,jj,jk) )  )
@@ -1047,5 +1047,5 @@
 
 
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
       zpwes = 0._wp; zpwed = 0._wp
       zpnss = 0._wp; zpnsd = 0._wp
Index: /NEMO/trunk/src/OCE/DYN/dynkeg.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/dynkeg.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/dynkeg.F90	(revision 13295)
@@ -101,5 +101,5 @@
       !
       CASE ( nkeg_C2 )                          !--  Standard scheme  --!
-         DO_3D_01_01( 1, jpkm1 )
+         DO_3D( 0, 1, 0, 1, 1, jpkm1 )
             zu =    puu(ji-1,jj  ,jk,Kmm) * puu(ji-1,jj  ,jk,Kmm)   &
                &  + puu(ji  ,jj  ,jk,Kmm) * puu(ji  ,jj  ,jk,Kmm)
@@ -109,5 +109,5 @@
          END_3D
       CASE ( nkeg_HW )                          !--  Hollingsworth scheme  --!
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zu = 8._wp * ( puu(ji-1,jj  ,jk,Kmm) * puu(ji-1,jj  ,jk,Kmm)    &
                &         + puu(ji  ,jj  ,jk,Kmm) * puu(ji  ,jj  ,jk,Kmm) )  &
@@ -125,5 +125,5 @@
       END SELECT 
       !
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) - ( zhke(ji+1,jj  ,jk) - zhke(ji,jj,jk) ) / e1u(ji,jj)
          pvv(ji,jj,jk,Krhs) = pvv(ji,jj,jk,Krhs) - ( zhke(ji  ,jj+1,jk) - zhke(ji,jj,jk) ) / e2v(ji,jj)
Index: /NEMO/trunk/src/OCE/DYN/dynldf_iso.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/dynldf_iso.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/dynldf_iso.F90	(revision 13295)
@@ -128,5 +128,5 @@
       IF( ln_dynldf_hor .AND. ln_traldf_iso ) THEN
          !
-         DO_3D_00_00( 1, jpk )
+         DO_3D( 0, 0, 0, 0, 1, jpk )
             uslp (ji,jj,jk) = - ( gdept(ji+1,jj,jk,Kbb) - gdept(ji ,jj ,jk,Kbb) ) * r1_e1u(ji,jj) * umask(ji,jj,jk)
             vslp (ji,jj,jk) = - ( gdept(ji,jj+1,jk,Kbb) - gdept(ji ,jj ,jk,Kbb) ) * r1_e2v(ji,jj) * vmask(ji,jj,jk)
@@ -168,5 +168,5 @@
 
          IF( ln_zps ) THEN      ! z-coordinate - partial steps : min(e3u)
-            DO_2D_00_01
+            DO_2D( 0, 0, 0, 1 )
                zabe1 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e2t(ji,jj)   &
                   &    * MIN( e3u(ji  ,jj,jk,Kmm),                &
@@ -183,5 +183,5 @@
             END_2D
          ELSE                   ! other coordinate system (zco or sco) : e3t
-            DO_2D_00_01
+            DO_2D( 0, 0, 0, 1 )
                zabe1 = ( ahmt(ji,jj,jk)+rn_ahm_b )   &
                   &     * e2t(ji,jj) * e3t(ji,jj,jk,Kmm) * r1_e1t(ji,jj)
@@ -199,5 +199,5 @@
 
          ! j-flux at f-point
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zabe2 = ( ahmf(ji,jj,jk) + rn_ahm_b )   &
                &     * e1f(ji,jj) * e3f(ji,jj,jk) * r1_e2f(ji,jj)
@@ -219,5 +219,5 @@
          ! i-flux at f-point              |   t   |
 
-         DO_2D_00_10
+         DO_2D( 0, 0, 1, 0 )
             zabe1 = ( ahmf(ji,jj,jk) + rn_ahm_b )   &
                &     * e2f(ji,jj) * e3f(ji,jj,jk) * r1_e1f(ji,jj)
@@ -235,5 +235,5 @@
          ! j-flux at t-point
          IF( ln_zps ) THEN      ! z-coordinate - partial steps : min(e3u)
-            DO_2D_01_10
+            DO_2D( 0, 1, 1, 0 )
                zabe2 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e1t(ji,jj)   &
                   &     * MIN( e3v(ji,jj  ,jk,Kmm),                 &
@@ -250,5 +250,5 @@
             END_2D
          ELSE                   ! other coordinate system (zco or sco) : e3t
-            DO_2D_01_10
+            DO_2D( 0, 1, 1, 0 )
                zabe2 = ( ahmt(ji,jj,jk)+rn_ahm_b )   &
                   &     * e1t(ji,jj) * e3t(ji,jj,jk,Kmm) * r1_e2t(ji,jj)
@@ -268,5 +268,5 @@
          ! Second derivative (divergence) and add to the general trend
          ! -----------------------------------------------------------
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) + (  ziut(ji+1,jj) - ziut(ji,jj  )    &
                &                           + zjuf(ji  ,jj) - zjuf(ji,jj-1)  ) * r1_e1e2u(ji,jj)   &
Index: /NEMO/trunk/src/OCE/DYN/dynldf_lap_blp.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/dynldf_lap_blp.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/dynldf_lap_blp.F90	(revision 13295)
@@ -73,5 +73,5 @@
       DO jk = 1, jpkm1                                 ! Horizontal slab
          !                                             ! ===============
-         DO_2D_01_01
+         DO_2D( 0, 1, 0, 1 )
             !                                      ! ahm * e3 * curl  (computed from 1 to jpim1/jpjm1)
             zcur(ji-1,jj-1) = ahmf(ji-1,jj-1,jk) * e3f(ji-1,jj-1,jk) * r1_e1e2f(ji-1,jj-1)       &   ! ahmf already * by fmask
@@ -84,5 +84,5 @@
          END_2D
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pu_rhs(ji,jj,jk) = pu_rhs(ji,jj,jk) + zsign * umask(ji,jj,jk) * (    &    ! * by umask is mandatory for dyn_ldf_blp use
                &              - ( zcur(ji  ,jj) - zcur(ji,jj-1) ) * r1_e2u(ji,jj) / e3u(ji,jj,jk,Kmm)   &
Index: /NEMO/trunk/src/OCE/DYN/dynspg.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/dynspg.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/dynspg.F90	(revision 13295)
@@ -95,5 +95,5 @@
          .OR.  ln_ice_embd ) THEN                                            ! embedded sea-ice
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             spgu(ji,jj) = 0._wp
             spgv(ji,jj) = 0._wp
@@ -102,5 +102,5 @@
          IF( ln_apr_dyn .AND. .NOT.ln_dynspg_ts ) THEN   !==  Atmospheric pressure gradient (added later in time-split case) ==!
             zg_2 = grav * 0.5
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                spgu(ji,jj) = spgu(ji,jj) + zg_2 * (  ssh_ib (ji+1,jj) - ssh_ib (ji,jj)    &
                   &                                + ssh_ibb(ji+1,jj) - ssh_ibb(ji,jj)  ) * r1_e1u(ji,jj)
@@ -117,5 +117,5 @@
             CALL upd_tide(zt0step, Kmm)
             !
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                spgu(ji,jj) = spgu(ji,jj) + grav * ( pot_astro(ji+1,jj) - pot_astro(ji,jj) ) * r1_e1u(ji,jj)
                spgv(ji,jj) = spgv(ji,jj) + grav * ( pot_astro(ji,jj+1) - pot_astro(ji,jj) ) * r1_e2v(ji,jj)
@@ -124,5 +124,5 @@
             IF (ln_scal_load) THEN
                zld = rn_scal_load * grav
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   spgu(ji,jj) = spgu(ji,jj) + zld * ( pssh(ji+1,jj,Kmm) - pssh(ji,jj,Kmm) ) * r1_e1u(ji,jj)
                   spgv(ji,jj) = spgv(ji,jj) + zld * ( pssh(ji,jj+1,Kmm) - pssh(ji,jj,Kmm) ) * r1_e2v(ji,jj)
@@ -136,5 +136,5 @@
             zgrho0r     = - grav * r1_rho0
             zpice(:,:) = (  zintp * snwice_mass(:,:) + ( 1.- zintp ) * snwice_mass_b(:,:)  ) * zgrho0r
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                spgu(ji,jj) = spgu(ji,jj) + ( zpice(ji+1,jj) - zpice(ji,jj) ) * r1_e1u(ji,jj)
                spgv(ji,jj) = spgv(ji,jj) + ( zpice(ji,jj+1) - zpice(ji,jj) ) * r1_e2v(ji,jj)
@@ -143,5 +143,5 @@
          ENDIF
          !
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) + spgu(ji,jj)
             pvv(ji,jj,jk,Krhs) = pvv(ji,jj,jk,Krhs) + spgv(ji,jj)
Index: /NEMO/trunk/src/OCE/DYN/dynspg_exp.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/dynspg_exp.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/dynspg_exp.F90	(revision 13295)
@@ -74,10 +74,10 @@
       IF( ln_linssh ) THEN          !* linear free surface : add the surface pressure gradient trend
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             spgu(ji,jj) = - grav * ( ssh(ji+1,jj,Kmm) - ssh(ji,jj,Kmm) ) * r1_e1u(ji,jj)
             spgv(ji,jj) = - grav * ( ssh(ji,jj+1,Kmm) - ssh(ji,jj,Kmm) ) * r1_e2v(ji,jj)
          END_2D
          !
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) + spgu(ji,jj)
             pvv(ji,jj,jk,Krhs) = pvv(ji,jj,jk,Krhs) + spgv(ji,jj)
Index: /NEMO/trunk/src/OCE/DYN/dynspg_ts.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/dynspg_ts.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/dynspg_ts.F90	(revision 13295)
@@ -264,5 +264,5 @@
          IF( ln_wd_il ) THEN                       ! W/D : limiter applied to spgspg
             CALL wad_spg( pssh(:,:,Kmm), zcpx, zcpy )          ! Calculating W/D gravity filters, zcpx and zcpy
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zu_trd(ji,jj) = zu_trd(ji,jj) - grav * ( pssh(ji+1,jj  ,Kmm) - pssh(ji  ,jj ,Kmm) )   &
                   &                          * r1_e1u(ji,jj) * zcpx(ji,jj)  * wdrampu(ji,jj)  !jth
@@ -271,5 +271,5 @@
             END_2D
          ELSE                                      ! now suface pressure gradient
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zu_trd(ji,jj) = zu_trd(ji,jj) - grav * (  pssh(ji+1,jj  ,Kmm) - pssh(ji  ,jj  ,Kmm)  ) * r1_e1u(ji,jj)
                zv_trd(ji,jj) = zv_trd(ji,jj) - grav * (  pssh(ji  ,jj+1,Kmm) - pssh(ji  ,jj  ,Kmm)  ) * r1_e2v(ji,jj) 
@@ -279,5 +279,5 @@
       ENDIF
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
           zu_frc(ji,jj) = zu_frc(ji,jj) - zu_trd(ji,jj) * ssumask(ji,jj)
           zv_frc(ji,jj) = zv_frc(ji,jj) - zv_trd(ji,jj) * ssvmask(ji,jj)
@@ -291,5 +291,5 @@
       IF( ln_apr_dyn ) THEN
          IF( ln_bt_fw ) THEN                          ! FORWARD integration: use kt+1/2 pressure (NOW+1/2)
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zu_frc(ji,jj) = zu_frc(ji,jj) + grav * (  ssh_ib (ji+1,jj  ) - ssh_ib (ji,jj) ) * r1_e1u(ji,jj)
                zv_frc(ji,jj) = zv_frc(ji,jj) + grav * (  ssh_ib (ji  ,jj+1) - ssh_ib (ji,jj) ) * r1_e2v(ji,jj)
@@ -297,5 +297,5 @@
          ELSE                                         ! CENTRED integration: use kt-1/2 + kt+1/2 pressure (NOW)
             zztmp = grav * r1_2
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zu_frc(ji,jj) = zu_frc(ji,jj) + zztmp * (  ssh_ib (ji+1,jj  ) - ssh_ib (ji,jj)  &
                     &                                   + ssh_ibb(ji+1,jj  ) - ssh_ibb(ji,jj)  ) * r1_e1u(ji,jj)
@@ -309,5 +309,5 @@
       !                                   !  ----------------------------------  !
       IF( ln_bt_fw ) THEN                        ! Add wind forcing
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zu_frc(ji,jj) =  zu_frc(ji,jj) + r1_rho0 * utau(ji,jj) * r1_hu(ji,jj,Kmm)
             zv_frc(ji,jj) =  zv_frc(ji,jj) + r1_rho0 * vtau(ji,jj) * r1_hv(ji,jj,Kmm)
@@ -315,5 +315,5 @@
       ELSE
          zztmp = r1_rho0 * r1_2
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zu_frc(ji,jj) =  zu_frc(ji,jj) + zztmp * ( utau_b(ji,jj) + utau(ji,jj) ) * r1_hu(ji,jj,Kmm)
             zv_frc(ji,jj) =  zv_frc(ji,jj) + zztmp * ( vtau_b(ji,jj) + vtau(ji,jj) ) * r1_hv(ji,jj,Kmm)
@@ -475,10 +475,10 @@
             !
             !                          ! ocean u- and v-depth at mid-step   (separate DO-loops remove the need of a lbc_lnk)
-            DO_2D_11_10
+            DO_2D( 1, 1, 1, 0 )
                zhup2_e(ji,jj) = hu_0(ji,jj) + r1_2 * r1_e1e2u(ji,jj)                        &
                     &                              * (  e1e2t(ji  ,jj) * zsshp2_e(ji  ,jj)  &
                     &                                 + e1e2t(ji+1,jj) * zsshp2_e(ji+1,jj)  ) * ssumask(ji,jj)
             END_2D
-            DO_2D_10_11
+            DO_2D( 1, 0, 1, 1 )
                zhvp2_e(ji,jj) = hv_0(ji,jj) + r1_2 * r1_e1e2v(ji,jj)                        &
                     &                              * (  e1e2t(ji,jj  ) * zsshp2_e(ji,jj  )  &
@@ -515,5 +515,5 @@
          !--        ssh    =  ssh   - delta_t' * [ frc + div( flux      ) ]      --!
          !-------------------------------------------------------------------------!
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zhdiv = (   zhU(ji,jj) - zhU(ji-1,jj) + zhV(ji,jj) - zhV(ji,jj-1)   ) * r1_e1e2t(ji,jj)
             ssha_e(ji,jj) = (  sshn_e(ji,jj) - rDt_e * ( zssh_frc(ji,jj) + zhdiv )  ) * ssmask(ji,jj)
@@ -541,5 +541,5 @@
          ! Sea Surface Height at u-,v-points (vvl case only)
          IF( .NOT.ln_linssh ) THEN                                
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zsshu_a(ji,jj) = r1_2 * ssumask(ji,jj) * r1_e1e2u(ji,jj)    &
                   &              * ( e1e2t(ji  ,jj  )  * ssha_e(ji  ,jj  ) &
@@ -561,5 +561,5 @@
          !                             ! Surface pressure gradient
          zldg = ( 1._wp - rn_scal_load ) * grav    ! local factor
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zu_spg(ji,jj) = - zldg * ( zsshp2_e(ji+1,jj) - zsshp2_e(ji,jj) ) * r1_e1u(ji,jj)
             zv_spg(ji,jj) = - zldg * ( zsshp2_e(ji,jj+1) - zsshp2_e(ji,jj) ) * r1_e2v(ji,jj)
@@ -579,5 +579,5 @@
          ! Add tidal astronomical forcing if defined
          IF ( ln_tide .AND. ln_tide_pot ) THEN
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zu_trd(ji,jj) = zu_trd(ji,jj) + grav * ( pot_astro(ji+1,jj) - pot_astro(ji,jj) ) * r1_e1u(ji,jj)
                zv_trd(ji,jj) = zv_trd(ji,jj) + grav * ( pot_astro(ji,jj+1) - pot_astro(ji,jj) ) * r1_e2v(ji,jj)
@@ -588,5 +588,5 @@
 !jth do implicitly instead
          IF ( .NOT. ll_wd ) THEN ! Revert to explicit for bit comparison tests in non wad runs
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zu_trd(ji,jj) = zu_trd(ji,jj) + zCdU_u(ji,jj) * un_e(ji,jj) * hur_e(ji,jj)
                zv_trd(ji,jj) = zv_trd(ji,jj) + zCdU_v(ji,jj) * vn_e(ji,jj) * hvr_e(ji,jj)
@@ -606,5 +606,5 @@
          !------------------------------------------------------------------------------------------------------------------------!
          IF( ln_dynadv_vec .OR. ln_linssh ) THEN      !* Vector form
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                ua_e(ji,jj) = (                                 un_e(ji,jj)   & 
                          &     + rDt_e * (                   zu_spg(ji,jj)   &
@@ -621,5 +621,5 @@
             !
          ELSE                           !* Flux form
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                !                    ! hu_e, hv_e hold depth at jn,  zhup2_e, zhvp2_e hold extrapolated depth at jn+1/2
                !                    ! backward interpolated depth used in spg terms at jn+1/2
@@ -645,5 +645,5 @@
 !jth implicit bottom friction:
          IF ( ll_wd ) THEN ! revert to explicit for bit comparison tests in non wad runs
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                   ua_e(ji,jj) =  ua_e(ji,jj) /(1.0 -   rDt_e * zCdU_u(ji,jj) * hur_e(ji,jj))
                   va_e(ji,jj) =  va_e(ji,jj) /(1.0 -   rDt_e * zCdU_v(ji,jj) * hvr_e(ji,jj))
@@ -712,5 +712,5 @@
       IF (ln_bt_fw) THEN
          IF( .NOT.( kt == nit000 .AND. l_1st_euler ) ) THEN
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                zun_save = un_adv(ji,jj)
                zvn_save = vn_adv(ji,jj)
@@ -743,5 +743,5 @@
       ELSE
          ! At this stage, pssh(:,:,:,Krhs) has been corrected: compute new depths at velocity points
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zsshu_a(ji,jj) = r1_2 * ssumask(ji,jj)  * r1_e1e2u(ji,jj) &
                &              * ( e1e2t(ji  ,jj) * pssh(ji  ,jj,Kaa)      &
@@ -975,5 +975,5 @@
       ! Max courant number for ext. grav. waves
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zxr2 = r1_e1t(ji,jj) * r1_e1t(ji,jj)
          zyr2 = r1_e2t(ji,jj) * r1_e2t(ji,jj)
@@ -1100,5 +1100,5 @@
          SELECT CASE( nn_een_e3f )              !* ff_f/e3 at F-point
          CASE ( 0 )                                   ! original formulation  (masked averaging of e3t divided by 4)
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) =   ( ht(ji  ,jj+1) + ht(ji+1,jj+1) +                    &
                     &           ht(ji  ,jj  ) + ht(ji+1,jj  )   ) * 0.25_wp  
@@ -1106,5 +1106,5 @@
             END_2D
          CASE ( 1 )                                   ! new formulation  (masked averaging of e3t divided by the sum of mask)
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) =             (  ht  (ji  ,jj+1) + ht  (ji+1,jj+1)      &
                     &                    + ht  (ji  ,jj  ) + ht  (ji+1,jj  )  )   &
@@ -1117,5 +1117,5 @@
          !
          ftne(1,:) = 0._wp ; ftnw(1,:) = 0._wp ; ftse(1,:) = 0._wp ; ftsw(1,:) = 0._wp
-         DO_2D_01_01
+         DO_2D( 0, 1, 0, 1 )
             ftne(ji,jj) = zwz(ji-1,jj  ) + zwz(ji  ,jj  ) + zwz(ji  ,jj-1)
             ftnw(ji,jj) = zwz(ji-1,jj-1) + zwz(ji-1,jj  ) + zwz(ji  ,jj  )
@@ -1126,5 +1126,5 @@
       CASE( np_EET )                  != EEN scheme using e3t energy conserving scheme
          ftne(1,:) = 0._wp ; ftnw(1,:) = 0._wp ; ftse(1,:) = 0._wp ; ftsw(1,:) = 0._wp
-         DO_2D_01_01
+         DO_2D( 0, 1, 0, 1 )
             z1_ht = ssmask(ji,jj) / ( ht(ji,jj) + 1._wp - ssmask(ji,jj) )
             ftne(ji,jj) = ( ff_f(ji-1,jj  ) + ff_f(ji  ,jj  ) + ff_f(ji  ,jj-1) ) * z1_ht
@@ -1159,5 +1159,5 @@
             !
             !zhf(:,:) = hbatf(:,:)
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zhf(ji,jj) =    (   ht_0  (ji,jj  ) + ht_0  (ji+1,jj  )          &
                     &            + ht_0  (ji,jj+1) + ht_0  (ji+1,jj+1)   )      &
@@ -1178,5 +1178,5 @@
          CALL lbc_lnk( 'dynspg_ts', zhf, 'F', 1._wp )
          ! JC: TBC. hf should be greater than 0 
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF( zhf(ji,jj) /= 0._wp )   zwz(ji,jj) = 1._wp / zhf(ji,jj)
          END_2D
@@ -1201,5 +1201,5 @@
       SELECT CASE( nvor_scheme )
       CASE( np_ENT )                ! enstrophy conserving scheme (f-point)
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             z1_hu = ssumask(ji,jj) / ( phu(ji,jj) + 1._wp - ssumask(ji,jj) )
             z1_hv = ssvmask(ji,jj) / ( phv(ji,jj) + 1._wp - ssvmask(ji,jj) )
@@ -1214,5 +1214,5 @@
          !         
       CASE( np_ENE , np_MIX )        ! energy conserving scheme (t-point) ENE or MIX
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zy1 = ( zhV(ji,jj-1) + zhV(ji+1,jj-1) ) * r1_e1u(ji,jj)
             zy2 = ( zhV(ji,jj  ) + zhV(ji+1,jj  ) ) * r1_e1u(ji,jj)
@@ -1225,5 +1225,5 @@
          !
       CASE( np_ENS )                ! enstrophy conserving scheme (f-point)
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zy1 =   r1_8 * ( zhV(ji  ,jj-1) + zhV(ji+1,jj-1) &
               &            + zhV(ji  ,jj  ) + zhV(ji+1,jj  ) ) * r1_e1u(ji,jj)
@@ -1235,5 +1235,5 @@
          !
       CASE( np_EET , np_EEN )      ! energy & enstrophy scheme (using e3t or e3f)         
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zu_trd(ji,jj) = + r1_12 * r1_e1u(ji,jj) * (  ftne(ji,jj  ) * zhV(ji  ,jj  ) &
              &                                         + ftnw(ji+1,jj) * zhV(ji+1,jj  ) &
@@ -1269,5 +1269,5 @@
       !
       IF( ln_wd_dl_rmp ) THEN     
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF    ( pssh(ji,jj) + ht_0(ji,jj) >  2._wp * rn_wdmin1 ) THEN 
                !           IF    ( pssh(ji,jj) + ht_0(ji,jj) >          rn_wdmin2 ) THEN 
@@ -1280,5 +1280,5 @@
          END_2D
       ELSE  
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF ( pssh(ji,jj) + ht_0(ji,jj) >  rn_wdmin1 ) THEN   ;   ptmsk(ji,jj) = 1._wp
             ELSE                                                 ;   ptmsk(ji,jj) = 0._wp
@@ -1308,5 +1308,5 @@
       !!----------------------------------------------------------------------
       !
-      DO_2D_11_10
+      DO_2D( 1, 1, 1, 0 )
          IF ( phU(ji,jj) > 0._wp ) THEN   ;   pUmsk(ji,jj) = pTmsk(ji  ,jj) 
          ELSE                             ;   pUmsk(ji,jj) = pTmsk(ji+1,jj)  
@@ -1316,5 +1316,5 @@
       END_2D
       !
-      DO_2D_10_11
+      DO_2D( 1, 0, 1, 1 )
          IF ( phV(ji,jj) > 0._wp ) THEN   ;   pVmsk(ji,jj) = pTmsk(ji,jj  )
          ELSE                             ;   pVmsk(ji,jj) = pTmsk(ji,jj+1)  
@@ -1338,5 +1338,5 @@
       REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) :: zcpx, zcpy
       !!----------------------------------------------------------------------
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          ll_tmp1 = MIN(  pshn(ji,jj)               ,  pshn(ji+1,jj) ) >                &
               &      MAX( -ht_0(ji,jj)               , -ht_0(ji+1,jj) ) .AND.            &
@@ -1407,10 +1407,10 @@
       IF( ln_isfcav ) THEN          ! top+bottom friction (ocean cavities)
          
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pCdU_u(ji,jj) = r1_2*( rCdU_bot(ji+1,jj)+rCdU_bot(ji,jj) + rCdU_top(ji+1,jj)+rCdU_top(ji,jj) )
             pCdU_v(ji,jj) = r1_2*( rCdU_bot(ji,jj+1)+rCdU_bot(ji,jj) + rCdU_top(ji,jj+1)+rCdU_top(ji,jj) )
          END_2D
       ELSE                          ! bottom friction only
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pCdU_u(ji,jj) = r1_2*( rCdU_bot(ji+1,jj)+rCdU_bot(ji,jj) )
             pCdU_v(ji,jj) = r1_2*( rCdU_bot(ji,jj+1)+rCdU_bot(ji,jj) )
@@ -1422,5 +1422,5 @@
       IF( ln_bt_fw ) THEN                 ! FORWARD integration: use NOW bottom baroclinic velocities
          
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ikbu = mbku(ji,jj)       
             ikbv = mbkv(ji,jj)    
@@ -1430,5 +1430,5 @@
       ELSE                                ! CENTRED integration: use BEFORE bottom baroclinic velocities
          
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ikbu = mbku(ji,jj)       
             ikbv = mbkv(ji,jj)    
@@ -1440,5 +1440,5 @@
       IF( ln_wd_il ) THEN      ! W/D : use the "clipped" bottom friction   !!gm   explain WHY, please !
          zztmp = -1._wp / rDt_e
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pu_RHSi(ji,jj) = pu_RHSi(ji,jj) + zu_i(ji,jj) *  wdrampu(ji,jj) * MAX(                                 & 
                  &                              r1_hu(ji,jj,Kmm) * r1_2*( rCdU_bot(ji+1,jj)+rCdU_bot(ji,jj) ) , zztmp  )
@@ -1448,5 +1448,5 @@
       ELSE                    ! use "unclipped" drag (even if explicit friction is used in 3D calculation)
          
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pu_RHSi(ji,jj) = pu_RHSi(ji,jj) + r1_hu(ji,jj,Kmm) * r1_2*( rCdU_bot(ji+1,jj)+rCdU_bot(ji,jj) ) * zu_i(ji,jj)
             pv_RHSi(ji,jj) = pv_RHSi(ji,jj) + r1_hv(ji,jj,Kmm) * r1_2*( rCdU_bot(ji,jj+1)+rCdU_bot(ji,jj) ) * zv_i(ji,jj)
@@ -1460,5 +1460,5 @@
          IF( ln_bt_fw ) THEN                ! FORWARD integration: use NOW top baroclinic velocity
             
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                iktu = miku(ji,jj)
                iktv = mikv(ji,jj)
@@ -1468,5 +1468,5 @@
          ELSE                                ! CENTRED integration: use BEFORE top baroclinic velocity
             
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                iktu = miku(ji,jj)
                iktv = mikv(ji,jj)
@@ -1478,5 +1478,5 @@
          !                    ! use "unclipped" top drag (even if explicit friction is used in 3D calculation)
          
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pu_RHSi(ji,jj) = pu_RHSi(ji,jj) + r1_hu(ji,jj,Kmm) * r1_2*( rCdU_top(ji+1,jj)+rCdU_top(ji,jj) ) * zu_i(ji,jj)
             pv_RHSi(ji,jj) = pv_RHSi(ji,jj) + r1_hv(ji,jj,Kmm) * r1_2*( rCdU_top(ji,jj+1)+rCdU_top(ji,jj) ) * zv_i(ji,jj)
Index: /NEMO/trunk/src/OCE/DYN/dynvor.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/dynvor.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/dynvor.F90	(revision 13295)
@@ -231,10 +231,10 @@
       CASE ( np_RVO )                           !* relative vorticity
          DO jk = 1, jpkm1                                 ! Horizontal slab
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = (  e2v(ji+1,jj) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk)  &
                   &             - e1u(ji,jj+1) * pu(ji,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) * r1_e1e2f(ji,jj)
             END_2D
             IF( ln_dynvor_msk ) THEN                     ! mask/unmask relative vorticity 
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   zwz(ji,jj,jk) = zwz(ji,jj,jk) * fmask(ji,jj,jk)
                END_2D
@@ -246,10 +246,10 @@
       CASE ( np_CRV )                           !* Coriolis + relative vorticity
          DO jk = 1, jpkm1                                 ! Horizontal slab
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = (   e2v(ji+1,jj) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk)   &
                   &              - e1u(ji,jj+1) * pu(ji,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)   ) * r1_e1e2f(ji,jj)
             END_2D
             IF( ln_dynvor_msk ) THEN                     ! mask/unmask relative vorticity 
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   zwz(ji,jj,jk) = zwz(ji,jj,jk) * fmask(ji,jj,jk)
                END_2D
@@ -269,5 +269,5 @@
             zwt(:,:) = ff_t(:,:) * e1e2t(:,:)*e3t(:,:,jk,Kmm)
          CASE ( np_RVO )                           !* relative vorticity
-            DO_2D_01_01
+            DO_2D( 0, 1, 0, 1 )
                zwt(ji,jj) = r1_4 * (   zwz(ji-1,jj  ,jk) + zwz(ji,jj  ,jk)   &
                   &                  + zwz(ji-1,jj-1,jk) + zwz(ji,jj-1,jk) ) &
@@ -275,5 +275,5 @@
             END_2D
          CASE ( np_MET )                           !* metric term
-            DO_2D_01_01
+            DO_2D( 0, 1, 0, 1 )
                zwt(ji,jj) = (   ( pv(ji,jj,jk) + pv(ji,jj-1,jk) ) * di_e2u_2(ji,jj)   &
                   &           - ( pu(ji,jj,jk) + pu(ji-1,jj,jk) ) * dj_e1v_2(ji,jj)   ) &
@@ -281,5 +281,5 @@
             END_2D
          CASE ( np_CRV )                           !* Coriolis + relative vorticity
-            DO_2D_01_01
+            DO_2D( 0, 1, 0, 1 )
                zwt(ji,jj) = (  ff_t(ji,jj) + r1_4 * ( zwz(ji-1,jj  ,jk) + zwz(ji,jj  ,jk)    &
                   &                                 + zwz(ji-1,jj-1,jk) + zwz(ji,jj-1,jk) )  ) &
@@ -287,5 +287,5 @@
             END_2D
          CASE ( np_CME )                           !* Coriolis + metric
-            DO_2D_01_01
+            DO_2D( 0, 1, 0, 1 )
                zwt(ji,jj) = (  ff_t(ji,jj) * e1e2t(ji,jj)                           &
                     &        + ( pv(ji,jj,jk) + pv(ji,jj-1,jk) ) * di_e2u_2(ji,jj)  &
@@ -298,5 +298,5 @@
          !
          !                                   !==  compute and add the vorticity term trend  =!
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pu_rhs(ji,jj,jk) = pu_rhs(ji,jj,jk) + r1_4 * r1_e1e2u(ji,jj) / e3u(ji,jj,jk,Kmm)                    &
                &                                * (  zwt(ji+1,jj) * ( pv(ji+1,jj,jk) + pv(ji+1,jj-1,jk) )   &
@@ -358,20 +358,20 @@
             zwz(:,:) = ff_f(:,:) 
          CASE ( np_RVO )                           !* relative vorticity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = (  e2v(ji+1,jj  ) * pv(ji+1,jj  ,jk) - e2v(ji,jj) * pv(ji,jj,jk)    &
                   &          - e1u(ji  ,jj+1) * pu(ji  ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) * r1_e1e2f(ji,jj)
             END_2D
          CASE ( np_MET )                           !* metric term
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = ( pv(ji+1,jj  ,jk) + pv(ji,jj,jk) ) * di_e2v_2e1e2f(ji,jj)   &
                   &       - ( pu(ji  ,jj+1,jk) + pu(ji,jj,jk) ) * dj_e1u_2e1e2f(ji,jj)
             END_2D
          CASE ( np_CRV )                           !* Coriolis + relative vorticity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = ff_f(ji,jj) + (  e2v(ji+1,jj) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk)      &
                   &                        - e1u(ji,jj+1) * pu(ji,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) * r1_e1e2f(ji,jj)
             END_2D
          CASE ( np_CME )                           !* Coriolis + metric
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = ff_f(ji,jj) + ( pv(ji+1,jj  ,jk) + pv(ji,jj,jk) ) * di_e2v_2e1e2f(ji,jj)   &
                   &                     - ( pu(ji  ,jj+1,jk) + pu(ji,jj,jk) ) * dj_e1u_2e1e2f(ji,jj)
@@ -382,5 +382,5 @@
          !
          IF( ln_dynvor_msk ) THEN          !==  mask/unmask vorticity ==!
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = zwz(ji,jj) * fmask(ji,jj,jk)
             END_2D
@@ -396,5 +396,5 @@
          ENDIF
          !                                   !==  compute and add the vorticity term trend  =!
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zy1 = zwy(ji,jj-1) + zwy(ji+1,jj-1)
             zy2 = zwy(ji,jj  ) + zwy(ji+1,jj  )
@@ -454,20 +454,20 @@
             zwz(:,:) = ff_f(:,:) 
          CASE ( np_RVO )                           !* relative vorticity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = (  e2v(ji+1,jj  ) * pv(ji+1,jj  ,jk) - e2v(ji,jj) * pv(ji,jj,jk)    &
                   &          - e1u(ji  ,jj+1) * pu(ji  ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) * r1_e1e2f(ji,jj)
             END_2D
          CASE ( np_MET )                           !* metric term
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = ( pv(ji+1,jj  ,jk) + pv(ji,jj,jk) ) * di_e2v_2e1e2f(ji,jj)   &
                   &       - ( pu(ji  ,jj+1,jk) + pu(ji,jj,jk) ) * dj_e1u_2e1e2f(ji,jj)
             END_2D
          CASE ( np_CRV )                           !* Coriolis + relative vorticity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = ff_f(ji,jj) + (  e2v(ji+1,jj  ) * pv(ji+1,jj  ,jk) - e2v(ji,jj) * pv(ji,jj,jk)  &
                   &                        - e1u(ji  ,jj+1) * pu(ji  ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) * r1_e1e2f(ji,jj)
             END_2D
          CASE ( np_CME )                           !* Coriolis + metric
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = ff_f(ji,jj) + ( pv(ji+1,jj  ,jk) + pv(ji,jj,jk) ) * di_e2v_2e1e2f(ji,jj)   &
                   &                     - ( pu(ji  ,jj+1,jk) + pu(ji,jj,jk) ) * dj_e1u_2e1e2f(ji,jj)
@@ -478,5 +478,5 @@
          !
          IF( ln_dynvor_msk ) THEN           !==  mask/unmask vorticity ==!
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = zwz(ji,jj) * fmask(ji,jj,jk)
             END_2D
@@ -492,5 +492,5 @@
          ENDIF
          !                                   !==  compute and add the vorticity term trend  =!
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zuav = r1_8 * r1_e1u(ji,jj) * (  zwy(ji  ,jj-1) + zwy(ji+1,jj-1)  &
                &                           + zwy(ji  ,jj  ) + zwy(ji+1,jj  )  )
@@ -550,5 +550,5 @@
          SELECT CASE( nn_een_e3f )           ! == reciprocal of e3 at F-point
          CASE ( 0 )                                   ! original formulation  (masked averaging of e3t divided by 4)
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                ze3f = (  e3t(ji  ,jj+1,jk,Kmm)*tmask(ji  ,jj+1,jk)   &
                   &    + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk)   &
@@ -560,5 +560,5 @@
             END_2D
          CASE ( 1 )                                   ! new formulation  (masked averaging of e3t divided by the sum of mask)
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                ze3f = (  e3t(ji  ,jj+1,jk,Kmm)*tmask(ji  ,jj+1,jk)   &
                   &    + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk)   &
@@ -575,19 +575,19 @@
          SELECT CASE( kvor )                 !==  vorticity considered  ==!
          CASE ( np_COR )                           !* Coriolis (planetary vorticity)
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = ff_f(ji,jj) * z1_e3f(ji,jj)
             END_2D
          CASE ( np_RVO )                           !* relative vorticity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = ( e2v(ji+1,jj  ) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk)  &
                   &            - e1u(ji  ,jj+1) * pu(ji,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) * r1_e1e2f(ji,jj)*z1_e3f(ji,jj)
             END_2D
          CASE ( np_MET )                           !* metric term
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = (   ( pv(ji+1,jj,jk) + pv(ji,jj,jk) ) * di_e2v_2e1e2f(ji,jj)   &
                   &              - ( pu(ji,jj+1,jk) + pu(ji,jj,jk) ) * dj_e1u_2e1e2f(ji,jj)   ) * z1_e3f(ji,jj)
             END_2D
          CASE ( np_CRV )                           !* Coriolis + relative vorticity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = (  ff_f(ji,jj) + (  e2v(ji+1,jj  ) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk)      &
                   &                              - e1u(ji  ,jj+1) * pu(ji,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  )   &
@@ -595,5 +595,5 @@
             END_2D
          CASE ( np_CME )                           !* Coriolis + metric
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = (   ff_f(ji,jj) + ( pv(ji+1,jj  ,jk) + pv(ji,jj,jk) ) * di_e2v_2e1e2f(ji,jj)   &
                   &                            - ( pu(ji  ,jj+1,jk) + pu(ji,jj,jk) ) * dj_e1u_2e1e2f(ji,jj)   ) * z1_e3f(ji,jj)
@@ -604,5 +604,5 @@
          !
          IF( ln_dynvor_msk ) THEN          !==  mask/unmask vorticity ==!
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = zwz(ji,jj,jk) * fmask(ji,jj,jk)
             END_2D
@@ -635,5 +635,5 @@
             END DO
          END DO
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zua = + r1_12 * r1_e1u(ji,jj) * (  ztne(ji,jj  ) * zwy(ji  ,jj  ) + ztnw(ji+1,jj) * zwy(ji+1,jj  )   &
                &                             + ztse(ji,jj  ) * zwy(ji  ,jj-1) + ztsw(ji+1,jj) * zwy(ji+1,jj-1) )
@@ -695,9 +695,9 @@
          SELECT CASE( kvor )                 !==  vorticity considered  ==!
          CASE ( np_COR )                           !* Coriolis (planetary vorticity)
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = ff_f(ji,jj)
             END_2D
          CASE ( np_RVO )                           !* relative vorticity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = (  e2v(ji+1,jj  ) * pv(ji+1,jj  ,jk) - e2v(ji,jj) * pv(ji,jj,jk)    &
                   &             - e1u(ji  ,jj+1) * pu(ji  ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) &
@@ -705,10 +705,10 @@
             END_2D
          CASE ( np_MET )                           !* metric term
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = ( pv(ji+1,jj  ,jk) + pv(ji,jj,jk) ) * di_e2v_2e1e2f(ji,jj)   &
                   &          - ( pu(ji  ,jj+1,jk) + pu(ji,jj,jk) ) * dj_e1u_2e1e2f(ji,jj)
             END_2D
          CASE ( np_CRV )                           !* Coriolis + relative vorticity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = (  ff_f(ji,jj) + (  e2v(ji+1,jj  ) * pv(ji+1,jj  ,jk) - e2v(ji,jj) * pv(ji,jj,jk)    &
                   &                              - e1u(ji  ,jj+1) * pu(ji  ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) &
@@ -716,5 +716,5 @@
             END_2D
          CASE ( np_CME )                           !* Coriolis + metric
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = ff_f(ji,jj) + ( pv(ji+1,jj  ,jk) + pv(ji,jj,jk) ) * di_e2v_2e1e2f(ji,jj)   &
                   &                        - ( pu(ji  ,jj+1,jk) + pu(ji,jj,jk) ) * dj_e1u_2e1e2f(ji,jj)
@@ -725,5 +725,5 @@
          !
          IF( ln_dynvor_msk ) THEN          !==  mask/unmask vorticity ==!
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = zwz(ji,jj,jk) * fmask(ji,jj,jk)
             END_2D
@@ -758,5 +758,5 @@
             END DO
          END DO
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zua = + r1_12 * r1_e1u(ji,jj) * (  ztne(ji,jj  ) * zwy(ji  ,jj  ) + ztnw(ji+1,jj) * zwy(ji+1,jj  )   &
                &                             + ztse(ji,jj  ) * zwy(ji  ,jj-1) + ztsw(ji+1,jj) * zwy(ji+1,jj-1) )
@@ -818,5 +818,5 @@
       IF(lwp) WRITE(numout,*) '      change fmask value in the angles (T)           ln_vorlat = ', ln_vorlat
       IF( ln_vorlat .AND. ( ln_dynvor_ene .OR. ln_dynvor_ens .OR. ln_dynvor_mix ) ) THEN
-         DO_3D_10_10( 1, jpk )
+         DO_3D( 1, 0, 1, 0, 1, jpk )
             IF(    tmask(ji,jj+1,jk) + tmask(ji+1,jj+1,jk)              &
                & + tmask(ji,jj  ,jk) + tmask(ji+1,jj  ,jk) == 3._wp )   fmask(ji,jj,jk) = 1._wp
@@ -857,5 +857,5 @@
          CASE( np_ENT )                      !* T-point metric term :   pre-compute di(e2u)/2 and dj(e1v)/2
             ALLOCATE( di_e2u_2(jpi,jpj), dj_e1v_2(jpi,jpj) )
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                di_e2u_2(ji,jj) = ( e2u(ji,jj) - e2u(ji-1,jj  ) ) * 0.5_wp
                dj_e1v_2(ji,jj) = ( e1v(ji,jj) - e1v(ji  ,jj-1) ) * 0.5_wp
@@ -865,5 +865,5 @@
          CASE DEFAULT                        !* F-point metric term :   pre-compute di(e2u)/(2*e1e2f) and dj(e1v)/(2*e1e2f)
             ALLOCATE( di_e2v_2e1e2f(jpi,jpj), dj_e1u_2e1e2f(jpi,jpj) )
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                di_e2v_2e1e2f(ji,jj) = ( e2v(ji+1,jj  ) - e2v(ji,jj) )  * 0.5 * r1_e1e2f(ji,jj)
                dj_e1u_2e1e2f(ji,jj) = ( e1u(ji  ,jj+1) - e1u(ji,jj) )  * 0.5 * r1_e1e2f(ji,jj)
Index: /NEMO/trunk/src/OCE/DYN/dynzad.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/dynzad.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/dynzad.F90	(revision 13295)
@@ -78,8 +78,8 @@
       
       DO jk = 2, jpkm1              ! Vertical momentum advection at level w and u- and v- vertical
-         DO_2D_01_01
+         DO_2D( 0, 1, 0, 1 )
             zww(ji,jj) = 0.25_wp * e1e2t(ji,jj) * ww(ji,jj,jk)
          END_2D
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zwuw(ji,jj,jk) = ( zww(ji+1,jj  ) + zww(ji,jj) ) * ( puu(ji,jj,jk-1,Kmm) - puu(ji,jj,jk,Kmm) )
             zwvw(ji,jj,jk) = ( zww(ji  ,jj+1) + zww(ji,jj) ) * ( pvv(ji,jj,jk-1,Kmm) - pvv(ji,jj,jk,Kmm) )
@@ -88,5 +88,5 @@
       !
       ! Surface and bottom advective fluxes set to zero
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zwuw(ji,jj, 1 ) = 0._wp
          zwvw(ji,jj, 1 ) = 0._wp
@@ -95,5 +95,5 @@
       END_2D
       !
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) - ( zwuw(ji,jj,jk) + zwuw(ji,jj,jk+1) ) * r1_e1e2u(ji,jj)   &
             &                                      / e3u(ji,jj,jk,Kmm)
Index: /NEMO/trunk/src/OCE/DYN/dynzdf.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/dynzdf.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/dynzdf.F90	(revision 13295)
@@ -107,10 +107,10 @@
       !                    ! time stepping except vertical diffusion
       IF( ln_dynadv_vec .OR. ln_linssh ) THEN   ! applied on velocity
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             puu(ji,jj,jk,Kaa) = ( puu(ji,jj,jk,Kbb) + rDt * puu(ji,jj,jk,Krhs) ) * umask(ji,jj,jk)
             pvv(ji,jj,jk,Kaa) = ( pvv(ji,jj,jk,Kbb) + rDt * pvv(ji,jj,jk,Krhs) ) * vmask(ji,jj,jk)
          END_3D
       ELSE                                      ! applied on thickness weighted velocity
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             puu(ji,jj,jk,Kaa) = (         e3u(ji,jj,jk,Kbb) * puu(ji,jj,jk,Kbb )  &
                &                  + rDt * e3u(ji,jj,jk,Kmm) * puu(ji,jj,jk,Krhs)  ) &
@@ -127,9 +127,9 @@
       !     G. Madec : in linear free surface, e3u(:,:,:,Kaa) = e3u(:,:,:,Kmm) = e3u_0, so systematic use of e3u(:,:,:,Kaa)
       IF( ln_drgimp .AND. ln_dynspg_ts ) THEN
-         DO_3D_00_00( 1, jpkm1 )      ! remove barotropic velocities
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )      ! remove barotropic velocities
             puu(ji,jj,jk,Kaa) = ( puu(ji,jj,jk,Kaa) - uu_b(ji,jj,Kaa) ) * umask(ji,jj,jk)
             pvv(ji,jj,jk,Kaa) = ( pvv(ji,jj,jk,Kaa) - vv_b(ji,jj,Kaa) ) * vmask(ji,jj,jk)
          END_3D
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             iku = mbku(ji,jj)         ! ocean bottom level at u- and v-points 
             ikv = mbkv(ji,jj)         ! (deepest ocean u- and v-points)
@@ -142,5 +142,5 @@
          END_2D
          IF( ln_isfcav ) THEN    ! Ocean cavities (ISF)
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                iku = miku(ji,jj)         ! top ocean level at u- and v-points 
                ikv = mikv(ji,jj)         ! (first wet ocean u- and v-points)
@@ -162,5 +162,5 @@
          SELECT CASE( nldf_dyn )
          CASE( np_lap_i )           ! rotated lateral mixing: add its vertical mixing (akzu)
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                ze3ua =  ( 1._wp - r_vvl ) * e3u(ji,jj,jk,Kmm)    &
                   &             + r_vvl   * e3u(ji,jj,jk,Kaa)   ! after scale factor at U-point
@@ -176,5 +176,5 @@
             END_3D
          CASE DEFAULT               ! iso-level lateral mixing
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                ze3ua =  ( 1._wp - r_vvl ) * e3u(ji,jj,jk,Kmm)    &    ! after scale factor at U-point
                   &             + r_vvl   * e3u(ji,jj,jk,Kaa)
@@ -190,5 +190,5 @@
             END_3D
          END SELECT
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zwi(ji,jj,1) = 0._wp
             ze3ua =  ( 1._wp - r_vvl ) * e3u(ji,jj,1,Kmm)    &
@@ -203,5 +203,5 @@
          SELECT CASE( nldf_dyn )
          CASE( np_lap_i )           ! rotated lateral mixing: add its vertical mixing (akzu)
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                ze3ua =  ( 1._wp - r_vvl ) * e3u(ji,jj,jk,Kmm)    &
                   &             + r_vvl   * e3u(ji,jj,jk,Kaa)   ! after scale factor at U-point
@@ -215,5 +215,5 @@
             END_3D
          CASE DEFAULT               ! iso-level lateral mixing
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                ze3ua =  ( 1._wp - r_vvl ) * e3u(ji,jj,jk,Kmm)    &
                   &             + r_vvl   * e3u(ji,jj,jk,Kaa)   ! after scale factor at U-point
@@ -227,5 +227,5 @@
             END_3D
          END SELECT
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zwi(ji,jj,1) = 0._wp
             zwd(ji,jj,1) = 1._wp - zws(ji,jj,1)
@@ -241,5 +241,5 @@
       !
       IF ( ln_drgimp ) THEN      ! implicit bottom friction
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             iku = mbku(ji,jj)       ! ocean bottom level at u- and v-points
             ze3ua =  ( 1._wp - r_vvl ) * e3u(ji,jj,iku,Kmm)    &
@@ -248,5 +248,5 @@
          END_2D
          IF ( ln_isfcav ) THEN   ! top friction (always implicit)
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                !!gm   top Cd is masked (=0 outside cavities) no need of test on mik>=2  ==>> it has been suppressed
                iku = miku(ji,jj)       ! ocean top level at u- and v-points 
@@ -273,9 +273,9 @@
       !-----------------------------------------------------------------------
       !
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          zwd(ji,jj,jk) = zwd(ji,jj,jk) - zwi(ji,jj,jk) * zws(ji,jj,jk-1) / zwd(ji,jj,jk-1)
       END_3D
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          ze3ua =  ( 1._wp - r_vvl ) * e3u(ji,jj,1,Kmm)    &
             &             + r_vvl   * e3u(ji,jj,1,Kaa) 
@@ -283,12 +283,12 @@
             &                                      / ( ze3ua * rho0 ) * umask(ji,jj,1) 
       END_2D
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          puu(ji,jj,jk,Kaa) = puu(ji,jj,jk,Kaa) - zwi(ji,jj,jk) / zwd(ji,jj,jk-1) * puu(ji,jj,jk-1,Kaa)
       END_3D
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          puu(ji,jj,jpkm1,Kaa) = puu(ji,jj,jpkm1,Kaa) / zwd(ji,jj,jpkm1)
       END_2D
-      DO_3DS_00_00( jpk-2, 1, -1 )
+      DO_3DS( 0, 0, 0, 0, jpk-2, 1, -1 )
          puu(ji,jj,jk,Kaa) = ( puu(ji,jj,jk,Kaa) - zws(ji,jj,jk) * puu(ji,jj,jk+1,Kaa) ) / zwd(ji,jj,jk)
       END_3D
@@ -301,5 +301,5 @@
          SELECT CASE( nldf_dyn )
          CASE( np_lap_i )           ! rotated lateral mixing: add its vertical mixing (akzv)
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                ze3va =  ( 1._wp - r_vvl ) * e3v(ji,jj,jk,Kmm)    &
                   &             + r_vvl   * e3v(ji,jj,jk,Kaa)   ! after scale factor at V-point
@@ -315,5 +315,5 @@
             END_3D
          CASE DEFAULT               ! iso-level lateral mixing
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                ze3va =  ( 1._wp - r_vvl ) * e3v(ji,jj,jk,Kmm)    &
                   &             + r_vvl   * e3v(ji,jj,jk,Kaa)   ! after scale factor at V-point
@@ -329,5 +329,5 @@
             END_3D
          END SELECT
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zwi(ji,jj,1) = 0._wp
             ze3va =  ( 1._wp - r_vvl ) * e3v(ji,jj,1,Kmm)    &
@@ -342,5 +342,5 @@
          SELECT CASE( nldf_dyn )
          CASE( np_lap_i )           ! rotated lateral mixing: add its vertical mixing (akzu)
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                ze3va =  ( 1._wp - r_vvl ) * e3v(ji,jj,jk,Kmm)    &
                   &             + r_vvl   * e3v(ji,jj,jk,Kaa)   ! after scale factor at V-point
@@ -354,5 +354,5 @@
             END_3D
          CASE DEFAULT               ! iso-level lateral mixing
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                ze3va =  ( 1._wp - r_vvl ) * e3v(ji,jj,jk,Kmm)    &
                   &             + r_vvl   * e3v(ji,jj,jk,Kaa)   ! after scale factor at V-point
@@ -366,5 +366,5 @@
             END_3D
          END SELECT
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zwi(ji,jj,1) = 0._wp
             zwd(ji,jj,1) = 1._wp - zws(ji,jj,1)
@@ -379,5 +379,5 @@
       !
       IF( ln_drgimp ) THEN
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ikv = mbkv(ji,jj)       ! (deepest ocean u- and v-points)
             ze3va =  ( 1._wp - r_vvl ) * e3v(ji,jj,ikv,Kmm)    &
@@ -386,5 +386,5 @@
          END_2D
          IF ( ln_isfcav ) THEN
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                ikv = mikv(ji,jj)       ! (first wet ocean u- and v-points)
                ze3va =  ( 1._wp - r_vvl ) * e3v(ji,jj,ikv,Kmm)    &
@@ -410,9 +410,9 @@
       !-----------------------------------------------------------------------
       !
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          zwd(ji,jj,jk) = zwd(ji,jj,jk) - zwi(ji,jj,jk) * zws(ji,jj,jk-1) / zwd(ji,jj,jk-1)
       END_3D
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          ze3va =  ( 1._wp - r_vvl ) * e3v(ji,jj,1,Kmm)    &
             &             + r_vvl   * e3v(ji,jj,1,Kaa) 
@@ -420,12 +420,12 @@
             &                                      / ( ze3va * rho0 ) * vmask(ji,jj,1) 
       END_2D
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          pvv(ji,jj,jk,Kaa) = pvv(ji,jj,jk,Kaa) - zwi(ji,jj,jk) / zwd(ji,jj,jk-1) * pvv(ji,jj,jk-1,Kaa)
       END_3D
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          pvv(ji,jj,jpkm1,Kaa) = pvv(ji,jj,jpkm1,Kaa) / zwd(ji,jj,jpkm1)
       END_2D
-      DO_3DS_00_00( jpk-2, 1, -1 )
+      DO_3DS( 0, 0, 0, 0, jpk-2, 1, -1 )
          pvv(ji,jj,jk,Kaa) = ( pvv(ji,jj,jk,Kaa) - zws(ji,jj,jk) * pvv(ji,jj,jk+1,Kaa) ) / zwd(ji,jj,jk)
       END_3D
Index: /NEMO/trunk/src/OCE/DYN/sshwzv.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/sshwzv.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/sshwzv.F90	(revision 13295)
@@ -178,5 +178,5 @@
             ! horizontal divergence of thickness diffusion transport ( velocity multiplied by e3t)
             ! - ML - note: computation already done in dom_vvl_sf_nxt. Could be optimized (not critical and clearer this way)
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zhdiv(ji,jj,jk) = r1_e1e2t(ji,jj) * ( un_td(ji,jj,jk) - un_td(ji-1,jj,jk) + vn_td(ji,jj,jk) - vn_td(ji,jj-1,jk) )
             END_2D
@@ -358,5 +358,5 @@
       zdt = 2._wp * rn_Dt                            ! 2*rn_Dt and not rDt (for restartability)
       IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             z1_e3t = 1._wp / e3t(ji,jj,jk,Kmm)
             Cu_adv(ji,jj,jk) =   zdt *                                                         &
@@ -375,5 +375,5 @@
          END_3D
       ELSE
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             z1_e3t = 1._wp / e3t(ji,jj,jk,Kmm)
             Cu_adv(ji,jj,jk) =   zdt *                                                      &
@@ -393,5 +393,5 @@
       !
       IF( MAXVAL( Cu_adv(:,:,:) ) > Cu_min ) THEN       ! Quick check if any breaches anywhere
-         DO_3DS_11_11( jpkm1, 2, -1 )
+         DO_3DS( 1, 1, 1, 1, jpkm1, 2, -1 )
             !
             zCu = MAX( Cu_adv(ji,jj,jk) , Cu_adv(ji,jj,jk-1) )
Index: /NEMO/trunk/src/OCE/DYN/wet_dry.F90
===================================================================
--- /NEMO/trunk/src/OCE/DYN/wet_dry.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/DYN/wet_dry.F90	(revision 13295)
@@ -174,5 +174,5 @@
       !
       wdmask(:,:) = 1._wp
-      DO_2D_01_01
+      DO_2D( 0, 1, 0, 1 )
          !
          IF( tmask(ji,jj,1)        < 0.5_wp )   CYCLE    ! we don't care about land cells
@@ -198,5 +198,5 @@
       wdramp(:,:) = min((ht_0(:,:) + psshb1(:,:) - rn_wdmin1)/(rn_wdmin0 - rn_wdmin1),1.0_wp)
       !jth assume don't need a lbc_lnk here
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          wdrampu(ji,jj) = MIN( wdramp(ji,jj) , wdramp(ji+1,jj) )
          wdrampv(ji,jj) = MIN( wdramp(ji,jj) , wdramp(ji,jj+1) )
@@ -211,5 +211,5 @@
          jflag = 0     ! flag indicating if any further iterations are needed
          !
-         DO_2D_01_01
+         DO_2D( 0, 1, 0, 1 )
             IF( tmask(ji, jj, 1) < 0.5_wp )   CYCLE 
             IF( ht_0(ji,jj)      > zdepwd )   CYCLE
@@ -307,5 +307,5 @@
       zwdlmtv(:,:) = 1._wp
       !
-      DO_2D_01_01
+      DO_2D( 0, 1, 0, 1 )
          !
          IF( tmask(ji, jj, 1 ) < 0.5_wp) CYCLE   ! we don't care about land cells
@@ -333,5 +333,5 @@
          jflag = 0     ! flag indicating if any further iterations are needed
          !
-         DO_2D_01_01
+         DO_2D( 0, 1, 0, 1 )
             !
             IF( tmask(ji, jj, 1 ) < 0.5_wp )   CYCLE 
Index: /NEMO/trunk/src/OCE/ICB/icbclv.F90
===================================================================
--- /NEMO/trunk/src/OCE/ICB/icbclv.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ICB/icbclv.F90	(revision 13295)
@@ -71,5 +71,5 @@
          !  where (berg_grid%calving==0.) berg_grid%stored_ice(:,:,jn)=0.
          !end do
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             IF( berg_grid%calving(ji,jj) /= 0._wp )                                          &    ! Need units of J
                berg_grid%stored_heat(ji,jj) = SUM( berg_grid%stored_ice(ji,jj,:) ) *         &    ! initial stored ice in kg
@@ -81,5 +81,5 @@
       ! assume that all calving flux must be distributed even if distribution array does not sum
       ! to one - this may not be what is intended, but it's what you've got
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          imx = berg_grid%maxclass(ji,jj)
          zdist = SUM( rn_distribution(1:nclasses) ) / SUM( rn_distribution(1:imx) )
Index: /NEMO/trunk/src/OCE/ICB/icbini.F90
===================================================================
--- /NEMO/trunk/src/OCE/ICB/icbini.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ICB/icbini.F90	(revision 13295)
@@ -123,5 +123,5 @@
       nicbfldproc(:) = -1
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          src_calving_hflx(ji,jj) = narea
          src_calving     (ji,jj) = nicbpack * mjg(jj) + mig(ji)
Index: /NEMO/trunk/src/OCE/IOM/iom.F90
===================================================================
--- /NEMO/trunk/src/OCE/IOM/iom.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/IOM/iom.F90	(revision 13295)
@@ -2255,5 +2255,5 @@
       !
       ! Cell vertices that can be defined
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          z_bnds(1,ji,jj,1) = plat_cnr(ji+icnr,  jj+jcnr  ) ! Bottom-left
          z_bnds(2,ji,jj,1) = plat_cnr(ji+icnr+1,jj+jcnr  ) ! Bottom-right
@@ -2266,5 +2266,5 @@
       END_2D
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          IF( z_fld(ji,jj) == -1. ) THEN
             z_rot(1,:) = z_bnds(3,ji,jj,:) ; z_rot(2,:) = z_bnds(4,ji,jj,:)
Index: /NEMO/trunk/src/OCE/ISF/isfcavmlt.F90
===================================================================
--- /NEMO/trunk/src/OCE/ISF/isfcavmlt.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ISF/isfcavmlt.F90	(revision 13295)
@@ -210,5 +210,5 @@
       ! compute upward heat flux zhtflx and upward water flux zwflx
       ! Resolution of a 3d equation from equation 24, 25 and 26 (note conduction through the ice has been added to Eq 24)
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !
          ! compute coeficient to solve the 2nd order equation
Index: /NEMO/trunk/src/OCE/ISF/isfcpl.F90
===================================================================
--- /NEMO/trunk/src/OCE/ISF/isfcpl.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ISF/isfcpl.F90	(revision 13295)
@@ -194,5 +194,5 @@
          !
          zdssmask(:,:) = ssmask(:,:) - zssmask0(:,:)
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             jip1=ji+1; jim1=ji-1;
             jjp1=jj+1; jjm1=jj-1;
@@ -317,5 +317,5 @@
             zdmask(:,:) = tmask(:,:,jk) - ztmask0(:,:,jk);
             !
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                jip1=ji+1; jim1=ji-1;
                jjp1=jj+1; jjm1=jj-1;
@@ -378,5 +378,5 @@
       ! -----------------------------------------------------------------------------------------
       ! case we open a cell but no neigbour cells available to get an estimate of T and S
-      DO_3D_11_11( 1,jpk-1 )
+      DO_3D( 1, 1, 1, 1, 1,jpk-1 )
          IF (tmask(ji,jj,jk) == 1._wp .AND. ts(ji,jj,jk,2,Kmm) == 0._wp)              &
             &   CALL ctl_stop('STOP', 'failing to fill all new weet cell,     &
@@ -418,5 +418,5 @@
       DO jk = 1, jpk                                 ! Horizontal slab
          ! 1.1: get volume flux before coupling (>0 out)
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zqvolb(ji,jj,jk) =    &
                &  (   e2u(ji  ,jj  ) * ze3u_b(ji  ,jj  ,jk) * uu(ji  ,jj  ,jk,Kmm)      &
@@ -433,5 +433,5 @@
          vv(:,:,jk,Kmm) = vv(:,:,jk,Kmm) * vmask(:,:,jk)
          ! compute volume flux divergence after coupling
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zqvoln(ji,jj,jk) =   &
                &  (   e2u(ji  ,jj  ) * e3u(ji  ,jj  ,jk,Kmm) * uu(ji  ,jj  ,jk,Kmm)    &
@@ -449,5 +449,5 @@
       ! 2.0: include the contribution of the vertical velocity in the volume flux correction
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          !
          ikt = mikt(ji,jj)
Index: /NEMO/trunk/src/OCE/ISF/isfdiags.F90
===================================================================
--- /NEMO/trunk/src/OCE/ISF/isfdiags.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ISF/isfdiags.F90	(revision 13295)
@@ -101,5 +101,5 @@
       zvar3d(:,:,:) = 0._wp
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ikt = ktop(ji,jj)
          ikb = kbot(ji,jj)
Index: /NEMO/trunk/src/OCE/ISF/isfhdiv.F90
===================================================================
--- /NEMO/trunk/src/OCE/ISF/isfhdiv.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ISF/isfhdiv.F90	(revision 13295)
@@ -100,5 +100,5 @@
       !
       ! update divergence at each level affected by ice shelf top boundary layer
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ikt = ktop(ji,jj)
          ikb = kbot(ji,jj)
Index: /NEMO/trunk/src/OCE/ISF/isfload.F90
===================================================================
--- /NEMO/trunk/src/OCE/ISF/isfload.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ISF/isfload.F90	(revision 13295)
@@ -94,5 +94,5 @@
       !                                !- Surface value + ice shelf gradient
       pisfload(:,:) = 0._wp                       ! compute pressure due to ice shelf load 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ikt = mikt(ji,jj)
          !
Index: /NEMO/trunk/src/OCE/ISF/isftbl.F90
===================================================================
--- /NEMO/trunk/src/OCE/ISF/isftbl.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ISF/isftbl.F90	(revision 13295)
@@ -78,5 +78,5 @@
          ! compute tbl property at T point
          pvarout(1,:) = 0._wp
-         DO_2D_11_01
+         DO_2D( 1, 1, 0, 1 )
             pvarout(ji,jj) = 0.5_wp * (zvarout(ji,jj) + zvarout(ji-1,jj))
          END_2D
@@ -99,5 +99,5 @@
          ! pvarout is an averaging of wet point
          pvarout(:,1) = 0._wp
-         DO_2D_01_11
+         DO_2D( 0, 1, 1, 1 )
             pvarout(ji,jj) = 0.5_wp * (zvarout(ji,jj) + zvarout(ji,jj-1))
          END_2D
@@ -138,5 +138,5 @@
       !
       ! compute tbl top.bottom level and thickness
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !
          ! tbl top/bottom indices initialisation
@@ -176,5 +176,5 @@
       !
       ! get htbl
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !
          ! tbl top/bottom indices initialisation
@@ -193,5 +193,5 @@
       !
       ! get pfrac
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !
          ! tbl top/bottom indices initialisation
@@ -227,5 +227,5 @@
       !
       ! get ktbl
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !
          ! determine the deepest level influenced by the boundary layer
@@ -261,5 +261,5 @@
       ! test: this routine run with pdep = 0 should return 1
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ! comput ktop
          ikt = 2
Index: /NEMO/trunk/src/OCE/LDF/ldfc1d_c2d.F90
===================================================================
--- /NEMO/trunk/src/OCE/LDF/ldfc1d_c2d.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/LDF/ldfc1d_c2d.F90	(revision 13295)
@@ -80,5 +80,5 @@
             pah1(:,:,jk) = pahs1(:,:) * (  zratio + zc * ( 1._wp + TANH( - ( gdept_0(:,:,jk) - zh ) * zw) )  )
          END DO
-         DO_3DS_10_10( jpkm1, 1, -1 )
+         DO_3DS( 1, 0, 1, 0, jpkm1, 1, -1 )
             zdep2 = (  gdept_0(ji,jj+1,jk) + gdept_0(ji+1,jj+1,jk)   &
                &     + gdept_0(ji,jj  ,jk) + gdept_0(ji+1,jj  ,jk)  ) * r1_4
@@ -88,5 +88,5 @@
          !
       CASE( 'TRA' )                     ! U- and V-points (zdep1 & 2 are an approximation in zps-coord.)
-         DO_3DS_10_10( jpkm1, 1, -1 )
+         DO_3DS( 1, 0, 1, 0, jpkm1, 1, -1 )
             zdep1 = (  gdept_0(ji,jj,jk) + gdept_0(ji+1,jj,jk)  ) * 0.5_wp
             zdep2 = (  gdept_0(ji,jj,jk) + gdept_0(ji,jj+1,jk)  ) * 0.5_wp
@@ -135,10 +135,10 @@
       !
       CASE( 'DYN' )                       ! T- and F-points
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             pah1(ji,jj,1) = pUfac * MAX( e1t(ji,jj) , e2t(ji,jj) )**knn
             pah2(ji,jj,1) = pUfac * MAX( e1f(ji,jj) , e2f(ji,jj) )**knn
          END_2D
       CASE( 'TRA' )                       ! U- and V-points
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             pah1(ji,jj,1) = pUfac * MAX( e1u(ji,jj), e2u(ji,jj) )**knn
             pah2(ji,jj,1) = pUfac * MAX( e1v(ji,jj), e2v(ji,jj) )**knn
Index: /NEMO/trunk/src/OCE/LDF/ldfdyn.F90
===================================================================
--- /NEMO/trunk/src/OCE/LDF/ldfdyn.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/LDF/ldfdyn.F90	(revision 13295)
@@ -311,5 +311,5 @@
             IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'ldf_dyn_init: failed to allocate Smagorinsky arrays')
             !
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                esqt(ji,jj) = ( 2._wp * e1e2t(ji,jj) / ( e1t(ji,jj) + e2t(ji,jj) ) )**2 
                esqf(ji,jj) = ( 2._wp * e1e2f(ji,jj) / ( e1f(ji,jj) + e2f(ji,jj) ) )**2 
@@ -368,5 +368,5 @@
          IF( ln_dynldf_lap   ) THEN        ! laplacian operator : |u| e /12 = |u/144| e
             DO jk = 1, jpkm1
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   zu2pv2_ij    = uu(ji  ,jj  ,jk,Kbb) * uu(ji  ,jj  ,jk,Kbb) + vv(ji  ,jj  ,jk,Kbb) * vv(ji  ,jj  ,jk,Kbb)
                   zu2pv2_ij_m1 = uu(ji-1,jj  ,jk,Kbb) * uu(ji-1,jj  ,jk,Kbb) + vv(ji  ,jj-1,jk,Kbb) * vv(ji  ,jj-1,jk,Kbb)
@@ -374,5 +374,5 @@
                   ahmt(ji,jj,jk) = SQRT( (zu2pv2_ij + zu2pv2_ij_m1) * r1_288 ) * zemax * tmask(ji,jj,jk)      ! 288= 12*12 * 2
                END_2D
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   zu2pv2_ij_p1 = uu(ji  ,jj+1,jk, Kbb) * uu(ji  ,jj+1,jk, Kbb) + vv(ji+1,jj  ,jk, Kbb) * vv(ji+1,jj  ,jk, Kbb)
                   zu2pv2_ij    = uu(ji  ,jj  ,jk, Kbb) * uu(ji  ,jj  ,jk, Kbb) + vv(ji  ,jj  ,jk, Kbb) * vv(ji  ,jj  ,jk, Kbb)
@@ -383,5 +383,5 @@
          ELSEIF( ln_dynldf_blp ) THEN      ! bilaplacian operator : sqrt( |u| e^3 /12 ) = sqrt( |u/144| e ) * e
             DO jk = 1, jpkm1
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   zu2pv2_ij    = uu(ji  ,jj  ,jk,Kbb) * uu(ji  ,jj  ,jk,Kbb) + vv(ji  ,jj  ,jk,Kbb) * vv(ji  ,jj  ,jk,Kbb)
                   zu2pv2_ij_m1 = uu(ji-1,jj  ,jk,Kbb) * uu(ji-1,jj  ,jk,Kbb) + vv(ji  ,jj-1,jk,Kbb) * vv(ji  ,jj-1,jk,Kbb)
@@ -389,5 +389,5 @@
                   ahmt(ji,jj,jk) = SQRT(  SQRT( (zu2pv2_ij + zu2pv2_ij_m1) * r1_288 ) * zemax  ) * zemax * tmask(ji,jj,jk)
                END_2D
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   zu2pv2_ij_p1 = uu(ji  ,jj+1,jk, Kbb) * uu(ji  ,jj+1,jk, Kbb) + vv(ji+1,jj  ,jk, Kbb) * vv(ji+1,jj  ,jk, Kbb)
                   zu2pv2_ij    = uu(ji  ,jj  ,jk, Kbb) * uu(ji  ,jj  ,jk, Kbb) + vv(ji  ,jj  ,jk, Kbb) * vv(ji  ,jj  ,jk, Kbb)
@@ -412,5 +412,5 @@
             DO jk = 1, jpkm1
                !
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   zdb =    ( uu(ji,jj,jk,Kbb) * r1_e2u(ji,jj) -  uu(ji-1,jj,jk,Kbb) * r1_e2u(ji-1,jj) )  &
                        &                      * r1_e1t(ji,jj) * e2t(ji,jj)                           &
@@ -420,5 +420,5 @@
                END_2D
                !
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   zdb =   (  uu(ji,jj+1,jk,Kbb) * r1_e1u(ji,jj+1) -  uu(ji,jj,jk,Kbb) * r1_e1u(ji,jj) )  &
                        &                        * r1_e2f(ji,jj)   * e1f(ji,jj)                       &
@@ -434,5 +434,5 @@
             DO jk = 1, jpkm1
               !
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   !
                   zu2pv2_ij    = uu(ji  ,jj  ,jk,Kbb) * uu(ji  ,jj  ,jk,Kbb) + vv(ji  ,jj  ,jk,Kbb) * vv(ji  ,jj  ,jk,Kbb)
@@ -448,5 +448,5 @@
                END_2D
                !
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   !
                   zu2pv2_ij_p1 = uu(ji  ,jj+1,jk, kbb) * uu(ji  ,jj+1,jk, kbb) + vv(ji+1,jj  ,jk, kbb) * vv(ji+1,jj  ,jk, kbb)
@@ -471,8 +471,8 @@
             !                          ! effective default limits are 1/12 |U|L^3 < B_hm < 1//(32*2dt) L^4
             DO jk = 1, jpkm1
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   ahmt(ji,jj,jk) = SQRT( r1_8 * esqt(ji,jj) * ahmt(ji,jj,jk) )
                END_2D
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   ahmf(ji,jj,jk) = SQRT( r1_8 * esqf(ji,jj) * ahmf(ji,jj,jk) )
                END_2D
Index: /NEMO/trunk/src/OCE/LDF/ldfslp.F90
===================================================================
--- /NEMO/trunk/src/OCE/LDF/ldfslp.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/LDF/ldfslp.F90	(revision 13295)
@@ -137,10 +137,10 @@
       zwz(:,:,:) = 0._wp
       !
-      DO_3D_10_10( 1, jpk )
+      DO_3D( 1, 0, 1, 0, 1, jpk )
          zgru(ji,jj,jk) = umask(ji,jj,jk) * ( prd(ji+1,jj  ,jk) - prd(ji,jj,jk) )
          zgrv(ji,jj,jk) = vmask(ji,jj,jk) * ( prd(ji  ,jj+1,jk) - prd(ji,jj,jk) )
       END_3D
       IF( ln_zps ) THEN                           ! partial steps correction at the bottom ocean level
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zgru(ji,jj,mbku(ji,jj)) = gru(ji,jj)
             zgrv(ji,jj,mbkv(ji,jj)) = grv(ji,jj)
@@ -148,5 +148,5 @@
       ENDIF
       IF( ln_zps .AND. ln_isfcav ) THEN           ! partial steps correction at the bottom ocean level
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             IF( miku(ji,jj) > 1 )   zgru(ji,jj,miku(ji,jj)) = grui(ji,jj) 
             IF( mikv(ji,jj) > 1 )   zgrv(ji,jj,mikv(ji,jj)) = grvi(ji,jj)
@@ -173,5 +173,5 @@
       !
       IF ( ln_isfcav ) THEN
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zslpml_hmlpu(ji,jj) = uslpml(ji,jj) / ( MAX(hmlpt  (ji,jj), hmlpt  (ji+1,jj  ), 5._wp) &
                &                                  - MAX(risfdep(ji,jj), risfdep(ji+1,jj  )       ) ) 
@@ -180,5 +180,5 @@
          END_2D
       ELSE
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zslpml_hmlpu(ji,jj) = uslpml(ji,jj) / MAX(hmlpt(ji,jj), hmlpt(ji+1,jj  ), 5._wp)
             zslpml_hmlpv(ji,jj) = vslpml(ji,jj) / MAX(hmlpt(ji,jj), hmlpt(ji  ,jj+1), 5._wp)
@@ -186,5 +186,5 @@
       END IF
 
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          !                                      ! horizontal and vertical density gradient at u- and v-points
          zau = zgru(ji,jj,jk) * r1_e1u(ji,jj)
@@ -233,5 +233,5 @@
       !                                            !* horizontal Shapiro filter
       DO jk = 2, jpkm1
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             uslp(ji,jj,jk) = z1_16 * (        zwz(ji-1,jj-1,jk) + zwz(ji+1,jj-1,jk)      &
                &                       +      zwz(ji-1,jj+1,jk) + zwz(ji+1,jj+1,jk)      &
@@ -260,5 +260,5 @@
          END DO
          !                                        !* decrease along coastal boundaries
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             uslp(ji,jj,jk) = uslp(ji,jj,jk) * ( umask(ji,jj+1,jk) + umask(ji,jj-1,jk  ) ) * 0.5_wp   &
                &                            * ( umask(ji,jj  ,jk) + umask(ji,jj  ,jk+1) ) * 0.5_wp
@@ -272,5 +272,5 @@
       ! ===========================      | wslpj = mij( d/dj( prd ) / d/dz( prd )
       !
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          !                                  !* Local vertical density gradient evaluated from N^2
          zbw = zm1_2g * pn2 (ji,jj,jk) * ( prd (ji,jj,jk) + prd (ji,jj,jk-1) + 2. )
@@ -307,5 +307,5 @@
       !                                           !* horizontal Shapiro filter
       DO jk = 2, jpkm1
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zcofw = wmask(ji,jj,jk) * z1_16
             wslpi(ji,jj,jk) = (         zwz(ji-1,jj-1,jk) + zwz(ji+1,jj-1,jk)     &
@@ -338,5 +338,5 @@
          END DO
          !                                        !* decrease in vicinity of topography
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zck =   ( umask(ji,jj,jk) + umask(ji-1,jj,jk) )   &
                &  * ( vmask(ji,jj,jk) + vmask(ji,jj-1,jk) ) * 0.25
@@ -401,5 +401,5 @@
          !
          ip = jl   ;   jp = jl                ! guaranteed nonzero gradients ( absolute value larger than repsln)
-         DO_3D_10_10( 1, jpkm1 )
+         DO_3D( 1, 0, 1, 0, 1, jpkm1 )
             zdit = ( ts(ji+1,jj,jk,jp_tem,Kbb) - ts(ji,jj,jk,jp_tem,Kbb) )    ! i-gradient of T & S at u-point
             zdis = ( ts(ji+1,jj,jk,jp_sal,Kbb) - ts(ji,jj,jk,jp_sal,Kbb) )
@@ -413,5 +413,5 @@
          !
          IF( ln_zps .AND. l_grad_zps ) THEN     ! partial steps: correction of i- & j-grad on bottom
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                iku  = mbku(ji,jj)          ;   ikv  = mbkv(ji,jj)             ! last ocean level (u- & v-points)
                zdit = gtsu(ji,jj,jp_tem)   ;   zdjt = gtsv(ji,jj,jp_tem)      ! i- & j-gradient of Temperature
@@ -427,5 +427,5 @@
 
       DO kp = 0, 1                            !==  unmasked before density i- j-, k-gradients  ==!
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             IF( jk+kp > 1 ) THEN        ! k-gradient of T & S a jk+kp
                zdkt = ( ts(ji,jj,jk+kp-1,jp_tem,Kbb) - ts(ji,jj,jk+kp,jp_tem,Kbb) )
@@ -442,5 +442,5 @@
       END DO
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          jk = MIN( nmln(ji,jj), mbkt(ji,jj) ) + 1     ! MIN in case ML depth is the ocean depth
          z1_mlbw(ji,jj) = 1._wp / gdepw(ji,jj,jk,Kmm)
@@ -462,5 +462,5 @@
       DO jl = 0, 1                            ! calculate slope of the 4 triads immediately ONE level below mixed-layer base
          DO kp = 0, 1                         ! with only the slope-max limit   and   MASKED
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                ip = jl   ;   jp = jl
                !
@@ -499,5 +499,5 @@
                ! Must mask contribution to slope from dz/dx at constant s for triads jk=1,kp=0 that poke up though ocean surface
                znot_thru_surface = REAL( 1-1/(jk+kp), wp )  !jk+kp=1,=0.; otherwise=1.0
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   !
                   ! Calculate slope relative to geopotentials used for GM skew fluxes
@@ -628,5 +628,5 @@
       !
       !                                            !==   surface mixed layer mask   !
-      DO_3D_11_11( 1, jpk )
+      DO_3D( 1, 1, 1, 1, 1, jpk )
          ik = nmln(ji,jj) - 1
          IF( jk <= ik ) THEN   ;   omlmask(ji,jj,jk) = 1._wp
@@ -646,5 +646,5 @@
       !-----------------------------------------------------------------------
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          !                        !==   Slope at u- & v-points just below the Mixed Layer   ==!
          !
Index: /NEMO/trunk/src/OCE/LDF/ldftra.F90
===================================================================
--- /NEMO/trunk/src/OCE/LDF/ldftra.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/LDF/ldftra.F90	(revision 13295)
@@ -430,5 +430,5 @@
          zaht_min = 0.2_wp * aht0                                       ! minimum value for aht
          zDaht    = aht0 - zaht_min                                      
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             !!gm CAUTION : here we assume lat/lon grid in 20deg N/S band (like all ORCA cfg)
             !!     ==>>>   The Coriolis value is identical for t- & u_points, and for v- and f-points
@@ -648,5 +648,5 @@
       !                       ! Compute lateral diffusive coefficient at T-point
       IF( ln_traldf_triad ) THEN
-         DO_3D_00_00( 1, jpk )
+         DO_3D( 0, 0, 0, 0, 1, jpk )
             ! Take the max of N^2 and zero then take the vertical sum 
             ! of the square root of the resulting N^2 ( required to compute 
@@ -662,5 +662,5 @@
          END_3D
       ELSE
-         DO_3D_00_00( 1, jpk )
+         DO_3D( 0, 0, 0, 0, 1, jpk )
             ! Take the max of N^2 and zero then take the vertical sum 
             ! of the square root of the resulting N^2 ( required to compute 
@@ -678,5 +678,5 @@
       ENDIF
 
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zfw = MAX( ABS( 2. * omega * SIN( rad * gphit(ji,jj) ) ) , 1.e-10 )
          ! Rossby radius at w-point taken betwenn 2 km and  40km
@@ -688,5 +688,5 @@
       !                                         !==  Bound on eiv coeff.  ==!
       z1_f20 = 1._wp / (  2._wp * omega * sin( rad * 20._wp )  )
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zzaei = MIN( 1._wp, ABS( ff_t(ji,jj) * z1_f20 ) ) * zaeiw(ji,jj)     ! tropical decrease
          zaeiw(ji,jj) = MIN( zzaei , paei0 )                                  ! Max value = paei0
@@ -694,5 +694,5 @@
       CALL lbc_lnk( 'ldftra', zaeiw(:,:), 'W', 1.0_wp )       ! lateral boundary condition
       !               
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          paeiu(ji,jj,1) = 0.5_wp * ( zaeiw(ji,jj) + zaeiw(ji+1,jj  ) ) * umask(ji,jj,1)
          paeiv(ji,jj,1) = 0.5_wp * ( zaeiw(ji,jj) + zaeiw(ji  ,jj+1) ) * vmask(ji,jj,1)
@@ -750,5 +750,5 @@
       zpsi_uw(:,:,jpk) = 0._wp   ;   zpsi_vw(:,:,jpk) = 0._wp
       !
-      DO_3D_10_10( 2, jpkm1 )
+      DO_3D( 1, 0, 1, 0, 2, jpkm1 )
          zpsi_uw(ji,jj,jk) = - r1_4 * e2u(ji,jj) * ( wslpi(ji,jj,jk  ) + wslpi(ji+1,jj,jk) )   &
             &                                    * ( aeiu (ji,jj,jk-1) + aeiu (ji  ,jj,jk) ) * wumask(ji,jj,jk)
@@ -757,9 +757,9 @@
       END_3D
       !
-      DO_3D_10_10( 1, jpkm1 )
+      DO_3D( 1, 0, 1, 0, 1, jpkm1 )
          pu(ji,jj,jk) = pu(ji,jj,jk) - ( zpsi_uw(ji,jj,jk) - zpsi_uw(ji,jj,jk+1) )
          pv(ji,jj,jk) = pv(ji,jj,jk) - ( zpsi_vw(ji,jj,jk) - zpsi_vw(ji,jj,jk+1) )
       END_3D
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          pw(ji,jj,jk) = pw(ji,jj,jk) + (  zpsi_uw(ji,jj,jk) - zpsi_uw(ji-1,jj  ,jk)   &
             &                             + zpsi_vw(ji,jj,jk) - zpsi_vw(ji  ,jj-1,jk) )
@@ -813,5 +813,5 @@
       CALL iom_put( "voce_eiv", zw3d )
       !
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          zw3d(ji,jj,jk) = (  psi_vw(ji,jj,jk) - psi_vw(ji  ,jj-1,jk)    &
             &              + psi_uw(ji,jj,jk) - psi_uw(ji-1,jj  ,jk)  ) / e1e2t(ji,jj)
@@ -840,5 +840,5 @@
         zw2d(:,:)   = 0._wp 
         zw3d(:,:,:) = 0._wp 
-        DO_3D_00_00( 1, jpkm1 )
+        DO_3D( 0, 0, 0, 0, 1, jpkm1 )
            zw3d(ji,jj,jk) = zw3d(ji,jj,jk) + ( psi_uw(ji,jj,jk+1)          - psi_uw(ji  ,jj,jk)            )   &
               &                            * ( ts    (ji,jj,jk,jp_tem,Kmm) + ts    (ji+1,jj,jk,jp_tem,Kmm) ) 
@@ -861,5 +861,5 @@
       zw2d(:,:)   = 0._wp 
       zw3d(:,:,:) = 0._wp 
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          zw3d(ji,jj,jk) = zw3d(ji,jj,jk) + ( psi_vw(ji,jj,jk+1)          - psi_vw(ji,jj  ,jk)            )   &
             &                            * ( ts    (ji,jj,jk,jp_tem,Kmm) + ts    (ji,jj+1,jk,jp_tem,Kmm) ) 
@@ -876,5 +876,5 @@
         zw2d(:,:) = 0._wp 
         zw3d(:,:,:) = 0._wp 
-        DO_3D_00_00( 1, jpkm1 )
+        DO_3D( 0, 0, 0, 0, 1, jpkm1 )
            zw3d(ji,jj,jk) = zw3d(ji,jj,jk) * ( psi_uw(ji,jj,jk+1)          - psi_uw(ji  ,jj,jk)            )   &
               &                            * ( ts    (ji,jj,jk,jp_sal,Kmm) + ts    (ji+1,jj,jk,jp_sal,Kmm) ) 
@@ -888,5 +888,5 @@
       zw2d(:,:) = 0._wp 
       zw3d(:,:,:) = 0._wp 
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          zw3d(ji,jj,jk) = zw3d(ji,jj,jk) + ( psi_vw(ji,jj,jk+1)          - psi_vw(ji,jj  ,jk)            )   &
             &                            * ( ts    (ji,jj,jk,jp_sal,Kmm) + ts    (ji,jj+1,jk,jp_sal,Kmm) ) 
Index: /NEMO/trunk/src/OCE/OBS/obs_oper.F90
===================================================================
--- /NEMO/trunk/src/OCE/OBS/obs_oper.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/OBS/obs_oper.F90	(revision 13295)
@@ -189,5 +189,5 @@
          ! Initialize daily mean for first timestep of the day
          IF ( idayend == 1 .OR. kt == 0 ) THEN
-            DO_3D_11_11( 1, jpk )
+            DO_3D( 1, 1, 1, 1, 1, jpk )
                prodatqc%vdmean(ji,jj,jk,1) = 0.0
                prodatqc%vdmean(ji,jj,jk,2) = 0.0
@@ -195,5 +195,5 @@
          ENDIF
 
-         DO_3D_11_11( 1, jpk )
+         DO_3D( 1, 1, 1, 1, 1, jpk )
             ! Increment field 1 for computing daily mean
             prodatqc%vdmean(ji,jj,jk,1) = prodatqc%vdmean(ji,jj,jk,1) &
@@ -209,5 +209,5 @@
             IF (lwp) WRITE(numout,*) 'Calculating prodatqc%vdmean on time-step: ',kt
             CALL FLUSH(numout)
-            DO_3D_11_11( 1, jpk )
+            DO_3D( 1, 1, 1, 1, 1, jpk )
                prodatqc%vdmean(ji,jj,jk,1) = prodatqc%vdmean(ji,jj,jk,1) &
                   &                        * zdaystp
@@ -750,5 +750,5 @@
          ! Initialize night-time mean for first timestep of the day
          IF ( idayend == 1 .OR. kt == 0 ) THEN
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                surfdataqc%vdmean(ji,jj) = 0.0
                zmeanday(ji,jj) = 0.0
@@ -761,5 +761,5 @@
          imask_night(:,:) = INT( zouttmp(:,:) )
 
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ! Increment the temperature field for computing night mean and counter
             surfdataqc%vdmean(ji,jj) = surfdataqc%vdmean(ji,jj)  &
@@ -773,5 +773,5 @@
          IF ( idayend == 0 ) THEN
             IF (lwp) WRITE(numout,*) 'Calculating surfdataqc%vdmean on time-step: ',kt
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                ! Test if "no night" point
                IF ( icount_night(ji,jj) > 0 ) THEN
Index: /NEMO/trunk/src/OCE/OBS/obs_readmdt.F90
===================================================================
--- /NEMO/trunk/src/OCE/OBS/obs_readmdt.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/OBS/obs_readmdt.F90	(revision 13295)
@@ -215,5 +215,5 @@
       zeta2 = 0.0
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
        zdxdy = e1e2t(ji,jj) * zpromsk(ji,jj)
        zarea = zarea + zdxdy
Index: /NEMO/trunk/src/OCE/SBC/cyclone.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/cyclone.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/cyclone.F90	(revision 13295)
@@ -147,5 +147,5 @@
             zb = 2.
 
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
 
                ! calc distance between TC center and any point following great circle
@@ -208,5 +208,5 @@
             ENDIF           
         
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                                
                zzrglam = rad * glamt(ji,jj) - zrlon
Index: /NEMO/trunk/src/OCE/SBC/fldread.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/fldread.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/fldread.F90	(revision 13295)
@@ -1169,5 +1169,5 @@
             WRITE(clname,'(a3,i2.2)') 'src',jn
             CALL iom_get ( inum, jpdom_global, clname, data_tmp(:,:), cd_type = 'Z' )   !  no call to lbc_lnk
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                isrc = NINT(data_tmp(ji,jj)) - 1
                ref_wgts(nxt_wgt)%data_jpi(ji,jj,jn) = 1 + MOD(isrc,  ref_wgts(nxt_wgt)%ddims(1))
@@ -1179,5 +1179,5 @@
             WRITE(clname,'(a3,i2.2)') 'wgt',jn
             CALL iom_get ( inum, jpdom_global, clname, data_tmp(:,:), cd_type = 'Z' )   !  no call to lbc_lnk
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                ref_wgts(nxt_wgt)%data_wgt(ji,jj,jn) = data_tmp(ji,jj)
             END_2D
@@ -1442,5 +1442,5 @@
       dta(:,:,:) = 0._wp
       DO jn = 1,4
-         DO_3D_00_00( 1,ipk )
+         DO_3D( 0, 0, 0, 0, 1,ipk )
             ni = ref_wgts(kw)%data_jpi(ji,jj,jn) + 1
             nj = ref_wgts(kw)%data_jpj(ji,jj,jn) + 1
@@ -1486,5 +1486,5 @@
          !
 !!$         DO jn = 1,4
-!!$            DO_3D_00_00( 1,ipk )
+!!$            DO_3D( 0, 0, 0, 0, 1,ipk )
 !!$               ni = ref_wgts(kw)%data_jpi(ji,jj,jn) + 1
 !!$               nj = ref_wgts(kw)%data_jpj(ji,jj,jn) + 1
@@ -1504,5 +1504,5 @@
          !
          DO jn = 1,4
-            DO_3D_00_00( 1,ipk )
+            DO_3D( 0, 0, 0, 0, 1,ipk )
                ni = ref_wgts(kw)%data_jpi(ji,jj,jn)
                nj = ref_wgts(kw)%data_jpj(ji,jj,jn)
@@ -1513,5 +1513,5 @@
          END DO
          DO jn = 1,4
-            DO_3D_00_00( 1,ipk )
+            DO_3D( 0, 0, 0, 0, 1,ipk )
                ni = ref_wgts(kw)%data_jpi(ji,jj,jn)
                nj = ref_wgts(kw)%data_jpj(ji,jj,jn)
@@ -1522,5 +1522,5 @@
          END DO
          DO jn = 1,4
-            DO_3D_00_00( 1,ipk )
+            DO_3D( 0, 0, 0, 0, 1,ipk )
                ni = ref_wgts(kw)%data_jpi(ji,jj,jn)
                nj = ref_wgts(kw)%data_jpj(ji,jj,jn)
Index: /NEMO/trunk/src/OCE/SBC/geo2ocean.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/geo2ocean.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/geo2ocean.F90	(revision 13295)
@@ -160,5 +160,5 @@
       ! (computation done on the north stereographic polar plane)
       !
-      DO_2D_00_01
+      DO_2D( 0, 0, 0, 1 )
          !                  
          zlam = plamt(ji,jj)     ! north pole direction & modulous (at t-point)
@@ -249,5 +249,5 @@
       ! =============== !
 
-      DO_2D_00_01
+      DO_2D( 0, 0, 0, 1 )
          IF( MOD( ABS( plamv(ji,jj) - plamv(ji,jj-1) ), 360. ) < 1.e-8 ) THEN
             gsint(ji,jj) = 0.
Index: /NEMO/trunk/src/OCE/SBC/sbc_oce.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbc_oce.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbc_oce.F90	(revision 13295)
@@ -217,5 +217,5 @@
       !!---------------------------------------------------------------------
       zcoef = 0.5 / ( zrhoa * zcdrag )
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          ztx = utau(ji-1,jj  ) + utau(ji,jj)
          zty = vtau(ji  ,jj-1) + vtau(ji,jj)
Index: /NEMO/trunk/src/OCE/SBC/sbcblk.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbcblk.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbcblk.F90	(revision 13295)
@@ -568,5 +568,5 @@
       zwnd_j(:,:) = 0._wp
       CALL wnd_cyc( kt, zwnd_i, zwnd_j )    ! add analytical tropical cyclone (Vincent et al. JGR 2012)
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zwnd_i(ji,jj) = pwndi(ji,jj) + zwnd_i(ji,jj)
          zwnd_j(ji,jj) = pwndj(ji,jj) + zwnd_j(ji,jj)
@@ -576,5 +576,5 @@
 #else
       ! ... scalar wind module at T-point (not masked)
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          wndm(ji,jj) = SQRT(  pwndi(ji,jj) * pwndi(ji,jj) + pwndj(ji,jj) * pwndj(ji,jj)  )
       END_2D
@@ -628,5 +628,5 @@
          !     use scalar version of gamma_moist() ...
          IF( ln_tpot ) THEN
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                ztpot(ji,jj) = ptair(ji,jj) + gamma_moist( ptair(ji,jj), zqair(ji,jj) ) * rn_zqt
             END_2D
@@ -690,5 +690,5 @@
 
       IF( ln_abl ) THEN         !==  ABL formulation  ==!   multiplication by rho_air and turbulent fluxes computation done in ablstp
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             zztmp = zU_zu(ji,jj)
             wndm(ji,jj)   = zztmp                   ! Store zU_zu in wndm to compute ustar2 in ablmod
@@ -710,5 +710,5 @@
          pevp(:,:) = pevp(:,:) * tmask(:,:,1)
 
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF( wndm(ji,jj) > 0._wp ) THEN
                zztmp = taum(ji,jj) / wndm(ji,jj)
@@ -728,5 +728,5 @@
          IF( ln_crt_fbk ) THEN   ! aply eq. 10 and 11 of Renault et al. 2020 (doi: 10.1029/2019MS001715)
             zstmax = MIN( rn_stau_a * 3._wp + rn_stau_b, 0._wp )   ! set the max value of Stau corresponding to a wind of 3 m/s (<0)
-            DO_2D_01_01   ! end at jpj and jpi, as ztau_j(ji,jj+1) ztau_i(ji+1,jj) used in the next loop
+            DO_2D( 0, 1, 0, 1 )   ! end at jpj and jpi, as ztau_j(ji,jj+1) ztau_i(ji+1,jj) used in the next loop
                zstau = MIN( rn_stau_a * wndm(ji,jj) + rn_stau_b, zstmax )   ! stau (<0) must be smaller than zstmax
                ztau_i(ji,jj) = ztau_i(ji,jj) + zstau * ( 0.5_wp * ( pu(ji-1,jj  ) + pu(ji,jj) ) - puatm(ji,jj) )
@@ -739,5 +739,5 @@
          !     Note the use of 0.5*(2-umask) in order to unmask the stress along coastlines
          !     Note that coastal wind stress is not used in the code... so this extra care has no effect
-         DO_2D_00_00              ! start loop at 2, in case ln_crt_fbk = T
+         DO_2D( 0, 0, 0, 0 )              ! start loop at 2, in case ln_crt_fbk = T
             utau(ji,jj) = 0.5 * ( 2. - umask(ji,jj,1) ) * ( ztau_i(ji,jj) + ztau_i(ji+1,jj  ) ) &
                &              * MAX(tmask(ji,jj,1),tmask(ji+1,jj,1))
@@ -828,5 +828,5 @@
 
       ! use scalar version of L_vap() for AGRIF compatibility
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zqla(ji,jj) = - L_vap( ztskk(ji,jj) ) * pevp(ji,jj)    ! Latent Heat flux !!GS: possibility to add a global qla to avoid recomputation after abl update
       END_2D
@@ -933,5 +933,5 @@
       ! ------------------------------------------------------------ !
       ! C-grid ice dynamics :   U & V-points (same as ocean)
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          wndm_ice(ji,jj) = SQRT( pwndi(ji,jj) * pwndi(ji,jj) + pwndj(ji,jj) * pwndj(ji,jj) )
       END_2D
@@ -959,10 +959,10 @@
          ! ---------------------------------------------------- !
          ! supress moving ice in wind stress computation as we don't know how to do it properly...
-         DO_2D_01_01    ! at T point 
+         DO_2D( 0, 1, 0, 1 )    ! at T point 
             putaui(ji,jj) = rhoa(ji,jj) * zcd_dui(ji,jj) * pwndi(ji,jj)
             pvtaui(ji,jj) = rhoa(ji,jj) * zcd_dui(ji,jj) * pwndj(ji,jj)
          END_2D
          !
-         DO_2D_00_00    ! U & V-points (same as ocean).
+         DO_2D( 0, 0, 0, 0 )    ! U & V-points (same as ocean).
             ! take care of the land-sea mask to avoid "pollution" of coastal stress. p[uv]taui used in frazil and  rheology 
             zztmp1 = 0.5_wp * ( 2. - umask(ji,jj,1) ) * MAX( tmask(ji,jj,1),tmask(ji+1,jj  ,1) )
@@ -978,5 +978,5 @@
          zztmp1 = 11637800.0_wp
          zztmp2 =    -5897.8_wp
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             pcd_dui(ji,jj) = zcd_dui (ji,jj)
             pseni  (ji,jj) = wndm_ice(ji,jj) * Ch_ice(ji,jj)
@@ -1233,5 +1233,5 @@
          !
          DO jl = 1, jpl
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                zhe = ( rn_cnd_s * phi(ji,jj,jl) + rcnd_i * phs(ji,jj,jl) ) * zfac                            ! Effective thickness
                IF( zhe >=  zfac2 )   zgfac(ji,jj,jl) = MIN( 2._wp, 0.5_wp * ( 1._wp + LOG( zhe * zfac3 ) ) ) ! Enhanced conduction factor
@@ -1248,5 +1248,5 @@
       !
       DO jl = 1, jpl
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             !
             zkeff_h = zfac * zgfac(ji,jj,jl) / &                                    ! Effective conductivity of the snow-ice system divided by thickness
@@ -1396,5 +1396,5 @@
       zqi_sat(:,:) =                  q_sat( ptm_su(:,:), pslp(:,:) )   ! saturation humidity over ice   [kg/kg]
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          ! Virtual potential temperature [K]
          zthetav_os = zst(ji,jj)    * ( 1._wp + rctv0 * zqo_sat(ji,jj) )   ! over ocean
Index: /NEMO/trunk/src/OCE/SBC/sbcblk_algo_coare3p0.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbcblk_algo_coare3p0.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbcblk_algo_coare3p0.F90	(revision 13295)
@@ -394,5 +394,5 @@
       !!-------------------------------------------------------------------
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
       !
       zw = pwnd(ji,jj)   ! wind speed
@@ -430,5 +430,5 @@
       !!----------------------------------------------------------------------------------
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
       !
       zta = pzeta(ji,jj)
@@ -481,5 +481,5 @@
       REAL(wp) :: zta, zphi_h, zphi_c, zpsi_k, zpsi_c, zf, zc, zstab
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
       !
       zta = pzeta(ji,jj)
Index: /NEMO/trunk/src/OCE/SBC/sbcblk_algo_coare3p6.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbcblk_algo_coare3p6.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbcblk_algo_coare3p6.F90	(revision 13295)
@@ -430,5 +430,5 @@
       !!----------------------------------------------------------------------------------
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
       !
       zta = pzeta(ji,jj)
@@ -481,5 +481,5 @@
       REAL(wp) :: zta, zphi_h, zphi_c, zpsi_k, zpsi_c, zf, zc, zstab
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
       !
       zta = pzeta(ji,jj)
Index: /NEMO/trunk/src/OCE/SBC/sbcblk_algo_ecmwf.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbcblk_algo_ecmwf.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbcblk_algo_ecmwf.F90	(revision 13295)
@@ -410,5 +410,5 @@
       REAL(wp) :: zzeta, zx, ztmp, psi_unst, psi_stab, stab
       !!----------------------------------------------------------------------------------
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
       !
       zzeta = MIN( pzeta(ji,jj) , 5._wp ) !! Very stable conditions (L positif and big!):
@@ -455,5 +455,5 @@
       !!----------------------------------------------------------------------------------
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
       !
       zzeta = MIN(pzeta(ji,jj) , 5._wp)   ! Very stable conditions (L positif and big!):
Index: /NEMO/trunk/src/OCE/SBC/sbcblk_algo_ncar.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbcblk_algo_ncar.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbcblk_algo_ncar.F90	(revision 13295)
@@ -241,5 +241,5 @@
       !!----------------------------------------------------------------------------------
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !
          zw  = pw10(ji,jj)
@@ -277,5 +277,5 @@
       REAL(wp) :: zx2, zx, zstab   ! local scalars
       !!----------------------------------------------------------------------------------
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zx2 = SQRT( ABS( 1._wp - 16._wp*pzeta(ji,jj) ) )
          zx2 = MAX( zx2 , 1._wp )
@@ -308,5 +308,5 @@
       !!----------------------------------------------------------------------------------
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zx2 = SQRT( ABS( 1._wp - 16._wp*pzeta(ji,jj) ) )
          zx2 = MAX( zx2 , 1._wp )
Index: /NEMO/trunk/src/OCE/SBC/sbcblk_phy.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbcblk_phy.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbcblk_phy.F90	(revision 13295)
@@ -181,5 +181,5 @@
       !!----------------------------------------------------------------------------------
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ztc  = ptak(ji,jj) - rt0   ! air temp, in deg. C
          ztc2 = ztc*ztc
@@ -270,5 +270,5 @@
       INTEGER  ::   ji, jj         ! dummy loop indices
       !!----------------------------------------------------------------------------------
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          gamma_moist_vctr(ji,jj) = gamma_moist_sclr( ptak(ji,jj), pqa(ji,jj) )
       END_2D
@@ -315,5 +315,5 @@
       !!-------------------------------------------------------------------
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !
          zqa = (1._wp + rctv0*pqa(ji,jj))
@@ -351,5 +351,5 @@
       !!-------------------------------------------------------------------
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !
          zqa = 0.5_wp*(pqa(ji,jj)+pssq(ji,jj))                                        ! ~ mean q within the layer...
@@ -448,5 +448,5 @@
       !!----------------------------------------------------------------------------------
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !
          ze_sat =  e_sat_sclr( ptak(ji,jj) )
@@ -473,5 +473,5 @@
       !!----------------------------------------------------------------------------------
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ze = prha(ji,jj)*e_sat_sclr(ptak(ji,jj))
          q_air_rh(ji,jj) = ze*reps0/(pslp(ji,jj) - (1. - reps0)*ze)
@@ -511,5 +511,5 @@
       INTEGER  ::   ji, jj     ! dummy loop indices
       !!----------------------------------------------------------------------------------
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
 
          zdt = pTa(ji,jj) - pTs(ji,jj) ;  zdt = SIGN( MAX(ABS(zdt),1.E-6_wp), zdt )
@@ -621,5 +621,5 @@
       IF( PRESENT(pfact_evap) ) zfact_evap = pfact_evap
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
 
          CALL BULK_FORMULA_SCLR( pzu, pTs(ji,jj), pqs(ji,jj), pTa(ji,jj), pqa(ji,jj), &
Index: /NEMO/trunk/src/OCE/SBC/sbcblk_skin_coare.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbcblk_skin_coare.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbcblk_skin_coare.F90	(revision 13295)
@@ -89,5 +89,5 @@
       REAL(wp) :: zQabs, zdlt, zfr, zalfa, zqlat, zus
       !!---------------------------------------------------------------------
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
 
          zQabs = pQnsol(ji,jj) ! first guess of heat flux absorbed within the viscous sublayer of thicknes delta,
@@ -156,5 +156,5 @@
       ztime = REAL(nsec_day,wp)/(24._wp*3600._wp) ! time of current time step since 00:00 for current day (UTC) -> ztime = 0 -> 00:00 / ztime = 0.5 -> 12:00 ...
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
 
          l_exit       = .FALSE.
Index: /NEMO/trunk/src/OCE/SBC/sbcblk_skin_ecmwf.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbcblk_skin_ecmwf.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbcblk_skin_ecmwf.F90	(revision 13295)
@@ -95,5 +95,5 @@
       REAL(wp) :: zQabs, zdlt, zfr, zalfa, zus
       !!---------------------------------------------------------------------
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
 
          zQabs = pQnsol(ji,jj) ! first guess of heat flux absorbed within the viscous sublayer of thicknes delta,
@@ -173,5 +173,5 @@
       IF( PRESENT(pustk) ) l_pustk_known = .TRUE.
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
 
          zHwl = Hz_wl(ji,jj) ! first guess for warm-layer depth (and unique..., less advanced than COARE3p6 !)
Index: /NEMO/trunk/src/OCE/SBC/sbccpl.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbccpl.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbccpl.F90	(revision 13295)
@@ -1170,5 +1170,5 @@
             !                              
             IF( srcv(jpr_otx1)%clgrid == 'T' ) THEN
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   frcv(jpr_otx1)%z3(ji,jj,1) = 0.5 * ( frcv(jpr_otx1)%z3(ji+1,jj  ,1) + frcv(jpr_otx1)%z3(ji,jj,1) )
                   frcv(jpr_oty1)%z3(ji,jj,1) = 0.5 * ( frcv(jpr_oty1)%z3(ji  ,jj+1,1) + frcv(jpr_oty1)%z3(ji,jj,1) )
@@ -1194,5 +1194,5 @@
          ! => need to be done only when otx1 was changed
          IF( llnewtx ) THEN
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zzx = frcv(jpr_otx1)%z3(ji-1,jj  ,1) + frcv(jpr_otx1)%z3(ji,jj,1)
                zzy = frcv(jpr_oty1)%z3(ji  ,jj-1,1) + frcv(jpr_oty1)%z3(ji,jj,1)
@@ -1219,5 +1219,5 @@
          IF( llnewtau ) THEN 
             zcoef = 1. / ( zrhoa * zcdrag ) 
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                frcv(jpr_w10m)%z3(ji,jj,1) = SQRT( frcv(jpr_taum)%z3(ji,jj,1) * zcoef )
             END_2D
@@ -1549,5 +1549,5 @@
             p_tauj(:,:) = frcv(jpr_ity1)%z3(:,:,1)
          CASE( 'T' )
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                ! take care of the land-sea mask to avoid "pollution" of coastal stress. p[uv]taui used in frazil and  rheology 
                zztmp1 = 0.5_wp * ( 2. - umask(ji,jj,1) ) * MAX( tmask(ji,jj,1),tmask(ji+1,jj  ,1) )
@@ -2365,10 +2365,10 @@
             SELECT CASE( TRIM( sn_snd_crt%cldes ) )
             CASE( 'oce only'             )      ! C-grid ==> T
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   zotx1(ji,jj) = 0.5 * ( uu(ji,jj,1,Kmm) + uu(ji-1,jj  ,1,Kmm) )
                   zoty1(ji,jj) = 0.5 * ( vv(ji,jj,1,Kmm) + vv(ji  ,jj-1,1,Kmm) ) 
                END_2D
             CASE( 'weighted oce and ice' )      ! Ocean and Ice on C-grid ==> T  
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   zotx1(ji,jj) = 0.5 * ( uu   (ji,jj,1,Kmm) + uu   (ji-1,jj  ,1,Kmm) ) * zfr_l(ji,jj)  
                   zoty1(ji,jj) = 0.5 * ( vv   (ji,jj,1,Kmm) + vv   (ji  ,jj-1,1,Kmm) ) * zfr_l(ji,jj)
@@ -2378,5 +2378,5 @@
                CALL lbc_lnk_multi( 'sbccpl', zitx1, 'T', -1.0_wp, zity1, 'T', -1.0_wp )
             CASE( 'mixed oce-ice'        )      ! Ocean and Ice on C-grid ==> T
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   zotx1(ji,jj) = 0.5 * ( uu   (ji,jj,1,Kmm) + uu   (ji-1,jj  ,1,Kmm) ) * zfr_l(ji,jj)   &
                      &         + 0.5 * ( u_ice(ji,jj  )     + u_ice(ji-1,jj    )     ) *  fr_i(ji,jj)
@@ -2442,10 +2442,10 @@
           SELECT CASE( TRIM( sn_snd_crtw%cldes ) ) 
           CASE( 'oce only'             )      ! C-grid ==> T 
-             DO_2D_00_00
+             DO_2D( 0, 0, 0, 0 )
                 zotx1(ji,jj) = 0.5 * ( uu(ji,jj,1,Kmm) + uu(ji-1,jj  ,1,Kmm) ) 
                 zoty1(ji,jj) = 0.5 * ( vv(ji,jj,1,Kmm) + vv(ji , jj-1,1,Kmm) )  
              END_2D
           CASE( 'weighted oce and ice' )      ! Ocean and Ice on C-grid ==> T   
-             DO_2D_00_00
+             DO_2D( 0, 0, 0, 0 )
                 zotx1(ji,jj) = 0.5 * ( uu   (ji,jj,1,Kmm) + uu   (ji-1,jj  ,1,Kmm) ) * zfr_l(ji,jj)   
                 zoty1(ji,jj) = 0.5 * ( vv   (ji,jj,1,Kmm) + vv   (ji  ,jj-1,1,Kmm) ) * zfr_l(ji,jj) 
@@ -2455,5 +2455,5 @@
              CALL lbc_lnk_multi( 'sbccpl', zitx1, 'T', -1.0_wp,  zity1, 'T', -1.0_wp ) 
           CASE( 'mixed oce-ice'        )      ! Ocean and Ice on C-grid ==> T  
-             DO_2D_00_00
+             DO_2D( 0, 0, 0, 0 )
                 zotx1(ji,jj) = 0.5 * ( uu   (ji,jj,1,Kmm) + uu   (ji-1,jj  ,1,Kmm) ) * zfr_l(ji,jj)   & 
                    &         + 0.5 * ( u_ice(ji,jj  ) + u_ice(ji-1,jj    ) ) *  fr_i(ji,jj) 
Index: /NEMO/trunk/src/OCE/SBC/sbcdcy.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbcdcy.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbcdcy.F90	(revision 13295)
@@ -110,5 +110,5 @@
 
       imask_night(:,:) = 0
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ztmpm = 0._wp
          IF( ABS(rab(ji,jj)) < 1. ) THEN         ! day duration is less than 24h
@@ -193,5 +193,5 @@
 
          zsin = SIN( zdecrad )   ;   zcos = COS( zdecrad )
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ztmp = rad * gphit(ji,jj)
             raa(ji,jj) = SIN( ztmp ) * zsin
@@ -202,5 +202,5 @@
          ! rab to test if the day time is equal to 0, less than 24h of full day
          rab(:,:) = -raa(:,:) / rbb(:,:)
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF( ABS(rab(ji,jj)) < 1._wp ) THEN         ! day duration is less than 24h
                ! When is it night?
@@ -226,5 +226,5 @@
          !         Avoid possible infinite scaling factor, associated with very short daylight
          !         periods, by ignoring periods less than 1/1000th of a day (ticket #1040)
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF( ABS(rab(ji,jj)) < 1._wp ) THEN         ! day duration is less than 24h
                rscal(ji,jj) = 0.0_wp
Index: /NEMO/trunk/src/OCE/SBC/sbcflx.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbcflx.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbcflx.F90	(revision 13295)
@@ -129,5 +129,5 @@
          ELSE                  ;   qsr(:,:) =          sf(jp_qsr)%fnow(:,:,1)
          ENDIF
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             utau(ji,jj) = sf(jp_utau)%fnow(ji,jj,1)
             vtau(ji,jj) = sf(jp_vtau)%fnow(ji,jj,1)
@@ -143,5 +143,5 @@
          !                                                        ! module of wind stress and wind speed at T-point
          zcoef = 1. / ( zrhoa * zcdrag )
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ztx = utau(ji-1,jj  ) + utau(ji,jj) 
             zty = vtau(ji  ,jj-1) + vtau(ji,jj) 
Index: /NEMO/trunk/src/OCE/SBC/sbcice_cice.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbcice_cice.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbcice_cice.F90	(revision 13295)
@@ -217,5 +217,5 @@
 ! T point to U point
 ! T point to V point
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          fr_iu(ji,jj)=0.5*(fr_i(ji,jj)+fr_i(ji+1,jj))*umask(ji,jj,1)
          fr_iv(ji,jj)=0.5*(fr_i(ji,jj)+fr_i(ji,jj+1))*vmask(ji,jj,1)
@@ -312,5 +312,5 @@
 ! x comp of wind stress (CI_1)
 ! U point to F point
-         DO_2D_10_11
+         DO_2D( 1, 0, 1, 1 )
             ztmp(ji,jj) = 0.5 * (  fr_iu(ji,jj) * utau(ji,jj)      &
                                  + fr_iu(ji,jj+1) * utau(ji,jj+1) ) * fmask(ji,jj,1)
@@ -320,5 +320,5 @@
 ! y comp of wind stress (CI_2)
 ! V point to F point
-         DO_2D_11_10
+         DO_2D( 1, 1, 1, 0 )
             ztmp(ji,jj) = 0.5 * (  fr_iv(ji,jj) * vtau(ji,jj)      &
                                  + fr_iv(ji+1,jj) * vtau(ji+1,jj) ) * fmask(ji,jj,1)
@@ -335,5 +335,5 @@
             qla_ice(:,:,1)= - ( emp_ice(:,:)+sprecip(:,:) ) * rLsub
 ! End of temporary code
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                IF(fr_i(ji,jj).eq.0.0) THEN
                   DO jl=1,ncat
@@ -437,5 +437,5 @@
 ! x comp and y comp of surface ocean current
 ! U point to F point
-      DO_2D_10_11
+      DO_2D( 1, 0, 1, 1 )
          ztmp(ji,jj)=0.5*(ssu_m(ji,jj)+ssu_m(ji,jj+1))*fmask(ji,jj,1)
       END_2D
@@ -443,5 +443,5 @@
 
 ! V point to F point
-      DO_2D_11_10
+      DO_2D( 1, 1, 1, 0 )
          ztmp(ji,jj)=0.5*(ssv_m(ji,jj)+ssv_m(ji+1,jj))*fmask(ji,jj,1)
       END_2D
@@ -467,5 +467,5 @@
 ! x comp and y comp of sea surface slope (on F points)
 ! T point to F point
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          ztmp(ji,jj)=0.5 * (  (zpice(ji+1,jj  )-zpice(ji,jj  )) * r1_e1u(ji,jj  )    &
             &               + (zpice(ji+1,jj+1)-zpice(ji,jj+1)) * r1_e1u(ji,jj+1)  ) * fmask(ji,jj,1)
@@ -474,5 +474,5 @@
 
 ! T point to F point
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          ztmp(ji,jj)=0.5 * (  (zpice(ji  ,jj+1)-zpice(ji  ,jj)) * r1_e2v(ji  ,jj)    &
             &               + (zpice(ji+1,jj+1)-zpice(ji+1,jj)) * r1_e2v(ji+1,jj)  ) *  fmask(ji,jj,1)
@@ -503,5 +503,5 @@
       ss_iou(:,:)=0.0
 ! F point to U point
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          ss_iou(ji,jj) = 0.5 * ( ztmp1(ji,jj-1) + ztmp1(ji,jj) ) * umask(ji,jj,1)
       END_2D
@@ -513,5 +513,5 @@
 ! F point to V point
 
-      DO_2D_10_00
+      DO_2D( 1, 0, 0, 0 )
          ss_iov(ji,jj) = 0.5 * ( ztmp1(ji-1,jj) + ztmp1(ji,jj) ) * vmask(ji,jj,1)
       END_2D
@@ -597,5 +597,5 @@
       CALL lbc_lnk( 'sbcice_cice', qsr , 'T', 1.0_wp )
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          nfrzmlt(ji,jj)=MAX(nfrzmlt(ji,jj),0.0)
       END_2D
@@ -621,5 +621,5 @@
 ! T point to U point
 ! T point to V point
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          fr_iu(ji,jj)=0.5*(fr_i(ji,jj)+fr_i(ji+1,jj))*umask(ji,jj,1)
          fr_iv(ji,jj)=0.5*(fr_i(ji,jj)+fr_i(ji,jj+1))*vmask(ji,jj,1)
@@ -981,5 +981,5 @@
 
       pn(:,:)=0.0
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          pn(ji,jj)=pc(ji+1-ji_off,jj+1-jj_off,1)
       END_2D
Index: /NEMO/trunk/src/OCE/SBC/sbcice_if.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbcice_if.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbcice_if.F90	(revision 13295)
@@ -109,5 +109,5 @@
 
          ! Flux and ice fraction computation
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             !
             zt_fzp  = fr_i(ji,jj)                        ! freezing point temperature
Index: /NEMO/trunk/src/OCE/SBC/sbcrnf.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbcrnf.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbcrnf.F90	(revision 13295)
@@ -209,5 +209,5 @@
       IF( ln_rnf_depth .OR. ln_rnf_depth_ini ) THEN      !==   runoff distributed over several levels   ==!
          IF( ln_linssh ) THEN    !* constant volume case : just apply the runoff input flow
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                DO jk = 1, nk_rnf(ji,jj)
                   phdivn(ji,jj,jk) = phdivn(ji,jj,jk) - ( rnf(ji,jj) + rnf_b(ji,jj) ) * zfact * r1_rho0 / h_rnf(ji,jj)
@@ -215,5 +215,5 @@
             END_2D
          ELSE                    !* variable volume case
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                h_rnf(ji,jj) = 0._wp
                DO jk = 1, nk_rnf(ji,jj)                           ! recalculates h_rnf to be the depth in metres
@@ -361,5 +361,5 @@
          !
          nk_rnf(:,:) = 0                               ! set the number of level over which river runoffs are applied
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF( h_rnf(ji,jj) > 0._wp ) THEN
                jk = 2
@@ -374,5 +374,5 @@
             ENDIF
          END_2D
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             h_rnf(ji,jj) = 0._wp
             DO jk = 1, nk_rnf(ji,jj)
@@ -404,5 +404,5 @@
          WHERE( zrnfcl(:,:,1) > 0._wp )  h_rnf(:,:) = zacoef * zrnfcl(:,:,1)   ! compute depth for all runoffs
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF( zrnfcl(ji,jj,1) > 0._wp ) THEN
                jk = mbkt(ji,jj)
@@ -412,5 +412,5 @@
          !
          nk_rnf(:,:) = 0                       ! number of levels on which runoffs are distributed
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF( zrnfcl(ji,jj,1) > 0._wp ) THEN
                jk = 2
@@ -423,5 +423,5 @@
          END_2D
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             h_rnf(ji,jj) = 0._wp
             DO jk = 1, nk_rnf(ji,jj)
Index: /NEMO/trunk/src/OCE/SBC/sbcssr.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbcssr.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbcssr.F90	(revision 13295)
@@ -95,5 +95,5 @@
             !
             IF( nn_sstr == 1 ) THEN                                   !* Temperature restoring term
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   zqrp = rn_dqdt * ( sst_m(ji,jj) - sf_sst(1)%fnow(ji,jj,1) ) * tmask(ji,jj,1)
                   qns(ji,jj) = qns(ji,jj) + zqrp
@@ -105,5 +105,5 @@
               ! use fraction of ice ( fr_i ) to adjust relaxation under ice if nn_sssr_ice .ne. 1
               ! n.b. coefice is initialised and fixed to 1._wp if nn_sssr_ice = 1
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   SELECT CASE ( nn_sssr_ice )
                     CASE ( 0 )    ;  coefice(ji,jj) = 1._wp - fr_i(ji,jj)              ! no/reduced damping under ice
@@ -115,5 +115,5 @@
             IF( nn_sssr == 1 ) THEN                                   !* Salinity damping term (salt flux only (sfx))
                zsrp = rn_deds / rday                                  ! from [mm/day] to [kg/m2/s]
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   zerp = zsrp * ( 1. - 2.*rnfmsk(ji,jj) )   &      ! No damping in vicinity of river mouths
                      &        *   coefice(ji,jj)            &      ! Optional control of damping under sea-ice
@@ -126,5 +126,5 @@
                zsrp = rn_deds / rday                                  ! from [mm/day] to [kg/m2/s]
                zerp_bnd = rn_sssr_bnd / rday                          !       -              -    
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   zerp = zsrp * ( 1. - 2.*rnfmsk(ji,jj) )   &      ! No damping in vicinity of river mouths
                      &        *   coefice(ji,jj)            &      ! Optional control of damping under sea-ice
Index: /NEMO/trunk/src/OCE/SBC/sbcwave.F90
===================================================================
--- /NEMO/trunk/src/OCE/SBC/sbcwave.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/SBC/sbcwave.F90	(revision 13295)
@@ -113,5 +113,5 @@
       IF( ll_st_bv_li ) THEN   ! (Eq. (19) in Breivik et al. (2014) )
          zfac = 2.0_wp * rpi / 16.0_wp
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ! Stokes drift velocity estimated from Hs and Tmean
             ztransp = zfac * hsw(ji,jj)*hsw(ji,jj) / MAX( wmp(ji,jj), 0.0000001_wp )
@@ -121,5 +121,5 @@
             zk_t(ji,jj) = ABS( tsd2d(ji,jj) ) / MAX( ABS( 5.97_wp*ztransp ), 0.0000001_wp )
          END_2D
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zk_u(ji,jj) = 0.5_wp * ( zk_t(ji,jj) + zk_t(ji+1,jj) )
             zk_v(ji,jj) = 0.5_wp * ( zk_t(ji,jj) + zk_t(ji,jj+1) )
@@ -129,8 +129,8 @@
          END_2D
       ELSE IF( ll_st_peakfr ) THEN    ! peak wave number calculated from the peak frequency received by the wave model
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             zk_t(ji,jj) = ( 2.0_wp * rpi * wfreq(ji,jj) ) * ( 2.0_wp * rpi * wfreq(ji,jj) ) / grav
          END_2D
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zk_u(ji,jj) = 0.5_wp * ( zk_t(ji,jj) + zk_t(ji+1,jj) )
             zk_v(ji,jj) = 0.5_wp * ( zk_t(ji,jj) + zk_t(ji,jj+1) )
@@ -143,5 +143,5 @@
       !                       !==  horizontal Stokes Drift 3D velocity  ==!
       IF( ll_st_bv2014 ) THEN
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zdep_u = 0.5_wp * ( gdept(ji,jj,jk,Kmm) + gdept(ji+1,jj,jk,Kmm) )
             zdep_v = 0.5_wp * ( gdept(ji,jj,jk,Kmm) + gdept(ji,jj+1,jk,Kmm) )
@@ -158,5 +158,5 @@
       ELSE IF( ll_st_li2017 .OR. ll_st_peakfr ) THEN
          ALLOCATE( zstokes_psi_u_top(jpi,jpj), zstokes_psi_v_top(jpi,jpj) )
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zstokes_psi_u_top(ji,jj) = 0._wp
             zstokes_psi_v_top(ji,jj) = 0._wp
@@ -164,5 +164,5 @@
          zsqrtpi = SQRT(rpi)
          z_two_thirds = 2.0_wp / 3.0_wp
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zbot_u = ( gdepw(ji,jj,jk+1,Kmm) + gdepw(ji+1,jj,jk+1,Kmm) )  ! 2 * bottom depth
             zbot_v = ( gdepw(ji,jj,jk+1,Kmm) + gdepw(ji,jj+1,jk+1,Kmm) )  ! 2 * bottom depth
@@ -204,5 +204,5 @@
       !                       !==  vertical Stokes Drift 3D velocity  ==!
       !
-      DO_3D_01_01( 1, jpkm1 )
+      DO_3D( 0, 1, 0, 1, 1, jpkm1 )
          ze3divh(ji,jj,jk) = (  e2u(ji  ,jj) * e3u(ji  ,jj,jk,Kmm) * usd(ji  ,jj,jk)    &
             &                 - e2u(ji-1,jj) * e3u(ji-1,jj,jk,Kmm) * usd(ji-1,jj,jk)    &
@@ -263,5 +263,5 @@
       !
       IF( ln_tauw ) THEN
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             ! Stress components at u- & v-points
             utau(ji,jj) = 0.5_wp * ( tauw_x(ji,jj) + tauw_x(ji+1,jj) )
Index: /NEMO/trunk/src/OCE/STO/stopar.F90
===================================================================
--- /NEMO/trunk/src/OCE/STO/stopar.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/STO/stopar.F90	(revision 13295)
@@ -837,5 +837,5 @@
       REAL(wp) :: gran   ! Gaussian random number (forced KIND=8 as in kiss_gaussian)
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          CALL kiss_gaussian( gran )
          psto(ji,jj) = gran
@@ -855,5 +855,5 @@
       INTEGER  :: ji, jj
 
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          psto(ji,jj) = 0.5_wp * psto(ji,jj) + 0.125_wp * &
                            &  ( psto(ji-1,jj) + psto(ji+1,jj) +  &
Index: /NEMO/trunk/src/OCE/STO/stopts.F90
===================================================================
--- /NEMO/trunk/src/OCE/STO/stopts.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/STO/stopts.F90	(revision 13295)
@@ -95,5 +95,5 @@
       ! Eliminate any possible negative salinity
       DO jdof = 1, nn_sto_eos
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             pts_ran(ji,jj,jk,jp_sal,jdof) = MIN( ABS(pts_ran(ji,jj,jk,jp_sal,jdof)) ,  &
                                           &      MAX(pts(ji,jj,jk,jp_sal),0._wp) )     &
Index: /NEMO/trunk/src/OCE/TRA/eosbn2.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/eosbn2.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/eosbn2.F90	(revision 13295)
@@ -238,5 +238,5 @@
       CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             !
             zh  = pdep(ji,jj,jk) * r1_Z0                                  ! depth
@@ -274,5 +274,5 @@
       CASE( np_seos )                !==  simplified EOS  ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             zt  = pts  (ji,jj,jk,jp_tem) - 10._wp
             zs  = pts  (ji,jj,jk,jp_sal) - 35._wp
@@ -338,5 +338,5 @@
             END DO
             !
-            DO_3D_11_11( 1, jpkm1 )
+            DO_3D( 1, 1, 1, 1, 1, jpkm1 )
                !
                ! compute density (2*nn_sto_eos) times:
@@ -388,5 +388,5 @@
          ! Non-stochastic equation of state
          ELSE
-            DO_3D_11_11( 1, jpkm1 )
+            DO_3D( 1, 1, 1, 1, 1, jpkm1 )
                !
                zh  = pdep(ji,jj,jk) * r1_Z0                                  ! depth
@@ -426,5 +426,5 @@
       CASE( np_seos )                !==  simplified EOS  ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             zt  = pts  (ji,jj,jk,jp_tem) - 10._wp
             zs  = pts  (ji,jj,jk,jp_sal) - 35._wp
@@ -480,5 +480,5 @@
       CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==!
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             !
             zh  = pdep(ji,jj) * r1_Z0                                  ! depth
@@ -515,5 +515,5 @@
       CASE( np_seos )                !==  simplified EOS  ==!
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             !
             zt    = pts  (ji,jj,jp_tem)  - 10._wp
@@ -563,5 +563,5 @@
       CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             !
             zh  = gdept(ji,jj,jk,Kmm) * r1_Z0                                ! depth
@@ -616,5 +616,5 @@
       CASE( np_seos )                  !==  simplified EOS  ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             zt  = pts (ji,jj,jk,jp_tem) - 10._wp   ! pot. temperature anomaly (t-T0)
             zs  = pts (ji,jj,jk,jp_sal) - 35._wp   ! abs. salinity anomaly (s-S0)
@@ -670,5 +670,5 @@
       CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==!
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             !
             zh  = pdep(ji,jj) * r1_Z0                                  ! depth
@@ -723,5 +723,5 @@
       CASE( np_seos )                  !==  simplified EOS  ==!
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             !
             zt    = pts  (ji,jj,jp_tem) - 10._wp   ! pot. temperature anomaly (t-T0)
@@ -873,5 +873,5 @@
       IF( ln_timing )   CALL timing_start('bn2')
       !
-      DO_3D_11_11( 2, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 2, jpkm1 )
          zrw =   ( gdepw(ji,jj,jk  ,Kmm) - gdept(ji,jj,jk,Kmm) )   &
             &  / ( gdept(ji,jj,jk-1,Kmm) - gdept(ji,jj,jk,Kmm) ) 
@@ -921,5 +921,5 @@
       z1_T0   = 1._wp/40._wp
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !
          zt  = ctmp   (ji,jj) * z1_T0
@@ -974,5 +974,5 @@
          !
          z1_S0 = 1._wp / 35.16504_wp
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             zs= SQRT( ABS( psal(ji,jj) ) * z1_S0 )           ! square root salinity
             ptf(ji,jj) = ((((1.46873e-03_wp*zs-9.64972e-03_wp)*zs+2.28348e-02_wp)*zs &
@@ -1081,5 +1081,5 @@
       CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             !
             zh  = gdept(ji,jj,jk,Kmm) * r1_Z0                                ! depth
@@ -1140,5 +1140,5 @@
       CASE( np_seos )                !==  Vallis (2006) simplified EOS  ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             zt  = pts(ji,jj,jk,jp_tem) - 10._wp  ! temperature anomaly (t-T0)
             zs = pts (ji,jj,jk,jp_sal) - 35._wp  ! abs. salinity anomaly (s-S0)
Index: /NEMO/trunk/src/OCE/TRA/traadv_cen.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/traadv_cen.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/traadv_cen.F90	(revision 13295)
@@ -104,5 +104,5 @@
          !
          CASE(  2  )                         !* 2nd order centered
-            DO_3D_10_10( 1, jpkm1 )
+            DO_3D( 1, 0, 1, 0, 1, jpkm1 )
                zwx(ji,jj,jk) = 0.5_wp * pU(ji,jj,jk) * ( pt(ji,jj,jk,jn,Kmm) + pt(ji+1,jj  ,jk,jn,Kmm) )
                zwy(ji,jj,jk) = 0.5_wp * pV(ji,jj,jk) * ( pt(ji,jj,jk,jn,Kmm) + pt(ji  ,jj+1,jk,jn,Kmm) )
@@ -112,5 +112,5 @@
             ztu(:,:,jpk) = 0._wp                   ! Bottom value : flux set to zero
             ztv(:,:,jpk) = 0._wp
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                ztu(ji,jj,jk) = ( pt(ji+1,jj  ,jk,jn,Kmm) - pt(ji,jj,jk,jn,Kmm) ) * umask(ji,jj,jk)
                ztv(ji,jj,jk) = ( pt(ji  ,jj+1,jk,jn,Kmm) - pt(ji,jj,jk,jn,Kmm) ) * vmask(ji,jj,jk)
@@ -118,5 +118,5 @@
             CALL lbc_lnk_multi( 'traadv_cen', ztu, 'U', -1.0_wp , ztv, 'V', -1.0_wp )   ! Lateral boundary cond.
             !
-            DO_3D_00_10( 1, jpkm1 )
+            DO_3D( 0, 0, 1, 0, 1, jpkm1 )
                zC2t_u = pt(ji,jj,jk,jn,Kmm) + pt(ji+1,jj  ,jk,jn,Kmm)   ! C2 interpolation of T at u- & v-points (x2)
                zC2t_v = pt(ji,jj,jk,jn,Kmm) + pt(ji  ,jj+1,jk,jn,Kmm)
@@ -136,5 +136,5 @@
          !
          CASE(  2  )                         !* 2nd order centered
-            DO_3D_00_00( 2, jpk )
+            DO_3D( 0, 0, 0, 0, 2, jpk )
                zwz(ji,jj,jk) = 0.5 * pW(ji,jj,jk) * ( pt(ji,jj,jk,jn,Kmm) + pt(ji,jj,jk-1,jn,Kmm) ) * wmask(ji,jj,jk)
             END_3D
@@ -142,5 +142,5 @@
          CASE(  4  )                         !* 4th order compact
             CALL interp_4th_cpt( pt(:,:,:,jn,Kmm) , ztw )      ! ztw = interpolated value of T at w-point
-            DO_3D_00_00( 2, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                zwz(ji,jj,jk) = pW(ji,jj,jk) * ztw(ji,jj,jk) * wmask(ji,jj,jk)
             END_3D
@@ -150,5 +150,5 @@
          IF( ln_linssh ) THEN                !* top value   (linear free surf. only as zwz is multiplied by wmask)
             IF( ln_isfcav ) THEN                  ! ice-shelf cavities (top of the ocean)
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   zwz(ji,jj, mikt(ji,jj) ) = pW(ji,jj,mikt(ji,jj)) * pt(ji,jj,mikt(ji,jj),jn,Kmm) 
                END_2D
@@ -158,5 +158,5 @@
          ENDIF
          !               
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             pt(ji,jj,jk,jn,Krhs) = pt(ji,jj,jk,jn,Krhs)    &
                &             - (  zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )    &
Index: /NEMO/trunk/src/OCE/TRA/traadv_fct.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/traadv_fct.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/traadv_fct.F90	(revision 13295)
@@ -139,5 +139,5 @@
       IF( ll_zAimp ) THEN
          ALLOCATE(zwdia(jpi,jpj,jpk), zwinf(jpi,jpj,jpk),zwsup(jpi,jpj,jpk))
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zwdia(ji,jj,jk) =  1._wp + p2dt * ( MAX( wi(ji,jj,jk) , 0._wp ) - MIN( wi(ji,jj,jk+1) , 0._wp ) )   &
             &                               / e3t(ji,jj,jk,Krhs)
@@ -151,5 +151,5 @@
          !        !==  upstream advection with initial mass fluxes & intermediate update  ==!
          !                    !* upstream tracer flux in the i and j direction 
-         DO_3D_10_10( 1, jpkm1 )
+         DO_3D( 1, 0, 1, 0, 1, jpkm1 )
             ! upstream scheme
             zfp_ui = pU(ji,jj,jk) + ABS( pU(ji,jj,jk) )
@@ -161,5 +161,5 @@
          END_3D
          !                    !* upstream tracer flux in the k direction *!
-         DO_3D_11_11( 2, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 2, jpkm1 )
             zfp_wk = pW(ji,jj,jk) + ABS( pW(ji,jj,jk) )
             zfm_wk = pW(ji,jj,jk) - ABS( pW(ji,jj,jk) )
@@ -168,9 +168,9 @@
          IF( ln_linssh ) THEN    ! top ocean value (only in linear free surface as zwz has been w-masked)
             IF( ln_isfcav ) THEN             ! top of the ice-shelf cavities and at the ocean surface
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   zwz(ji,jj, mikt(ji,jj) ) = pW(ji,jj,mikt(ji,jj)) * pt(ji,jj,mikt(ji,jj),jn,Kbb)   ! linear free surface 
                END_2D
             ELSE                             ! no cavities: only at the ocean surface
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   zwz(ji,jj,1) = pW(ji,jj,1) * pt(ji,jj,1,jn,Kbb)
                END_2D
@@ -178,5 +178,5 @@
          ENDIF
          !               
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             !                             ! total intermediate advective trends
             ztra = - (  zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )   &
@@ -194,5 +194,5 @@
             !
             ztw(:,:,1) = 0._wp ; ztw(:,:,jpk) = 0._wp ;
-            DO_3D_00_00( 2, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                zfp_wk = wi(ji,jj,jk) + ABS( wi(ji,jj,jk) )
                zfm_wk = wi(ji,jj,jk) - ABS( wi(ji,jj,jk) )
@@ -200,5 +200,5 @@
                zwz(ji,jj,jk) = zwz(ji,jj,jk) + ztw(ji,jj,jk) ! update vertical fluxes
             END_3D
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                pt(ji,jj,jk,jn,Krhs) = pt(ji,jj,jk,jn,Krhs) - ( ztw(ji,jj,jk) - ztw(ji  ,jj  ,jk+1) ) &
                   &                                        * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm)
@@ -218,5 +218,5 @@
          !
          CASE(  2  )                   !- 2nd order centered
-            DO_3D_10_10( 1, jpkm1 )
+            DO_3D( 1, 0, 1, 0, 1, jpkm1 )
                zwx(ji,jj,jk) = 0.5_wp * pU(ji,jj,jk) * ( pt(ji,jj,jk,jn,Kmm) + pt(ji+1,jj,jk,jn,Kmm) ) - zwx(ji,jj,jk)
                zwy(ji,jj,jk) = 0.5_wp * pV(ji,jj,jk) * ( pt(ji,jj,jk,jn,Kmm) + pt(ji,jj+1,jk,jn,Kmm) ) - zwy(ji,jj,jk)
@@ -227,9 +227,9 @@
             zltv(:,:,jpk) = 0._wp
             DO jk = 1, jpkm1                 ! Laplacian
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   ztu(ji,jj,jk) = ( pt(ji+1,jj  ,jk,jn,Kmm) - pt(ji,jj,jk,jn,Kmm) ) * umask(ji,jj,jk)
                   ztv(ji,jj,jk) = ( pt(ji  ,jj+1,jk,jn,Kmm) - pt(ji,jj,jk,jn,Kmm) ) * vmask(ji,jj,jk)
                END_2D
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   zltu(ji,jj,jk) = (  ztu(ji,jj,jk) + ztu(ji-1,jj,jk)  ) * r1_6
                   zltv(ji,jj,jk) = (  ztv(ji,jj,jk) + ztv(ji,jj-1,jk)  ) * r1_6
@@ -238,5 +238,5 @@
             CALL lbc_lnk_multi( 'traadv_fct', zltu, 'T', 1.0_wp , zltv, 'T', 1.0_wp )   ! Lateral boundary cond. (unchanged sgn)
             !
-            DO_3D_10_10( 1, jpkm1 )
+            DO_3D( 1, 0, 1, 0, 1, jpkm1 )
                zC2t_u = pt(ji,jj,jk,jn,Kmm) + pt(ji+1,jj  ,jk,jn,Kmm)   ! 2 x C2 interpolation of T at u- & v-points
                zC2t_v = pt(ji,jj,jk,jn,Kmm) + pt(ji  ,jj+1,jk,jn,Kmm)
@@ -249,5 +249,5 @@
             ztu(:,:,jpk) = 0._wp             ! Bottom value : flux set to zero
             ztv(:,:,jpk) = 0._wp
-            DO_3D_10_10( 1, jpkm1 )
+            DO_3D( 1, 0, 1, 0, 1, jpkm1 )
                ztu(ji,jj,jk) = ( pt(ji+1,jj  ,jk,jn,Kmm) - pt(ji,jj,jk,jn,Kmm) ) * umask(ji,jj,jk)
                ztv(ji,jj,jk) = ( pt(ji  ,jj+1,jk,jn,Kmm) - pt(ji,jj,jk,jn,Kmm) ) * vmask(ji,jj,jk)
@@ -255,5 +255,5 @@
             CALL lbc_lnk_multi( 'traadv_fct', ztu, 'U', -1.0_wp , ztv, 'V', -1.0_wp )   ! Lateral boundary cond. (unchanged sgn)
             !
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                zC2t_u = pt(ji,jj,jk,jn,Kmm) + pt(ji+1,jj  ,jk,jn,Kmm)   ! 2 x C2 interpolation of T at u- & v-points (x2)
                zC2t_v = pt(ji,jj,jk,jn,Kmm) + pt(ji  ,jj+1,jk,jn,Kmm)
@@ -271,5 +271,5 @@
          !
          CASE(  2  )                   !- 2nd order centered
-            DO_3D_00_00( 2, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                zwz(ji,jj,jk) =  (  pW(ji,jj,jk) * 0.5_wp * ( pt(ji,jj,jk,jn,Kmm) + pt(ji,jj,jk-1,jn,Kmm) )   &
                   &              - zwz(ji,jj,jk)  ) * wmask(ji,jj,jk)
@@ -278,5 +278,5 @@
          CASE(  4  )                   !- 4th order COMPACT
             CALL interp_4th_cpt( pt(:,:,:,jn,Kmm) , ztw )   ! zwt = COMPACT interpolation of T at w-point
-            DO_3D_00_00( 2, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                zwz(ji,jj,jk) = ( pW(ji,jj,jk) * ztw(ji,jj,jk) - zwz(ji,jj,jk) ) * wmask(ji,jj,jk)
             END_3D
@@ -288,5 +288,5 @@
          !         
          IF ( ll_zAimp ) THEN
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                !                             ! total intermediate advective trends
                ztra = - (  zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )   &
@@ -298,5 +298,5 @@
             CALL tridia_solver( zwdia, zwsup, zwinf, ztw, ztw , 0 )
             !
-            DO_3D_00_00( 2, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                zfp_wk = wi(ji,jj,jk) + ABS( wi(ji,jj,jk) )
                zfm_wk = wi(ji,jj,jk) - ABS( wi(ji,jj,jk) )
@@ -313,5 +313,5 @@
          !        !==  final trend with corrected fluxes  ==!
          !
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             ztra = - (  zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )   &
                &      + zwy(ji,jj,jk) - zwy(ji  ,jj-1,jk  )   &
@@ -324,5 +324,5 @@
             !
             ztw(:,:,1) = 0._wp ; ztw(:,:,jpk) = 0._wp
-            DO_3D_00_00( 2, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                zfp_wk = wi(ji,jj,jk) + ABS( wi(ji,jj,jk) )
                zfm_wk = wi(ji,jj,jk) - ABS( wi(ji,jj,jk) )
@@ -330,5 +330,5 @@
                zwz(ji,jj,jk) = zwz(ji,jj,jk) + ztw(ji,jj,jk) ! Update vertical fluxes for trend diagnostic
             END_3D
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                pt(ji,jj,jk,jn,Krhs) = pt(ji,jj,jk,jn,Krhs) - ( ztw(ji,jj,jk) - ztw(ji  ,jj  ,jk+1) ) &
                   &                                        * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm)
@@ -409,5 +409,5 @@
       DO jk = 1, jpkm1
          ikm1 = MAX(jk-1,1)
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
 
             ! search maximum in neighbourhood
@@ -443,5 +443,5 @@
       ! 3. monotonic flux in the i & j direction (paa & pbb)
       ! ----------------------------------------
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          zau = MIN( 1._wp, zbetdo(ji,jj,jk), zbetup(ji+1,jj,jk) )
          zbu = MIN( 1._wp, zbetup(ji,jj,jk), zbetdo(ji+1,jj,jk) )
@@ -481,5 +481,5 @@
       !!----------------------------------------------------------------------
       
-      DO_3D_11_11( 3, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 3, jpkm1 )
          zwd (ji,jj,jk) = 4._wp
          zwi (ji,jj,jk) = 1._wp
@@ -496,5 +496,5 @@
       !
       jk = 2                                          ! Switch to second order centered at top
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zwd (ji,jj,jk) = 1._wp
          zwi (ji,jj,jk) = 0._wp
@@ -504,22 +504,22 @@
       !
       !                       !==  tridiagonal solve  ==!
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zwt(ji,jj,2) = zwd(ji,jj,2)
       END_2D
-      DO_3D_11_11( 3, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 3, jpkm1 )
          zwt(ji,jj,jk) = zwd(ji,jj,jk) - zwi(ji,jj,jk) * zws(ji,jj,jk-1) /zwt(ji,jj,jk-1)
       END_3D
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          pt_out(ji,jj,2) = zwrm(ji,jj,2)
       END_2D
-      DO_3D_11_11( 3, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 3, jpkm1 )
          pt_out(ji,jj,jk) = zwrm(ji,jj,jk) - zwi(ji,jj,jk) / zwt(ji,jj,jk-1) *pt_out(ji,jj,jk-1)             
       END_3D
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          pt_out(ji,jj,jpkm1) = pt_out(ji,jj,jpkm1) / zwt(ji,jj,jpkm1)
       END_2D
-      DO_3DS_11_11( jpk-2, 2, -1 )
+      DO_3DS( 1, 1, 1, 1, jpk-2, 2, -1 )
          pt_out(ji,jj,jk) = ( pt_out(ji,jj,jk) - zws(ji,jj,jk) * pt_out(ji,jj,jk+1) ) / zwt(ji,jj,jk)
       END_3D
@@ -546,5 +546,5 @@
       !                      !==  build the three diagonal matrix & the RHS  ==!
       !
-      DO_3D_00_00( 3, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 3, jpkm1 )
          zwd (ji,jj,jk) = 3._wp * wmask(ji,jj,jk) + 1._wp                 !       diagonal
          zwi (ji,jj,jk) =         wmask(ji,jj,jk)                         ! lower diagonal
@@ -565,5 +565,5 @@
       END IF
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          ikt = mikt(ji,jj) + 1            ! w-point below the 1st  wet point
          ikb = MAX(mbkt(ji,jj), 2)        !     -   above the last wet point
@@ -582,22 +582,22 @@
       !                       !==  tridiagonal solver  ==!
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zwt(ji,jj,2) = zwd(ji,jj,2)
       END_2D
-      DO_3D_00_00( 3, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 3, jpkm1 )
          zwt(ji,jj,jk) = zwd(ji,jj,jk) - zwi(ji,jj,jk) * zws(ji,jj,jk-1) /zwt(ji,jj,jk-1)
       END_3D
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          pt_out(ji,jj,2) = zwrm(ji,jj,2)
       END_2D
-      DO_3D_00_00( 3, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 3, jpkm1 )
          pt_out(ji,jj,jk) = zwrm(ji,jj,jk) - zwi(ji,jj,jk) / zwt(ji,jj,jk-1) *pt_out(ji,jj,jk-1)             
       END_3D
 
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          pt_out(ji,jj,jpkm1) = pt_out(ji,jj,jpkm1) / zwt(ji,jj,jpkm1)
       END_2D
-      DO_3DS_00_00( jpk-2, 2, -1 )
+      DO_3DS( 0, 0, 0, 0, jpk-2, 2, -1 )
          pt_out(ji,jj,jk) = ( pt_out(ji,jj,jk) - zws(ji,jj,jk) * pt_out(ji,jj,jk+1) ) / zwt(ji,jj,jk)
       END_3D
@@ -638,22 +638,22 @@
       kstart =  1  + klev
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zwt(ji,jj,kstart) = pD(ji,jj,kstart)
       END_2D
-      DO_3D_00_00( kstart+1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, kstart+1, jpkm1 )
          zwt(ji,jj,jk) = pD(ji,jj,jk) - pL(ji,jj,jk) * pU(ji,jj,jk-1) /zwt(ji,jj,jk-1)
       END_3D
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          pt_out(ji,jj,kstart) = pRHS(ji,jj,kstart)
       END_2D
-      DO_3D_00_00( kstart+1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, kstart+1, jpkm1 )
          pt_out(ji,jj,jk) = pRHS(ji,jj,jk) - pL(ji,jj,jk) / zwt(ji,jj,jk-1) *pt_out(ji,jj,jk-1)             
       END_3D
 
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          pt_out(ji,jj,jpkm1) = pt_out(ji,jj,jpkm1) / zwt(ji,jj,jpkm1)
       END_2D
-      DO_3DS_00_00( jpk-2, kstart, -1 )
+      DO_3DS( 0, 0, 0, 0, jpk-2, kstart, -1 )
          pt_out(ji,jj,jk) = ( pt_out(ji,jj,jk) - pU(ji,jj,jk) * pt_out(ji,jj,jk+1) ) / zwt(ji,jj,jk)
       END_3D
Index: /NEMO/trunk/src/OCE/TRA/traadv_mus.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/traadv_mus.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/traadv_mus.F90	(revision 13295)
@@ -132,5 +132,5 @@
          zwx(:,:,jpk) = 0._wp                   ! bottom values
          zwy(:,:,jpk) = 0._wp  
-         DO_3D_10_10( 1, jpkm1 )
+         DO_3D( 1, 0, 1, 0, 1, jpkm1 )
             zwx(ji,jj,jk) = umask(ji,jj,jk) * ( pt(ji+1,jj,jk,jn,Kbb) - pt(ji,jj,jk,jn,Kbb) )
             zwy(ji,jj,jk) = vmask(ji,jj,jk) * ( pt(ji,jj+1,jk,jn,Kbb) - pt(ji,jj,jk,jn,Kbb) )
@@ -141,5 +141,5 @@
          zslpx(:,:,jpk) = 0._wp                 ! bottom values
          zslpy(:,:,jpk) = 0._wp
-         DO_3D_01_01( 1, jpkm1 )
+         DO_3D( 0, 1, 0, 1, 1, jpkm1 )
             zslpx(ji,jj,jk) =                       ( zwx(ji,jj,jk) + zwx(ji-1,jj  ,jk) )   &
                &            * ( 0.25 + SIGN( 0.25_wp, zwx(ji,jj,jk) * zwx(ji-1,jj  ,jk) ) )
@@ -148,5 +148,5 @@
          END_3D
          !
-         DO_3D_01_01( 1, jpkm1 )
+         DO_3D( 0, 1, 0, 1, 1, jpkm1 )
             zslpx(ji,jj,jk) = SIGN( 1.0_wp, zslpx(ji,jj,jk) ) * MIN(    ABS( zslpx(ji  ,jj,jk) ),   &
                &                                                     2.*ABS( zwx  (ji-1,jj,jk) ),   &
@@ -157,5 +157,5 @@
          END_3D
          !
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             ! MUSCL fluxes
             z0u = SIGN( 0.5_wp, pU(ji,jj,jk) )
@@ -175,5 +175,5 @@
          CALL lbc_lnk_multi( 'traadv_mus', zwx, 'U', -1.0_wp , zwy, 'V', -1.0_wp )   ! lateral boundary conditions   (changed sign)
          !
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             pt(ji,jj,jk,jn,Krhs) = pt(ji,jj,jk,jn,Krhs) - ( zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )       &
             &                                     + zwy(ji,jj,jk) - zwy(ji  ,jj-1,jk  ) )     &
@@ -200,14 +200,14 @@
          !                                !-- Slopes of tracer
          zslpx(:,:,1) = 0._wp                   ! surface values
-         DO_3D_11_11( 2, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 2, jpkm1 )
             zslpx(ji,jj,jk) =                        ( zwx(ji,jj,jk) + zwx(ji,jj,jk+1) )  &
                &            * (  0.25 + SIGN( 0.25_wp, zwx(ji,jj,jk) * zwx(ji,jj,jk+1) )  )
          END_3D
-         DO_3D_11_11( 2, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 2, jpkm1 )
             zslpx(ji,jj,jk) = SIGN( 1.0_wp, zslpx(ji,jj,jk) ) * MIN(    ABS( zslpx(ji,jj,jk  ) ),   &
                &                                                     2.*ABS( zwx  (ji,jj,jk+1) ),   &
                &                                                     2.*ABS( zwx  (ji,jj,jk  ) )  )
          END_3D
-         DO_3D_00_00( 1, jpk-2 )
+         DO_3D( 0, 0, 0, 0, 1, jpk-2 )
             z0w = SIGN( 0.5_wp, pW(ji,jj,jk+1) )
             zalpha = 0.5 + z0w
@@ -219,5 +219,5 @@
          IF( ln_linssh ) THEN                   ! top values, linear free surface only
             IF( ln_isfcav ) THEN                      ! ice-shelf cavities (top of the ocean)
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   zwx(ji,jj, mikt(ji,jj) ) = pW(ji,jj,mikt(ji,jj)) * pt(ji,jj,mikt(ji,jj),jn,Kbb)
                END_2D
@@ -227,5 +227,5 @@
          ENDIF
          !
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             pt(ji,jj,jk,jn,Krhs) =  pt(ji,jj,jk,jn,Krhs) - ( zwx(ji,jj,jk) - zwx(ji,jj,jk+1) )   &
                &                                      * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm)
Index: /NEMO/trunk/src/OCE/TRA/traadv_qck.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/traadv_qck.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/traadv_qck.F90	(revision 13295)
@@ -142,5 +142,5 @@
          !
 !!gm why not using a SHIFT instruction...
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zfc(ji,jj,jk) = pt(ji-1,jj,jk,jn,Kbb)        ! Upstream   in the x-direction for the tracer
             zfd(ji,jj,jk) = pt(ji+1,jj,jk,jn,Kbb)        ! Downstream in the x-direction for the tracer
@@ -151,10 +151,10 @@
          ! Horizontal advective fluxes
          ! ---------------------------
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zdir = 0.5 + SIGN( 0.5_wp, pU(ji,jj,jk) )   ! if pU > 0 : zdir = 1 otherwise zdir = 0 
             zfu(ji,jj,jk) = zdir * zfc(ji,jj,jk ) + ( 1. - zdir ) * zfd(ji+1,jj,jk)  ! FU in the x-direction for T 
          END_3D
          !
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zdir = 0.5 + SIGN( 0.5_wp, pU(ji,jj,jk) )   ! if pU > 0 : zdir = 1 otherwise zdir = 0 
             zdx = ( zdir * e1t(ji,jj) + ( 1. - zdir ) * e1t(ji+1,jj) ) * e2u(ji,jj) * e3u(ji,jj,jk,Kmm)
@@ -170,5 +170,5 @@
          !
          ! Mask at the T-points in the x-direction (mask=0 or mask=1)
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zfu(ji,jj,jk) = tmask(ji-1,jj,jk) + tmask(ji,jj,jk) + tmask(ji+1,jj,jk) - 2.
          END_3D
@@ -179,5 +179,5 @@
          DO jk = 1, jpkm1  
             !
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zdir = 0.5 + SIGN( 0.5_wp, pU(ji,jj,jk) )   ! if pU > 0 : zdir = 1 otherwise zdir = 0 
                !--- If the second ustream point is a land point
@@ -192,5 +192,5 @@
          !
          ! Computation of the trend
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zbtr = r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm)
             ! horizontal advective trends
@@ -233,5 +233,5 @@
             !                                             
             !--- Computation of the ustream and downstream value of the tracer and the mask
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                ! Upstream in the x-direction for the tracer
                zfc(ji,jj,jk) = pt(ji,jj-1,jk,jn,Kbb)
@@ -247,10 +247,10 @@
          ! ---------------------------
          !
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zdir = 0.5 + SIGN( 0.5_wp, pV(ji,jj,jk) )   ! if pU > 0 : zdir = 1 otherwise zdir = 0 
             zfu(ji,jj,jk) = zdir * zfc(ji,jj,jk ) + ( 1. - zdir ) * zfd(ji,jj+1,jk)  ! FU in the x-direction for T 
          END_3D
          !
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zdir = 0.5 + SIGN( 0.5_wp, pV(ji,jj,jk) )   ! if pU > 0 : zdir = 1 otherwise zdir = 0 
             zdx = ( zdir * e2t(ji,jj) + ( 1. - zdir ) * e2t(ji,jj+1) ) * e1v(ji,jj) * e3v(ji,jj,jk,Kmm)
@@ -267,5 +267,5 @@
          !
          ! Mask at the T-points in the x-direction (mask=0 or mask=1)
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zfu(ji,jj,jk) = tmask(ji,jj-1,jk) + tmask(ji,jj,jk) + tmask(ji,jj+1,jk) - 2.
          END_3D
@@ -275,5 +275,5 @@
          DO jk = 1, jpkm1  
             !
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zdir = 0.5 + SIGN( 0.5_wp, pV(ji,jj,jk) )   ! if pU > 0 : zdir = 1 otherwise zdir = 0 
                !--- If the second ustream point is a land point
@@ -288,5 +288,5 @@
          !
          ! Computation of the trend
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zbtr = r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm)
             ! horizontal advective trends
@@ -327,10 +327,10 @@
          !                                                       ! ===========
          !
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             zwz(ji,jj,jk) = 0.5 * pW(ji,jj,jk) * ( pt(ji,jj,jk-1,jn,Kmm) + pt(ji,jj,jk,jn,Kmm) ) * wmask(ji,jj,jk)
          END_3D
          IF( ln_linssh ) THEN                !* top value   (only in linear free surf. as zwz is multiplied by wmask)
             IF( ln_isfcav ) THEN                  ! ice-shelf cavities (top of the ocean)
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   zwz(ji,jj, mikt(ji,jj) ) = pW(ji,jj,mikt(ji,jj)) * pt(ji,jj,mikt(ji,jj),jn,Kmm)   ! linear free surface 
                END_2D
@@ -340,5 +340,5 @@
          ENDIF
          !
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             pt(ji,jj,jk,jn,Krhs) = pt(ji,jj,jk,jn,Krhs) - ( zwz(ji,jj,jk) - zwz(ji,jj,jk+1) )   &
                &                                * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm)
@@ -369,5 +369,5 @@
       !----------------------------------------------------------------------
       !
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zc     = puc(ji,jj,jk)                         ! Courant number
          zcurv  = pfd(ji,jj,jk) + pfu(ji,jj,jk) - 2. * pfc(ji,jj,jk)
Index: /NEMO/trunk/src/OCE/TRA/traadv_ubs.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/traadv_ubs.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/traadv_ubs.F90	(revision 13295)
@@ -125,5 +125,5 @@
          !                                              
          DO jk = 1, jpkm1        !==  horizontal laplacian of before tracer ==!
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zeeu = e2_e1u(ji,jj) * e3u(ji,jj,jk,Kmm) * umask(ji,jj,jk)
                zeev = e1_e2v(ji,jj) * e3v(ji,jj,jk,Kmm) * vmask(ji,jj,jk)
@@ -131,5 +131,5 @@
                ztv(ji,jj,jk) = zeev * ( pt(ji  ,jj+1,jk,jn,Kbb) - pt(ji,jj,jk,jn,Kbb) )
             END_2D
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zcoef = 1._wp / ( 6._wp * e3t(ji,jj,jk,Kmm) )
                zltu(ji,jj,jk) = (  ztu(ji,jj,jk) - ztu(ji-1,jj,jk)  ) * zcoef
@@ -140,5 +140,5 @@
          CALL lbc_lnk( 'traadv_ubs', zltu, 'T', 1.0_wp )   ;    CALL lbc_lnk( 'traadv_ubs', zltv, 'T', 1.0_wp )   ! Lateral boundary cond. (unchanged sgn)
          !    
-         DO_3D_10_10( 1, jpkm1 )
+         DO_3D( 1, 0, 1, 0, 1, jpkm1 )
             zfp_ui = pU(ji,jj,jk) + ABS( pU(ji,jj,jk) )      ! upstream transport (x2)
             zfm_ui = pU(ji,jj,jk) - ABS( pU(ji,jj,jk) )
@@ -156,5 +156,5 @@
          !
          DO jk = 1, jpkm1        !==  add the horizontal advective trend  ==!
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                pt(ji,jj,jk,jn,Krhs) = pt(ji,jj,jk,jn,Krhs)                        &
                   &             - (  ztu(ji,jj,jk) - ztu(ji-1,jj  ,jk)    &
@@ -188,5 +188,5 @@
             !
             !                          !*  upstream advection with initial mass fluxes & intermediate update  ==!
-            DO_3D_11_11( 2, jpkm1 )
+            DO_3D( 1, 1, 1, 1, 2, jpkm1 )
                zfp_wk = pW(ji,jj,jk) + ABS( pW(ji,jj,jk) )
                zfm_wk = pW(ji,jj,jk) - ABS( pW(ji,jj,jk) )
@@ -195,5 +195,5 @@
             IF( ln_linssh ) THEN             ! top ocean value (only in linear free surface as ztw has been w-masked)
                IF( ln_isfcav ) THEN                ! top of the ice-shelf cavities and at the ocean surface
-                  DO_2D_11_11
+                  DO_2D( 1, 1, 1, 1 )
                      ztw(ji,jj, mikt(ji,jj) ) = pW(ji,jj,mikt(ji,jj)) * pt(ji,jj,mikt(ji,jj),jn,Kbb)   ! linear free surface 
                   END_2D
@@ -203,5 +203,5 @@
             ENDIF
             !
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                ztak = - ( ztw(ji,jj,jk) - ztw(ji,jj,jk+1) )    &
                   &     * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm)
@@ -212,5 +212,5 @@
             !
             !                          !*  anti-diffusive flux : high order minus low order
-            DO_3D_11_11( 2, jpkm1 )
+            DO_3D( 1, 1, 1, 1, 2, jpkm1 )
                ztw(ji,jj,jk) = (   0.5_wp * pW(ji,jj,jk) * ( pt(ji,jj,jk,jn,Kmm) + pt(ji,jj,jk-1,jn,Kmm) )   &
                   &              - ztw(ji,jj,jk)   ) * wmask(ji,jj,jk)
@@ -223,5 +223,5 @@
          CASE(  4  )                               ! 4th order COMPACT
             CALL interp_4th_cpt( pt(:,:,:,jn,Kmm) , ztw )         ! 4th order compact interpolation of T at w-point
-            DO_3D_00_00( 2, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                ztw(ji,jj,jk) = pW(ji,jj,jk) * ztw(ji,jj,jk) * wmask(ji,jj,jk)
             END_3D
@@ -230,5 +230,5 @@
          END SELECT
          !
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             pt(ji,jj,jk,jn,Krhs) = pt(ji,jj,jk,jn,Krhs) - ( ztw(ji,jj,jk) - ztw(ji,jj,jk+1) )    &
                &                                        * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm)
@@ -236,5 +236,5 @@
          !
          IF( l_trd )  THEN       ! vertical advective trend diagnostics
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                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)  )   &
@@ -286,5 +286,5 @@
       DO jk = 1, jpkm1     ! search maximum in neighbourhood
          ikm1 = MAX(jk-1,1)
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zbetup(ji,jj,jk) = MAX(  pbef(ji  ,jj  ,jk  ), paft(ji  ,jj  ,jk  ),   &
                &                     pbef(ji  ,jj  ,ikm1), pbef(ji  ,jj  ,jk+1),   &
@@ -298,5 +298,5 @@
       DO jk = 1, jpkm1     ! search minimum in neighbourhood
          ikm1 = MAX(jk-1,1)
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zbetdo(ji,jj,jk) = MIN(  pbef(ji  ,jj  ,jk  ), paft(ji  ,jj  ,jk  ),   &
                &                     pbef(ji  ,jj  ,ikm1), pbef(ji  ,jj  ,jk+1),   &
@@ -310,5 +310,5 @@
       ! Positive and negative part of fluxes and beta terms
       ! ---------------------------------------------------
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          ! positive & negative part of the flux
          zpos = MAX( 0., pcc(ji  ,jj  ,jk+1) ) - MIN( 0., pcc(ji  ,jj  ,jk  ) )
@@ -322,5 +322,5 @@
       ! monotonic flux in the k direction, i.e. pcc
       ! -------------------------------------------
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          za = MIN( 1., zbetdo(ji,jj,jk), zbetup(ji,jj,jk-1) )
          zb = MIN( 1., zbetup(ji,jj,jk), zbetdo(ji,jj,jk-1) )
Index: /NEMO/trunk/src/OCE/TRA/traatf.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/traatf.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/traatf.F90	(revision 13295)
@@ -210,5 +210,5 @@
       DO jn = 1, kjpt
          !
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             ztn = pt(ji,jj,jk,jn,Kmm)                                    
             ztd = pt(ji,jj,jk,jn,Kaa) - 2._wp * ztn + pt(ji,jj,jk,jn,Kbb)  ! time laplacian on tracers
@@ -275,5 +275,5 @@
       zfact2 = zfact1 * r1_rho0
       DO jn = 1, kjpt      
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             ze3t_b = e3t(ji,jj,jk,Kbb)
             ze3t_n = e3t(ji,jj,jk,Kmm)
Index: /NEMO/trunk/src/OCE/TRA/traatf_qco.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/traatf_qco.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/traatf_qco.F90	(revision 13295)
@@ -203,5 +203,5 @@
       DO jn = 1, kjpt
          !
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             ztn = pt(ji,jj,jk,jn,Kmm)
             ztd = pt(ji,jj,jk,jn,Kaa) - 2._wp * ztn + pt(ji,jj,jk,jn,Kbb)  ! time laplacian on tracers
@@ -268,5 +268,5 @@
       zfact2 = zfact1 * r1_rho0
       DO jn = 1, kjpt
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             ze3t_b = e3t(ji,jj,jk,Kbb)
             ze3t_n = e3t(ji,jj,jk,Kmm)
Index: /NEMO/trunk/src/OCE/TRA/trabbc.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/trabbc.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/trabbc.F90	(revision 13295)
@@ -91,5 +91,5 @@
       ENDIF
       !                             !  Add the geothermal trend on temperature
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          pts(ji,jj,mbkt(ji,jj),jp_tem,Krhs) = pts(ji,jj,mbkt(ji,jj),jp_tem,Krhs)   &
             &             + qgh_trd0(ji,jj) / e3t(ji,jj,mbkt(ji,jj),Kmm)
Index: /NEMO/trunk/src/OCE/TRA/trabbl.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/trabbl.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/trabbl.F90	(revision 13295)
@@ -192,10 +192,10 @@
       DO jn = 1, kjpt                                     ! tracer loop
          !                                                ! ===========
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ik = mbkt(ji,jj)                             ! bottom T-level index
             zptb(ji,jj) = pt(ji,jj,ik,jn)                ! bottom before T and S
          END_2D
          !               
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ik = mbkt(ji,jj)                            ! bottom T-level index
             pt_rhs(ji,jj,ik,jn) = pt_rhs(ji,jj,ik,jn)                                                  &
@@ -343,5 +343,5 @@
       ENDIF
       !                                        !* bottom variables (T, S, alpha, beta, depth, velocity)
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ik = mbkt(ji,jj)                             ! bottom T-level index
          zts (ji,jj,jp_tem) = ts(ji,jj,ik,jp_tem,Kbb) ! bottom before T and S
@@ -358,5 +358,5 @@
       IF( nn_bbl_ldf == 1 ) THEN          !   diffusive bbl   !
          !                                !-------------------!
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             !                                                   ! i-direction
             za = zab(ji+1,jj,jp_tem) + zab(ji,jj,jp_tem)              ! 2*(alpha,beta) at u-point
@@ -388,5 +388,5 @@
          !
          CASE( 1 )                                   != use of upper velocity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                !                                                  ! i-direction
                za = zab(ji+1,jj,jp_tem) + zab(ji,jj,jp_tem)               ! 2*(alpha,beta) at u-point
@@ -417,5 +417,5 @@
          CASE( 2 )                                 != bbl velocity = F( delta rho )
             zgbbl = grav * rn_gambbl
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                !                                                  ! i-direction
                ! down-slope T-point i/k-index (deep)  &   up-slope T-point i/k-index (shelf)
@@ -509,5 +509,5 @@
       !
       !                             !* vertical index of  "deep" bottom u- and v-points
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          mbku_d(ji,jj) = MAX(  mbkt(ji+1,jj  ) , mbkt(ji,jj)  )   ! >= 1 as mbkt=1 over land
          mbkv_d(ji,jj) = MAX(  mbkt(ji  ,jj+1) , mbkt(ji,jj)  )
@@ -520,5 +520,5 @@
       !                             !* sign of grad(H) at u- and v-points; zero if grad(H) = 0
       mgrhu(:,:) = 0   ;   mgrhv(:,:) = 0
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          IF( gdept_0(ji+1,jj,mbkt(ji+1,jj)) - gdept_0(ji,jj,mbkt(ji,jj)) /= 0._wp ) THEN
             mgrhu(ji,jj) = INT(  SIGN( 1.0_wp, gdept_0(ji+1,jj,mbkt(ji+1,jj)) - gdept_0(ji,jj,mbkt(ji,jj)) )  )
@@ -530,5 +530,5 @@
       END_2D
       !
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          e3u_bbl_0(ji,jj) = MIN( e3u_0(ji,jj,mbkt(ji+1,jj  )), e3u_0(ji,jj,mbkt(ji,jj)) )
          e3v_bbl_0(ji,jj) = MIN( e3v_0(ji,jj,mbkt(ji  ,jj+1)), e3v_0(ji,jj,mbkt(ji,jj)) )
Index: /NEMO/trunk/src/OCE/TRA/tradmp.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/tradmp.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/tradmp.F90	(revision 13295)
@@ -112,5 +112,5 @@
       CASE( 0 )                        !*  newtonian damping throughout the water column  *!
          DO jn = 1, jpts
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                pts(ji,jj,jk,jn,Krhs) = pts(ji,jj,jk,jn,Krhs)           &
                   &                  + resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jn) - pts(ji,jj,jk,jn,Kbb) )
@@ -119,5 +119,5 @@
          !
       CASE ( 1 )                       !*  no damping in the turbocline (avt > 5 cm2/s)  *!
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             IF( avt(ji,jj,jk) <= avt_c ) THEN
                pts(ji,jj,jk,jp_tem,Krhs) = pts(ji,jj,jk,jp_tem,Krhs)   &
@@ -129,5 +129,5 @@
          !
       CASE ( 2 )                       !*  no damping in the mixed layer   *!
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             IF( gdept(ji,jj,jk,Kmm) >= hmlp (ji,jj) ) THEN
                pts(ji,jj,jk,jp_tem,Krhs) = pts(ji,jj,jk,jp_tem,Krhs)   &
Index: /NEMO/trunk/src/OCE/TRA/traisf.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/traisf.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/traisf.F90	(revision 13295)
@@ -108,5 +108,5 @@
       !
       ! update pts(:,:,:,:,Krhs)
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !
          ikt = ktop(ji,jj)
Index: /NEMO/trunk/src/OCE/TRA/traldf_iso.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/traldf_iso.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/traldf_iso.F90	(revision 13295)
@@ -141,5 +141,5 @@
       IF( kpass == 1 ) THEN                  !==  first pass only  ==!
          !
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             !
             zmsku = wmask(ji,jj,jk) / MAX(   umask(ji  ,jj,jk-1) + umask(ji-1,jj,jk)          &
@@ -158,5 +158,5 @@
          !
          IF( ln_traldf_msc ) THEN                ! stabilizing vertical diffusivity coefficient
-            DO_3D_00_00( 2, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                akz(ji,jj,jk) = 0.25_wp * (                                                                     &
                   &              ( pahu(ji  ,jj,jk) + pahu(ji  ,jj,jk-1) ) / ( e1u(ji  ,jj) * e1u(ji  ,jj) )   &
@@ -167,5 +167,5 @@
             !
             IF( ln_traldf_blp ) THEN                ! bilaplacian operator
-               DO_3D_10_10( 2, jpkm1 )
+               DO_3D( 1, 0, 1, 0, 2, jpkm1 )
                   akz(ji,jj,jk) = 16._wp   &
                      &   * ah_wslp2   (ji,jj,jk)   &
@@ -175,5 +175,5 @@
                END_3D
             ELSEIF( ln_traldf_lap ) THEN              ! laplacian operator
-               DO_3D_10_10( 2, jpkm1 )
+               DO_3D( 1, 0, 1, 0, 2, jpkm1 )
                   ze3w_2 = e3w(ji,jj,jk,Kmm) * e3w(ji,jj,jk,Kmm)
                   zcoef0 = rDt * (  akz(ji,jj,jk) + ah_wslp2(ji,jj,jk) / ze3w_2  )
@@ -200,15 +200,15 @@
 
          ! Horizontal tracer gradient 
-         DO_3D_10_10( 1, jpkm1 )
+         DO_3D( 1, 0, 1, 0, 1, jpkm1 )
             zdit(ji,jj,jk) = ( pt(ji+1,jj  ,jk,jn) - pt(ji,jj,jk,jn) ) * umask(ji,jj,jk)
             zdjt(ji,jj,jk) = ( pt(ji  ,jj+1,jk,jn) - pt(ji,jj,jk,jn) ) * vmask(ji,jj,jk)
          END_3D
          IF( ln_zps ) THEN      ! botton and surface ocean correction of the horizontal gradient
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zdit(ji,jj,mbku(ji,jj)) = pgu(ji,jj,jn)          
                zdjt(ji,jj,mbkv(ji,jj)) = pgv(ji,jj,jn)
             END_2D
             IF( ln_isfcav ) THEN      ! first wet level beneath a cavity
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   IF( miku(ji,jj) > 1 )   zdit(ji,jj,miku(ji,jj)) = pgui(ji,jj,jn)          
                   IF( mikv(ji,jj) > 1 )   zdjt(ji,jj,mikv(ji,jj)) = pgvi(ji,jj,jn)     
@@ -229,5 +229,5 @@
             ELSE                 ;   zdkt(:,:) = ( pt(:,:,jk-1,jn) - pt(:,:,jk,jn) ) * wmask(:,:,jk)
             ENDIF
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zabe1 = pahu(ji,jj,jk) * e2_e1u(ji,jj) * e3u(ji,jj,jk,Kmm)
                zabe2 = pahv(ji,jj,jk) * e1_e2v(ji,jj) * e3v(ji,jj,jk,Kmm)
@@ -250,5 +250,5 @@
             END_2D
             !
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                pt_rhs(ji,jj,jk,jn) = pt_rhs(ji,jj,jk,jn)    &
                   &       + zsign * (  zftu(ji,jj,jk) - zftu(ji-1,jj,jk) + zftv(ji,jj,jk) - zftv(ji,jj-1,jk)  )   &
@@ -266,5 +266,5 @@
          ztfw(:,:, 1 ) = 0._wp      ;      ztfw(:,:,jpk) = 0._wp
          
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             !
             zmsku = wmask(ji,jj,jk) / MAX(   umask(ji  ,jj,jk-1) + umask(ji-1,jj,jk)          &
@@ -288,5 +288,5 @@
          !                                !==  add the vertical 33 flux  ==!
          IF( ln_traldf_lap ) THEN               ! laplacian case: eddy coef = ah_wslp2 - akz
-            DO_3D_00_00( 2, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                ztfw(ji,jj,jk) = ztfw(ji,jj,jk) + e1e2t(ji,jj) / e3w(ji,jj,jk,Kmm) * wmask(ji,jj,jk)   &
                   &                            * ( ah_wslp2(ji,jj,jk) - akz(ji,jj,jk) )               &
@@ -297,5 +297,5 @@
             SELECT CASE( kpass )
             CASE(  1  )                            ! 1st pass : eddy coef = ah_wslp2
-               DO_3D_00_00( 2, jpkm1 )
+               DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                   ztfw(ji,jj,jk) =   &
                      &  ztfw(ji,jj,jk) + ah_wslp2(ji,jj,jk) * e1e2t(ji,jj)   &
@@ -303,5 +303,5 @@
                END_3D
             CASE(  2  )                         ! 2nd pass : eddy flux = ah_wslp2 and akz applied on pt  and pt2 gradients, resp.
-               DO_3D_00_00( 2, jpkm1 )
+               DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                   ztfw(ji,jj,jk) = ztfw(ji,jj,jk) + e1e2t(ji,jj) / e3w(ji,jj,jk,Kmm) * wmask(ji,jj,jk)                  &
                      &                            * (  ah_wslp2(ji,jj,jk) * ( pt (ji,jj,jk-1,jn) - pt (ji,jj,jk,jn) )   &
@@ -311,5 +311,5 @@
          ENDIF
          !         
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             pt_rhs(ji,jj,jk,jn) = pt_rhs(ji,jj,jk,jn) + zsign * (  ztfw (ji,jj,jk) - ztfw(ji,jj,jk+1)  ) * r1_e1e2t(ji,jj)   &
                &                                             / e3t(ji,jj,jk,Kmm)
Index: /NEMO/trunk/src/OCE/TRA/traldf_lap_blp.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/traldf_lap_blp.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/traldf_lap_blp.F90	(revision 13295)
@@ -99,5 +99,5 @@
       ELSE                    ;   zsign = -1._wp
       ENDIF
-      DO_3D_10_10( 1, jpkm1 )
+      DO_3D( 1, 0, 1, 0, 1, jpkm1 )
          zaheeu(ji,jj,jk) = zsign * pahu(ji,jj,jk) * e2_e1u(ji,jj) * e3u(ji,jj,jk,Kmm)   !!gm   * umask(ji,jj,jk) pah masked!
          zaheev(ji,jj,jk) = zsign * pahv(ji,jj,jk) * e1_e2v(ji,jj) * e3v(ji,jj,jk,Kmm)   !!gm   * vmask(ji,jj,jk)
@@ -108,15 +108,15 @@
          !                          ! =========== !    
          !                               
-         DO_3D_10_10( 1, jpkm1 )
+         DO_3D( 1, 0, 1, 0, 1, jpkm1 )
             ztu(ji,jj,jk) = zaheeu(ji,jj,jk) * ( pt(ji+1,jj  ,jk,jn) - pt(ji,jj,jk,jn) )
             ztv(ji,jj,jk) = zaheev(ji,jj,jk) * ( pt(ji  ,jj+1,jk,jn) - pt(ji,jj,jk,jn) )
          END_3D
          IF( ln_zps ) THEN                ! set gradient at bottom/top ocean level
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                ztu(ji,jj,mbku(ji,jj)) = zaheeu(ji,jj,mbku(ji,jj)) * pgu(ji,jj,jn)
                ztv(ji,jj,mbkv(ji,jj)) = zaheev(ji,jj,mbkv(ji,jj)) * pgv(ji,jj,jn)
             END_2D
             IF( ln_isfcav ) THEN                ! top in ocean cavities only
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   IF( miku(ji,jj) > 1 )   ztu(ji,jj,miku(ji,jj)) = zaheeu(ji,jj,miku(ji,jj)) * pgui(ji,jj,jn) 
                   IF( mikv(ji,jj) > 1 )   ztv(ji,jj,mikv(ji,jj)) = zaheev(ji,jj,mikv(ji,jj)) * pgvi(ji,jj,jn) 
@@ -125,5 +125,5 @@
          ENDIF
          !
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             pt_rhs(ji,jj,jk,jn) = pt_rhs(ji,jj,jk,jn) + (  ztu(ji,jj,jk) - ztu(ji-1,jj,jk)     &
                &                                      +    ztv(ji,jj,jk) - ztv(ji,jj-1,jk) )   &
Index: /NEMO/trunk/src/OCE/TRA/traldf_triad.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/traldf_triad.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/traldf_triad.F90	(revision 13295)
@@ -137,5 +137,5 @@
          DO ip = 0, 1                            ! i-k triads
             DO kp = 0, 1
-               DO_3D_10_10( 1, jpkm1 )
+               DO_3D( 1, 0, 1, 0, 1, jpkm1 )
                   ze3wr = 1._wp / e3w(ji+ip,jj,jk+kp,Kmm)
                   zbu   = e1e2u(ji,jj) * e3u(ji,jj,jk,Kmm)
@@ -157,5 +157,5 @@
          DO jp = 0, 1                            ! j-k triads 
             DO kp = 0, 1
-               DO_3D_10_10( 1, jpkm1 )
+               DO_3D( 1, 0, 1, 0, 1, jpkm1 )
                   ze3wr = 1.0_wp / e3w(ji,jj+jp,jk+kp,Kmm)
                   zbv   = e1e2v(ji,jj) * e3v(ji,jj,jk,Kmm)
@@ -179,5 +179,5 @@
             !
             IF( ln_traldf_blp ) THEN                ! bilaplacian operator
-               DO_3D_10_10( 2, jpkm1 )
+               DO_3D( 1, 0, 1, 0, 2, jpkm1 )
                   akz(ji,jj,jk) = 16._wp           &
                      &   * ah_wslp2   (ji,jj,jk)   &
@@ -187,5 +187,5 @@
                END_3D
             ELSEIF( ln_traldf_lap ) THEN              ! laplacian operator
-               DO_3D_10_10( 2, jpkm1 )
+               DO_3D( 1, 0, 1, 0, 2, jpkm1 )
                   ze3w_2 = e3w(ji,jj,jk,Kmm) * e3w(ji,jj,jk,Kmm)
                   zcoef0 = rDt * (  akz(ji,jj,jk) + ah_wslp2(ji,jj,jk) / ze3w_2  )
@@ -211,15 +211,15 @@
          zftv(:,:,:) = 0._wp
          !
-         DO_3D_10_10( 1, jpkm1 )
+         DO_3D( 1, 0, 1, 0, 1, jpkm1 )
             zdit(ji,jj,jk) = ( pt(ji+1,jj  ,jk,jn) - pt(ji,jj,jk,jn) ) * umask(ji,jj,jk)
             zdjt(ji,jj,jk) = ( pt(ji  ,jj+1,jk,jn) - pt(ji,jj,jk,jn) ) * vmask(ji,jj,jk)
          END_3D
          IF( ln_zps .AND. l_grad_zps ) THEN    ! partial steps: correction at top/bottom ocean level
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zdit(ji,jj,mbku(ji,jj)) = pgu(ji,jj,jn)
                zdjt(ji,jj,mbkv(ji,jj)) = pgv(ji,jj,jn)
             END_2D
             IF( ln_isfcav ) THEN                   ! top level (ocean cavities only)
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   IF( miku(ji,jj)  > 1 )   zdit(ji,jj,miku(ji,jj) ) = pgui(ji,jj,jn) 
                   IF( mikv(ji,jj)  > 1 )   zdjt(ji,jj,mikv(ji,jj) ) = pgvi(ji,jj,jn) 
@@ -246,5 +246,5 @@
                DO ip = 0, 1              !==  Horizontal & vertical fluxes
                   DO kp = 0, 1
-                     DO_2D_10_10
+                     DO_2D( 1, 0, 1, 0 )
                         ze1ur = r1_e1u(ji,jj)
                         zdxt  = zdit(ji,jj,jk) * ze1ur
@@ -267,5 +267,5 @@
                DO jp = 0, 1
                   DO kp = 0, 1
-                     DO_2D_10_10
+                     DO_2D( 1, 0, 1, 0 )
                         ze2vr = r1_e2v(ji,jj)
                         zdyt  = zdjt(ji,jj,jk) * ze2vr
@@ -289,5 +289,5 @@
                DO ip = 0, 1               !==  Horizontal & vertical fluxes
                   DO kp = 0, 1
-                     DO_2D_10_10
+                     DO_2D( 1, 0, 1, 0 )
                         ze1ur = r1_e1u(ji,jj)
                         zdxt  = zdit(ji,jj,jk) * ze1ur
@@ -310,5 +310,5 @@
                DO jp = 0, 1
                   DO kp = 0, 1
-                     DO_2D_10_10
+                     DO_2D( 1, 0, 1, 0 )
                         ze2vr = r1_e2v(ji,jj)
                         zdyt  = zdjt(ji,jj,jk) * ze2vr
@@ -329,5 +329,5 @@
             ENDIF
             !                             !==  horizontal divergence and add to the general trend  ==!
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                pt_rhs(ji,jj,jk,jn) = pt_rhs(ji,jj,jk,jn)    &
                   &                       + zsign * (  zftu(ji-1,jj  ,jk) - zftu(ji,jj,jk)       &
@@ -340,5 +340,5 @@
          !                                !==  add the vertical 33 flux  ==!
          IF( ln_traldf_lap ) THEN               ! laplacian case: eddy coef = ah_wslp2 - akz
-            DO_3D_10_00( 2, jpkm1 )
+            DO_3D( 1, 0, 0, 0, 2, jpkm1 )
                ztfw(ji,jj,jk) = ztfw(ji,jj,jk) - e1e2t(ji,jj) / e3w(ji,jj,jk,Kmm) * tmask(ji,jj,jk)   &
                   &                            * ( ah_wslp2(ji,jj,jk) - akz(ji,jj,jk) )             &
@@ -348,10 +348,10 @@
             SELECT CASE( kpass )
             CASE(  1  )                            ! 1st pass : eddy coef = ah_wslp2
-               DO_3D_10_00( 2, jpkm1 )
+               DO_3D( 1, 0, 0, 0, 2, jpkm1 )
                   ztfw(ji,jj,jk) = ztfw(ji,jj,jk) - e1e2t(ji,jj) / e3w(ji,jj,jk,Kmm) * tmask(ji,jj,jk)             &
                      &                            * ah_wslp2(ji,jj,jk) * ( pt(ji,jj,jk-1,jn) - pt(ji,jj,jk,jn) )
                END_3D
             CASE(  2  )                            ! 2nd pass : eddy flux = ah_wslp2 and akz applied on pt  and pt2 gradients, resp.
-               DO_3D_10_00( 2, jpkm1 )
+               DO_3D( 1, 0, 0, 0, 2, jpkm1 )
                   ztfw(ji,jj,jk) = ztfw(ji,jj,jk) - e1e2t(ji,jj) / e3w(ji,jj,jk,Kmm) * tmask(ji,jj,jk)                      &
                      &                            * (  ah_wslp2(ji,jj,jk) * ( pt (ji,jj,jk-1,jn) - pt (ji,jj,jk,jn) )   &
@@ -361,5 +361,5 @@
          ENDIF
          !
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             pt_rhs(ji,jj,jk,jn) = pt_rhs(ji,jj,jk,jn)    &
             &                                  + zsign * (  ztfw(ji,jj,jk+1) - ztfw(ji,jj,jk)  )   &
Index: /NEMO/trunk/src/OCE/TRA/tramle.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/tramle.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/tramle.F90	(revision 13295)
@@ -100,5 +100,5 @@
       inml_mle(:,:) = mbkt(:,:) + 1                    ! init. to number of ocean w-level (T-level + 1)
       IF ( nla10 > 0 ) THEN                            ! avoid case where first level is thicker than 10m
-         DO_3DS_11_11( jpkm1, nlb10, -1 )
+         DO_3DS( 1, 1, 1, 1, jpkm1, nlb10, -1 )
             IF( rhop(ji,jj,jk) > rhop(ji,jj,nla10) + rn_rho_c_mle )   inml_mle(ji,jj) = jk      ! Mixed layer
          END_3D
@@ -110,5 +110,5 @@
       zbm (:,:) = 0._wp
       zn2 (:,:) = 0._wp
-      DO_3D_11_11( 1, ikmax )
+      DO_3D( 1, 1, 1, 1, 1, ikmax )
          zc = e3t(ji,jj,jk,Kmm) * REAL( MIN( MAX( 0, inml_mle(ji,jj)-jk ) , 1  )  )    ! zc being 0 outside the ML t-points
          zmld(ji,jj) = zmld(ji,jj) + zc
@@ -119,15 +119,15 @@
       SELECT CASE( nn_mld_uv )                         ! MLD at u- & v-pts
       CASE ( 0 )                                               != min of the 2 neighbour MLDs
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zhu(ji,jj) = MIN( zmld(ji+1,jj), zmld(ji,jj) )
             zhv(ji,jj) = MIN( zmld(ji,jj+1), zmld(ji,jj) )
          END_2D
       CASE ( 1 )                                               != average of the 2 neighbour MLDs
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zhu(ji,jj) = ( zmld(ji+1,jj) + zmld(ji,jj) ) * 0.5_wp
             zhv(ji,jj) = ( zmld(ji,jj+1) + zmld(ji,jj) ) * 0.5_wp
          END_2D
       CASE ( 2 )                                               != max of the 2 neighbour MLDs
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zhu(ji,jj) = MAX( zmld(ji+1,jj), zmld(ji,jj) )
             zhv(ji,jj) = MAX( zmld(ji,jj+1), zmld(ji,jj) )
@@ -146,5 +146,5 @@
       !
       IF( nn_mle == 0 ) THEN           ! Fox-Kemper et al. 2010 formulation
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zpsim_u(ji,jj) = rn_ce * zhu(ji,jj) * zhu(ji,jj)  * e2_e1u(ji,jj)                                            &
                &           * ( zbm(ji+1,jj) - zbm(ji,jj) ) * MIN( 111.e3_wp , e1u(ji,jj) )   &
@@ -157,5 +157,5 @@
          !
       ELSEIF( nn_mle == 1 ) THEN       ! New formulation (Lf = 5km fo/ff with fo=Coriolis parameter at latitude rn_lat)
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zpsim_u(ji,jj) = rc_f *   zhu(ji,jj)   * zhu(ji,jj)   * e2_e1u(ji,jj)               &
                &                  * ( zbm(ji+1,jj) - zbm(ji,jj) ) * MIN( 111.e3_wp , e1u(ji,jj) )
@@ -167,5 +167,5 @@
       !
       IF( nn_conv == 1 ) THEN              ! No MLE in case of convection
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             IF( MIN( zn2(ji,jj) , zn2(ji+1,jj) ) < 0._wp )   zpsim_u(ji,jj) = 0._wp
             IF( MIN( zn2(ji,jj) , zn2(ji,jj+1) ) < 0._wp )   zpsim_v(ji,jj) = 0._wp
@@ -174,5 +174,5 @@
       !
       !                                      !==  structure function value at uw- and vw-points  ==!
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          zhu(ji,jj) = 1._wp / zhu(ji,jj)                   ! hu --> 1/hu
          zhv(ji,jj) = 1._wp / zhv(ji,jj)
@@ -182,5 +182,5 @@
       zpsi_vw(:,:,:) = 0._wp
       !
-      DO_3D_10_10( 2, ikmax )
+      DO_3D( 1, 0, 1, 0, 2, ikmax )
          zcuw = 1._wp - ( gdepw(ji+1,jj,jk,Kmm) + gdepw(ji,jj,jk,Kmm) ) * zhu(ji,jj)
          zcvw = 1._wp - ( gdepw(ji,jj+1,jk,Kmm) + gdepw(ji,jj,jk,Kmm) ) * zhv(ji,jj)
@@ -196,9 +196,9 @@
       !                                      !==  transport increased by the MLE induced transport ==!
       DO jk = 1, ikmax
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             pu(ji,jj,jk) = pu(ji,jj,jk) + ( zpsi_uw(ji,jj,jk) - zpsi_uw(ji,jj,jk+1) )
             pv(ji,jj,jk) = pv(ji,jj,jk) + ( zpsi_vw(ji,jj,jk) - zpsi_vw(ji,jj,jk+1) )
          END_2D
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pw(ji,jj,jk) = pw(ji,jj,jk) - ( zpsi_uw(ji,jj,jk) - zpsi_uw(ji-1,jj,jk)   &
                &                          + zpsi_vw(ji,jj,jk) - zpsi_vw(ji,jj-1,jk) )
@@ -283,5 +283,5 @@
             IF( ierr /= 0 )   CALL ctl_stop( 'tra_adv_mle_init: failed to allocate arrays' )
             z1_t2 = 1._wp / ( rn_time * rn_time )
-            DO_2D_01_01
+            DO_2D( 0, 1, 0, 1 )
                zfu = ( ff_f(ji,jj) + ff_f(ji,jj-1) ) * 0.5_wp
                zfv = ( ff_f(ji,jj) + ff_f(ji-1,jj) ) * 0.5_wp
Index: /NEMO/trunk/src/OCE/TRA/tranpc.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/tranpc.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/tranpc.F90	(revision 13295)
@@ -103,5 +103,5 @@
          inpcc = 0
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             !
             IF( tmask(ji,jj,2) == 1 ) THEN      ! At least 2 ocean points
Index: /NEMO/trunk/src/OCE/TRA/traqsr.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/traqsr.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/traqsr.F90	(revision 13295)
@@ -172,5 +172,5 @@
             ! most expensive calculations)
             !
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                        ! zlogc = log(zchl)
                zlogc = LOG ( MIN( 10. , MAX( 0.03, sf_chl(1)%fnow(ji,jj,1) ) ) )     
@@ -191,5 +191,5 @@
             
 !
-            DO_3D_00_00 ( 1, nksr + 1 )
+            DO_3D( 0, 0, 0, 0, 1, nksr + 1 )
                ! zchl    = ALOG( ze0(ji,jj) )
                zlogc = ze0(ji,jj)
@@ -221,5 +221,5 @@
          !
          zcoef  = ( 1. - rn_abs ) / 3._wp    !* surface equi-partition in R-G-B
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ze0(ji,jj) = rn_abs * qsr(ji,jj)
             ze1(ji,jj) = zcoef  * qsr(ji,jj)
@@ -232,5 +232,5 @@
          !
          !* interior equi-partition in R-G-B depending on vertical profile of Chl
-         DO_3D_00_00 ( 2, nksr + 1 )
+         DO_3D( 0, 0, 0, 0, 2, nksr + 1 )
             ze3t = e3t(ji,jj,jk-1,Kmm)
             irgb = NINT( ztmp3d(ji,jj,jk) )
@@ -246,5 +246,5 @@
          END_3D
          !
-         DO_3D_00_00( 1, nksr )
+         DO_3D( 0, 0, 0, 0, 1, nksr )
             qsr_hc(ji,jj,jk) = r1_rho0_rcp * ( ztmp3d(ji,jj,jk) - ztmp3d(ji,jj,jk+1) )
          END_3D
@@ -256,5 +256,5 @@
          zz0 =        rn_abs   * r1_rho0_rcp      ! surface equi-partition in 2-bands
          zz1 = ( 1. - rn_abs ) * r1_rho0_rcp
-         DO_3D_00_00( 1, nksr )
+         DO_3D( 0, 0, 0, 0, 1, nksr )
             zc0 = zz0 * EXP( -gdepw(ji,jj,jk  ,Kmm)*xsi0r ) + zz1 * EXP( -gdepw(ji,jj,jk  ,Kmm)*xsi1r )
             zc1 = zz0 * EXP( -gdepw(ji,jj,jk+1,Kmm)*xsi0r ) + zz1 * EXP( -gdepw(ji,jj,jk+1,Kmm)*xsi1r )
@@ -265,5 +265,5 @@
       !
       !                          !-----------------------------!
-      DO_3D_00_00( 1, nksr )
+      DO_3D( 0, 0, 0, 0, 1, nksr )
          pts(ji,jj,jk,jp_tem,Krhs) = pts(ji,jj,jk,jp_tem,Krhs)   &
             &                      + z1_2 * ( qsr_hc_b(ji,jj,jk) + qsr_hc(ji,jj,jk) )   &
@@ -272,5 +272,5 @@
       !
       ! sea-ice: store the 1st ocean level attenuation coefficient
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          IF( qsr(ji,jj) /= 0._wp ) THEN   ;   fraqsr_1lev(ji,jj) = qsr_hc(ji,jj,1) / ( r1_rho0_rcp * qsr(ji,jj) )
          ELSE                             ;   fraqsr_1lev(ji,jj) = 1._wp
Index: /NEMO/trunk/src/OCE/TRA/trasbc.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/trasbc.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/trasbc.F90	(revision 13295)
@@ -124,10 +124,10 @@
       ENDIF
       !                             !==  Now sbc tracer content fields  ==!
-      DO_2D_01_00
+      DO_2D( 0, 1, 0, 0 )
          sbc_tsc(ji,jj,jp_tem) = r1_rho0_rcp * qns(ji,jj)   ! non solar heat flux
          sbc_tsc(ji,jj,jp_sal) = r1_rho0     * sfx(ji,jj)   ! salt flux due to freezing/melting
       END_2D
       IF( ln_linssh ) THEN                !* linear free surface  
-         DO_2D_01_00
+         DO_2D( 0, 1, 0, 0 )
             sbc_tsc(ji,jj,jp_tem) = sbc_tsc(ji,jj,jp_tem) + r1_rho0 * emp(ji,jj) * pts(ji,jj,1,jp_tem,Kmm)
             sbc_tsc(ji,jj,jp_sal) = sbc_tsc(ji,jj,jp_sal) + r1_rho0 * emp(ji,jj) * pts(ji,jj,1,jp_sal,Kmm)
@@ -138,5 +138,5 @@
       !
       DO jn = 1, jpts               !==  update tracer trend  ==!
-         DO_2D_01_00
+         DO_2D( 0, 1, 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)
@@ -157,5 +157,5 @@
       IF( ln_rnf ) THEN         ! input of heat and salt due to river runoff 
          zfact = 0.5_wp
-         DO_2D_01_00
+         DO_2D( 0, 1, 0, 0 )
             IF( rnf(ji,jj) /= 0._wp ) THEN
                zdep = zfact / h_rnf(ji,jj)
@@ -182,5 +182,5 @@
       	 !
          IF( ln_linssh ) THEN 
-            DO_2D_01_00
+            DO_2D( 0, 1, 0, 0 )
                ztim = ssh_iau(ji,jj) / e3t(ji,jj,1,Kmm)
                pts(ji,jj,1,jp_tem,Krhs) = pts(ji,jj,1,jp_tem,Krhs) + pts(ji,jj,1,jp_tem,Kmm) * ztim
@@ -188,5 +188,5 @@
             END_2D
          ELSE
-            DO_2D_01_00
+            DO_2D( 0, 1, 0, 0 )
                ztim = ssh_iau(ji,jj) / ( ht(ji,jj) + 1. - ssmask(ji, jj) )
                pts(ji,jj,:,jp_tem,Krhs) = pts(ji,jj,:,jp_tem,Krhs) + pts(ji,jj,:,jp_tem,Kmm) * ztim
Index: /NEMO/trunk/src/OCE/TRA/trazdf.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/trazdf.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/trazdf.F90	(revision 13295)
@@ -161,9 +161,9 @@
             IF( l_ldfslp ) THEN            ! isoneutral diffusion: add the contribution 
                IF( ln_traldf_msc  ) THEN     ! MSC iso-neutral operator 
-                  DO_3D_00_00( 2, jpkm1 )
+                  DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                      zwt(ji,jj,jk) = zwt(ji,jj,jk) + akz(ji,jj,jk)  
                   END_3D
                ELSE                          ! standard or triad iso-neutral operator
-                  DO_3D_00_00( 2, jpkm1 )
+                  DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                      zwt(ji,jj,jk) = zwt(ji,jj,jk) + ah_wslp2(ji,jj,jk)
                   END_3D
@@ -173,5 +173,5 @@
             ! Diagonal, lower (i), upper (s)  (including the bottom boundary condition since avt is masked)
             IF( ln_zad_Aimp ) THEN         ! Adaptive implicit vertical advection
-               DO_3D_00_00( 1, jpkm1 )
+               DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                   zzwi = - p2dt * zwt(ji,jj,jk  ) / e3w(ji,jj,jk  ,Kmm)
                   zzws = - p2dt * zwt(ji,jj,jk+1) / e3w(ji,jj,jk+1,Kmm)
@@ -182,5 +182,5 @@
                END_3D
             ELSE
-               DO_3D_00_00( 1, jpkm1 )
+               DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                   zwi(ji,jj,jk) = - p2dt * zwt(ji,jj,jk  ) / e3w(ji,jj,jk,Kmm)
                   zws(ji,jj,jk) = - p2dt * zwt(ji,jj,jk+1) / e3w(ji,jj,jk+1,Kmm)
@@ -208,8 +208,8 @@
             !   used as a work space array: its value is modified.
             !
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zwt(ji,jj,1) = zwd(ji,jj,1)
             END_2D
-            DO_3D_00_00( 2, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                zwt(ji,jj,jk) = zwd(ji,jj,jk) - zwi(ji,jj,jk) * zws(ji,jj,jk-1) / zwt(ji,jj,jk-1)
             END_3D
@@ -217,9 +217,9 @@
          ENDIF 
          !         
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pt(ji,jj,1,jn,Kaa) =        e3t(ji,jj,1,Kbb) * pt(ji,jj,1,jn,Kbb)    &
                &               + p2dt * e3t(ji,jj,1,Kmm) * pt(ji,jj,1,jn,Krhs)
          END_2D
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             zrhs =        e3t(ji,jj,jk,Kbb) * pt(ji,jj,jk,jn,Kbb)    & 
                & + p2dt * e3t(ji,jj,jk,Kmm) * pt(ji,jj,jk,jn,Krhs)   ! zrhs=right hand side
@@ -227,8 +227,8 @@
          END_3D
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pt(ji,jj,jpkm1,jn,Kaa) = pt(ji,jj,jpkm1,jn,Kaa) / zwt(ji,jj,jpkm1) * tmask(ji,jj,jpkm1)
          END_2D
-         DO_3DS_00_00( jpk-2, 1, -1 )
+         DO_3DS( 0, 0, 0, 0, jpk-2, 1, -1 )
             pt(ji,jj,jk,jn,Kaa) = ( pt(ji,jj,jk,jn,Kaa) - zws(ji,jj,jk) * pt(ji,jj,jk+1,jn,Kaa) )   &
                &             / zwt(ji,jj,jk) * tmask(ji,jj,jk)
Index: /NEMO/trunk/src/OCE/TRA/zpshde.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRA/zpshde.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRA/zpshde.F90	(revision 13295)
@@ -107,5 +107,5 @@
       DO jn = 1, kjpt      !==   Interpolation of tracers at the last ocean level   ==!
          !
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             iku = mbku(ji,jj)   ;   ikum1 = MAX( iku - 1 , 1 )    ! last and before last ocean level at u- & v-points
             ikv = mbkv(ji,jj)   ;   ikvm1 = MAX( ikv - 1 , 1 )    ! if level first is a p-step, ik.m1=1
@@ -151,5 +151,5 @@
          pgru(:,:) = 0._wp
          pgrv(:,:) = 0._wp                ! depth of the partial step level
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             iku = mbku(ji,jj)
             ikv = mbkv(ji,jj)
@@ -167,5 +167,5 @@
          CALL eos( ztj, zhj, zrj )        ! at the partial step depth output in  zri, zrj 
          !
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             iku = mbku(ji,jj)
             ikv = mbkv(ji,jj)
@@ -262,5 +262,5 @@
       DO jn = 1, kjpt      !==   Interpolation of tracers at the last ocean level   ==!
          !
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
 
             iku = mbku(ji,jj); ikum1 = MAX( iku - 1 , 1 )    ! last and before last ocean level at u- & v-points
@@ -308,5 +308,5 @@
          pgru(:,:)=0.0_wp   ; pgrv(:,:)=0.0_wp ; 
          !
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
 
             iku = mbku(ji,jj)
@@ -329,5 +329,5 @@
          CALL eos( ztj, zhj, zrj )
 
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             iku = mbku(ji,jj)
             ikv = mbkv(ji,jj)
@@ -351,5 +351,5 @@
       !
       DO jn = 1, kjpt      !==   Interpolation of tracers at the last ocean level   ==!            !
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             iku = miku(ji,jj); ikup1 = miku(ji,jj) + 1
             ikv = mikv(ji,jj); ikvp1 = mikv(ji,jj) + 1
@@ -400,5 +400,5 @@
          !
          pgrui(:,:)  =0.0_wp; pgrvi(:,:)  =0.0_wp;
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
 
             iku = miku(ji,jj)
@@ -420,5 +420,5 @@
          CALL eos( ztj, zhj, zrj )        ! at the partial step depth output in  zri, zrj 
          !
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             iku = miku(ji,jj) 
             ikv = mikv(ji,jj) 
Index: /NEMO/trunk/src/OCE/TRD/trddyn.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRD/trddyn.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRD/trddyn.F90	(revision 13295)
@@ -124,5 +124,5 @@
                               z3dx(:,:,:) = 0._wp                  ! U.dxU & V.dyV (approximation)
                               z3dy(:,:,:) = 0._wp
-                              DO_3D_00_00( 1, jpkm1 )
+                              DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                                  z3dx(ji,jj,jk) = uu(ji,jj,jk,Kmm) * ( uu(ji+1,jj,jk,Kmm) - uu(ji-1,jj,jk,Kmm) ) / ( 2._wp * e1u(ji,jj) )
                                  z3dy(ji,jj,jk) = vv(ji,jj,jk,Kmm) * ( vv(ji,jj+1,jk,Kmm) - vv(ji,jj-1,jk,Kmm) ) / ( 2._wp * e2v(ji,jj) )
Index: /NEMO/trunk/src/OCE/TRD/trdglo.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRD/trdglo.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRD/trdglo.F90	(revision 13295)
@@ -86,5 +86,5 @@
       	!
       	CASE( 'TRA' )          !==  Tracers (T & S)  ==!
-      	   DO_3D_11_11( 1, jpkm1 )
+      	   DO_3D( 1, 1, 1, 1, 1, jpkm1 )
 	            zvm = e1e2t(ji,jj) * e3t(ji,jj,jk,Kmm) * tmask(ji,jj,jk) * tmask_i(ji,jj)
 	            zvt = ptrdx(ji,jj,jk) * zvm
@@ -115,5 +115,5 @@
             !
          CASE( 'DYN' )          !==  Momentum and KE  ==!        
-            DO_3D_10_10( 1, jpkm1 )
+            DO_3D( 1, 0, 1, 0, 1, jpkm1 )
                zvt = ptrdx(ji,jj,jk) * tmask_i(ji+1,jj) * tmask_i(ji,jj) * umask(ji,jj,jk)   &
                   &                                     * e1e2u  (ji,jj) * e3u(ji,jj,jk,Kmm)
@@ -127,5 +127,5 @@
             IF( ktrd == jpdyn_zdf ) THEN      ! zdf trend: compute separately the surface forcing trend
                z1_2rho0 = 0.5_wp / rho0
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   zvt = ( utau_b(ji,jj) + utau(ji,jj) ) * tmask_i(ji+1,jj) * tmask_i(ji,jj) * umask(ji,jj,jk)   &
                      &                                                     * z1_2rho0       * e1e2u(ji,jj)
@@ -211,5 +211,5 @@
          
          zcof   = 0.5_wp / rho0           ! Density flux at u and v-points
-         DO_3D_10_10( 1, jpkm1 )
+         DO_3D( 1, 0, 1, 0, 1, jpkm1 )
             zkx(ji,jj,jk) = zcof * e2u(ji,jj) * e3u(ji,jj,jk,Kmm)   &
                &                              *  uu(ji,jj,jk,Kmm) * ( rhop(ji,jj,jk) + rhop(ji+1,jj,jk) )
@@ -218,5 +218,5 @@
          END_3D
          
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zkepe(ji,jj,jk) = - (  zkz(ji,jj,jk) - zkz(ji  ,jj  ,jk+1)               &
                &                 + zkx(ji,jj,jk) - zkx(ji-1,jj  ,jk  )               &
@@ -527,5 +527,5 @@
       tvolv = 0._wp
 
-      DO_3D_00_00( 1, jpk )
+      DO_3D( 0, 0, 0, 0, 1, jpk )
          tvolu = tvolu + e1u(ji,jj) * e2u(ji,jj) * e3u(ji,jj,jk,Kmm)   &
             &                                       * tmask_i(ji+1,jj  ) * tmask_i(ji,jj) * umask(ji,jj,jk)
Index: /NEMO/trunk/src/OCE/TRD/trdken.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRD/trdken.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRD/trdken.F90	(revision 13295)
@@ -102,5 +102,5 @@
       zke(1,:, : ) = 0._wp
       zke(:,1, : ) = 0._wp
-      DO_3D_01_01( 1, jpkm1 )
+      DO_3D( 0, 1, 0, 1, 1, jpkm1 )
          zke(ji,jj,jk) = 0.5_wp * rho0 *( uu(ji  ,jj,jk,Kmm) * putrd(ji  ,jj,jk) * bu(ji  ,jj,jk)  &
             &                           + uu(ji-1,jj,jk,Kmm) * putrd(ji-1,jj,jk) * bu(ji-1,jj,jk)  &
@@ -123,5 +123,5 @@
                            z2dy(:,:) = vv(:,:,1,Kmm) * ( vtau_b(:,:) + vtau(:,:) ) * e1e2v(:,:) * vmask(:,:,1)
                            zke2d(1,:) = 0._wp   ;   zke2d(:,1) = 0._wp
-                           DO_2D_01_01
+                           DO_2D( 0, 1, 0, 1 )
                               zke2d(ji,jj) = r1_rho0 * 0.5_wp * (   z2dx(ji,jj) + z2dx(ji-1,jj)   &
                               &                                   + z2dy(ji,jj) + z2dy(ji,jj-1)   ) * r1_bt(ji,jj,1)
@@ -219,5 +219,5 @@
 
       ! conv value on T-point
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zcoef = 0.5_wp / e3t(ji,jj,jk,Kmm)
          pconv(ji,jj,jk) = zcoef * ( zconv(ji,jj,jk) + zconv(ji,jj,jk+1) ) * tmask(ji,jj,jk)
Index: /NEMO/trunk/src/OCE/TRD/trdmxl.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRD/trdmxl.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRD/trdmxl.F90	(revision 13295)
@@ -120,5 +120,5 @@
          !
          wkx(:,:,:) = 0._wp         !==  now ML weights for vertical averaging  ==!
-         DO_3D_11_11( 1, jpktrd )
+         DO_3D( 1, 1, 1, 1, 1, jpktrd )
             IF( jk - kmxln(ji,jj) < 0 )   THEN
                wkx(ji,jj,jk) = e3t(ji,jj,jk,Kmm) * tmask(ji,jj,jk)
Index: /NEMO/trunk/src/OCE/TRD/trdtra.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRD/trdtra.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRD/trdtra.F90	(revision 13295)
@@ -221,5 +221,5 @@
       ptrd(:,:,jpk) = 0._wp
       !
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          ptrd(ji,jj,jk) = - (     pf (ji,jj,jk) - pf (ji-ii,jj-ij,jk-ik)                        &
            &                  - ( pu(ji,jj,jk) - pu(ji-ii,jj-ij,jk-ik) ) * pt(ji,jj,jk)  )   &
Index: /NEMO/trunk/src/OCE/TRD/trdvor.F90
===================================================================
--- /NEMO/trunk/src/OCE/TRD/trdvor.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/TRD/trdvor.F90	(revision 13295)
@@ -105,5 +105,5 @@
       CASE( jpdyn_zdf )                                                      ! Vertical Diffusion 
          ztswu(:,:) = 0.e0   ;   ztswv(:,:) = 0.e0
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ztswu(ji,jj) = 0.5 * ( utau_b(ji,jj) + utau(ji,jj) ) / ( e3u(ji,jj,1,Kmm) * rho0 )
             ztswv(ji,jj) = 0.5 * ( vtau_b(ji,jj) + vtau(ji,jj) ) / ( e3v(ji,jj,1,Kmm) * rho0 )
@@ -172,5 +172,5 @@
       !
       CASE( jpvor_bfr )        ! bottom friction
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ikbu = mbkv(ji,jj)
             ikbv = mbkv(ji,jj)            
Index: /NEMO/trunk/src/OCE/USR/usrdef_hgr.F90
===================================================================
--- /NEMO/trunk/src/OCE/USR/usrdef_hgr.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/USR/usrdef_hgr.F90	(revision 13295)
@@ -115,5 +115,5 @@
       ENDIF
       !   
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zim1 = REAL( mig0_oldcmp(ji), wp ) - 1.   ;   zim05 = REAL( mig0_oldcmp(ji), wp ) - 1.5
          zjm1 = REAL( mjg0_oldcmp(jj), wp ) - 1.   ;   zjm05 = REAL( mjg0_oldcmp(jj), wp ) - 1.5
Index: /NEMO/trunk/src/OCE/USR/usrdef_istate.F90
===================================================================
--- /NEMO/trunk/src/OCE/USR/usrdef_istate.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/USR/usrdef_istate.F90	(revision 13295)
@@ -61,5 +61,5 @@
       pssh(:,:)   = 0._wp
       !
-      DO_3D_11_11( 1, jpk )
+      DO_3D( 1, 1, 1, 1, 1, jpk )
          pts(ji,jj,jk,jp_tem) =  (  (  16. - 12. * TANH( (pdept(ji,jj,jk) - 400) / 700 ) )   &
               &           * (-TANH( (500. - pdept(ji,jj,jk)) / 150. ) + 1.) / 2.             &
Index: /NEMO/trunk/src/OCE/USR/usrdef_sbc.F90
===================================================================
--- /NEMO/trunk/src/OCE/USR/usrdef_sbc.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/USR/usrdef_sbc.F90	(revision 13295)
@@ -110,5 +110,5 @@
       ztrp= - 40.e0        ! retroaction term on heat fluxes (W/m2/K)
       zconv = 3.16e-5      ! convertion factor: 1 m/yr => 3.16e-5 mm/s
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ! domain from 15 deg to 50 deg between 27 and 28  degC at 15N, -3
          ! and 13 degC at 50N 53.5 + or - 11 = 1/4 period :
@@ -165,5 +165,5 @@
       ztau_sais = 0.015
       ztaun = ztau - ztau_sais * COS( (ztime - ztimemax) / (ztimemin - ztimemax) * rpi )
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
         ! domain from 15deg to 50deg and 1/2 period along 14deg
         ! so 5/4 of half period with seasonal cycle
@@ -174,5 +174,5 @@
       ! module of wind stress and wind speed at T-point
       zcoef = 1. / ( zrhoa * zcdrag ) 
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          ztx = utau(ji-1,jj  ) + utau(ji,jj) 
          zty = vtau(ji  ,jj-1) + vtau(ji,jj) 
Index: /NEMO/trunk/src/OCE/ZDF/zdfddm.F90
===================================================================
--- /NEMO/trunk/src/OCE/ZDF/zdfddm.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ZDF/zdfddm.F90	(revision 13295)
@@ -94,5 +94,5 @@
 !!gm                            and many acces in memory
          
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             zrw =   ( gdepw(ji,jj,jk  ,Kmm) - gdept(ji,jj,jk,Kmm) )   &
 !!gm please, use e3w at Kmm below 
@@ -110,5 +110,5 @@
          END_2D
 
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ! stability indicator: msks=1 if rn2>0; 0 elsewhere
             IF( rn2(ji,jj,jk) + 1.e-12  <= 0. ) THEN   ;   zmsks(ji,jj) = 0._wp
@@ -140,5 +140,5 @@
          ! ------------------
          ! Constant eddy coefficient: reset to the background value
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             zinr = 1._wp / zrau(ji,jj)
             ! salt fingering
Index: /NEMO/trunk/src/OCE/ZDF/zdfdrg.F90
===================================================================
--- /NEMO/trunk/src/OCE/ZDF/zdfdrg.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ZDF/zdfdrg.F90	(revision 13295)
@@ -116,5 +116,5 @@
       !
       IF( l_log_not_linssh ) THEN     !==  "log layer"  ==!   compute Cd and -Cd*|U|
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             imk = k_mk(ji,jj)          ! ocean bottom level at t-points
             zut = uu(ji,jj,imk,Kmm) + uu(ji-1,jj,imk,Kmm)     ! 2 x velocity at t-point
@@ -128,5 +128,5 @@
          END_2D
       ELSE                                            !==  standard Cd  ==!
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             imk = k_mk(ji,jj)    ! ocean bottom level at t-points
             zut = uu(ji,jj,imk,Kmm) + uu(ji-1,jj,imk,Kmm)     ! 2 x velocity at t-point
@@ -175,5 +175,5 @@
       ENDIF
 
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          ikbu = mbku(ji,jj)          ! deepest wet ocean u- & v-levels
          ikbv = mbkv(ji,jj)
@@ -188,5 +188,5 @@
       !
       IF( ln_isfcav ) THEN        ! ocean cavities
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ikbu = miku(ji,jj)          ! first wet ocean u- & v-levels
             ikbv = mikv(ji,jj)
@@ -422,5 +422,5 @@
             l_log_not_linssh = .FALSE.    !- don't update Cd at each time step
             !
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                zzz =  0.5_wp * e3t_0(ji,jj,k_mk(ji,jj))
                zcd = (  vkarmn / LOG( zzz / rn_z0 )  )**2
Index: /NEMO/trunk/src/OCE/ZDF/zdfevd.F90
===================================================================
--- /NEMO/trunk/src/OCE/ZDF/zdfevd.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ZDF/zdfevd.F90	(revision 13295)
@@ -87,5 +87,5 @@
 !         END WHERE
          !
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             IF(  MIN( rn2(ji,jj,jk), rn2b(ji,jj,jk) ) <= -1.e-12 ) THEN
                p_avt(ji,jj,jk) = rn_evd * wmask(ji,jj,jk)
@@ -103,5 +103,5 @@
 !         END WHERE
 
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             IF(  MIN( rn2(ji,jj,jk), rn2b(ji,jj,jk) ) <= -1.e-12 )   &
                p_avt(ji,jj,jk) = rn_evd * wmask(ji,jj,jk)
Index: /NEMO/trunk/src/OCE/ZDF/zdfgls.F90
===================================================================
--- /NEMO/trunk/src/OCE/ZDF/zdfgls.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ZDF/zdfgls.F90	(revision 13295)
@@ -168,5 +168,5 @@
 
       ! Compute surface, top and bottom friction at T-points
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          !
          ! surface friction
@@ -181,5 +181,5 @@
       END_2D
       IF( ln_isfcav ) THEN       !top friction
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zmsku = ( 2. - umask(ji-1,jj,mikt(ji,jj)) * umask(ji,jj,mikt(ji,jj)) )
             zmskv = ( 2. - vmask(ji,jj-1,mikt(ji,jj)) * vmask(ji,jj,mikt(ji,jj)) )     ! (CAUTION: CdU<0)
@@ -204,5 +204,5 @@
       END SELECT
       !
-      DO_3D_10_10( 2, jpkm1 )
+      DO_3D( 1, 0, 1, 0, 2, jpkm1 )
          eps(ji,jj,jk)  = rc03 * en(ji,jj,jk) * SQRT( en(ji,jj,jk) ) / hmxl_n(ji,jj,jk)
       END_3D
@@ -213,5 +213,5 @@
 
       IF( nn_clos == 0 ) THEN    ! Mellor-Yamada
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             zup   = hmxl_n(ji,jj,jk) * gdepw(ji,jj,mbkt(ji,jj)+1,Kmm)
             zdown = vkarmn * gdepw(ji,jj,jk,Kmm) * ( -gdepw(ji,jj,jk,Kmm) + gdepw(ji,jj,mbkt(ji,jj)+1,Kmm) )
@@ -234,5 +234,5 @@
       ! Warning : after this step, en : right hand side of the matrix
 
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          !
          buoy = - p_avt(ji,jj,jk) * rn2(ji,jj,jk)     ! stratif. destruction
@@ -330,5 +330,5 @@
          !                      ! en(ibot) = u*^2 / Co2 and hmxl_n(ibot) = rn_lmin
          !                      ! Balance between the production and the dissipation terms
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
 !!gm This means that bottom and ocean w-level above have a specified "en" value.   Sure ????
 !!   With thick deep ocean level thickness, this may be quite large, no ???
@@ -348,5 +348,5 @@
          !
          IF( ln_isfcav) THEN     ! top boundary   (ocean cavity)
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                itop   = mikt(ji,jj)       ! k   top w-point
                itopp1 = mikt(ji,jj) + 1   ! k+1 1st w-point below the top one
@@ -366,5 +366,5 @@
       CASE ( 1 )             ! Neumman boundary condition
          !                      
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ibot   = mbkt(ji,jj) + 1      ! k   bottom level of w-point
             ibotm1 = mbkt(ji,jj)          ! k-1 bottom level of w-point but >=1
@@ -380,5 +380,5 @@
          END_2D
          IF( ln_isfcav) THEN     ! top boundary   (ocean cavity)
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                itop   = mikt(ji,jj)       ! k   top w-point
                itopp1 = mikt(ji,jj) + 1   ! k+1 1st w-point below the top one
@@ -400,11 +400,11 @@
       ! ----------------------------------------------------------
       !
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          zdiag(ji,jj,jk) = zdiag(ji,jj,jk) - zd_lw(ji,jj,jk) * zd_up(ji,jj,jk-1) / zdiag(ji,jj,jk-1)
       END_3D
-      DO_3D_00_00( 2, jpk )
+      DO_3D( 0, 0, 0, 0, 2, jpk )
          zd_lw(ji,jj,jk) = en(ji,jj,jk) - zd_lw(ji,jj,jk) / zdiag(ji,jj,jk-1) * zd_lw(ji,jj,jk-1)
       END_3D
-      DO_3DS_00_00( jpk-1, 2, -1 )
+      DO_3DS( 0, 0, 0, 0, jpk-1, 2, -1 )
          en(ji,jj,jk) = ( zd_lw(ji,jj,jk) - zd_up(ji,jj,jk) * en(ji,jj,jk+1) ) / zdiag(ji,jj,jk)
       END_3D
@@ -421,20 +421,20 @@
       !
       CASE( 0 )               ! k-kl  (Mellor-Yamada)
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             psi(ji,jj,jk)  = eb(ji,jj,jk) * hmxl_b(ji,jj,jk)
          END_3D
          !
       CASE( 1 )               ! k-eps
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             psi(ji,jj,jk)  = eps(ji,jj,jk)
          END_3D
          !
       CASE( 2 )               ! k-w
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             psi(ji,jj,jk)  = SQRT( eb(ji,jj,jk) ) / ( rc0 * hmxl_b(ji,jj,jk) )
          END_3D
          !
       CASE( 3 )               ! generic
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             psi(ji,jj,jk)  = rc02 * eb(ji,jj,jk) * hmxl_b(ji,jj,jk)**rnn 
          END_3D
@@ -449,5 +449,5 @@
       ! Warning : after this step, en : right hand side of the matrix
 
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          !
          ! psi / k
@@ -546,5 +546,5 @@
          !                      ! en(ibot) = u*^2 / Co2 and hmxl_n(ibot) = vkarmn * r_z0_bot
          !                      ! Balance between the production and the dissipation terms
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ibot   = mbkt(ji,jj) + 1      ! k   bottom level of w-point
             ibotm1 = mbkt(ji,jj)          ! k-1 bottom level of w-point but >=1
@@ -565,5 +565,5 @@
       CASE ( 1 )             ! Neumman boundary condition
          !                      
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ibot   = mbkt(ji,jj) + 1      ! k   bottom level of w-point
             ibotm1 = mbkt(ji,jj)          ! k-1 bottom level of w-point but >=1
@@ -593,11 +593,11 @@
       ! ----------------
       !
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          zdiag(ji,jj,jk) = zdiag(ji,jj,jk) - zd_lw(ji,jj,jk) * zd_up(ji,jj,jk-1) / zdiag(ji,jj,jk-1)
       END_3D
-      DO_3D_00_00( 2, jpk )
+      DO_3D( 0, 0, 0, 0, 2, jpk )
          zd_lw(ji,jj,jk) = psi(ji,jj,jk) - zd_lw(ji,jj,jk) / zdiag(ji,jj,jk-1) * zd_lw(ji,jj,jk-1)
       END_3D
-      DO_3DS_00_00( jpk-1, 2, -1 )
+      DO_3DS( 0, 0, 0, 0, jpk-1, 2, -1 )
          psi(ji,jj,jk) = ( zd_lw(ji,jj,jk) - zd_up(ji,jj,jk) * psi(ji,jj,jk+1) ) / zdiag(ji,jj,jk)
       END_3D
@@ -609,15 +609,15 @@
       !
       CASE( 0 )               ! k-kl  (Mellor-Yamada)
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             eps(ji,jj,jk) = rc03 * en(ji,jj,jk) * en(ji,jj,jk) * SQRT( en(ji,jj,jk) ) / MAX( psi(ji,jj,jk), rn_epsmin)
          END_3D
          !
       CASE( 1 )               ! k-eps
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             eps(ji,jj,jk) = psi(ji,jj,jk)
          END_3D
          !
       CASE( 2 )               ! k-w
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             eps(ji,jj,jk) = rc04 * en(ji,jj,jk) * psi(ji,jj,jk) 
          END_3D
@@ -627,5 +627,5 @@
          zex1  =      ( 1.5_wp + rmm/rnn )
          zex2  = -1._wp / rnn
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             eps(ji,jj,jk) = zcoef * en(ji,jj,jk)**zex1 * psi(ji,jj,jk)**zex2
          END_3D
@@ -635,5 +635,5 @@
       ! Limit dissipation rate under stable stratification
       ! --------------------------------------------------
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          ! limitation
          eps   (ji,jj,jk)  = MAX( eps(ji,jj,jk), rn_epsmin )
@@ -651,5 +651,5 @@
       !
       CASE ( 0 , 1 )             ! Galperin or Kantha-Clayson stability functions
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             ! zcof =  l²/q²
             zcof = hmxl_b(ji,jj,jk) * hmxl_b(ji,jj,jk) / ( 2._wp*eb(ji,jj,jk) )
@@ -668,5 +668,5 @@
          !
       CASE ( 2, 3 )               ! Canuto stability functions
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             ! zcof =  l²/q²
             zcof = hmxl_b(ji,jj,jk)*hmxl_b(ji,jj,jk) / ( 2._wp * eb(ji,jj,jk) )
@@ -700,5 +700,5 @@
       ! default value, in case jpk > mbkt(ji,jj)+1. Not needed but avoid a bug when looking for undefined values (-fpe0)
       zstm(:,:,jpk) = 0.  
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zstm(ji,jj,mbkt(ji,jj)+1) = zstm(ji,jj,mbkt(ji,jj))
       END_2D
@@ -715,5 +715,5 @@
       !     later overwritten by surface/bottom boundaries conditions, so we don't really care of p_avm(:,:1) and p_avm(:,:jpk)
       !     for zd_lw and zd_up but they have to be defined to avoid a bug when looking for undefined values (-fpe0)
-      DO_3D_00_00( 1, jpk )
+      DO_3D( 0, 0, 0, 0, 1, jpk )
          zsqen = SQRT( 2._wp * en(ji,jj,jk) ) * hmxl_n(ji,jj,jk)
          zavt  = zsqen * zstt(ji,jj,jk)
Index: /NEMO/trunk/src/OCE/ZDF/zdfiwm.F90
===================================================================
--- /NEMO/trunk/src/OCE/ZDF/zdfiwm.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ZDF/zdfiwm.F90	(revision 13295)
@@ -143,5 +143,5 @@
       ! Set to zero the 1st and last vertical levels of appropriate variables
       IF( iom_use("emix_iwm") ) THEN
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zemx_iwm (ji,jj,1) = 0._wp   ;   zemx_iwm (ji,jj,jpk) = 0._wp
          END_2D
@@ -150,5 +150,5 @@
       ENDIF
       IF( iom_use("av_ratio") ) THEN
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zav_ratio(ji,jj,1) = 0._wp   ;   zav_ratio(ji,jj,jpk) = 0._wp
          END_2D
@@ -157,5 +157,5 @@
       ENDIF
       IF( iom_use("av_wave") ) THEN
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zav_wave (ji,jj,1) = 0._wp   ;   zav_wave (ji,jj,jpk) = 0._wp
          END_2D
@@ -170,5 +170,5 @@
       !                       !* Critical slope mixing: distribute energy over the time-varying ocean depth,
       !                                                 using an exponential decay from the seafloor.
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zhdep(ji,jj) = gdepw_0(ji,jj,mbkt(ji,jj)+1)       ! depth of the ocean
          zfact(ji,jj) = rho0 * (  1._wp - EXP( -zhdep(ji,jj) / hcri_iwm(ji,jj) )  )
@@ -176,5 +176,5 @@
       END_2D
 !!gm gde3w ==>>>  check for ssh taken into account.... seem OK gde3w_n=gdept(:,:,:,Kmm) - ssh(:,:,Kmm)
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          IF ( zfact(ji,jj) == 0._wp .OR. wmask(ji,jj,jk) == 0._wp ) THEN   ! optimization
             zemx_iwm(ji,jj,jk) = 0._wp
@@ -196,16 +196,16 @@
       CASE ( 1 )               ! Dissipation scales as N (recommended)
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zfact(ji,jj) = 0._wp
          END_2D
-         DO_3D_00_00( 2, jpkm1 )       ! part independent of the level
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )       ! part independent of the level
             zfact(ji,jj) = zfact(ji,jj) + e3w(ji,jj,jk,Kmm) * SQRT(  MAX( 0._wp, rn2(ji,jj,jk) )  ) * wmask(ji,jj,jk)
          END_3D
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             IF( zfact(ji,jj) /= 0 )   zfact(ji,jj) = epyc_iwm(ji,jj) / ( rho0 * zfact(ji,jj) )
          END_2D
          !
-         DO_3D_00_00( 2, jpkm1 )       ! complete with the level-dependent part
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )       ! complete with the level-dependent part
             zemx_iwm(ji,jj,jk) = zemx_iwm(ji,jj,jk) + zfact(ji,jj) * SQRT(  MAX( 0._wp, rn2(ji,jj,jk) )  ) * wmask(ji,jj,jk)
          END_3D
@@ -213,16 +213,16 @@
       CASE ( 2 )               ! Dissipation scales as N^2
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zfact(ji,jj) = 0._wp
          END_2D
-         DO_3D_00_00( 2, jpkm1 )       ! part independent of the level
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )       ! part independent of the level
             zfact(ji,jj) = zfact(ji,jj) + e3w(ji,jj,jk,Kmm) * MAX( 0._wp, rn2(ji,jj,jk) ) * wmask(ji,jj,jk)
          END_3D
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             IF( zfact(ji,jj) /= 0 )   zfact(ji,jj) = epyc_iwm(ji,jj) / ( rho0 * zfact(ji,jj) )
          END_2D
          !
-         DO_3D_00_00( 2, jpkm1 )       ! complete with the level-dependent part
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )       ! complete with the level-dependent part
             zemx_iwm(ji,jj,jk) = zemx_iwm(ji,jj,jk) + zfact(ji,jj) * MAX( 0._wp, rn2(ji,jj,jk) ) * wmask(ji,jj,jk)
          END_3D
@@ -233,23 +233,23 @@
       !                        !* ocean depth as proportional to rn2 * exp(-z_wkb/rn_hbot)
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zwkb(ji,jj,1) = 0._wp
       END_2D
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          zwkb(ji,jj,jk) = zwkb(ji,jj,jk-1) + e3w(ji,jj,jk,Kmm) * SQRT(  MAX( 0._wp, rn2(ji,jj,jk) )  ) * wmask(ji,jj,jk)
       END_3D
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zfact(ji,jj) = zwkb(ji,jj,jpkm1)
       END_2D
       !
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          IF( zfact(ji,jj) /= 0 )   zwkb(ji,jj,jk) = zhdep(ji,jj) * ( zfact(ji,jj) - zwkb(ji,jj,jk) )   &
             &                                     * wmask(ji,jj,jk) / zfact(ji,jj)
       END_3D
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zwkb (ji,jj,1) = zhdep(ji,jj) * wmask(ji,jj,1)
       END_2D
       !
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          IF ( rn2(ji,jj,jk) <= 0._wp .OR. wmask(ji,jj,jk) == 0._wp ) THEN   ! optimization: EXP coast a lot
             zweight(ji,jj,jk) = 0._wp
@@ -260,16 +260,16 @@
       END_3D
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zfact(ji,jj) = 0._wp
       END_2D
-      DO_3D_00_00( 2, jpkm1 )       ! part independent of the level
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )       ! part independent of the level
          zfact(ji,jj) = zfact(ji,jj) + zweight(ji,jj,jk)
       END_3D
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          IF( zfact(ji,jj) /= 0 )   zfact(ji,jj) = ebot_iwm(ji,jj) / ( rho0 * zfact(ji,jj) )
       END_2D
       !
-      DO_3D_00_00( 2, jpkm1 )       ! complete with the level-dependent part
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )       ! complete with the level-dependent part
          zemx_iwm(ji,jj,jk) = zemx_iwm(ji,jj,jk) + zweight(ji,jj,jk) * zfact(ji,jj) * wmask(ji,jj,jk)   &
             &                                                        / ( gde3w(ji,jj,jk) - gde3w(ji,jj,jk-1) )
@@ -279,10 +279,10 @@
 !!gm  this is to be replaced by just a constant value znu=1.e-6 m2/s
       ! Calculate molecular kinematic viscosity
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          znu_t(ji,jj,jk) = 1.e-4_wp * (  17.91_wp - 0.53810_wp * ts(ji,jj,jk,jp_tem,Kmm)   &
             &                                     + 0.00694_wp * ts(ji,jj,jk,jp_tem,Kmm) * ts(ji,jj,jk,jp_tem,Kmm)  &
             &                                     + 0.02305_wp * ts(ji,jj,jk,jp_sal,Kmm)  ) * tmask(ji,jj,jk) * r1_rho0
       END_3D
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          znu_w(ji,jj,jk) = 0.5_wp * ( znu_t(ji,jj,jk-1) + znu_t(ji,jj,jk) ) * wmask(ji,jj,jk)
       END_3D
@@ -290,15 +290,15 @@
       !
       ! Calculate turbulence intensity parameter Reb
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          zReb(ji,jj,jk) = zemx_iwm(ji,jj,jk) / MAX( 1.e-20_wp, znu_w(ji,jj,jk) * rn2(ji,jj,jk) )
       END_3D
       !
       ! Define internal wave-induced diffusivity
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          zav_wave(ji,jj,jk) = znu_w(ji,jj,jk) * zReb(ji,jj,jk) * r1_6   ! This corresponds to a constant mixing efficiency of 1/6
       END_3D
       !
       IF( ln_mevar ) THEN              ! Variable mixing efficiency case : modify zav_wave in the
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             IF( zReb(ji,jj,jk) > 480.00_wp ) THEN
                zav_wave(ji,jj,jk) = 3.6515_wp * znu_w(ji,jj,jk) * SQRT( zReb(ji,jj,jk) )
@@ -309,5 +309,5 @@
       ENDIF
       !
-      DO_3D_00_00( 2, jpkm1 )          ! Bound diffusivity by molecular value and 100 cm2/s
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )          ! Bound diffusivity by molecular value and 100 cm2/s
          zav_wave(ji,jj,jk) = MIN(  MAX( 1.4e-7_wp, zav_wave(ji,jj,jk) ), 1.e-2_wp  ) * wmask(ji,jj,jk)
       END_3D
@@ -316,5 +316,5 @@
          zztmp = 0._wp
 !!gm used of glosum 3D....
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             zztmp = zztmp + e3w(ji,jj,jk,Kmm) * e1e2t(ji,jj)   &
                &          * MAX( 0._wp, rn2(ji,jj,jk) ) * zav_wave(ji,jj,jk) * wmask(ji,jj,jk) * tmask_i(ji,jj)
@@ -338,5 +338,5 @@
       IF( ln_tsdiff ) THEN          !* Option for differential mixing of salinity and temperature
          ztmp1 = 0.505_wp + 0.495_wp * TANH( 0.92_wp * ( LOG10( 1.e-20_wp ) - 0.60_wp ) )
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             ztmp2 = zReb(ji,jj,jk) * 5._wp * r1_6
             IF ( ztmp2 > 1.e-20_wp .AND. wmask(ji,jj,jk) == 1._wp ) THEN
@@ -347,5 +347,5 @@
          END_3D
          CALL iom_put( "av_ratio", zav_ratio )
-         DO_3D_00_00( 2, jpkm1 )    !* update momentum & tracer diffusivity with wave-driven mixing
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )    !* update momentum & tracer diffusivity with wave-driven mixing
             p_avs(ji,jj,jk) = p_avs(ji,jj,jk) + zav_wave(ji,jj,jk) * zav_ratio(ji,jj,jk)
             p_avt(ji,jj,jk) = p_avt(ji,jj,jk) + zav_wave(ji,jj,jk)
@@ -354,5 +354,5 @@
          !
       ELSE                          !* update momentum & tracer diffusivity with wave-driven mixing
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             p_avs(ji,jj,jk) = p_avs(ji,jj,jk) + zav_wave(ji,jj,jk)
             p_avt(ji,jj,jk) = p_avt(ji,jj,jk) + zav_wave(ji,jj,jk)
@@ -369,5 +369,5 @@
          ALLOCATE( z2d(jpi,jpj) , z3d(jpi,jpj,jpk) )
          ! Initialisation for iom_put
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             z3d(ji,jj,1) = 0._wp   ;   z3d(ji,jj,jpk) = 0._wp
          END_2D
@@ -377,14 +377,14 @@
          z2d(jpi-nn_hls+1:jpi   ,:  ) = 0._wp   ;   z2d(:,jpj-nn_hls+1:   jpj  ) = 0._wp
 
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             z3d(ji,jj,jk) = MAX( 0._wp, rn2(ji,jj,jk) ) * zav_wave(ji,jj,jk)
          END_3D
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             z2d(ji,jj) = 0._wp
          END_2D
-         DO_3D_00_00( 2, jpkm1 ) 
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
             z2d(ji,jj) = z2d(ji,jj) + e3w(ji,jj,jk,Kmm) * z3d(ji,jj,jk) * wmask(ji,jj,jk)
          END_3D
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             z2d(ji,jj) = rho0 * z2d(ji,jj)
          END_2D
Index: /NEMO/trunk/src/OCE/ZDF/zdfmxl.F90
===================================================================
--- /NEMO/trunk/src/OCE/ZDF/zdfmxl.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ZDF/zdfmxl.F90	(revision 13295)
@@ -99,5 +99,5 @@
       hmlp(:,:)  = 0._wp               ! here hmlp used as a dummy variable, integrating vertically N^2
       zN2_c = grav * rho_c * r1_rho0   ! convert density criteria into N^2 criteria
-      DO_3D_11_11( nlb10, jpkm1 )
+      DO_3D( 1, 1, 1, 1, nlb10, jpkm1 )
          ikt = mbkt(ji,jj)
          hmlp(ji,jj) =   &
@@ -108,9 +108,9 @@
       ! w-level of the turbocline and mixing layer (iom_use)
       imld(:,:) = mbkt(:,:) + 1        ! Initialization to the number of w ocean point
-      DO_3DS_11_11( jpkm1, nlb10, -1 )
+      DO_3DS( 1, 1, 1, 1, jpkm1, nlb10, -1 )
          IF( avt (ji,jj,jk) < avt_c * wmask(ji,jj,jk) )   imld(ji,jj) = jk      ! Turbocline 
       END_3D
       ! depth of the mixing and mixed layers
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          iiki = imld(ji,jj)
          iikn = nmln(ji,jj)
Index: /NEMO/trunk/src/OCE/ZDF/zdfosm.F90
===================================================================
--- /NEMO/trunk/src/OCE/ZDF/zdfosm.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ZDF/zdfosm.F90	(revision 13295)
@@ -300,5 +300,5 @@
      zz0 =       rn_abs       ! surface equi-partition in 2-bands
      zz1 =  1. - rn_abs
-     DO_2D_00_00
+     DO_2D( 0, 0, 0, 0 )
         ! Surface downward irradiance (so always +ve)
         zrad0(ji,jj) = qsr(ji,jj) * r1_rho0_rcp
@@ -310,5 +310,5 @@
      END_2D
      ! Turbulent surface fluxes and fluxes averaged over depth of the OSBL
-     DO_2D_00_00
+     DO_2D( 0, 0, 0, 0 )
         zthermal = rab_n(ji,jj,1,jp_tem)
         zbeta    = rab_n(ji,jj,1,jp_sal)
@@ -337,5 +337,5 @@
      ! Assume constant La#=0.3
      CASE(0)
-        DO_2D_00_00
+        DO_2D( 0, 0, 0, 0 )
            zus_x = zcos_wind(ji,jj) * zustar(ji,jj) / 0.3**2
            zus_y = zsin_wind(ji,jj) * zustar(ji,jj) / 0.3**2
@@ -345,5 +345,5 @@
      ! Assume Pierson-Moskovitz wind-wave spectrum
      CASE(1)
-        DO_2D_00_00
+        DO_2D( 0, 0, 0, 0 )
            ! Use wind speed wndm included in sbc_oce module
            zustke(ji,jj) = MAX ( 0.016 * wndm(ji,jj), 1.0e-8 )
@@ -353,5 +353,5 @@
      CASE(2)
         zfac =  2.0_wp * rpi / 16.0_wp
-        DO_2D_00_00
+        DO_2D( 0, 0, 0, 0 )
            ! The Langmur number from the ECMWF model appears to give La<0.3 for wind-driven seas.
            !    The coefficient 0.8 gives La=0.3  in this situation.
@@ -366,5 +366,5 @@
      ! Langmuir velocity scale (zwstrl), La # (zla)
      ! mixed scale (zvstr), convective velocity scale (zwstrc)
-     DO_2D_00_00
+     DO_2D( 0, 0, 0, 0 )
         ! Langmuir velocity scale (zwstrl), at T-point
         zwstrl(ji,jj) = ( zustar(ji,jj) * zustar(ji,jj) * zustke(ji,jj) )**pthird
@@ -402,5 +402,5 @@
       hbl(:,:) = MAX(hbl(:,:), gdepw(:,:,3,Kmm) )
       ibld(:,:) = 3
-      DO_3D_00_00( 4, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 4, jpkm1 )
          IF ( hbl(ji,jj) >= gdepw(ji,jj,jk,Kmm) ) THEN
             ibld(ji,jj) = MIN(mbkt(ji,jj), jk)
@@ -408,5 +408,5 @@
       END_3D
 
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
             zthermal = rab_n(ji,jj,1,jp_tem) !ideally use ibld not 1??
             zbeta    = rab_n(ji,jj,1,jp_sal)
@@ -478,5 +478,5 @@
       zdhdt(:,:) = MIN(zdhdt(:,:), (zhbl_t(:,:) - hbl(:,:))/rn_Dt + ww(ji,jj,ibld(ji,jj))) ! adjustment to represent limiting by ocean bottom
 
-      DO_3D_00_00( 4, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 4, jpkm1 )
          IF ( zhbl_t(ji,jj) >= gdepw(ji,jj,jk,Kmm) ) THEN
             ibld(ji,jj) =  MIN(mbkt(ji,jj), jk)
@@ -487,5 +487,5 @@
 ! Step through model levels taking account of buoyancy change to determine the effect on dhdt
 !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          IF ( ibld(ji,jj) - imld(ji,jj) > 1 ) THEN
 !
@@ -552,5 +552,5 @@
      ! Consider later  combining this into the loop above and looking for columns
      ! where the index for base of the boundary layer have changed
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
             zthermal = rab_n(ji,jj,1,jp_tem) !ideally use ibld not 1??
             zbeta    = rab_n(ji,jj,1,jp_sal)
@@ -635,5 +635,5 @@
       ! Average over the depth of the mixed layer in the convective boundary layer
       ! Also calculate entrainment fluxes for temperature and salinity
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zthermal = rab_n(ji,jj,1,jp_tem) !ideally use ibld not 1??
          zbeta    = rab_n(ji,jj,1,jp_sal)
@@ -705,5 +705,5 @@
     !
 
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          ztemp = zu_ml(ji,jj)
          zu_ml(ji,jj) = zu_ml(ji,jj) * zcos_wind(ji,jj) + zv_ml(ji,jj) * zsin_wind(ji,jj)
@@ -723,5 +723,5 @@
      zuw_bse = 0._wp
      zvw_bse = 0._wp
-     DO_2D_00_00
+     DO_2D( 0, 0, 0, 0 )
 
         IF ( lconv(ji,jj) ) THEN
@@ -740,5 +740,5 @@
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
-       DO_2D_00_00
+       DO_2D( 0, 0, 0, 0 )
        !
           IF ( lconv (ji,jj) ) THEN
@@ -788,5 +788,5 @@
        END_2D
 !
-       DO_2D_00_00
+       DO_2D( 0, 0, 0, 0 )
        !
           IF ( lconv (ji,jj) ) THEN
@@ -832,5 +832,5 @@
       !     zvisml_sc = zwstrl * zhbl * EXP ( -( zhol / 0.183_wp )**2 )
       !  ENDWHERE
-       DO_2D_00_00
+       DO_2D( 0, 0, 0, 0 )
           IF ( lconv(ji,jj) ) THEN
             zdifml_sc(ji,jj) = zhml(ji,jj) * ( zvstr(ji,jj)**3 + 0.5 * zwstrc(ji,jj)**3 )**pthird
@@ -846,5 +846,5 @@
        END_2D
 !
-       DO_2D_00_00
+       DO_2D( 0, 0, 0, 0 )
           IF ( lconv(ji,jj) ) THEN
              DO jk = 2, imld(ji,jj)   ! mixed layer diffusivity
@@ -896,5 +896,5 @@
 
 
-       DO_2D_00_00
+       DO_2D( 0, 0, 0, 0 )
          IF ( lconv(ji,jj) ) THEN
            DO jk = 2, imld(ji,jj)
@@ -929,5 +929,5 @@
        ENDWHERE
 
-       DO_2D_00_00
+       DO_2D( 0, 0, 0, 0 )
           IF ( lconv(ji,jj) ) THEN
              DO jk = 2, imld(ji,jj)
@@ -961,5 +961,5 @@
        ENDWHERE
 
-       DO_2D_00_00
+       DO_2D( 0, 0, 0, 0 )
           IF (lconv(ji,jj) ) THEN
              DO jk = 2, imld(ji,jj)
@@ -993,5 +993,5 @@
        ENDWHERE
 
-       DO_2D_00_00
+       DO_2D( 0, 0, 0, 0 )
           IF ( lconv(ji,jj) ) THEN
              DO jk = 2 , imld(ji,jj)
@@ -1021,5 +1021,5 @@
        ENDWHERE
 
-       DO_2D_00_00
+       DO_2D( 0, 0, 0, 0 )
          IF ( lconv(ji,jj) ) THEN
             DO jk = 2, imld(ji,jj)
@@ -1058,5 +1058,5 @@
        ENDWHERE
 
-       DO_2D_00_00
+       DO_2D( 0, 0, 0, 0 )
           IF ( lconv(ji,jj) ) THEN
             DO jk = 2, imld(ji,jj)
@@ -1093,5 +1093,5 @@
 ! Make surface forced velocity non-gradient terms go to zero at the base of the mixed layer.
 
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          IF ( lconv(ji,jj) ) THEN
             DO jk = 2, ibld(ji,jj)
@@ -1122,5 +1122,5 @@
        ! Temporary fix to avoid instabilities when zdb_bl becomes very very small
        zsc_uw_1 = 0._wp ! 50.0 * zla**(8.0/3.0) * zustar**2 * zhbl / ( zdb_bl + epsln )
-       DO_2D_00_00
+       DO_2D( 0, 0, 0, 0 )
           DO jk= 2, ibld(ji,jj)
              znd = gdepw(ji,jj,jk,Kmm) / zhbl(ji,jj)
@@ -1135,5 +1135,5 @@
 ! Entrainment contribution.
 
-       DO_2D_00_00
+       DO_2D( 0, 0, 0, 0 )
           IF ( lconv(ji,jj) ) THEN
             DO jk = 1, imld(ji,jj) - 1
@@ -1170,5 +1170,5 @@
        ! rotate non-gradient velocity terms back to model reference frame
 
-       DO_2D_00_00
+       DO_2D( 0, 0, 0, 0 )
           DO jk = 2, ibld(ji,jj)
              ztemp = ghamu(ji,jj,jk)
@@ -1184,5 +1184,5 @@
 ! KPP-style Ri# mixing
        IF( ln_kpprimix) THEN
-          DO_3D_10_10( 2, jpkm1 )
+          DO_3D( 1, 0, 1, 0, 2, jpkm1 )
              z3du(ji,jj,jk) = 0.5 * (  uu(ji,jj,jk-1,Kmm) -  uu(ji  ,jj,jk,Kmm) )   &
                   &                 * (  uu(ji,jj,jk-1,Kbb) -  uu(ji  ,jj,jk,Kbb) ) * wumask(ji,jj,jk) &
@@ -1193,5 +1193,5 @@
           END_3D
       !
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             !                                          ! shear prod. at w-point weightened by mask
             zesh2  =  ( z3du(ji-1,jj,jk) + z3du(ji,jj,jk) ) / MAX( 1._wp , umask(ji-1,jj,jk) + umask(ji,jj,jk) )   &
@@ -1204,5 +1204,5 @@
          END_3D
 
-          DO_2D_00_00
+          DO_2D( 0, 0, 0, 0 )
              DO jk = ibld(ji,jj) + 1, jpkm1
                 zdiffut(ji,jj,jk) = zrimix(ji,jj,jk)*rn_difri
@@ -1215,5 +1215,5 @@
 ! KPP-style set diffusivity large if unstable below BL
        IF( ln_convmix) THEN
-          DO_2D_00_00
+          DO_2D( 0, 0, 0, 0 )
              DO jk = ibld(ji,jj) + 1, jpkm1
                IF(  MIN( rn2(ji,jj,jk), rn2b(ji,jj,jk) ) <= -1.e-12 ) zdiffut(ji,jj,jk) = rn_difconv
@@ -1227,5 +1227,5 @@
        ! GN 25/8: need to change tmask --> wmask
 
-     DO_3D_00_00( 2, jpkm1 )
+     DO_3D( 0, 0, 0, 0, 2, jpkm1 )
           p_avt(ji,jj,jk) = MAX( zdiffut(ji,jj,jk), avtb(jk) ) * tmask(ji,jj,jk)
           p_avm(ji,jj,jk) = MAX( zviscos(ji,jj,jk), avmb(jk) ) * tmask(ji,jj,jk)
@@ -1234,5 +1234,5 @@
      CALL lbc_lnk_multi( 'zdfosm', p_avt, 'W', 1.0_wp , p_avm, 'W', 1.0_wp,   &
       &                  ghamu, 'W', 1.0_wp , ghamv, 'W', 1.0_wp )
-       DO_3D_00_00( 2, jpkm1 )
+       DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             ghamu(ji,jj,jk) = ( ghamu(ji,jj,jk) + ghamu(ji+1,jj,jk) ) &
                &  / MAX( 1., tmask(ji,jj,jk) + tmask (ji + 1,jj,jk) ) * umask(ji,jj,jk)
@@ -1395,5 +1395,5 @@
         etmean(:,:,:) = 0.e0
 
-        DO_3D_00_00( 1, jpkm1 )
+        DO_3D( 0, 0, 0, 0, 1, jpkm1 )
            etmean(ji,jj,jk) = tmask(ji,jj,jk)                     &
                 &  / MAX( 1.,  umask(ji-1,jj  ,jk) + umask(ji,jj,jk)   &
@@ -1409,5 +1409,5 @@
         etmean(:,:,:) = 0.e0
 
-        DO_3D_00_00( 1, jpkm1 )
+        DO_3D( 0, 0, 0, 0, 1, jpkm1 )
            etmean(ji,jj,jk) = tmask(ji, jj,jk)                           &
                 & / MAX( 1., 2.* tmask(ji,jj,jk)                           &
@@ -1516,5 +1516,5 @@
      !
      hbl(:,:)  = 0._wp              ! here hbl used as a dummy variable, integrating vertically N^2
-     DO_3D_11_11( 1, jpkm1 )
+     DO_3D( 1, 1, 1, 1, 1, jpkm1 )
         ikt = mbkt(ji,jj)
         hbl(ji,jj) = hbl(ji,jj) + MAX( rn2(ji,jj,jk) , 0._wp ) * e3w(ji,jj,jk,Kmm)
@@ -1522,5 +1522,5 @@
      END_3D
      !
-     DO_2D_11_11
+     DO_2D( 1, 1, 1, 1 )
         iiki = imld_rst(ji,jj)
         hbl (ji,jj) = gdepw(ji,jj,iiki  ,Kmm) * ssmask(ji,jj)    ! Turbocline depth
@@ -1561,5 +1561,5 @@
 
       ! add non-local temperature and salinity flux
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          pts(ji,jj,jk,jp_tem,Krhs) =  pts(ji,jj,jk,jp_tem,Krhs)                      &
             &                 - (  ghamt(ji,jj,jk  )  &
@@ -1629,5 +1629,5 @@
       !code saving tracer trends removed, replace with trdmxl_oce
 
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          puu(ji,jj,jk,Krhs) =  puu(ji,jj,jk,Krhs)                      &
             &                 - (  ghamu(ji,jj,jk  )  &
Index: /NEMO/trunk/src/OCE/ZDF/zdfric.F90
===================================================================
--- /NEMO/trunk/src/OCE/ZDF/zdfric.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ZDF/zdfric.F90	(revision 13295)
@@ -160,5 +160,5 @@
       !
       !                       !==  avm and avt = F(Richardson number)  ==!
-      DO_3D_10_10( 2, jpkm1 )
+      DO_3D( 1, 0, 1, 0, 2, jpkm1 )
          zcfRi = 1._wp / (  1._wp + rn_alp * MAX(  0._wp , avm(ji,jj,jk) * rn2(ji,jj,jk) / ( p_sh2(ji,jj,jk) + 1.e-20 ) )  )
          zav   = rn_avmri * zcfRi**nn_ric
@@ -173,10 +173,10 @@
       IF( ln_mldw ) THEN      !==  set a minimum value in the Ekman layer  ==!
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zustar = SQRT( taum(ji,jj) * r1_rho0 )
             zhek   = rn_ekmfc * zustar / ( ABS( ff_t(ji,jj) ) + rsmall )   ! Ekman depth
             zh_ekm(ji,jj) = MAX(  rn_mldmin , MIN( zhek , rn_mldmax )  )   ! set allowed range
          END_2D
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             IF( gdept(ji,jj,jk,Kmm) < zh_ekm(ji,jj) ) THEN
                p_avm(ji,jj,jk) = MAX(  p_avm(ji,jj,jk), rn_wvmix  ) * wmask(ji,jj,jk)
Index: /NEMO/trunk/src/OCE/ZDF/zdfsh2.F90
===================================================================
--- /NEMO/trunk/src/OCE/ZDF/zdfsh2.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ZDF/zdfsh2.F90	(revision 13295)
@@ -60,5 +60,5 @@
       !
       DO jk = 2, jpkm1
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zsh2u(ji,jj) = ( p_avm(ji+1,jj,jk) + p_avm(ji,jj,jk) ) &
                &         * (   uu(ji,jj,jk-1,Kmm) -   uu(ji,jj,jk,Kmm) ) &
@@ -72,5 +72,5 @@
                &         * wvmask(ji,jj,jk)
          END_2D
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             p_sh2(ji,jj,jk) = 0.25 * (   ( zsh2u(ji-1,jj) + zsh2u(ji,jj) ) * ( 2. - umask(ji-1,jj,jk) * umask(ji,jj,jk) )   &
                &                       + ( zsh2v(ji,jj-1) + zsh2v(ji,jj) ) * ( 2. - vmask(ji,jj-1,jk) * vmask(ji,jj,jk) )   )
Index: /NEMO/trunk/src/OCE/ZDF/zdfswm.F90
===================================================================
--- /NEMO/trunk/src/OCE/ZDF/zdfswm.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ZDF/zdfswm.F90	(revision 13295)
@@ -63,5 +63,5 @@
       !
       zcoef = 1._wp * 0.353553_wp
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          zqb = zcoef * hsw(ji,jj) * tsd2d(ji,jj) * EXP( -3. * wnum(ji,jj) * gdepw(ji,jj,jk,Kmm) ) * wmask(ji,jj,jk)
          !
Index: /NEMO/trunk/src/OCE/ZDF/zdftke.F90
===================================================================
--- /NEMO/trunk/src/OCE/ZDF/zdftke.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/ZDF/zdftke.F90	(revision 13295)
@@ -224,5 +224,5 @@
       !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
       ! 
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          en(ji,jj,1) = MAX( rn_emin0, zbbrau * taum(ji,jj) ) * tmask(ji,jj,1)
       END_2D
@@ -238,5 +238,5 @@
       IF( ln_drg ) THEN       !== friction used as top/bottom boundary condition on TKE
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zmsku = ( 2. - umask(ji-1,jj,mbkt(ji,jj)) * umask(ji,jj,mbkt(ji,jj)) )
             zmskv = ( 2. - vmask(ji,jj-1,mbkt(ji,jj)) * vmask(ji,jj,mbkt(ji,jj)) )
@@ -247,5 +247,5 @@
          END_2D
          IF( ln_isfcav ) THEN       ! top friction
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zmsku = ( 2. - umask(ji-1,jj,mikt(ji,jj)) * umask(ji,jj,mikt(ji,jj)) )
                zmskv = ( 2. - vmask(ji,jj-1,mikt(ji,jj)) * vmask(ji,jj,mikt(ji,jj)) )
@@ -274,19 +274,19 @@
          zcof = 0.5 * 0.016 * 0.016 / ( zrhoa * zcdrag )
          imlc(:,:) = mbkt(:,:) + 1       ! Initialization to the number of w ocean point (=2 over land)
-         DO_3DS_11_11( jpkm1, 2, -1 )
+         DO_3DS( 1, 1, 1, 1, jpkm1, 2, -1 )
             zus  = zcof * taum(ji,jj)
             IF( zpelc(ji,jj,jk) > zus )   imlc(ji,jj) = jk
          END_3D
          !                               ! finite LC depth
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             zhlc(ji,jj) = gdepw(ji,jj,imlc(ji,jj),Kmm)
          END_2D
          zcof = 0.016 / SQRT( zrhoa * zcdrag )
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zus  = zcof * SQRT( taum(ji,jj) )           ! Stokes drift
             zfr_i(ji,jj) = ( 1._wp - 4._wp * fr_i(ji,jj) ) * zus * zus * zus * tmask(ji,jj,1) ! zus > 0. ok
             IF (zfr_i(ji,jj) < 0. ) zfr_i(ji,jj) = 0.
          END_2D
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             IF ( zfr_i(ji,jj) /= 0. ) THEN               
                ! vertical velocity due to LC   
@@ -310,5 +310,5 @@
       !
       IF( nn_pdl == 1 ) THEN      !* Prandtl number = F( Ri )
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             !                             ! local Richardson number
             IF (rn2b(ji,jj,jk) <= 0.0_wp) then
@@ -322,5 +322,5 @@
       ENDIF
       !         
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          zcof   = zfact1 * tmask(ji,jj,jk)
          !                                   ! A minimum of 2.e-5 m2/s is imposed on TKE vertical
@@ -344,20 +344,20 @@
       END_3D
       !                          !* Matrix inversion from level 2 (tke prescribed at level 1)
-      DO_3D_00_00( 3, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 3, jpkm1 )
          zdiag(ji,jj,jk) = zdiag(ji,jj,jk) - zd_lw(ji,jj,jk) * zd_up(ji,jj,jk-1) / zdiag(ji,jj,jk-1)
       END_3D
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zd_lw(ji,jj,2) = en(ji,jj,2) - zd_lw(ji,jj,2) * en(ji,jj,1)    ! Surface boudary conditions on tke
       END_2D
-      DO_3D_00_00( 3, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 3, jpkm1 )
          zd_lw(ji,jj,jk) = en(ji,jj,jk) - zd_lw(ji,jj,jk) / zdiag(ji,jj,jk-1) *zd_lw(ji,jj,jk-1)
       END_3D
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          en(ji,jj,jpkm1) = zd_lw(ji,jj,jpkm1) / zdiag(ji,jj,jpkm1)
       END_2D
-      DO_3DS_00_00( jpk-2, 2, -1 )
+      DO_3DS( 0, 0, 0, 0, jpk-2, 2, -1 )
          en(ji,jj,jk) = ( zd_lw(ji,jj,jk) - zd_up(ji,jj,jk) * en(ji,jj,jk+1) ) / zdiag(ji,jj,jk)
       END_3D
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          en(ji,jj,jk) = MAX( en(ji,jj,jk), rn_emin ) * wmask(ji,jj,jk)
       END_3D
@@ -371,10 +371,10 @@
       
       IF( nn_etau == 1 ) THEN           !* penetration below the mixed layer (rn_efr fraction)
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             en(ji,jj,jk) = en(ji,jj,jk) + rn_efr * en(ji,jj,1) * EXP( -gdepw(ji,jj,jk,Kmm) / htau(ji,jj) )   &
                &                                 * MAX(0.,1._wp - rn_eice *fr_i(ji,jj) )  * wmask(ji,jj,jk) * tmask(ji,jj,1)
          END_3D
       ELSEIF( nn_etau == 2 ) THEN       !* act only at the base of the mixed layer (jk=nmln)  (rn_efr fraction)
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             jk = nmln(ji,jj)
             en(ji,jj,jk) = en(ji,jj,jk) + rn_efr * en(ji,jj,1) * EXP( -gdepw(ji,jj,jk,Kmm) / htau(ji,jj) )   &
@@ -382,5 +382,5 @@
          END_2D
       ELSEIF( nn_etau == 3 ) THEN       !* penetration belox the mixed layer (HF variability)
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             ztx2 = utau(ji-1,jj  ) + utau(ji,jj)
             zty2 = vtau(ji  ,jj-1) + vtau(ji,jj)
@@ -456,5 +456,5 @@
          zraug = vkarmn * 2.e5_wp / ( rho0 * grav )
 #if ! defined key_si3 && ! defined key_cice
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zmxlm(ji,jj,1) =  zraug * taum(ji,jj) * tmask(ji,jj,1)
          END_2D
@@ -463,15 +463,15 @@
          !
          CASE( 0 )                      ! No scaling under sea-ice
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zmxlm(ji,jj,1) = zraug * taum(ji,jj) * tmask(ji,jj,1)
             END_2D
             !
          CASE( 1 )                           ! scaling with constant sea-ice thickness
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zmxlm(ji,jj,1) =  ( ( 1. - fr_i(ji,jj) ) * zraug * taum(ji,jj) + fr_i(ji,jj) * rn_mxlice ) * tmask(ji,jj,1)
             END_2D
             !
          CASE( 2 )                                 ! scaling with mean sea-ice thickness
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
 #if defined key_si3
                zmxlm(ji,jj,1) = ( ( 1. - fr_i(ji,jj) ) * zraug * taum(ji,jj) + fr_i(ji,jj) * hm_i(ji,jj) * 2. ) * tmask(ji,jj,1)
@@ -483,5 +483,5 @@
             !
          CASE( 3 )                                 ! scaling with max sea-ice thickness
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zmaxice = MAXVAL( h_i(ji,jj,:) )
                zmxlm(ji,jj,1) = ( ( 1. - fr_i(ji,jj) ) * zraug * taum(ji,jj) + fr_i(ji,jj) * zmaxice ) * tmask(ji,jj,1)
@@ -491,5 +491,5 @@
 #endif
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zmxlm(ji,jj,1) = MAX( rn_mxl0, zmxlm(ji,jj,1) )
          END_2D
@@ -500,5 +500,5 @@
 
       !
-      DO_3D_00_00( 2, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 2, jpkm1 )
          zrn2 = MAX( rn2(ji,jj,jk), rsmall )
          zmxlm(ji,jj,jk) = MAX(  rmxl_min,  SQRT( 2._wp * en(ji,jj,jk) / zrn2 )  )
@@ -515,5 +515,5 @@
       ! where wmask = 0 set zmxlm == e3w(:,:,:,Kmm)
       CASE ( 0 )           ! bounded by the distance to surface and bottom
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             zemxl = MIN( gdepw(ji,jj,jk,Kmm) - gdepw(ji,jj,mikt(ji,jj),Kmm), zmxlm(ji,jj,jk),   &
             &            gdepw(ji,jj,mbkt(ji,jj)+1,Kmm) - gdepw(ji,jj,jk,Kmm) )
@@ -526,5 +526,5 @@
          !
       CASE ( 1 )           ! bounded by the vertical scale factor
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             zemxl = MIN( e3w(ji,jj,jk,Kmm), zmxlm(ji,jj,jk) )
             zmxlm(ji,jj,jk) = zemxl
@@ -533,9 +533,9 @@
          !
       CASE ( 2 )           ! |dk[xml]| bounded by e3t :
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             zmxlm(ji,jj,jk) =   &
                &    MIN( zmxlm(ji,jj,jk-1) + e3t(ji,jj,jk-1,Kmm), zmxlm(ji,jj,jk) )
          END_3D
-         DO_3DS_00_00( jpkm1, 2, -1 )
+         DO_3DS( 0, 0, 0, 0, jpkm1, 2, -1 )
             zemxl = MIN( zmxlm(ji,jj,jk+1) + e3t(ji,jj,jk+1,Kmm), zmxlm(ji,jj,jk) )
             zmxlm(ji,jj,jk) = zemxl
@@ -544,13 +544,13 @@
          !
       CASE ( 3 )           ! lup and ldown, |dk[xml]| bounded by e3t :
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             zmxld(ji,jj,jk) =    &
                &    MIN( zmxld(ji,jj,jk-1) + e3t(ji,jj,jk-1,Kmm), zmxlm(ji,jj,jk) )
          END_3D
-         DO_3DS_00_00( jpkm1, 2, -1 )
+         DO_3DS( 0, 0, 0, 0, jpkm1, 2, -1 )
             zmxlm(ji,jj,jk) =   &
                &    MIN( zmxlm(ji,jj,jk+1) + e3t(ji,jj,jk+1,Kmm), zmxlm(ji,jj,jk) )
          END_3D
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             zemlm = MIN ( zmxld(ji,jj,jk),  zmxlm(ji,jj,jk) )
             zemlp = SQRT( zmxld(ji,jj,jk) * zmxlm(ji,jj,jk) )
@@ -564,5 +564,5 @@
       !                     !  Vertical eddy viscosity and diffusivity  (avm and avt)
       !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          zsqen = SQRT( en(ji,jj,jk) )
          zav   = rn_ediff * zmxlm(ji,jj,jk) * zsqen
@@ -574,5 +574,5 @@
       !
       IF( nn_pdl == 1 ) THEN      !* Prandtl number case: update avt
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             p_avt(ji,jj,jk)   = MAX( apdlr(ji,jj,jk) * p_avt(ji,jj,jk), avtb_2d(ji,jj) * avtb(jk) ) * wmask(ji,jj,jk)
          END_3D
Index: /NEMO/trunk/src/OCE/do_loop_substitute.h90
===================================================================
--- /NEMO/trunk/src/OCE/do_loop_substitute.h90	(revision 13294)
+++ /NEMO/trunk/src/OCE/do_loop_substitute.h90	(revision 13295)
@@ -47,250 +47,22 @@
 !   END_2D
 ! 
-! similar conventions apply to the 3D loops macros. jk loop limits are retained through macro arguments and are not restricted. This
-! includes the possibility of strides for which an extra set of DO_3DS macros are defined.
+! similar conventions apply to the 3D loops macros. jk loop limits are retained through macro arguments 
+! and are not restricted. This includes the possibility of strides for which an extra set of DO_3DS 
+! macros are defined.
 !
-! In the following definitions the inner PE domain is defined by start indices of (_Nis0, Njs0) and end indices of (Nie0, Njs0)
-! The following macros are defined just below: _Nis0, Njs0, _Nis1, Njs1, _Nie0, Njs0, _Nie1, Nje1. 
-! These names are chosen to, hopefully, avoid any future, unintended matches elsewhere in the code.
+! In the following definitions the inner PE domain is defined by start indices of (Nis0, Njs0) and end 
+! indices of (Nie0, Nje0) where:
 !
-!!gm changes ;
-!
-! -0- fortran code : defined in par_oce.F90 the folowwing valiables :
-!!# 
-!!#    INTEGER, PUBLIC ::   Nis0, Nis1, Nis2   !: start I-index (_0: no halo, _1 & _2: 1 & 2-halos)
-!!#    INTEGER, PUBLIC ::   Nie0, Nie1, Nie2   !: end   I-index (_0: no halo, _1 & _2: 1 & 2-halos)
-!!#    INTEGER, PUBLIC ::   Njs0, Njs1, Njs2   !: start J-index (_0: no halo, _1 & _2: 1 & 2-halos)
-!!#    INTEGER, PUBLIC ::   Nje0, Nje1, Nje2   !: end   J-index (_0: no halo, _1 & _2: 1 & 2-halos)
-!!# 
-! -1- fortran code  put in  mppinit.F90 :   
-!!#            just after the futur read of nn_hls in namXXX (to be defined)
-!!#            NB: currently nn_hls is defined as a parameter in par_oce.F90
-!!#   SUBROUTINE init_do_loop
-!!#      !!----------------------------------------------------------------------
-!!#      !!                  ***  ROUTINE init_do_loop_indices  ***
-!!#      !!
-!!#      !! ** Purpose :   set the starting/ending indices of DO-loop
-!!#      !!              These indices are used in do_loop_substitute.h90
-!!#      !!----------------------------------------------------------------------!!# !                             !==  set the starting/ending indices of DO-loop  ==!   (used in do_loop_substitute.h90)
-!!#      !
-!!#      IF(     nn_hls == 1 ) THEN          !* halo size of 1
-!!#         !
-!!#         Nis0 =   2     ;   Nis1 =   1     ;   Nis2 = Nis1
-!!#         Njs0 = Nis0    ;   Njs1 = Nis1    ;   Njs2 = Nis1
-!!#         !
-!!#         Nie0 = jpi-1   ;   Nje1 = jpi     ;   Nie2 = Nie1
-!!#         Nje0 = jpj-1   ;   Nje1 = jpj-1   ;   Nje2 = Nie1
-!!#         !
-!!#      ELSEIF( nn_hls == 2 ) THEN          !* halo size of 2
-!!#         !
-!!#         Nis0 =   3     ;   Nis1 =   2     ;   Nis2 =   1
-!!#         Njs0 = Nis0    ;   Njs1 = Nis1    ;   Njs2 = Nis2
-!!#         !
-!!#         Nie0 = jpi-2   ;   Nje1 = jpi-1   ;   Nie2 = jpi
-!!#         Nje0 = jpj-2   ;   Nje1 = jpj-1   ;   Nje2 = jpj
-!!#         !
-!!#      ELSE                                !* unexpected halo size
-!!#         CALL ctl_stop( 'STOP', 'ini_mpp:  wrong value of halo size : nn_hls= 1 or 2 only !')
-!!#      ENDIF
-!!#
-!!#      !
-!!#   END SUBROUTINE init_do_loop
-!
-!  ! -2- in do_loop_substitute becomes :
+! Nis0 =   1 + nn_hls     Njs0 =   1 + nn_hls
+! Nie0 = jpi - nn_hls     Nje0 = jpj - nn_hls
 ! 
 #endif
 
-! 2D loops with 1
+#define DO_2D(B, T, L, R) DO jj = Njs0-(B), Nje0+(T)   ;   DO ji = Nis0-(L), Nie0+(R)
 
-#define DO_2D_00_00   DO jj = Njs0, Nje0   ;   DO ji = Nis0, Nie0
-#define DO_2D_00_01   DO jj = Njs0, Nje0   ;   DO ji = Nis0, Nie1
-#define DO_2D_00_10   DO jj = Njs0, Nje0   ;   DO ji = Nis1, Nie0
-#define DO_2D_00_11   DO jj = Njs0, Nje0   ;   DO ji = Nis1, Nie1
- 
-#define DO_2D_01_00   DO jj = Njs0, Nje1   ;   DO ji = Nis0, Nie0
-#define DO_2D_01_01   DO jj = Njs0, Nje1   ;   DO ji = Nis0, Nie1
-#define DO_2D_01_10   DO jj = Njs0, Nje1   ;   DO ji = Nis1, Nie0
-#define DO_2D_01_11   DO jj = Njs0, Nje1   ;   DO ji = Nis1, Nie1
- 
-#define DO_2D_10_00   DO jj = Njs1, Nje0   ;   DO ji = Nis0, Nie0
-#define DO_2D_10_01   DO jj = Njs1, Nje0   ;   DO ji = Nis0, Nie1   ! not used ?
-#define DO_2D_10_10   DO jj = Njs1, Nje0   ;   DO ji = Nis1, Nie0
-#define DO_2D_10_11   DO jj = Njs1, Nje0   ;   DO ji = Nis1, Nie1
- 
-#define DO_2D_11_00   DO jj = Njs1, Nje1   ;   DO ji = Nis0, Nie0
-#define DO_2D_11_01   DO jj = Njs1, Nje1   ;   DO ji = Nis0, Nie1
-#define DO_2D_11_10   DO jj = Njs1, Nje1   ;   DO ji = Nis1, Nie0
-#define DO_2D_11_11   DO jj = Njs1, Nje1   ;   DO ji = Nis1, Nie1
+#define DO_3D(B, T, L, R, ks, ke) DO jk = ks, ke   ;   DO_2D(B, T, L, R)
 
-! 2D loops with 1 following a 2/3D loop with 2
+#define DO_3DS(B, T, L, R, ks, ke, ki) DO jk = ks, ke, ki   ;   DO_2D(B, T, L, R)
 
-#define DO_2D_00_01nxt2   DO jj = Njs0    , Nje0       ;   DO ji = Nis0    , Nie1nxt2
-#define DO_2D_00_10nxt2   DO jj = Njs0    , Nje0       ;   DO ji = Nis1nxt2, Nie0
-#define DO_2D_00_11nxt2   DO jj = Njs0    , Nje0       ;   DO ji = Nis1nxt2, Nie1nxt2
-
-#define DO_2D_01_00nxt2   DO jj = Njs0    , Nje1nxt2   ;   DO ji = Nis0    , Nie0
-#define DO_2D_01_01nxt2   DO jj = Njs0    , Nje1nxt2   ;   DO ji = Nis0    , Nie1nxt2
-#define DO_2D_01_10nxt2   DO jj = Njs0    , Nje1nxt2   ;   DO ji = Nis1nxt2, Nie0
-#define DO_2D_01_11nxt2   DO jj = Njs0    , Nje1nxt2   ;   DO ji = Nis1nxt2, Nie1nxt2
-
-#define DO_2D_10_00nxt2   DO jj = Njs1nxt2, Nje0       ;   DO ji = Nis0    , Nie0
-#define DO_2D_10_01nxt2   DO jj = Njs1nxt2, Nje0       ;   DO ji = Nis0    , Nie1nxt2   ! not used ?
-#define DO_2D_10_10nxt2   DO jj = Njs1nxt2, Nje0       ;   DO ji = Nis1nxt2, Nie0
-#define DO_2D_10_11nxt2   DO jj = Njs1nxt2, Nje0       ;   DO ji = Nis1nxt2, Nie1nxt2
-
-#define DO_2D_11_00nxt2   DO jj = Njs1nxt2, Nje1nxt2   ;   DO ji = Nis0    , Nie0
-#define DO_2D_11_01nxt2   DO jj = Njs1nxt2, Nje1nxt2   ;   DO ji = Nis0    , Nie1nxt2
-#define DO_2D_11_10nxt2   DO jj = Njs1nxt2, Nje1nxt2   ;   DO ji = Nis1nxt2, Nie0
-#define DO_2D_11_11nxt2   DO jj = Njs1nxt2, Nje1nxt2   ;   DO ji = Nis1nxt2, Nie1nxt2
-
-! 2D loops with 2
-
-#define DO_2D_11_12   DO jj = Njs1nxt2, Nje1nxt2   ;   DO ji = Nis1nxt2, Nie2
-#define DO_2D_11_21   DO jj = Njs1nxt2, Nje1nxt2   ;   DO ji = Nis2    , Nie1nxt2
-#define DO_2D_11_22   DO jj = Njs1nxt2, Nje1nxt2   ;   DO ji = Nis2    , Nie2
-
-#define DO_2D_12_11   DO jj = Njs1nxt2, Nje2       ;   DO ji = Nis1nxt2, Nie1nxt2
-#define DO_2D_12_12   DO jj = Njs1nxt2, Nje2       ;   DO ji = Nis1nxt2, Nie2
-#define DO_2D_12_21   DO jj = Njs1nxt2, Nje2       ;   DO ji = Nis2    , Nie1nxt2
-#define DO_2D_12_22   DO jj = Njs1nxt2, Nje2       ;   DO ji = Nis2    , Nie2
- 
-#define DO_2D_21_11   DO jj = Njs2    , Nje1nxt2   ;   DO ji = Nis1nxt2, Nie1nxt2
-#define DO_2D_21_12   DO jj = Njs2    , Nje1nxt2   ;   DO ji = Nis1nxt2, Nie2        ! not used ?
-#define DO_2D_21_21   DO jj = Njs2    , Nje1nxt2   ;   DO ji = Nis2    , Nie1nxt2
-#define DO_2D_21_22   DO jj = Njs2    , Nje1nxt2   ;   DO ji = Nis2    , Nie2
-                                     
-#define DO_2D_22_11   DO jj = Njs2    , Nje2       ;   DO ji = Nis1nxt2, Nie1nxt2
-#define DO_2D_22_12   DO jj = Njs2    , Nje2       ;   DO ji = Nis1nxt2, Nie2
-#define DO_2D_22_21   DO jj = Njs2    , Nje2       ;   DO ji = Nis2    , Nie1nxt2
-#define DO_2D_22_22   DO jj = Njs2    , Nje2       ;   DO ji = Nis2    , Nie2
-
-! 3D loops with 1
-
-#define DO_3D_00_00(ks,ke)   DO jk = ks, ke   ;   DO_2D_00_00   
-#define DO_3D_00_01(ks,ke)   DO jk = ks, ke   ;   DO_2D_00_01   
-#define DO_3D_00_10(ks,ke)   DO jk = ks, ke   ;   DO_2D_00_10   
-#define DO_3D_00_11(ks,ke)   DO jk = ks, ke   ;   DO_2D_00_11   
-
-#define DO_3D_01_00(ks,ke)   DO jk = ks, ke   ;   DO_2D_01_00   
-#define DO_3D_01_01(ks,ke)   DO jk = ks, ke   ;   DO_2D_01_01   
-#define DO_3D_01_10(ks,ke)   DO jk = ks, ke   ;   DO_2D_01_10   
-#define DO_3D_01_11(ks,ke)   DO jk = ks, ke   ;   DO_2D_01_11   
-
-#define DO_3D_10_00(ks,ke)   DO jk = ks, ke   ;   DO_2D_10_00   
-#define DO_3D_10_01(ks,ke)   DO jk = ks, ke   ;   DO_2D_10_01   
-#define DO_3D_10_10(ks,ke)   DO jk = ks, ke   ;   DO_2D_10_10   
-#define DO_3D_10_11(ks,ke)   DO jk = ks, ke   ;   DO_2D_10_11   
-
-#define DO_3D_11_00(ks,ke)   DO jk = ks, ke   ;   DO_2D_11_00   
-#define DO_3D_11_01(ks,ke)   DO jk = ks, ke   ;   DO_2D_11_01   
-#define DO_3D_11_10(ks,ke)   DO jk = ks, ke   ;   DO_2D_11_10   
-#define DO_3D_11_11(ks,ke)   DO jk = ks, ke   ;   DO_2D_11_11   
-
-! 3D loops with 1, following a 2/3D loop with 2
-
-#define DO_3D_00_01nxt2(ks,ke)   DO jk = ks, ke   ;   DO_2D_00_01nxt2   
-#define DO_3D_00_10nxt2(ks,ke)   DO jk = ks, ke   ;   DO_2D_00_10nxt2   
-#define DO_3D_00_11nxt2(ks,ke)   DO jk = ks, ke   ;   DO_2D_00_11nxt2   
-
-#define DO_3D_01_00nxt2(ks,ke)   DO jk = ks, ke   ;   DO_2D_01_00nxt2   
-#define DO_3D_01_01nxt2(ks,ke)   DO jk = ks, ke   ;   DO_2D_01_01nxt2   
-#define DO_3D_01_10nxt2(ks,ke)   DO jk = ks, ke   ;   DO_2D_01_10nxt2   
-#define DO_3D_01_11nxt2(ks,ke)   DO jk = ks, ke   ;   DO_2D_01_11nxt2   
-
-#define DO_3D_10_00nxt2(ks,ke)   DO jk = ks, ke   ;   DO_2D_10_00nxt2   
-#define DO_3D_10_01nxt2(ks,ke)   DO jk = ks, ke   ;   DO_2D_10_01nxt2   
-#define DO_3D_10_10nxt2(ks,ke)   DO jk = ks, ke   ;   DO_2D_10_10nxt2   
-#define DO_3D_10_11nxt2(ks,ke)   DO jk = ks, ke   ;   DO_2D_10_11nxt2   
-
-#define DO_3D_11_00nxt2(ks,ke)   DO jk = ks, ke   ;   DO_2D_11_00nxt2   
-#define DO_3D_11_01nxt2(ks,ke)   DO jk = ks, ke   ;   DO_2D_11_01nxt2   
-#define DO_3D_11_10nxt2(ks,ke)   DO jk = ks, ke   ;   DO_2D_11_10nxt2   
-#define DO_3D_11_11nxt2(ks,ke)   DO jk = ks, ke   ;   DO_2D_11_11nxt2   
-
-! 3D loops with 2
-
-#define DO_3D_11_12(ks,ke)   DO jk = ks, ke   ;   DO_2D_11_12   
-#define DO_3D_11_21(ks,ke)   DO jk = ks, ke   ;   DO_2D_11_21   
-#define DO_3D_11_22(ks,ke)   DO jk = ks, ke   ;   DO_2D_11_22   
-
-#define DO_3D_12_11(ks,ke)   DO jk = ks, ke   ;   DO_2D_12_11   
-#define DO_3D_12_12(ks,ke)   DO jk = ks, ke   ;   DO_2D_12_12   
-#define DO_3D_12_21(ks,ke)   DO jk = ks, ke   ;   DO_2D_12_21   
-#define DO_3D_12_22(ks,ke)   DO jk = ks, ke   ;   DO_2D_12_22   
-
-#define DO_3D_21_11(ks,ke)   DO jk = ks, ke   ;   DO_2D_21_11   
-#define DO_3D_21_12(ks,ke)   DO jk = ks, ke   ;   DO_2D_21_12   
-#define DO_3D_21_21(ks,ke)   DO jk = ks, ke   ;   DO_2D_21_21   
-#define DO_3D_21_22(ks,ke)   DO jk = ks, ke   ;   DO_2D_21_22   
-
-#define DO_3D_22_11(ks,ke)   DO jk = ks, ke   ;   DO_2D_22_11   
-#define DO_3D_22_12(ks,ke)   DO jk = ks, ke   ;   DO_2D_22_12   
-#define DO_3D_22_21(ks,ke)   DO jk = ks, ke   ;   DO_2D_22_21   
-#define DO_3D_22_22(ks,ke)   DO jk = ks, ke   ;   DO_2D_22_22   
-                                
-! 3D loops with increment with 1
-
-#define DO_3DS_00_00(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_00_00   
-#define DO_3DS_00_01(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_00_01   
-#define DO_3DS_00_10(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_00_10   
-#define DO_3DS_00_11(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_00_11   
-
-#define DO_3DS_01_00(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_01_00   
-#define DO_3DS_01_01(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_01_01   
-#define DO_3DS_01_10(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_01_10   
-#define DO_3DS_01_11(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_01_11   
-
-#define DO_3DS_10_00(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_10_00   
-#define DO_3DS_10_01(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_10_01   
-#define DO_3DS_10_10(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_10_10   
-#define DO_3DS_10_11(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_10_11   
-
-#define DO_3DS_11_00(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_11_00   
-#define DO_3DS_11_01(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_11_01   
-#define DO_3DS_11_10(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_11_10   
-#define DO_3DS_11_11(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_11_11   
-                                
-! 3D loops with increment with 1, following a 2/3D loop with 2
-
-#define DO_3DS_00_01nxt2(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_00_01nxt2   
-#define DO_3DS_00_10nxt2(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_00_10nxt2   
-#define DO_3DS_00_11nxt2(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_00_11nxt2   
-
-#define DO_3DS_01_00nxt2(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_01_00nxt2   
-#define DO_3DS_01_01nxt2(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_01_01nxt2   
-#define DO_3DS_01_10nxt2(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_01_10nxt2   
-#define DO_3DS_01_11nxt2(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_01_11nxt2   
-
-#define DO_3DS_10_00nxt2(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_10_00nxt2   
-#define DO_3DS_10_01nxt2(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_10_01nxt2   
-#define DO_3DS_10_10nxt2(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_10_10nxt2   
-#define DO_3DS_10_11nxt2(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_10_11nxt2   
-
-#define DO_3DS_11_00nxt2(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_11_00nxt2   
-#define DO_3DS_11_01nxt2(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_11_01nxt2   
-#define DO_3DS_11_10nxt2(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_11_10nxt2   
-#define DO_3DS_11_11nxt2(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_11_11nxt2   
-
-! 3D loops with increment with 2
-
-#define DO_3DS_11_12(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_11_12   
-#define DO_3DS_11_21(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_11_21   
-#define DO_3DS_11_22(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_11_22   
-
-#define DO_3DS_12_11(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_12_11   
-#define DO_3DS_12_12(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_12_12   
-#define DO_3DS_12_21(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_12_21   
-#define DO_3DS_12_22(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_12_22   
-
-#define DO_3DS_21_11(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_21_11   
-#define DO_3DS_21_12(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_21_12   
-#define DO_3DS_21_21(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_21_21   
-#define DO_3DS_21_22(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_21_22   
-
-#define DO_3DS_22_11(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_22_11   
-#define DO_3DS_22_12(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_22_12   
-#define DO_3DS_22_21(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_22_21   
-#define DO_3DS_22_22(ks,ke,ki)   DO jk = ks, ke, ki   ;   DO_2D_22_22   
-                                
 #define END_2D   END DO   ;   END DO
 #define END_3D   END DO   ;   END DO   ;   END DO
Index: /NEMO/trunk/src/OCE/lib_fortran.F90
===================================================================
--- /NEMO/trunk/src/OCE/lib_fortran.F90	(revision 13294)
+++ /NEMO/trunk/src/OCE/lib_fortran.F90	(revision 13295)
@@ -217,5 +217,5 @@
       IF( SIZE(p2d,2) /= jpj ) CALL ctl_stop( 'STOP', 'wrong call of sum3x3_2d, the second dimension is not equal to jpj' ) 
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          IF( MOD(mig(ji), 3) == 1 .AND. MOD(mjg(jj), 3) == 1 ) THEN   ! bottom left corber of a 3x3 box
             ji2 = MIN(mig(ji)+2, jpiglo) - nimpp + 1                  ! right position of the box
@@ -264,5 +264,5 @@
       !
       DO jn = 1, ipn
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF( MOD(mig(ji), 3) == 1 .AND. MOD(mjg(jj), 3) == 1 ) THEN   ! bottom left corber of a 3x3 box
                ji2 = MIN(mig(ji)+2, jpiglo) - nimpp + 1                  ! right position of the box
Index: /NEMO/trunk/src/OFF/dtadyn.F90
===================================================================
--- /NEMO/trunk/src/OFF/dtadyn.F90	(revision 13294)
+++ /NEMO/trunk/src/OFF/dtadyn.F90	(revision 13295)
@@ -371,5 +371,5 @@
         gdepw(:,:,1,Kmm) = 0.0_wp
 
-        DO_3D_11_11( 2, jpk )
+        DO_3D( 1, 1, 1, 1, 2, jpk )
           !    zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk))   ! 0 everywhere
           !    tmask = wmask, ie everywhere expect at jk = mikt
@@ -396,5 +396,5 @@
          !
          nk_rnf(:,:) = 0                               ! set the number of level over which river runoffs are applied
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF( h_rnf(ji,jj) > 0._wp ) THEN
                jk = 2
@@ -410,5 +410,5 @@
          END_2D
 !!st pourquoi on n'utilise pas le gde3w ici plutôt que de faire une boucle ? 
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             h_rnf(ji,jj) = 0._wp
             DO jk = 1, nk_rnf(ji,jj)
@@ -605,5 +605,5 @@
       gdepw(:,:,1,Kmm) = 0.0_wp
       !
-      DO_3D_11_11( 2, jpk )
+      DO_3D( 1, 1, 1, 1, 2, jpk )
          zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk))
          gdepw(ji,jj,jk,Kmm) = gdepw(ji,jj,jk-1,Kmm) + e3t(ji,jj,jk-1,Kmm)
@@ -686,5 +686,5 @@
       !
 !!st code dupliqué même remarque que plus haut pourquoi ne pas utiliser gdepw ?
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          h_rnf(ji,jj) = 0._wp
          DO jk = 1, nk_rnf(ji,jj)                           ! recalculates h_rnf to be the depth in metres
Index: /NEMO/trunk/src/SWE/asminc.F90
===================================================================
--- /NEMO/trunk/src/SWE/asminc.F90	(revision 13294)
+++ /NEMO/trunk/src/SWE/asminc.F90	(revision 13295)
@@ -416,5 +416,5 @@
             DO jk = 1, jpkm1           ! zhdiv = e1e1 * div
                zhdiv(:,:) = 0._wp
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   zhdiv(ji,jj) = (  e2u(ji  ,jj) * e3u(ji  ,jj,jk,Kmm) * u_bkginc(ji  ,jj,jk)    &
                      &            - e2u(ji-1,jj) * e3u(ji-1,jj,jk,Kmm) * u_bkginc(ji-1,jj,jk)    &
@@ -425,5 +425,5 @@
                CALL lbc_lnk( 'asminc', zhdiv, 'T', 1. )   ! lateral boundary cond. (no sign change)
                !
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   u_bkginc(ji,jj,jk) = u_bkginc(ji,jj,jk)                         &
                      &               + 0.2_wp * ( zhdiv(ji+1,jj) - zhdiv(ji  ,jj) ) * r1_e1u(ji,jj) * umask(ji,jj,jk)
Index: /NEMO/trunk/src/SWE/diawri.F90
===================================================================
--- /NEMO/trunk/src/SWE/diawri.F90	(revision 13294)
+++ /NEMO/trunk/src/SWE/diawri.F90	(revision 13295)
@@ -180,5 +180,5 @@
       IF( iom_use("hu") )   THEN                   ! water column at u-point
          z2d(:,:) = 0._wp
-         DO_2D_10_10  
+         DO_2D( 1, 0, 1, 0 )  
             z2d(ji,jj) = 0.5_wp * ( e3t(ji  ,jj,1,Kmm) * e1e2t(ji  ,jj)  &
                &                  + e3t(ji+1,jj,1,Kmm) * e1e2t(ji+1,jj)  ) * r1_e1e2u(ji,jj)
@@ -190,5 +190,5 @@
       IF( iom_use("hv") )   THEN                  ! water column at v-point
          z2d(:,:) = 0._wp
-         DO_2D_10_10  
+         DO_2D( 1, 0, 1, 0 )  
             z2d(ji,jj) = 0.5_wp * (  e3t(ji,jj+1,1,Kmm) * e1e2t(ji,jj+1)   &
               &                    + e3t(ji,jj  ,1,Kmm) * e1e2t(ji,jj  )   ) * r1_e1e2v(ji,jj)
@@ -200,5 +200,5 @@
       IF( iom_use("hf") )  THEN                    ! water column at f-point
          z2d(:,:) = 0._wp
-         DO_2D_10_10  
+         DO_2D( 1, 0, 1, 0 )  
             z2d(ji,jj) = 0.25_wp * (  e3t(ji,jj+1,1,Kmm) * e1e2t(ji,jj+1) + e3t(ji+1,jj+1,1,Kmm) * e1e2t(ji+1,jj+1)    &
               &                     + e3t(ji,jj  ,1,Kmm) * e1e2t(ji,jj  ) + e3t(ji+1,jj  ,1,Kmm) * e1e2t(ji+1,jj  )  ) * r1_e1e2f(ji,jj)
@@ -216,5 +216,5 @@
          zztmp = rho0 * 0.25
          z2d(:,:) = 0._wp
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zztmp2 = (  ( rCdU_bot(ji+1,jj)+rCdU_bot(ji  ,jj) ) * uu(ji  ,jj,mbku(ji  ,jj),Kmm)  )**2   &
                &   + (  ( rCdU_bot(ji  ,jj)+rCdU_bot(ji-1,jj) ) * uu(ji-1,jj,mbku(ji-1,jj),Kmm)  )**2   &
@@ -235,5 +235,5 @@
       IF ( iom_use("sKE") ) THEN                        ! surface kinetic energy at T point
          z2d(:,:) = 0._wp
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             z2d(ji,jj) =    0.25_wp * ( uu(ji  ,jj,1,Kmm) * uu(ji  ,jj,1,Kmm) * e1e2u(ji  ,jj) * e3u(ji  ,jj,1,Kmm)  &
                &                      + uu(ji-1,jj,1,Kmm) * uu(ji-1,jj,1,Kmm) * e1e2u(ji-1,jj) * e3u(ji-1,jj,1,Kmm)  &
@@ -251,5 +251,5 @@
       IF ( iom_use("sKEf") ) THEN                        ! surface kinetic energy at F point
          z2d(:,:) = 0._wp                                ! CAUTION : only valid in SWE, not with bathymetry
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             z2d(ji,jj) =    0.25_wp * ( uu(ji,jj  ,1,Kmm) * uu(ji,jj  ,1,Kmm) * e1e2u(ji,jj  ) * e3u(ji,jj  ,1,Kmm)  &
                &                      + uu(ji,jj+1,1,Kmm) * uu(ji,jj+1,1,Kmm) * e1e2u(ji,jj+1) * e3u(ji,jj+1,1,Kmm)  &
@@ -273,5 +273,5 @@
          z2d(:,:) = 0._wp 
          ze3 = 0._wp 
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             z2d(ji,jj) = (   e2v(ji+1,jj  ) * vv(ji+1,jj  ,1,Kmm) - e2v(ji,jj) * vv(ji,jj,1,Kmm)    &
             &              - e1u(ji  ,jj+1) * uu(ji  ,jj+1,1,Kmm) + e1u(ji,jj) * uu(ji,jj,1,Kmm)  ) * r1_e1e2f(ji,jj)
@@ -282,5 +282,5 @@
          CALL iom_put( "plavor", ff_f )                 ! planetary vorticity ( f )
          !
-         DO_2D_10_10  
+         DO_2D( 1, 0, 1, 0 )  
             ze3 = (  e3t(ji,jj+1,1,Kmm) * e1e2t(ji,jj+1) + e3t(ji+1,jj+1,1,Kmm) * e1e2t(ji+1,jj+1)    &
               &    + e3t(ji,jj  ,1,Kmm) * e1e2t(ji,jj  ) + e3t(ji+1,jj  ,1,Kmm) * e1e2t(ji+1,jj  )  ) * r1_e1e2f(ji,jj)
@@ -293,5 +293,5 @@
          CALL iom_put( "relpotvor", z2d )                  ! relative potential vorticity (zeta/h)
          !
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             ze3 = (  e3t(ji,jj+1,1,Kmm) * e1e2t(ji,jj+1) + e3t(ji+1,jj+1,1,Kmm) * e1e2t(ji+1,jj+1)    &
               &    + e3t(ji,jj  ,1,Kmm) * e1e2t(ji,jj  ) + e3t(ji+1,jj  ,1,Kmm) * e1e2t(ji+1,jj  )  ) * r1_e1e2f(ji,jj)
@@ -304,5 +304,5 @@
          CALL iom_put( "abspotvor", z2d )                  ! absolute potential vorticity ( q )
          !
-         DO_2D_10_10  
+         DO_2D( 1, 0, 1, 0 )  
             z2d(ji,jj) = 0.5_wp * z2d(ji,jj)  * z2d(ji,jj) 
          END_2D
Index: /NEMO/trunk/src/SWE/domain.F90
===================================================================
--- /NEMO/trunk/src/SWE/domain.F90	(revision 13294)
+++ /NEMO/trunk/src/SWE/domain.F90	(revision 13295)
@@ -169,5 +169,5 @@
 !!anhf hf_0 = mean(ht_0*tmask) so hf = mimj( ht0 + ssht)
 ! ne pas combiner avec an45 tout de suite
-!      DO_2D_10_10
+!      DO_2D( 1, 0, 1, 0 )
 !         hf_0(ji,jj) = 0.25_wp * (   ht_0(ji,jj+1) * tmask(ji,jj+1,1) + ht_0(ji+1,jj+1) * tmask(ji+1,jj+1,1)   &
 !            &                      + ht_0(ji,jj  ) * tmask(ji,jj  ,1) + ht_0(ji+1,jj  ) * tmask(ji+1,jj  ,1)   )
@@ -183,5 +183,5 @@
 !!an45 Ligne de cote a 45deg : e1e2t *= ( mi(umask) + mj(vmask) ) /2
 !!                             idem pour e1e2f
-!      DO_2D_10_10
+!      DO_2D( 1, 0, 1, 0 )
 !      zcoeff = 0.25_wp * (   umask(ji,jj+1,1) + umask(ji+1,jj+1,1)   &
 !         &                 + vmask(ji,jj  ,1) + vmask(ji+1,jj  ,1)   )
Index: /NEMO/trunk/src/SWE/dommsk.F90
===================================================================
--- /NEMO/trunk/src/SWE/dommsk.F90	(revision 13294)
+++ /NEMO/trunk/src/SWE/dommsk.F90	(revision 13295)
@@ -131,5 +131,5 @@
       !
       tmask(:,:,:) = 0._wp
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          iktop = k_top(ji,jj)
          ikbot = k_bot(ji,jj)
@@ -153,5 +153,5 @@
          CALL iom_get ( inum, jpdom_data, 'bdy_msk', bdytmask(:,:) )
          CALL iom_close( inum )
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             tmask(ji,jj,jk) = tmask(ji,jj,jk) * bdytmask(ji,jj)
          END_3D
@@ -194,5 +194,5 @@
 !!an 
       ! ssfmask(:,:) = MAXVAL( fmask(:,:,:), DIM=3 )
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          ssfmask(ji,jj) = MAX(  tmask(ji,jj+1,1), tmask(ji+1,jj+1,1),  & 
             &                   tmask(ji,jj  ,1), tmask(ji+1,jj  ,1)   )
@@ -245,5 +245,5 @@
          DO jk = 1, jpk
             zwf(:,:) = fmask(:,:,jk)         
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                IF( fmask(ji,jj,jk) == 0._wp ) THEN
                   fmask(ji,jj,jk) = rn_shlat * MIN( 1._wp , MAX( zwf(ji+1,jj), zwf(ji,jj+1),   &
Index: /NEMO/trunk/src/SWE/domvvl.F90
===================================================================
--- /NEMO/trunk/src/SWE/domvvl.F90	(revision 13294)
+++ /NEMO/trunk/src/SWE/domvvl.F90	(revision 13295)
@@ -205,5 +205,5 @@
       gdept(:,:,1,Kbb) = 0.5_wp * e3w(:,:,1,Kbb)
       gdepw(:,:,1,Kbb) = 0.0_wp
-      DO_3D_11_11( 2, jpk )
+      DO_3D( 1, 1, 1, 1, 2, jpk )
          !    zcoef = tmask - wmask    ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt
          !                             ! 1 everywhere from mbkt to mikt + 1 or 1 (if no isf)
@@ -253,5 +253,5 @@
          ENDIF
          IF ( ln_vvl_zstar_at_eqtor ) THEN   ! use z-star in vicinity of the Equator
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
 !!gm  case |gphi| >= 6 degrees is useless   initialized just above by default
                IF( ABS(gphit(ji,jj)) >= 6.) THEN
@@ -354,5 +354,5 @@
       e3v(:,:,:,Kaa) = e3v(:,:,:,Kmm)
       !
-      DO_3D_11_11( 1, jpk )
+      DO_3D( 1, 1, 1, 1, 1, jpk )
          gdepw(ji,jj,jk,Kmm) =  gdepw_0(ji,jj,jk) * (1._wp + r3t(ji,jj,Kmm))
          gdept(ji,jj,jk,Kmm) =  gdept_0(ji,jj,jk) * (1._wp + r3t(ji,jj,Kmm)) 
@@ -500,5 +500,5 @@
          zwu(:,:) = 0._wp
          zwv(:,:) = 0._wp
-         DO_3D_10_10( 1, jpkm1 )
+         DO_3D( 1, 0, 1, 0, 1, jpkm1 )
             un_td(ji,jj,jk) = rn_ahe3 * umask(ji,jj,jk) * e2_e1u(ji,jj)           &
                &            * ( tilde_e3t_b(ji,jj,jk) - tilde_e3t_b(ji+1,jj  ,jk) )
@@ -508,9 +508,9 @@
             zwv(ji,jj) = zwv(ji,jj) + vn_td(ji,jj,jk)
          END_3D
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             un_td(ji,jj,mbku(ji,jj)) = un_td(ji,jj,mbku(ji,jj)) - zwu(ji,jj)
             vn_td(ji,jj,mbkv(ji,jj)) = vn_td(ji,jj,mbkv(ji,jj)) - zwv(ji,jj)
          END_2D
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             tilde_e3t_a(ji,jj,jk) = tilde_e3t_a(ji,jj,jk) + (   un_td(ji-1,jj  ,jk) - un_td(ji,jj,jk)    &
                &                                          +     vn_td(ji  ,jj-1,jk) - vn_td(ji,jj,jk)    &
@@ -831,5 +831,5 @@
       gdepw(:,:,1,Kmm) = 0.0_wp
       gde3w(:,:,1) = gdept(:,:,1,Kmm) - ssh(:,:,Kmm)
-      DO_3D_11_11( 2, jpk )
+      DO_3D( 1, 1, 1, 1, 2, jpk )
         !    zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk))   ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt
                                                            ! 1 for jk = mikt
@@ -918,5 +918,5 @@
 
       ! t- and w- points depth (set the isf depth as it is in the initial step)
-      DO_3D_11_11( 1, jpk )
+      DO_3D( 1, 1, 1, 1, 1, jpk )
          gdepw(ji,jj,jk,Kmm) =  gdepw_0(ji,jj,jk) * (1._wp + r3t(ji,jj,Kmm))
          gdept(ji,jj,jk,Kmm) =  gdept_0(ji,jj,jk) * (1._wp + r3t(ji,jj,Kmm)) 
@@ -1014,5 +1014,5 @@
          !
       CASE( 'U' )                   !* from T- to U-point : hor. surface weighted mean
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zc3(ji,jj) = 0.5_wp * (  e1e2t(ji  ,jj) * pssh(ji  ,jj)  &
                &                   + e1e2t(ji+1,jj) * pssh(ji+1,jj)  ) * r1_hu_0(ji,jj) * r1_e1e2u(ji,jj)
@@ -1025,5 +1025,5 @@
          !
       CASE( 'V' )                   !* from T- to V-point : hor. surface weighted mean
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zc3(ji,jj) = 0.5_wp * (  e1e2t(ji,jj  ) * pssh(ji,jj  )  &
                &                   + e1e2t(ji,jj+1) * pssh(ji,jj+1)  ) * r1_hv_0(ji,jj) * r1_e1e2v(ji,jj)
@@ -1036,5 +1036,5 @@
          !
       CASE( 'F' )                   !* from U-point to F-point : hor. surface weighted mean
-         DO_2D_10_10
+         DO_2D( 1, 0, 1, 0 )
             zc3(ji,jj) = 0.25_wp * (  e1e2t(ji  ,jj  ) * pssh(ji  ,jj  )  &
                &                    + e1e2t(ji+1,jj  ) * pssh(ji+1,jj  )  &
@@ -1057,5 +1057,5 @@
       CASE( 'UW' )                  !* from U- to UW-point
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zc3(ji,jj) = 0.5_wp * (  e1e2t(ji  ,jj) * pssh(ji  ,jj)  &
                &                   + e1e2t(ji+1,jj) * pssh(ji+1,jj)  ) * r1_hu_0(ji,jj) * r1_e1e2u(ji,jj)
@@ -1068,5 +1068,5 @@
       CASE( 'VW' )                  !* from U- to UW-point : vertical simple mean
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zc3(ji,jj) = 0.5_wp * (  e1e2t(ji,jj  ) * pssh(ji,jj  )  &
                &                   + e1e2t(ji,jj+1) * pssh(ji,jj+1)  ) * r1_hv_0(ji,jj) * r1_e1e2v(ji,jj)
@@ -1201,5 +1201,5 @@
                   ssh(:,:,Kbb) = -ssh_ref
 
-                  DO_2D_11_11
+                  DO_2D( 1, 1, 1, 1 )
                      IF( ht_0(ji,jj)-ssh_ref <  rn_wdmin1 ) THEN ! if total depth is less than min depth
                         ssh(ji,jj,Kbb) = rn_wdmin1 - (ht_0(ji,jj) )
Index: /NEMO/trunk/src/SWE/dynatf.F90
===================================================================
--- /NEMO/trunk/src/SWE/dynatf.F90	(revision 13294)
+++ /NEMO/trunk/src/SWE/dynatf.F90	(revision 13295)
@@ -197,5 +197,5 @@
          IF( ln_linssh ) THEN             ! Fixed volume !
             !                             ! =============!
-            DO_3D_11_11( 1, jpkm1 )
+            DO_3D( 1, 1, 1, 1, 1, jpkm1 )
                puu(ji,jj,jk,Kmm) = puu(ji,jj,jk,Kmm) + rn_atfp * ( puu(ji,jj,jk,Kbb) - 2._wp * puu(ji,jj,jk,Kmm) + puu(ji,jj,jk,Kaa) )
                pvv(ji,jj,jk,Kmm) = pvv(ji,jj,jk,Kmm) + rn_atfp * ( pvv(ji,jj,jk,Kbb) - 2._wp * pvv(ji,jj,jk,Kmm) + pvv(ji,jj,jk,Kaa) )
@@ -232,5 +232,5 @@
                CALL dom_vvl_interpol( ssh(:,:,Kmm), pe3u(:,:,:,Kmm), 'U' )
                CALL dom_vvl_interpol( ssh(:,:,Kmm), pe3v(:,:,:,Kmm), 'V' )
-               DO_3D_11_11( 1, jpkm1 )
+               DO_3D( 1, 1, 1, 1, 1, jpkm1 )
                   puu(ji,jj,jk,Kmm) = puu(ji,jj,jk,Kmm) + rn_atfp * ( puu(ji,jj,jk,Kbb) - 2._wp * puu(ji,jj,jk,Kmm) + puu(ji,jj,jk,Kaa) )
                   pvv(ji,jj,jk,Kmm) = pvv(ji,jj,jk,Kmm) + rn_atfp * ( pvv(ji,jj,jk,Kbb) - 2._wp * pvv(ji,jj,jk,Kmm) + pvv(ji,jj,jk,Kaa) )
@@ -243,5 +243,5 @@
                CALL dom_vvl_interpol( ssh(:,:,Kmm), ze3u_f, 'U' )
                CALL dom_vvl_interpol( ssh(:,:,Kmm), ze3v_f, 'V' )
-               DO_3D_11_11( 1, jpkm1 )
+               DO_3D( 1, 1, 1, 1, 1, jpkm1 )
                   zue3a = pe3u(ji,jj,jk,Kaa) * puu(ji,jj,jk,Kaa)
                   zve3a = pe3v(ji,jj,jk,Kaa) * pvv(ji,jj,jk,Kaa)
Index: /NEMO/trunk/src/SWE/dynkeg.F90
===================================================================
--- /NEMO/trunk/src/SWE/dynkeg.F90	(revision 13294)
+++ /NEMO/trunk/src/SWE/dynkeg.F90	(revision 13295)
@@ -103,5 +103,5 @@
 !!an45 to be ADDED : que cas C2 - "wet points only" il suffit de x2 le terme quadratic a la coast (nn_dynkeg_adv = 2)
       CASE ( nkeg_C2_wpo )                          !--  Standard scheme  --!
-         DO_3D_01_01( 1, jpkm1 )
+         DO_3D( 0, 1, 0, 1, 1, jpkm1 )
             zu =  (   puu(ji-1,jj  ,jk,Kmm) * puu(ji-1,jj  ,jk,Kmm)   &
                &    + puu(ji  ,jj  ,jk,Kmm) * puu(ji  ,jj  ,jk,Kmm)   ) * ( 2._wp - umask(ji-1,jj,jk) * umask(ji,jj,jk) )
@@ -113,5 +113,5 @@
       !
       CASE ( nkeg_C2 )                          !--  Standard scheme  --!
-         DO_3D_01_01( 1, jpkm1 )
+         DO_3D( 0, 1, 0, 1, 1, jpkm1 )
             zu =    puu(ji-1,jj  ,jk,Kmm) * puu(ji-1,jj  ,jk,Kmm)   &
                &  + puu(ji  ,jj  ,jk,Kmm) * puu(ji  ,jj  ,jk,Kmm)
@@ -121,5 +121,5 @@
          END_3D
       CASE ( nkeg_HW )                          !--  Hollingsworth scheme  --!
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zu = 8._wp * ( puu(ji-1,jj  ,jk,Kmm) * puu(ji-1,jj  ,jk,Kmm)    &
                &         + puu(ji  ,jj  ,jk,Kmm) * puu(ji  ,jj  ,jk,Kmm) )  &
@@ -137,5 +137,5 @@
       END SELECT 
       !
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          puu(ji,jj,jk,Krhs) = puu(ji,jj,jk,Krhs) - ( zhke(ji+1,jj  ,jk) - zhke(ji,jj,jk) ) / e1u(ji,jj)
          pvv(ji,jj,jk,Krhs) = pvv(ji,jj,jk,Krhs) - ( zhke(ji  ,jj+1,jk) - zhke(ji,jj,jk) ) / e2v(ji,jj)
Index: /NEMO/trunk/src/SWE/dynldf_lap_blp.F90
===================================================================
--- /NEMO/trunk/src/SWE/dynldf_lap_blp.F90	(revision 13294)
+++ /NEMO/trunk/src/SWE/dynldf_lap_blp.F90	(revision 13295)
@@ -97,5 +97,5 @@
             DO jk = 1, jpkm1                                 ! Horizontal slab
                !                                             
-               DO_2D_01_01
+               DO_2D( 0, 1, 0, 1 )
                !                                      ! ahm * e3 * curl  (computed from 1 to jpim1/jpjm1)
 !!gm open question here : e3f  at before or now ?    probably now... 
@@ -112,5 +112,5 @@
                END_2D
                !
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   pu_rhs(ji,jj,jk) = pu_rhs(ji,jj,jk) + zsign * (                                             &
                      &              - ( zcur(ji  ,jj) - zcur(ji,jj-1) ) * r1_e2u(ji,jj) / e3u(ji,jj,jk,Kmm)   &
@@ -128,5 +128,5 @@
             DO jk = 1, jpkm1                                 ! Horizontal slab
                !
-               DO_2D_01_01
+               DO_2D( 0, 1, 0, 1 )
                   !                                      ! shearing stress component (F-point)   NB : ahmf has already been multiplied by fmask
                   zshe(ji-1,jj-1) = ahmf(ji-1,jj-1,jk)                                                              &
@@ -143,5 +143,5 @@
                END_2D
                !
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   pu_rhs(ji,jj,jk) = pu_rhs(ji,jj,jk) + zsign * r1_e1e2u(ji,jj) / e3u(ji,jj,jk,Kmm)                               &
                      &    * (   (   zten(ji+1,jj  ) * e2t(ji+1,jj  )*e2t(ji+1,jj  ) * e3t(ji+1,jj  ,jk,Kmm)                       &
@@ -164,5 +164,5 @@
             DO jk = 1, jpkm1                                 ! Horizontal slab
                !
-               DO_2D_01_01
+               DO_2D( 0, 1, 0, 1 )
                   !                                      ! shearing stress component (F-point)   NB : ahmf has already been multiplied by fmask
                   zshe(ji-1,jj-1) = ahmf(ji-1,jj-1,jk)                                           &
@@ -175,5 +175,5 @@
                END_2D
                !
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   pu_rhs(ji,jj,jk) = pu_rhs(ji,jj,jk) + zsign * r1_e1e2u(ji,jj) / e3u(ji,jj,jk,Kmm)   &
                      &    * (   zten(ji+1,jj  ) * e2t(ji+1,jj  ) * e3t(ji+1,jj  ,jk,Kmm)              &
Index: /NEMO/trunk/src/SWE/dynvor.F90
===================================================================
--- /NEMO/trunk/src/SWE/dynvor.F90	(revision 13294)
+++ /NEMO/trunk/src/SWE/dynvor.F90	(revision 13295)
@@ -232,10 +232,10 @@
       CASE ( np_RVO , np_CRV )                  !* relative vorticity at f-point is used
          DO jk = 1, jpkm1                                ! Horizontal slab
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = (  e2v(ji+1,jj) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk)  &
                   &             - e1u(ji,jj+1) * pu(ji,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) * r1_e1e2f(ji,jj)
             END_2D
             IF( ln_dynvor_msk ) THEN                     ! mask relative vorticity 
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   zwz(ji,jj,jk) = zwz(ji,jj,jk) * fmask(ji,jj,jk)
                END_2D
@@ -255,5 +255,5 @@
             zwt(:,:) = ff_t(:,:) * e1e2t(:,:)*e3t(:,:,jk,Kmm)
          CASE ( np_RVO )                           !* relative vorticity
-            DO_2D_01_01
+            DO_2D( 0, 1, 0, 1 )
                zwt(ji,jj) = r1_4 * (   zwz(ji-1,jj  ,jk) + zwz(ji,jj  ,jk)   &
                   &                  + zwz(ji-1,jj-1,jk) + zwz(ji,jj-1,jk) ) &
@@ -261,5 +261,5 @@
             END_2D
          CASE ( np_MET )                           !* metric term
-            DO_2D_01_01
+            DO_2D( 0, 1, 0, 1 )
                zwt(ji,jj) = (   ( pv(ji,jj,jk) + pv(ji,jj-1,jk) ) * di_e2u_2(ji,jj)     &
                   &           - ( pu(ji,jj,jk) + pu(ji-1,jj,jk) ) * dj_e1v_2(ji,jj)   ) &
@@ -267,5 +267,5 @@
             END_2D
          CASE ( np_CRV )                           !* Coriolis + relative vorticity
-            DO_2D_01_01
+            DO_2D( 0, 1, 0, 1 )
                zwt(ji,jj) = (  ff_t(ji,jj) + r1_4 * ( zwz(ji-1,jj  ,jk) + zwz(ji,jj  ,jk)      &
                   &                                 + zwz(ji-1,jj-1,jk) + zwz(ji,jj-1,jk) )  ) &
@@ -273,5 +273,5 @@
             END_2D
          CASE ( np_CME )                           !* Coriolis + metric
-            DO_2D_01_01
+            DO_2D( 0, 1, 0, 1 )
                zwt(ji,jj) = (  ff_t(ji,jj) * e1e2t(ji,jj)                             &
                     &        + ( pv(ji,jj,jk) + pv(ji,jj-1,jk) ) * di_e2u_2(ji,jj)    &
@@ -284,5 +284,5 @@
          !
          !                                   !==  compute and add the vorticity term trend  =!
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pu_rhs(ji,jj,jk) = pu_rhs(ji,jj,jk) + r1_4 * r1_e1e2u(ji,jj) / e3u(ji,jj,jk,Kmm)                    &
                &                                * (  zwt(ji+1,jj) * ( pv(ji+1,jj,jk) + pv(ji+1,jj-1,jk) )   &
@@ -344,30 +344,30 @@
             zwz(:,:) = ff_f(:,:) 
          CASE ( np_RVO )                           !* relative vorticity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = (  e2v(ji+1,jj  ) * pv(ji+1,jj  ,jk) - e2v(ji,jj) * pv(ji,jj,jk)    &
                   &          - e1u(ji  ,jj+1) * pu(ji  ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) * r1_e1e2f(ji,jj)
             END_2D
             IF( ln_dynvor_msk ) THEN                     ! mask the relative vorticity
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   zwz(ji,jj) = zwz(ji,jj) * fmask(ji,jj,jk)
                END_2D
             ENDIF
          CASE ( np_MET )                           !* metric term
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = ( pv(ji+1,jj  ,jk) + pv(ji,jj,jk) ) * di_e2v_2e1e2f(ji,jj)   &
                   &       - ( pu(ji  ,jj+1,jk) + pu(ji,jj,jk) ) * dj_e1u_2e1e2f(ji,jj)
             END_2D
          CASE ( np_CRV )                           !* Coriolis + relative vorticity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = ff_f(ji,jj) + (  e2v(ji+1,jj) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk)      &
                   &                        - e1u(ji,jj+1) * pu(ji,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) * r1_e1e2f(ji,jj)
             END_2D
             IF( ln_dynvor_msk ) THEN                     ! mask the relative vorticity (NOT the Coriolis term)
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   zwz(ji,jj) = ( zwz(ji,jj) - ff_f(ji,jj) ) * fmask(ji,jj,jk) + ff_f(ji,jj)
                END_2D
             ENDIF
          CASE ( np_CME )                           !* Coriolis + metric
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = ff_f(ji,jj) + ( pv(ji+1,jj  ,jk) + pv(ji,jj,jk) ) * di_e2v_2e1e2f(ji,jj)   &
                   &                     - ( pu(ji  ,jj+1,jk) + pu(ji,jj,jk) ) * dj_e1u_2e1e2f(ji,jj)
@@ -383,5 +383,5 @@
          !
          !                                   !==  compute and add the vorticity term trend  =!
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zy1 = zwy(ji,jj-1) + zwy(ji+1,jj-1)
             zy2 = zwy(ji,jj  ) + zwy(ji+1,jj  )
@@ -441,30 +441,30 @@
             zwz(:,:) = ff_f(:,:) 
          CASE ( np_RVO )                           !* relative vorticity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = (  e2v(ji+1,jj  ) * pv(ji+1,jj  ,jk) - e2v(ji,jj) * pv(ji,jj,jk)    &
                   &          - e1u(ji  ,jj+1) * pu(ji  ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) * r1_e1e2f(ji,jj)
             END_2D
             IF( ln_dynvor_msk ) THEN                     ! mask the relative vorticity
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   zwz(ji,jj) = ff_f(ji,jj) * fmask(ji,jj,jk)
                END_2D
             ENDIF
          CASE ( np_MET )                           !* metric term
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = ( pv(ji+1,jj  ,jk) + pv(ji,jj,jk) ) * di_e2v_2e1e2f(ji,jj)   &
                   &       - ( pu(ji  ,jj+1,jk) + pu(ji,jj,jk) ) * dj_e1u_2e1e2f(ji,jj)
             END_2D
          CASE ( np_CRV )                           !* Coriolis + relative vorticity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = ff_f(ji,jj) + (  e2v(ji+1,jj  ) * pv(ji+1,jj  ,jk) - e2v(ji,jj) * pv(ji,jj,jk)  &
                   &                        - e1u(ji  ,jj+1) * pu(ji  ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) * r1_e1e2f(ji,jj)
             END_2D
             IF( ln_dynvor_msk ) THEN                     ! mask the relative vorticity (NOT the Coriolis term)
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   zwz(ji,jj) = ( zwz(ji,jj) - ff_f(ji,jj) ) * fmask(ji,jj,jk) + ff_f(ji,jj)
                END_2D
             ENDIF
          CASE ( np_CME )                           !* Coriolis + metric
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj) = ff_f(ji,jj) + ( pv(ji+1,jj  ,jk) + pv(ji,jj,jk) ) * di_e2v_2e1e2f(ji,jj)   &
                   &                     - ( pu(ji  ,jj+1,jk) + pu(ji,jj,jk) ) * dj_e1u_2e1e2f(ji,jj)
@@ -481,5 +481,5 @@
          !
          !                                   !==  compute and add the vorticity term trend  =!
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zuav = r1_8 * r1_e1u(ji,jj) * (  zwy(ji  ,jj-1) + zwy(ji+1,jj-1)  &
                &                           + zwy(ji  ,jj  ) + zwy(ji+1,jj  )  )
@@ -539,5 +539,5 @@
          SELECT CASE( nn_een_e3f )           ! == reciprocal of e3 at F-point
          CASE ( 0 )                                   ! original formulation  (masked averaging of e3t divided by 4)
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                ze3f = (  e3t(ji  ,jj+1,jk,Kmm)*tmask(ji  ,jj+1,jk)   &
                   &    + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk)   &
@@ -549,5 +549,5 @@
             END_2D
          CASE ( 1 )                                   ! new formulation  (masked averaging of e3t divided by the sum of mask)
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                ze3f = (  e3t(ji  ,jj+1,jk,Kmm)*tmask(ji  ,jj+1,jk)   &
                   &    + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk)   &
@@ -564,19 +564,19 @@
          SELECT CASE( kvor )                 !==  vorticity considered  ==!
          CASE ( np_COR )                           !* Coriolis (planetary vorticity)
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = ff_f(ji,jj) * z1_e3f(ji,jj)
             END_2D
          CASE ( np_RVO )                           !* relative vorticity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = ( e2v(ji+1,jj  ) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk)  &
                   &            - e1u(ji  ,jj+1) * pu(ji,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) * r1_e1e2f(ji,jj)*z1_e3f(ji,jj)
             END_2D
          CASE ( np_MET )                           !* metric term
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = (   ( pv(ji+1,jj,jk) + pv(ji,jj,jk) ) * di_e2v_2e1e2f(ji,jj)   &
                   &              - ( pu(ji,jj+1,jk) + pu(ji,jj,jk) ) * dj_e1u_2e1e2f(ji,jj)   ) * z1_e3f(ji,jj)
             END_2D
          CASE ( np_CRV )                           !* Coriolis + relative vorticity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = (  ff_f(ji,jj) + (  e2v(ji+1,jj  ) * pv(ji+1,jj,jk) - e2v(ji,jj) * pv(ji,jj,jk)      &
                   &                              - e1u(ji  ,jj+1) * pu(ji,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  )   &
@@ -584,5 +584,5 @@
             END_2D
          CASE ( np_CME )                           !* Coriolis + metric
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = (   ff_f(ji,jj) + ( pv(ji+1,jj  ,jk) + pv(ji,jj,jk) ) * di_e2v_2e1e2f(ji,jj)   &
                   &                            - ( pu(ji  ,jj+1,jk) + pu(ji,jj,jk) ) * dj_e1u_2e1e2f(ji,jj)   ) * z1_e3f(ji,jj)
@@ -593,5 +593,5 @@
          !
          IF( ln_dynvor_msk ) THEN          !==  mask/unmask vorticity ==!
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = zwz(ji,jj,jk) * fmask(ji,jj,jk)
             END_2D
@@ -624,5 +624,5 @@
             END DO
          END DO
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zua = + r1_12 * r1_e1u(ji,jj) * (  ztne(ji,jj  ) * zwy(ji  ,jj  ) + ztnw(ji+1,jj) * zwy(ji+1,jj  )   &
                &                             + ztse(ji,jj  ) * zwy(ji  ,jj-1) + ztsw(ji+1,jj) * zwy(ji+1,jj-1) )
@@ -684,9 +684,9 @@
          SELECT CASE( kvor )                 !==  vorticity considered  ==!
          CASE ( np_COR )                           !* Coriolis (planetary vorticity)
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = ff_f(ji,jj)
             END_2D
          CASE ( np_RVO )                           !* relative vorticity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = (  e2v(ji+1,jj  ) * pv(ji+1,jj  ,jk) - e2v(ji,jj) * pv(ji,jj,jk)    &
                   &             - e1u(ji  ,jj+1) * pu(ji  ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) &
@@ -694,10 +694,10 @@
             END_2D
          CASE ( np_MET )                           !* metric term
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = ( pv(ji+1,jj  ,jk) + pv(ji,jj,jk) ) * di_e2v_2e1e2f(ji,jj)   &
                   &          - ( pu(ji  ,jj+1,jk) + pu(ji,jj,jk) ) * dj_e1u_2e1e2f(ji,jj)
             END_2D
          CASE ( np_CRV )                           !* Coriolis + relative vorticity
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = (  ff_f(ji,jj) + (  e2v(ji+1,jj  ) * pv(ji+1,jj  ,jk) - e2v(ji,jj) * pv(ji,jj,jk)    &
                   &                              - e1u(ji  ,jj+1) * pu(ji  ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) &
@@ -705,5 +705,5 @@
             END_2D
          CASE ( np_CME )                           !* Coriolis + metric
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = ff_f(ji,jj) + ( pv(ji+1,jj  ,jk) + pv(ji,jj,jk) ) * di_e2v_2e1e2f(ji,jj)   &
                   &                        - ( pu(ji  ,jj+1,jk) + pu(ji,jj,jk) ) * dj_e1u_2e1e2f(ji,jj)
@@ -714,5 +714,5 @@
          !
          IF( ln_dynvor_msk ) THEN          !==  mask/unmask vorticity ==!
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                zwz(ji,jj,jk) = zwz(ji,jj,jk) * fmask(ji,jj,jk)
             END_2D
@@ -747,5 +747,5 @@
             END DO
          END DO
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zua = + r1_12 * r1_e1u(ji,jj) * (  ztne(ji,jj  ) * zwy(ji  ,jj  ) + ztnw(ji+1,jj) * zwy(ji+1,jj  )   &
                &                             + ztse(ji,jj  ) * zwy(ji  ,jj-1) + ztsw(ji+1,jj) * zwy(ji+1,jj-1) )
@@ -807,5 +807,5 @@
       IF(lwp) WRITE(numout,*) '      change fmask value in the angles (T)           ln_vorlat = ', ln_vorlat
       IF( ln_vorlat .AND. ( ln_dynvor_ene .OR. ln_dynvor_ens .OR. ln_dynvor_mix ) ) THEN
-         DO_3D_10_10( 1, jpk )
+         DO_3D( 1, 0, 1, 0, 1, jpk )
             IF(    tmask(ji,jj+1,jk) + tmask(ji+1,jj+1,jk)              &
                & + tmask(ji,jj  ,jk) + tmask(ji+1,jj+1,jk) == 3._wp )   fmask(ji,jj,jk) = 1._wp
@@ -846,5 +846,5 @@
          CASE( np_ENT )                      !* T-point metric term :   pre-compute di(e2u)/2 and dj(e1v)/2
             ALLOCATE( di_e2u_2(jpi,jpj), dj_e1v_2(jpi,jpj) )
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                di_e2u_2(ji,jj) = ( e2u(ji,jj) - e2u(ji-1,jj  ) ) * 0.5_wp
                dj_e1v_2(ji,jj) = ( e1v(ji,jj) - e1v(ji  ,jj-1) ) * 0.5_wp
@@ -854,5 +854,5 @@
          CASE DEFAULT                        !* F-point metric term :   pre-compute di(e2u)/(2*e1e2f) and dj(e1v)/(2*e1e2f)
             ALLOCATE( di_e2v_2e1e2f(jpi,jpj), dj_e1u_2e1e2f(jpi,jpj) )
-            DO_2D_10_10
+            DO_2D( 1, 0, 1, 0 )
                di_e2v_2e1e2f(ji,jj) = ( e2v(ji+1,jj  ) - e2v(ji,jj) )  * 0.5 * r1_e1e2f(ji,jj)
                dj_e1u_2e1e2f(ji,jj) = ( e1u(ji  ,jj+1) - e1u(ji,jj) )  * 0.5 * r1_e1e2f(ji,jj)
Index: /NEMO/trunk/src/SWE/ldfdyn.F90
===================================================================
--- /NEMO/trunk/src/SWE/ldfdyn.F90	(revision 13294)
+++ /NEMO/trunk/src/SWE/ldfdyn.F90	(revision 13295)
@@ -312,5 +312,5 @@
             IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'ldf_dyn_init: failed to allocate Smagorinsky arrays')
             !
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                esqt(ji,jj) = ( 2._wp * e1e2t(ji,jj) / ( e1t(ji,jj) + e2t(ji,jj) ) )**2 
                esqf(ji,jj) = ( 2._wp * e1e2f(ji,jj) / ( e1f(ji,jj) + e2f(ji,jj) ) )**2 
@@ -396,5 +396,5 @@
          IF( ln_dynldf_lap   ) THEN        ! laplacian operator : |u| e /12 = |u/144| e
             DO jk = 1, jpkm1
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   zu2pv2_ij    = uu(ji  ,jj  ,jk,Kbb) * uu(ji  ,jj  ,jk,Kbb) + vv(ji  ,jj  ,jk,Kbb) * vv(ji  ,jj  ,jk,Kbb)
                   zu2pv2_ij_m1 = uu(ji-1,jj  ,jk,Kbb) * uu(ji-1,jj  ,jk,Kbb) + vv(ji  ,jj-1,jk,Kbb) * vv(ji  ,jj-1,jk,Kbb)
@@ -402,5 +402,5 @@
                   ahmt(ji,jj,jk) = SQRT( (zu2pv2_ij + zu2pv2_ij_m1) * r1_288 ) * zemax * tmask(ji,jj,jk)      ! 288= 12*12 * 2
                END_2D
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   zu2pv2_ij_p1 = uu(ji  ,jj+1,jk, Kbb) * uu(ji  ,jj+1,jk, Kbb) + vv(ji+1,jj  ,jk, Kbb) * vv(ji+1,jj  ,jk, Kbb)
                   zu2pv2_ij    = uu(ji  ,jj  ,jk, Kbb) * uu(ji  ,jj  ,jk, Kbb) + vv(ji  ,jj  ,jk, Kbb) * vv(ji  ,jj  ,jk, Kbb)
@@ -411,5 +411,5 @@
          ELSEIF( ln_dynldf_blp ) THEN      ! bilaplacian operator : sqrt( |u| e^3 /12 ) = sqrt( |u/144| e ) * e
             DO jk = 1, jpkm1
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   zu2pv2_ij    = uu(ji  ,jj  ,jk,Kbb) * uu(ji  ,jj  ,jk,Kbb) + vv(ji  ,jj  ,jk,Kbb) * vv(ji  ,jj  ,jk,Kbb)
                   zu2pv2_ij_m1 = uu(ji-1,jj  ,jk,Kbb) * uu(ji-1,jj  ,jk,Kbb) + vv(ji  ,jj-1,jk,Kbb) * vv(ji  ,jj-1,jk,Kbb)
@@ -417,5 +417,5 @@
                   ahmt(ji,jj,jk) = SQRT(  SQRT( (zu2pv2_ij + zu2pv2_ij_m1) * r1_288 ) * zemax  ) * zemax * tmask(ji,jj,jk)
                END_2D
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   zu2pv2_ij_p1 = uu(ji  ,jj+1,jk, Kbb) * uu(ji  ,jj+1,jk, Kbb) + vv(ji+1,jj  ,jk, Kbb) * vv(ji+1,jj  ,jk, Kbb)
                   zu2pv2_ij    = uu(ji  ,jj  ,jk, Kbb) * uu(ji  ,jj  ,jk, Kbb) + vv(ji  ,jj  ,jk, Kbb) * vv(ji  ,jj  ,jk, Kbb)
@@ -440,5 +440,5 @@
             DO jk = 1, jpkm1
                !
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   zdb =    ( uu(ji,jj,jk,Kbb) * r1_e2u(ji,jj) -  uu(ji-1,jj,jk,Kbb) * r1_e2u(ji-1,jj) )  &
                        &                      * r1_e1t(ji,jj) * e2t(ji,jj)                           &
@@ -448,5 +448,5 @@
                END_2D
                !
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   zdb =   (  uu(ji,jj+1,jk,Kbb) * r1_e1u(ji,jj+1) -  uu(ji,jj,jk,Kbb) * r1_e1u(ji,jj) )  &
                        &                        * r1_e2f(ji,jj)   * e1f(ji,jj)                       &
@@ -462,5 +462,5 @@
             DO jk = 1, jpkm1
               !
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   !
                   zu2pv2_ij    = uu(ji  ,jj  ,jk,Kbb) * uu(ji  ,jj  ,jk,Kbb) + vv(ji  ,jj  ,jk,Kbb) * vv(ji  ,jj  ,jk,Kbb)
@@ -476,5 +476,5 @@
                END_2D
                !
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   !
                   zu2pv2_ij_p1 = uu(ji  ,jj+1,jk, kbb) * uu(ji  ,jj+1,jk, kbb) + vv(ji+1,jj  ,jk, kbb) * vv(ji+1,jj  ,jk, kbb)
@@ -499,8 +499,8 @@
             !                          ! effective default limits are 1/12 |U|L^3 < B_hm < 1//(32*2dt) L^4
             DO jk = 1, jpkm1
-               DO_2D_00_00
+               DO_2D( 0, 0, 0, 0 )
                   ahmt(ji,jj,jk) = SQRT( r1_8 * esqt(ji,jj) * ahmt(ji,jj,jk) )
                END_2D
-               DO_2D_10_10
+               DO_2D( 1, 0, 1, 0 )
                   ahmf(ji,jj,jk) = SQRT( r1_8 * esqf(ji,jj) * ahmf(ji,jj,jk) )
                END_2D
Index: /NEMO/trunk/src/SWE/sbcice_cice.F90
===================================================================
--- /NEMO/trunk/src/SWE/sbcice_cice.F90	(revision 13294)
+++ /NEMO/trunk/src/SWE/sbcice_cice.F90	(revision 13295)
@@ -219,5 +219,5 @@
 ! T point to U point
 ! T point to V point
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          fr_iu(ji,jj)=0.5*(fr_i(ji,jj)+fr_i(ji+1,jj))*umask(ji,jj,1)
          fr_iv(ji,jj)=0.5*(fr_i(ji,jj)+fr_i(ji,jj+1))*vmask(ji,jj,1)
@@ -316,5 +316,5 @@
 ! x comp of wind stress (CI_1)
 ! U point to F point
-         DO_2D_10_11
+         DO_2D( 1, 0, 1, 1 )
             ztmp(ji,jj) = 0.5 * (  fr_iu(ji,jj) * utau(ji,jj)      &
                                  + fr_iu(ji,jj+1) * utau(ji,jj+1) ) * fmask(ji,jj,1)
@@ -324,5 +324,5 @@
 ! y comp of wind stress (CI_2)
 ! V point to F point
-         DO_2D_11_10
+         DO_2D( 1, 1, 1, 0 )
             ztmp(ji,jj) = 0.5 * (  fr_iv(ji,jj) * vtau(ji,jj)      &
                                  + fr_iv(ji+1,jj) * vtau(ji+1,jj) ) * fmask(ji,jj,1)
@@ -339,5 +339,5 @@
             qla_ice(:,:,1)= - ( emp_ice(:,:)+sprecip(:,:) ) * rLsub
 ! End of temporary code
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                IF(fr_i(ji,jj).eq.0.0) THEN
                   DO jl=1,ncat
@@ -441,5 +441,5 @@
 ! x comp and y comp of surface ocean current
 ! U point to F point
-      DO_2D_10_11
+      DO_2D( 1, 0, 1, 1 )
          ztmp(ji,jj)=0.5*(ssu_m(ji,jj)+ssu_m(ji,jj+1))*fmask(ji,jj,1)
       END_2D
@@ -447,5 +447,5 @@
 
 ! V point to F point
-      DO_2D_11_10
+      DO_2D( 1, 1, 1, 0 )
          ztmp(ji,jj)=0.5*(ssv_m(ji,jj)+ssv_m(ji+1,jj))*fmask(ji,jj,1)
       END_2D
@@ -471,5 +471,5 @@
 ! x comp and y comp of sea surface slope (on F points)
 ! T point to F point
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          ztmp(ji,jj)=0.5 * (  (zpice(ji+1,jj  )-zpice(ji,jj  )) * r1_e1u(ji,jj  )    &
             &               + (zpice(ji+1,jj+1)-zpice(ji,jj+1)) * r1_e1u(ji,jj+1)  ) * fmask(ji,jj,1)
@@ -478,5 +478,5 @@
 
 ! T point to F point
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          ztmp(ji,jj)=0.5 * (  (zpice(ji  ,jj+1)-zpice(ji  ,jj)) * r1_e2v(ji  ,jj)    &
             &               + (zpice(ji+1,jj+1)-zpice(ji+1,jj)) * r1_e2v(ji+1,jj)  ) *  fmask(ji,jj,1)
@@ -507,5 +507,5 @@
       ss_iou(:,:)=0.0
 ! F point to U point
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          ss_iou(ji,jj) = 0.5 * ( ztmp1(ji,jj-1) + ztmp1(ji,jj) ) * umask(ji,jj,1)
       END_2D
@@ -517,5 +517,5 @@
 ! F point to V point
 
-      DO_2D_10_00
+      DO_2D( 1, 0, 0, 0 )
          ss_iov(ji,jj) = 0.5 * ( ztmp1(ji-1,jj) + ztmp1(ji,jj) ) * vmask(ji,jj,1)
       END_2D
@@ -601,5 +601,5 @@
       CALL lbc_lnk( 'sbcice_cice', qsr , 'T', 1. )
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          nfrzmlt(ji,jj)=MAX(nfrzmlt(ji,jj),0.0)
       END_2D
@@ -625,5 +625,5 @@
 ! T point to U point
 ! T point to V point
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          fr_iu(ji,jj)=0.5*(fr_i(ji,jj)+fr_i(ji+1,jj))*umask(ji,jj,1)
          fr_iv(ji,jj)=0.5*(fr_i(ji,jj)+fr_i(ji,jj+1))*vmask(ji,jj,1)
@@ -985,5 +985,5 @@
 
       pn(:,:)=0.0
-      DO_2D_10_10
+      DO_2D( 1, 0, 1, 0 )
          pn(ji,jj)=pc(ji+1-ji_off,jj+1-jj_off,1)
       END_2D
Index: /NEMO/trunk/src/SWE/step.F90
===================================================================
--- /NEMO/trunk/src/SWE/step.F90	(revision 13294)
+++ /NEMO/trunk/src/SWE/step.F90	(revision 13295)
@@ -148,5 +148,5 @@
 
 !!an - calcul du gradient de pression horizontal (explicit)
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          uu(ji,jj,jk,Nrhs) = uu(ji,jj,jk,Nrhs) - grav * ( ssh(ji+1,jj,Nnn) - ssh(ji,jj,Nnn) ) * r1_e1u(ji,jj)
          vv(ji,jj,jk,Nrhs) = vv(ji,jj,jk,Nrhs) - grav * ( ssh(ji,jj+1,Nnn) - ssh(ji,jj,Nnn) ) * r1_e2v(ji,jj)
@@ -155,5 +155,5 @@
       ! add wind stress forcing and layer linear friction to the RHS 
       z1_2rho0 = 0.5_wp * r1_rho0
-      DO_3D_00_00(1,jpkm1)
+      DO_3D( 0, 0, 0, 0,1,jpkm1)
          uu(ji,jj,jk,Nrhs) = uu(ji,jj,jk,Nrhs) + z1_2rho0 * ( utau_b(ji,jj) + utau(ji,jj) ) / e3u(ji,jj,jk,Nnn)   &
             &                                  - rn_rfr * uu(ji,jj,jk,Nbb)
@@ -172,10 +172,10 @@
       IF( ln_dynadv_vec ) THEN      ! vector invariant form : applied on velocity
          IF( l_1st_euler ) THEN           ! Euler time stepping (no Asselin filter)
-            DO_3D_00_00(1,jpkm1)
+            DO_3D( 0, 0, 0, 0,1,jpkm1)
                uu(ji,jj,jk,Naa) = uu(ji,jj,jk,Nbb) + rDt * uu(ji,jj,jk,Nrhs) * umask(ji,jj,jk)
                vv(ji,jj,jk,Naa) = vv(ji,jj,jk,Nbb) + rDt * vv(ji,jj,jk,Nrhs) * vmask(ji,jj,jk)
              END_3D          
          ELSE                             ! Leap Frog time stepping + Asselin filter         
-            DO_3D_11_11(1,jpkm1)
+            DO_3D( 1, 1, 1, 1,1,jpkm1)
                zua = uu(ji,jj,jk,Nbb) + rDt * uu(ji,jj,jk,Nrhs) * umask(ji,jj,jk)
                zva = vv(ji,jj,jk,Nbb) + rDt * vv(ji,jj,jk,Nrhs) * vmask(ji,jj,jk)
@@ -199,5 +199,5 @@
       ELSE                          ! flux form : applied on thickness weighted velocity
          IF( l_1st_euler ) THEN           ! Euler time stepping (no Asselin filter)
-            DO_3D_00_00(1,jpkm1)
+            DO_3D( 0, 0, 0, 0,1,jpkm1)
                zue3b = e3u(ji,jj,jk,Nbb) * uu(ji,jj,jk,Nbb)
                zve3b = e3v(ji,jj,jk,Nbb) * vv(ji,jj,jk,Nbb)
@@ -210,5 +210,5 @@
             END_3D
          ELSE                             ! Leap Frog time stepping + Asselin filter
-            DO_3D_11_11(1,jpkm1)
+            DO_3D( 1, 1, 1, 1,1,jpkm1)
                zue3n = e3u(ji,jj,jk,Nnn) * uu(ji,jj,jk,Nnn)
                zve3n = e3v(ji,jj,jk,Nnn) * vv(ji,jj,jk,Nnn)
Index: /NEMO/trunk/src/SWE/stepLF.F90
===================================================================
--- /NEMO/trunk/src/SWE/stepLF.F90	(revision 13294)
+++ /NEMO/trunk/src/SWE/stepLF.F90	(revision 13295)
@@ -146,5 +146,5 @@
       !IF( .NOT.ln_linssh )  CALL dom_vvl_sf_nxt_st( kstp, Nbb, Nnn,      Naa )    ! after vertical scale factors 
 !!an - calcul du gradient de pression horizontal (explicit)
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          uu(ji,jj,jk,Nrhs) = uu(ji,jj,jk,Nrhs) - grav * ( ssh(ji+1,jj,Nnn) - ssh(ji,jj,Nnn) ) * r1_e1u(ji,jj)
          vv(ji,jj,jk,Nrhs) = vv(ji,jj,jk,Nrhs) - grav * ( ssh(ji,jj+1,Nnn) - ssh(ji,jj,Nnn) ) * r1_e2v(ji,jj)
@@ -153,5 +153,5 @@
       ! add wind stress forcing and layer linear friction to the RHS 
       z1_2rho0 = 0.5_wp * r1_rho0
-      DO_3D_00_00(1,jpkm1)
+      DO_3D( 0, 0, 0, 0,1,jpkm1)
          uu(ji,jj,jk,Nrhs) = uu(ji,jj,jk,Nrhs) + z1_2rho0 * ( utau_b(ji,jj) + utau(ji,jj) ) / e3u(ji,jj,jk,Nnn)   &
             &                                  - rn_rfr * uu(ji,jj,jk,Nbb)
@@ -176,10 +176,10 @@
       IF( ln_dynadv_vec ) THEN      ! vector invariant form : applied on velocity
          IF( l_1st_euler ) THEN           ! Euler time stepping (no Asselin filter)
-            DO_3D_00_00(1,jpkm1)
+            DO_3D( 0, 0, 0, 0,1,jpkm1)
                uu(ji,jj,jk,Naa) = uu(ji,jj,jk,Nbb) + rDt * uu(ji,jj,jk,Nrhs) * umask(ji,jj,jk)
                vv(ji,jj,jk,Naa) = vv(ji,jj,jk,Nbb) + rDt * vv(ji,jj,jk,Nrhs) * vmask(ji,jj,jk)
              END_3D          
          ELSE                             ! Leap Frog time stepping + Asselin filter         
-            DO_3D_11_11(1,jpkm1)
+            DO_3D( 1, 1, 1, 1,1,jpkm1)
                zua = uu(ji,jj,jk,Nbb) + rDt * uu(ji,jj,jk,Nrhs) * umask(ji,jj,jk)
                zva = vv(ji,jj,jk,Nbb) + rDt * vv(ji,jj,jk,Nrhs) * vmask(ji,jj,jk)
@@ -203,5 +203,5 @@
       ELSE                          ! flux form : applied on thickness weighted velocity
          IF( l_1st_euler ) THEN           ! Euler time stepping (no Asselin filter)
-            DO_3D_00_00(1,jpkm1)
+            DO_3D( 0, 0, 0, 0,1,jpkm1)
                zue3b = e3u(ji,jj,jk,Nbb) * uu(ji,jj,jk,Nbb)
                zve3b = e3v(ji,jj,jk,Nbb) * vv(ji,jj,jk,Nbb)
@@ -215,5 +215,5 @@
          ELSE                             ! Leap Frog time stepping + Asselin filter
             CALL dom_qco_r3c( ssh(:,:,Nnn), r3t_f(:,:), r3u_f(:,:), r3v_f(:,:) )   ! "now" ssh/h_0 ratio from filtrered ssh
-            DO_3D_11_11(1,jpkm1)
+            DO_3D( 1, 1, 1, 1,1,jpkm1)
                zue3n = e3u(ji,jj,jk,Nnn) * uu(ji,jj,jk,Nnn)
                zve3n = e3v(ji,jj,jk,Nnn) * vv(ji,jj,jk,Nnn)
Index: /NEMO/trunk/src/SWE/stpRK3.F90
===================================================================
--- /NEMO/trunk/src/SWE/stpRK3.F90	(revision 13294)
+++ /NEMO/trunk/src/SWE/stpRK3.F90	(revision 13295)
@@ -145,5 +145,5 @@
       !
 !!an - calcul du gradient de pression horizontal (explicit)
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          uu(ji,jj,jk,Nrhs) = uu(ji,jj,jk,Nrhs) - grav * ( ssh(ji+1,jj,Nbb) - ssh(ji,jj,Nbb) ) * r1_e1u(ji,jj)
          vv(ji,jj,jk,Nrhs) = vv(ji,jj,jk,Nrhs) - grav * ( ssh(ji,jj+1,Nbb) - ssh(ji,jj,Nbb) ) * r1_e2v(ji,jj)
@@ -153,5 +153,5 @@
       ! add wind stress forcing and layer linear friction to the RHS 
       z5_6 = 5._wp/6._wp
-      DO_3D_00_00(1,jpkm1)
+      DO_3D( 0, 0, 0, 0,1,jpkm1)
          uu(ji,jj,jk,Nrhs) = uu(ji,jj,jk,Nrhs) + r1_rho0 * ( z5_6*utau_b(ji,jj) + (1._wp - z5_6)*utau(ji,jj) ) / e3u(ji,jj,jk,Nbb)   &
             &                                  - rn_rfr * uu(ji,jj,jk,Nbb)
@@ -163,10 +163,10 @@
                             CALL dom_qco_r3c   ( ssh(:,:,Naa), r3t(:,:,Naa), r3u(:,:,Naa), r3v(:,:,Naa), r3f(:,:) )   ! "after" ssh./h._0 ratio explicit
       IF( ln_dynadv_vec ) THEN      ! vector invariant form : applied on velocity
-         DO_3D_00_00(1,jpkm1)
+         DO_3D( 0, 0, 0, 0,1,jpkm1)
             uu(ji,jj,jk,Naa) = uu(ji,jj,jk,Nbb) + rDt * uu(ji,jj,jk,Nrhs) * umask(ji,jj,jk)
             vv(ji,jj,jk,Naa) = vv(ji,jj,jk,Nbb) + rDt * vv(ji,jj,jk,Nrhs) * vmask(ji,jj,jk)
          END_3D          
       ELSE
-         DO_3D_00_00(1,jpkm1)       ! flux form : applied on thickness weighted velocity
+         DO_3D( 0, 0, 0, 0,1,jpkm1)       ! flux form : applied on thickness weighted velocity
             uu(ji,jj,jk,Naa) = (         uu(ji,jj,jk,Nbb )*e3u(ji,jj,jk,Nbb)                              &
                &                 + rDt * uu(ji,jj,jk,Nrhs)*e3t(ji,jj,jk,Nbb) * umask(ji,jj,jk)        )   &
@@ -203,5 +203,5 @@
       !
 !!an - calcul du gradient de pression horizontal (explicit)
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          uu(ji,jj,jk,Nrhs) = uu(ji,jj,jk,Nrhs) - grav * ( ssh(ji+1,jj,Nnn) - ssh(ji,jj,Nnn) ) * r1_e1u(ji,jj)
          vv(ji,jj,jk,Nrhs) = vv(ji,jj,jk,Nrhs) - grav * ( ssh(ji,jj+1,Nnn) - ssh(ji,jj,Nnn) ) * r1_e2v(ji,jj)
@@ -211,5 +211,5 @@
 #if defined key_RK3all
       z3_4 = 3._wp/4._wp
-      DO_3D_00_00(1,jpkm1)
+      DO_3D( 0, 0, 0, 0,1,jpkm1)
          uu(ji,jj,jk,Nrhs) = uu(ji,jj,jk,Nrhs) + r1_rho0 * ( z3_4*utau_b(ji,jj) + (1._wp - z3_4)*utau(ji,jj) ) / e3u(ji,jj,jk,Nbb)   &
             &                                  - rn_rfr * uu(ji,jj,jk,Nbb)
@@ -221,10 +221,10 @@
                            CALL dom_qco_r3c   ( ssh(:,:,Naa), r3t(:,:,Naa), r3u(:,:,Naa), r3v(:,:,Naa), r3f(:,:) )   ! "after" ssh./h._0 ratio explicit
       IF( ln_dynadv_vec ) THEN      ! vector invariant form : applied on velocity
-         DO_3D_00_00(1,jpkm1)
+         DO_3D( 0, 0, 0, 0,1,jpkm1)
             uu(ji,jj,jk,Naa) = uu(ji,jj,jk,Nbb) + rDt * uu(ji,jj,jk,Nrhs) * umask(ji,jj,jk)
             vv(ji,jj,jk,Naa) = vv(ji,jj,jk,Nbb) + rDt * vv(ji,jj,jk,Nrhs) * vmask(ji,jj,jk)
          END_3D          
       ELSE
-         DO_3D_00_00(1,jpkm1)       ! flux form : applied on thickness weighted velocity
+         DO_3D( 0, 0, 0, 0,1,jpkm1)       ! flux form : applied on thickness weighted velocity
             uu(ji,jj,jk,Naa) = (         uu(ji,jj,jk,Nbb )*e3u(ji,jj,jk,Nbb)                              &
                &                 + rDt * uu(ji,jj,jk,Nrhs)*e3t(ji,jj,jk,Nnn) * umask(ji,jj,jk)        )   &
@@ -264,5 +264,5 @@
 
 !!an - calcul du gradient de pression horizontal (explicit)
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          uu(ji,jj,jk,Nrhs) = uu(ji,jj,jk,Nrhs) - grav * ( ssh(ji+1,jj,Nnn) - ssh(ji,jj,Nnn) ) * r1_e1u(ji,jj)
          vv(ji,jj,jk,Nrhs) = vv(ji,jj,jk,Nrhs) - grav * ( ssh(ji,jj+1,Nnn) - ssh(ji,jj,Nnn) ) * r1_e2v(ji,jj)
@@ -271,5 +271,5 @@
       ! add wind stress forcing and layer linear friction to the RHS 
       z1_2rho0 = 0.5_wp * r1_rho0
-      DO_3D_00_00(1,jpkm1)
+      DO_3D( 0, 0, 0, 0,1,jpkm1)
          uu(ji,jj,jk,Nrhs) = uu(ji,jj,jk,Nrhs) + z1_2rho0 * ( utau_b(ji,jj) + utau(ji,jj) ) / e3u(ji,jj,jk,Nnn)   &
             &                                  - rn_rfr * uu(ji,jj,jk,Nbb)
@@ -280,5 +280,5 @@
                             CALL dom_qco_r3c   ( ssh(:,:,Naa), r3t(:,:,Naa), r3u(:,:,Naa), r3v(:,:,Naa), r3f(:,:) )   ! "after" ssh./h._0 ratio explicit      
       IF( ln_dynadv_vec ) THEN      ! vector invariant form : applied on velocity
-         DO_3D_11_11(1,jpkm1)
+         DO_3D( 1, 1, 1, 1,1,jpkm1)
             zua = uu(ji,jj,jk,Nbb) + rDt * uu(ji,jj,jk,Nrhs) * umask(ji,jj,jk)
             zva = vv(ji,jj,jk,Nbb) + rDt * vv(ji,jj,jk,Nrhs) * vmask(ji,jj,jk)
@@ -292,5 +292,5 @@
          !
       ELSE                          ! flux form : applied on thickness weighted velocity
-         DO_3D_11_11(1,jpkm1)
+         DO_3D( 1, 1, 1, 1,1,jpkm1)
             zue3n = e3u(ji,jj,jk,Nnn) * uu(ji,jj,jk,Nnn)
             zve3n = e3v(ji,jj,jk,Nnn) * vv(ji,jj,jk,Nnn)
Index: /NEMO/trunk/src/TOP/C14/trcatm_c14.F90
===================================================================
--- /NEMO/trunk/src/TOP/C14/trcatm_c14.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/C14/trcatm_c14.F90	(revision 13295)
@@ -120,5 +120,5 @@
             IF( ierr3 /= 0 )   CALL ctl_stop( 'STOP', 'trc_atm_c14_ini: unable to allocate fareaz' )
       !
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
               IF( gphit(ji,jj) >= yn40 ) THEN
                  fareaz(ji,jj,1) = 0.
Index: /NEMO/trunk/src/TOP/C14/trcsms_c14.F90
===================================================================
--- /NEMO/trunk/src/TOP/C14/trcsms_c14.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/C14/trcsms_c14.F90	(revision 13295)
@@ -81,5 +81,5 @@
       ! -------------------------------------------------------------------
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          IF( tmask(ji,jj,1) >  0. ) THEN
             !
@@ -128,10 +128,10 @@
       !
       ! Add the surface flux to the trend of jp_c14
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          tr(ji,jj,1,jp_c14,Krhs) = tr(ji,jj,1,jp_c14,Krhs) + qtr_c14(ji,jj) / e3t(ji,jj,1,Kmm) 
       END_2D
       !
       ! Computation of decay effects on jp_c14
-      DO_3D_11_11( 1, jpk )
+      DO_3D( 1, 1, 1, 1, 1, jpk )
          !
          tr(ji,jj,jk,jp_c14,Krhs) = tr(ji,jj,jk,jp_c14,Krhs) - rlam14 * tr(ji,jj,jk,jp_c14,Kbb) * tmask(ji,jj,jk) 
Index: /NEMO/trunk/src/TOP/C14/trcwri_c14.F90
===================================================================
--- /NEMO/trunk/src/TOP/C14/trcwri_c14.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/C14/trcwri_c14.F90	(revision 13295)
@@ -60,5 +60,5 @@
          zz3d(:,:,:) = 0._wp
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             IF( tmask(ji,jj,jk) > 0._wp) THEN
                z3d (ji,jj,jk) = tr(ji,jj,jk,jp_c14,Kmm)
@@ -71,5 +71,5 @@
          z2d(:,:) =0._wp
          jk = 1
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ztemp = zres(ji,jj) / c14sbc(ji,jj)
             IF( ztemp > 0._wp .AND. tmask(ji,jj,jk) > 0._wp ) z2d(ji,jj) = LOG( ztemp )
Index: /NEMO/trunk/src/TOP/CFC/trcini_cfc.F90
===================================================================
--- /NEMO/trunk/src/TOP/CFC/trcini_cfc.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/CFC/trcini_cfc.F90	(revision 13295)
@@ -132,5 +132,5 @@
       !---------------------------------------------------------------------------------------
       zyd = ylatn - ylats      
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          IF(     gphit(ji,jj) >= ylatn ) THEN   ;   xphem(ji,jj) = 1.e0
          ELSEIF( gphit(ji,jj) <= ylats ) THEN   ;   xphem(ji,jj) = 0.e0
Index: /NEMO/trunk/src/TOP/CFC/trcsms_cfc.F90
===================================================================
--- /NEMO/trunk/src/TOP/CFC/trcsms_cfc.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/CFC/trcsms_cfc.F90	(revision 13295)
@@ -126,5 +126,5 @@
          
          !                                                         !------------!
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
  
             ! space interpolation
Index: /NEMO/trunk/src/TOP/PISCES/P2Z/p2zbio.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P2Z/p2zbio.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P2Z/p2zbio.F90	(revision 13295)
@@ -122,5 +122,5 @@
       DO jk = 1, jpkbm1                      !  Upper ocean (bio-layers)  !
          !                                   ! -------------------------- !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ! trophic variables( det, zoo, phy, no3, nh4, dom)
             ! ------------------------------------------------
@@ -242,5 +242,5 @@
       DO jk = jpkb, jpkm1                    !  Upper ocean (bio-layers)  !
          !                                   ! -------------------------- !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             ! remineralisation of all quantities towards nitrate 
 
Index: /NEMO/trunk/src/TOP/PISCES/P2Z/p2zexp.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P2Z/p2zexp.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P2Z/p2zexp.F90	(revision 13295)
@@ -82,5 +82,5 @@
       ! LAYERS IS DETERMINED BY DMIN3 DEFINED IN sms_p2z.F90
       ! ----------------------------------------------------------------------
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          ze3t = 1. / e3t(ji,jj,jk,Kmm)
          tr(ji,jj,jk,jpno3,Krhs) = tr(ji,jj,jk,jpno3,Krhs) + ze3t * dmin3(ji,jj,jk) * xksi(ji,jj)
@@ -93,5 +93,5 @@
       zgeolpoc = 0.e0         !     Initialization
       ! Release of nutrients from the "simple" sediment
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          ikt = mbkt(ji,jj) 
          tr(ji,jj,ikt,jpno3,Krhs) = tr(ji,jj,ikt,jpno3,Krhs) + sedlam * sedpocn(ji,jj) / e3t(ji,jj,ikt,Kmm) 
@@ -103,5 +103,5 @@
       END_2D
 
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          tr(ji,jj,1,jpno3,Krhs) = tr(ji,jj,1,jpno3,Krhs) + zgeolpoc * cmask(ji,jj) / areacot / e3t(ji,jj,1,Kmm)
       END_2D
@@ -121,5 +121,5 @@
       ELSE
         !
-        DO_2D_11_11
+        DO_2D( 1, 1, 1, 1 )
            zsedpocd = zsedpoca(ji,jj) - 2. * sedpocn(ji,jj) + sedpocb(ji,jj)      ! time laplacian on tracers
            sedpocb(ji,jj) = sedpocn(ji,jj) + rn_atfp * zsedpocd                     ! sedpocb <-- filtered sedpocn
@@ -174,5 +174,5 @@
       zdm0 = 0._wp
       zrro = 1._wp
-      DO_3D_11_11( jpkb, jpkm1 )
+      DO_3D( 1, 1, 1, 1, jpkb, jpkm1 )
          zfluo = ( gdepw(ji,jj,jk  ,Kmm) / gdepw(ji,jj,jpkb,Kmm) )**xhr
          zfluu = ( gdepw(ji,jj,jk+1,Kmm) / gdepw(ji,jj,jpkb,Kmm) )**xhr
@@ -191,5 +191,5 @@
       dminl(:,:)   = 0._wp
       dmin3(:,:,:) = zdm0
-      DO_3D_11_11( 1, jpk )
+      DO_3D( 1, 1, 1, 1, 1, jpk )
          IF( tmask(ji,jj,jk) == 0._wp ) THEN
             dminl(ji,jj) = dminl(ji,jj) + dmin3(ji,jj,jk)
@@ -198,5 +198,5 @@
       END_3D
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          IF( tmask(ji,jj,1) == 0 )   dmin3(ji,jj,1) = 0._wp
       END_2D
@@ -204,5 +204,5 @@
       ! Coastal mask 
       cmask(:,:) = 0._wp
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          IF( tmask(ji,jj,1) /= 0. ) THEN
             zmaskt = tmask(ji+1,jj,1) * tmask(ji-1,jj,1) * tmask(ji,jj+1,1) * tmask(ji,jj-1,1) 
Index: /NEMO/trunk/src/TOP/PISCES/P2Z/p2zopt.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P2Z/p2zopt.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P2Z/p2zopt.F90	(revision 13295)
@@ -95,5 +95,5 @@
       !                                          ! Photosynthetically Available Radiation (PAR)
       zcoef = 12 * redf / rcchl / rpig           ! --------------------------------------
-      DO_3D_11_11( 2, jpk )
+      DO_3D( 1, 1, 1, 1, 2, jpk )
          zpig = LOG(  MAX( TINY(0.), tr(ji,jj,jk-1,jpphy,Kmm) ) * zcoef  )
          zkr  = xkr0 + xkrp * EXP( xlr * zpig )
@@ -102,5 +102,5 @@
          zparg(ji,jj,jk) = zparg(ji,jj,jk-1) * EXP( -zkg * e3t(ji,jj,jk-1,Kmm) )
       END_3D
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zpig = LOG(  MAX( TINY(0.), tr(ji,jj,jk,jpphy,Kmm) ) * zcoef  )
          zkr  = xkr0 + xkrp * EXP( xlr * zpig )
@@ -114,9 +114,9 @@
       !                                          ! --------------
       neln(:,:) = 1                                   ! euphotic layer level
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
         IF( etot(ji,jj,jk) >= zpar100(ji,jj) )   neln(ji,jj) = jk + 1 
       END_3D
       !                                               ! Euphotic layer depth
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          heup(ji,jj) = gdepw(ji,jj,neln(ji,jj),Kmm)
       END_2D
Index: /NEMO/trunk/src/TOP/PISCES/P2Z/p2zsed.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P2Z/p2zsed.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P2Z/p2zsed.F90	(revision 13295)
@@ -89,5 +89,5 @@
 
       ! tracer flux divergence at t-point added to the general trend
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          ztra(ji,jj,jk)  = - ( zwork(ji,jj,jk) - zwork(ji,jj,jk+1) ) / e3t(ji,jj,jk,Kmm)
          tr(ji,jj,jk,jpdet,Krhs) = tr(ji,jj,jk,jpdet,Krhs) + ztra(ji,jj,jk) 
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zagg.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zagg.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zagg.F90	(revision 13295)
@@ -60,5 +60,5 @@
       IF( ln_p4z ) THEN
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             !
             zfact = xstep * xdiss(ji,jj,jk)
@@ -102,5 +102,5 @@
       ELSE    ! ln_p5z
         !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             !
             zfact = xstep * xdiss(ji,jj,jk)
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zbc.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zbc.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zbc.F90	(revision 13295)
@@ -112,5 +112,5 @@
       IF( ll_river ) THEN
           jl = n_trc_indcbc(jpno3)
-          DO_2D_11_11
+          DO_2D( 1, 1, 1, 1 )
              DO jk = 1, nk_rnf(ji,jj)
                 zcoef = rn_rfact / ( e1e2t(ji,jj) * h_rnf(ji,jj) * rn_cbc_time ) * tmask(ji,jj,1)
@@ -145,5 +145,5 @@
          ALLOCATE( zironice(jpi,jpj) )
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             zdep    = rfact / e3t(ji,jj,1,Kmm)
             zwflux  = fmmflx(ji,jj) / 1000._wp
@@ -297,5 +297,5 @@
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) ' Level corresponding to 50m depth ',  ik50,' ', gdept_1d(ik50+1)
-         DO_3D_00_00( 1, ik50 )
+         DO_3D( 0, 0, 0, 0, 1, ik50 )
             ze3t   = e3t_0(ji,jj,jk)
             zsurfc =  e1u(ji,jj) * ( 1. - umask(ji  ,jj  ,jk) )   &
@@ -313,5 +313,5 @@
          CALL lbc_lnk( 'p4zbc', zcmask , 'T', 1.0_wp )      ! lateral boundary conditions on cmask   (sign unchanged)
          !
-         DO_3D_11_11( 1, jpk )
+         DO_3D( 1, 1, 1, 1, 1, jpk )
             zexpide   = MIN( 8.,( gdept(ji,jj,jk,Kmm) / 500. )**(-1.5) )
             zdenitide = -0.9543 + 0.7662 * LOG( zexpide ) - 0.235 * LOG( zexpide )**2
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zbio.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zbio.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zbio.F90	(revision 13295)
@@ -72,5 +72,5 @@
       xdiss(:,:,:) = 1.
 !!gm the use of nmld should be better here?
-      DO_3D_11_11( 2, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 2, jpkm1 )
 !!gm  :  use nmln  and test on jk ...  less memory acces
          IF( gdepw(ji,jj,jk+1,Kmm) > hmld(ji,jj) )   xdiss(ji,jj,jk) = 0.01
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zche.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zche.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zche.F90	(revision 13295)
@@ -179,5 +179,5 @@
       ! 0.04°C relative to an exact computation
       ! ---------------------------------------------------------------------
-      DO_3D_11_11( 1, jpk )
+      DO_3D( 1, 1, 1, 1, 1, jpk )
          zpres = gdept(ji,jj,jk,Kmm) / 1000.
          za1 = 0.04 * ( 1.0 + 0.185 * ts(ji,jj,jk,jp_tem,Kmm) + 0.035 * (salinprac(ji,jj,jk) - 35.0) )
@@ -472,5 +472,5 @@
       IF( ln_timing )  CALL timing_start('ahini_for_at')
       !
-      DO_3D_11_11( 1, jpk )
+      DO_3D( 1, 1, 1, 1, 1, jpk )
       p_alkcb  = tr(ji,jj,jk,jptal,Kbb) * 1000. / (rhop(ji,jj,jk) + rtrn)
       p_dictot = tr(ji,jj,jk,jpdic,Kbb) * 1000. / (rhop(ji,jj,jk) + rtrn)
@@ -570,5 +570,5 @@
 
    ! TOTAL H+ scale: conversion factor for Htot = aphscale * Hfree
-   DO_3D_11_11( 1, jpk )
+   DO_3D( 1, 1, 1, 1, 1, jpk )
       IF (rmask(ji,jj,jk) == 1.) THEN
          p_alktot = tr(ji,jj,jk,jptal,Kbb) * 1000. / (rhop(ji,jj,jk) + rtrn)
@@ -599,5 +599,5 @@
 
    DO jn = 1, jp_maxniter_atgen 
-   DO_3D_11_11( 1, jpk )
+   DO_3D( 1, 1, 1, 1, 1, jpk )
       IF (rmask(ji,jj,jk) == 1.) THEN
          zfact = rhop(ji,jj,jk) / 1000. + rtrn
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zfechem.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zfechem.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zfechem.F90	(revision 13295)
@@ -92,5 +92,5 @@
       ! Chemistry is supposed to be fast enough to be at equilibrium
       ! ------------------------------------------------------------
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zTL1(ji,jj,jk)  = ztotlig(ji,jj,jk)
          zkeq            = fekeq(ji,jj,jk)
@@ -107,5 +107,5 @@
 
       zdust = 0.         ! if no dust available
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          ! Scavenging rate of iron. This scavenging rate depends on the load of particles of sea water. 
          ! This parameterization assumes a simple second order kinetics (k[Particles][Fe]).
@@ -177,5 +177,5 @@
       IF( ln_ligand ) THEN
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             zlam1a   = ( 0.369  * 0.3 * tr(ji,jj,jk,jpdoc,Kbb) + 102.4  * tr(ji,jj,jk,jppoc,Kbb) ) * xdiss(ji,jj,jk)    &
                 &    + ( 114.   * 0.3 * tr(ji,jj,jk,jpdoc,Kbb) )
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zflx.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zflx.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zflx.F90	(revision 13295)
@@ -110,5 +110,5 @@
       IF( l_co2cpl )   satmco2(:,:) = atm_co2(:,:)
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ! DUMMY VARIABLES FOR DIC, H+, AND BORATE
          zfact = rhop(ji,jj,1) / 1000. + rtrn
@@ -126,5 +126,5 @@
       ! -------------------------------------------
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ztc  = MIN( 35., ts(ji,jj,1,jp_tem,Kmm) )
          ztc2 = ztc * ztc
@@ -145,5 +145,5 @@
 
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ztkel = tempis(ji,jj,1) + 273.15
          zsal  = salinprac(ji,jj,1) + ( 1.- tmask(ji,jj,1) ) * 35.
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zligand.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zligand.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zligand.F90	(revision 13295)
@@ -52,5 +52,5 @@
       IF( ln_timing )   CALL timing_start('p4z_ligand')
       !
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          !
          ! ------------------------------------------------------------------
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zlim.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zlim.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zlim.F90	(revision 13295)
@@ -98,5 +98,5 @@
       IF( ln_timing )   CALL timing_start('p4z_lim')
       !
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          
          ! Tuning of the iron concentration to a minimum level that is set to the detection limit
@@ -173,5 +173,5 @@
       ! Compute the fraction of nanophytoplankton that is made of calcifiers
       ! --------------------------------------------------------------------
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zlim1 =  ( tr(ji,jj,jk,jpno3,Kbb) * concnnh4 + tr(ji,jj,jk,jpnh4,Kbb) * concnno3 )    &
             &   / ( concnno3 * concnnh4 + concnnh4 * tr(ji,jj,jk,jpno3,Kbb) + concnno3 * tr(ji,jj,jk,jpnh4,Kbb) ) 
@@ -193,5 +193,5 @@
       END_3D
       !
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          ! denitrification factor computed from O2 levels
          nitrfac(ji,jj,jk) = MAX(  0.e0, 0.4 * ( 6.e-6  - tr(ji,jj,jk,jpoxy,Kbb) )    &
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zlys.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zlys.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zlys.F90	(revision 13295)
@@ -75,5 +75,5 @@
       CALL solve_at_general( zhinit, zhi, Kbb )
 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zco3(ji,jj,jk) = tr(ji,jj,jk,jpdic,Kbb) * ak13(ji,jj,jk) * ak23(ji,jj,jk) / (zhi(ji,jj,jk)**2   &
             &             + ak13(ji,jj,jk) * zhi(ji,jj,jk) + ak13(ji,jj,jk) * ak23(ji,jj,jk) + rtrn )
@@ -87,5 +87,5 @@
       !     ---------------------------------------------------------
 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
 
          ! DEVIATION OF [CO3--] FROM SATURATION VALUE
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zmeso.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zmeso.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zmeso.F90	(revision 13295)
@@ -81,5 +81,5 @@
       IF( ln_timing )   CALL timing_start('p4z_meso')
       !
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zcompam   = MAX( ( tr(ji,jj,jk,jpmes,Kbb) - 1.e-9 ), 0.e0 )
          zfact     = xstep * tgfunc2(ji,jj,jk) * zcompam
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zmicro.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zmicro.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zmicro.F90	(revision 13295)
@@ -79,5 +79,5 @@
       IF( ln_timing )   CALL timing_start('p4z_micro')
       !
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zcompaz = MAX( ( tr(ji,jj,jk,jpzoo,Kbb) - 1.e-9 ), 0.e0 )
          zfact   = xstep * tgfunc2(ji,jj,jk) * zcompaz
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zmort.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zmort.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zmort.F90	(revision 13295)
@@ -77,5 +77,5 @@
       !
       prodcal(:,:,:) = 0._wp   ! calcite production variable set to zero
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zcompaph = MAX( ( tr(ji,jj,jk,jpphy,Kbb) - 1e-8 ), 0.e0 )
          !     When highly limited by macronutrients, very small cells 
@@ -152,5 +152,5 @@
       !     ------------------------------------------------------------
 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
 
          zcompadi = MAX( ( tr(ji,jj,jk,jpdia,Kbb) - 1e-9), 0. )
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zopt.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zopt.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zopt.F90	(revision 13295)
@@ -89,5 +89,5 @@
       IF( ln_p5z )   zchl3d(:,:,:) = zchl3d(:,:,:)    + tr(:,:,:,jppch,Kbb)
       !
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zchl = ( zchl3d(ji,jj,jk) + rtrn ) * 1.e6
          zchl = MIN(  10. , MAX( 0.05, zchl )  )
@@ -160,5 +160,5 @@
       heup_01(:,:) = gdepw(:,:,2,Kmm)
 
-      DO_3D_11_11( 2, nksrp )
+      DO_3D( 1, 1, 1, 1, 2, nksrp )
         IF( etot_ndcy(ji,jj,jk) * tmask(ji,jj,jk) >=  zqsr100(ji,jj) )  THEN
            neln(ji,jj) = jk+1                    ! Euphotic level : 1rst T-level strictly below Euphotic layer
@@ -178,5 +178,5 @@
       zetmp2 (:,:)   = 0.e0
 
-      DO_3D_11_11( 1, nksrp )
+      DO_3D( 1, 1, 1, 1, 1, nksrp )
          IF( gdepw(ji,jj,jk+1,Kmm) <= hmld(ji,jj) ) THEN
             zetmp1 (ji,jj) = zetmp1 (ji,jj) + etot     (ji,jj,jk) * e3t(ji,jj,jk,Kmm) ! remineralisation
@@ -189,5 +189,5 @@
       zpar(:,:,:) = etot_ndcy(:,:,:)  ! diagnostic : PAR with no diurnal cycle 
       !
-      DO_3D_11_11( 1, nksrp )
+      DO_3D( 1, 1, 1, 1, 1, nksrp )
          IF( gdepw(ji,jj,jk+1,Kmm) <= hmld(ji,jj) ) THEN
             z1_dep = 1. / ( zdepmoy(ji,jj) + rtrn )
@@ -201,5 +201,5 @@
       zetmp4 (:,:)   = 0.e0
       !
-      DO_3D_11_11( 1, nksrp )
+      DO_3D( 1, 1, 1, 1, 1, nksrp )
          IF( gdepw(ji,jj,jk+1,Kmm) <= MIN(hmld(ji,jj), heup_01(ji,jj)) ) THEN
             zetmp3 (ji,jj) = zetmp3 (ji,jj) + enano    (ji,jj,jk) * e3t(ji,jj,jk,Kmm) ! production
@@ -211,5 +211,5 @@
       ediatm(:,:,:) = ediat(:,:,:)
       !
-      DO_3D_11_11( 1, nksrp )
+      DO_3D( 1, 1, 1, 1, 1, nksrp )
          IF( gdepw(ji,jj,jk+1,Kmm) <= hmld(ji,jj) ) THEN
             z1_dep = 1. / ( zdepmoy(ji,jj) + rtrn )
@@ -221,5 +221,5 @@
       IF( ln_p5z ) THEN
          ALLOCATE( zetmp5(jpi,jpj) )  ;   zetmp5 (:,:) = 0.e0
-         DO_3D_11_11( 1, nksrp )
+         DO_3D( 1, 1, 1, 1, 1, nksrp )
             IF( gdepw(ji,jj,jk+1,Kmm) <= MIN(hmld(ji,jj), heup_01(ji,jj)) ) THEN
                zetmp5(ji,jj)  = zetmp5 (ji,jj) + epico(ji,jj,jk) * e3t(ji,jj,jk,Kmm) ! production
@@ -229,5 +229,5 @@
          epicom(:,:,:) = epico(:,:,:)
          !
-         DO_3D_11_11( 1, nksrp )
+         DO_3D( 1, 1, 1, 1, 1, nksrp )
             IF( gdepw(ji,jj,jk+1,Kmm) <= hmld(ji,jj) ) THEN
                z1_dep = 1. / ( zdepmoy(ji,jj) + rtrn )
@@ -302,5 +302,5 @@
         pe3(:,:,1) = zqsr(:,:) * EXP( -0.5 * ekr(:,:,1) )
         !
-        DO_3D_11_11( 2, nksrp )
+        DO_3D( 1, 1, 1, 1, 2, nksrp )
            pe1(ji,jj,jk) = pe1(ji,jj,jk-1) * EXP( -0.5 * ( ekb(ji,jj,jk-1) + ekb(ji,jj,jk) ) )
            pe2(ji,jj,jk) = pe2(ji,jj,jk-1) * EXP( -0.5 * ( ekg(ji,jj,jk-1) + ekg(ji,jj,jk) ) )
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zpoc.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zpoc.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zpoc.F90	(revision 13295)
@@ -107,5 +107,5 @@
      ! -----------------------------------------------------------------------
      ztremint(:,:,:) = zremigoc(:,:,:)
-     DO_3D_11_11( 2, jpkm1 )
+     DO_3D( 1, 1, 1, 1, 2, jpkm1 )
         IF (tmask(ji,jj,jk) == 1.) THEN
           zdep = hmld(ji,jj)
@@ -192,5 +192,5 @@
 
       IF( ln_p4z ) THEN
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             ! POC disaggregation by turbulence and bacterial activity. 
             ! --------------------------------------------------------
@@ -212,5 +212,5 @@
          END_3D
       ELSE
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
              ! POC disaggregation by turbulence and bacterial activity. 
             ! --------------------------------------------------------
@@ -260,5 +260,5 @@
      ! ----------------------------------------------------------------
      ! 
-     DO_3D_11_11( 1, jpkm1 )
+     DO_3D( 1, 1, 1, 1, 1, jpkm1 )
         zdep = hmld(ji,jj)
         IF (tmask(ji,jj,jk) == 1. .AND. gdept(ji,jj,jk,Kmm) <= zdep ) THEN
@@ -275,5 +275,5 @@
      ! ---------------------------------------------------------------------
      ztremint(:,:,:) = zremipoc(:,:,:)
-     DO_3D_11_11( 1, jpkm1 )
+     DO_3D( 1, 1, 1, 1, 1, jpkm1 )
         IF (tmask(ji,jj,jk) == 1.) THEN
           zdep = hmld(ji,jj)
@@ -310,5 +310,5 @@
      ! -----------------------------------------------------------------------
      !
-     DO_3D_11_11( 2, jpkm1 )
+     DO_3D( 1, 1, 1, 1, 2, jpkm1 )
         IF (tmask(ji,jj,jk) == 1.) THEN
           zdep = hmld(ji,jj)
@@ -384,5 +384,5 @@
 
      IF( ln_p4z ) THEN
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             IF (tmask(ji,jj,jk) == 1.) THEN
               ! POC disaggregation by turbulence and bacterial activity. 
@@ -401,5 +401,5 @@
          END_3D
      ELSE
-       DO_3D_11_11( 1, jpkm1 )
+       DO_3D( 1, 1, 1, 1, 1, jpkm1 )
           ! POC disaggregation by turbulence and bacterial activity. 
           ! --------------------------------------------------------
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zprod.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zprod.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zprod.F90	(revision 13295)
@@ -110,5 +110,5 @@
       ! day length in hours
       zstrn(:,:) = 0.
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zargu = TAN( zcodel ) * TAN( gphit(ji,jj) * rad )
          zargu = MAX( -1., MIN(  1., zargu ) )
@@ -117,5 +117,5 @@
 
       ! Impact of the day duration and light intermittency on phytoplankton growth
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
             zval = MAX( 1., zstrn(ji,jj) )
@@ -135,5 +135,5 @@
 
       ! Computation of the P-I slope for nanos and diatoms
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
             ztn         = MAX( 0., ts(ji,jj,jk,jp_tem,Kmm) - 15. )
@@ -150,5 +150,5 @@
       END_3D
 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
              ! Computation of production function for Carbon
@@ -171,5 +171,5 @@
       !  Computation of a proxy of the N/C ratio
       !  ---------------------------------------
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
           zval = MIN( xnanopo4(ji,jj,jk), ( xnanonh4(ji,jj,jk) + xnanono3(ji,jj,jk) ) )   &
           &      * zprmaxn(ji,jj,jk) / ( zprbio(ji,jj,jk) + rtrn )
@@ -181,5 +181,5 @@
 
 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
 
           IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
@@ -205,5 +205,5 @@
       !  Sea-ice effect on production
 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zprbio(ji,jj,jk) = zprbio(ji,jj,jk) * ( 1. - fr_i(ji,jj) )
          zprdia(ji,jj,jk) = zprdia(ji,jj,jk) * ( 1. - fr_i(ji,jj) )
@@ -211,5 +211,5 @@
 
       ! Computation of the various production terms 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
             !  production terms for nanophyto. (C)
@@ -237,5 +237,5 @@
 
       ! Computation of the chlorophyll production terms
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
             !  production terms for nanophyto. ( chlorophyll )
@@ -260,5 +260,5 @@
 
       !   Update the arrays TRA which contain the biological sources and sinks
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
         IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
            zproreg  = zprorcan(ji,jj,jk) - zpronewn(ji,jj,jk)
@@ -288,5 +288,5 @@
      IF( ln_ligand ) THEN
          zpligprod1(:,:,:) = 0._wp    ;    zpligprod2(:,:,:) = 0._wp
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
            IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
               zdocprod = excretd * zprorcad(ji,jj,jk) + excretn * zprorcan(ji,jj,jk)
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zrem.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zrem.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zrem.F90	(revision 13295)
@@ -89,5 +89,5 @@
       ! that was modeling explicitely bacteria
       ! -------------------------------------------------------
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zdep = MAX( hmld(ji,jj), heup(ji,jj) )
          IF( gdept(ji,jj,jk,Kmm) < zdep ) THEN
@@ -103,5 +103,5 @@
 
       IF( ln_p4z ) THEN
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             ! DOC ammonification. Depends on depth, phytoplankton biomass
             ! and a limitation term which is supposed to be a parameterization of the bacterial activity. 
@@ -134,5 +134,5 @@
          END_3D
       ELSE
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             ! DOC ammonification. Depends on depth, phytoplankton biomass
             ! and a limitation term which is supposed to be a parameterization of the bacterial activity. 
@@ -178,5 +178,5 @@
 
 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          ! NH4 nitrification to NO3. Ceased for oxygen concentrations
          ! below 2 umol/L. Inhibited at strong light 
@@ -200,5 +200,5 @@
        ENDIF
 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
 
          ! Bacterial uptake of iron. No iron is available in DOC. So
@@ -226,5 +226,5 @@
       ! ---------------------------------------------------------------
 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zdep     = MAX( hmld(ji,jj), heup_01(ji,jj) )
          zsatur   = MAX( rtrn, ( sio3eq(ji,jj,jk) - tr(ji,jj,jk,jpsil,Kbb) ) / ( sio3eq(ji,jj,jk) + rtrn ) )
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zsed.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zsed.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zsed.F90	(revision 13295)
@@ -94,5 +94,5 @@
          ! OA: Warning, the following part is necessary to avoid CFL problems above the sediments
          ! --------------------------------------------------------------------
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ikt  = mbkt(ji,jj)
             zdep = e3t(ji,jj,ikt,Kmm) / xstep
@@ -104,5 +104,5 @@
          ! Computation of the fraction of organic matter that is permanently buried from Dunne's model
          ! -------------------------------------------------------
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
            IF( tmask(ji,jj,1) == 1 ) THEN
               ikt = mbkt(ji,jj)
@@ -130,5 +130,5 @@
       IF( .NOT.lk_sed )  zrivsil = 1._wp - sedsilfrac
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ikt  = mbkt(ji,jj)
          zdep = xstep / e3t(ji,jj,ikt,Kmm) 
@@ -142,5 +142,5 @@
       !
       IF( .NOT.lk_sed ) THEN
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ikt  = mbkt(ji,jj)
             zdep = xstep / e3t(ji,jj,ikt,Kmm) 
@@ -160,5 +160,5 @@
       ENDIF
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ikt  = mbkt(ji,jj)
          zdep = xstep / e3t(ji,jj,ikt,Kmm) 
@@ -172,5 +172,5 @@
       !
       IF( ln_p5z ) THEN
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ikt  = mbkt(ji,jj)
             zdep = xstep / e3t(ji,jj,ikt,Kmm) 
@@ -187,5 +187,5 @@
          ! The 0.5 factor in zpdenit is to avoid negative NO3 concentration after
          ! denitrification in the sediments. Not very clever, but simpliest option.
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ikt  = mbkt(ji,jj)
             zdep = xstep / e3t(ji,jj,ikt,Kmm) 
@@ -224,5 +224,5 @@
       ENDDO
       IF( ln_p4z ) THEN
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             !                      ! Potential nitrogen fixation dependant on temperature and iron
             ztemp = ts(ji,jj,jk,jp_tem,Kmm)
@@ -240,5 +240,5 @@
          END_3D
       ELSE       ! p5z
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             !                      ! Potential nitrogen fixation dependant on temperature and iron
             ztemp = ts(ji,jj,jk,jp_tem,Kmm)
@@ -261,5 +261,5 @@
       ! ----------------------------------------
       IF( ln_p4z ) THEN
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             zfact = nitrpot(ji,jj,jk) * nitrfix
             tr(ji,jj,jk,jpnh4,Krhs) = tr(ji,jj,jk,jpnh4,Krhs) + zfact / 3.0
@@ -278,5 +278,5 @@
          END_3D
       ELSE    ! p5z
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             zfact = nitrpot(ji,jj,jk) * nitrfix
             tr(ji,jj,jk,jpnh4,Krhs) = tr(ji,jj,jk,jpnh4,Krhs) + zfact / 3.0
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zsink.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zsink.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zsink.F90	(revision 13295)
@@ -81,5 +81,5 @@
       !    by data and from the coagulation theory
       !    -----------------------------------------------------------
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zmax  = MAX( heup_01(ji,jj), hmld(ji,jj) )
          zfact = MAX( 0., gdepw(ji,jj,jk+1,Kmm) - zmax ) / wsbio2scale
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zsms.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zsms.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zsms.F90	(revision 13295)
@@ -133,5 +133,5 @@
          xnegtr(:,:,:) = 1.e0
          DO jn = jp_pcs0, jp_pcs1
-            DO_3D_11_11( 1, jpk )
+            DO_3D( 1, 1, 1, 1, 1, jpk )
                IF( ( tr(ji,jj,jk,jn,Kbb) + tr(ji,jj,jk,jn,Krhs) ) < 0.e0 ) THEN
                   ztra             = ABS( tr(ji,jj,jk,jn,Kbb) ) / ( ABS( tr(ji,jj,jk,jn,Krhs) ) + rtrn )
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p5zlim.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p5zlim.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p5zlim.F90	(revision 13295)
@@ -131,5 +131,5 @@
       zratchl = 6.0
       !
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          ! 
          ! Tuning of the iron concentration to a minimum level that is set to the detection limit
@@ -318,5 +318,5 @@
       ! phytoplankton (see Daines et al., 2013). 
       ! --------------------------------------------------------------------------------------------------
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          ! Size estimation of nanophytoplankton
          ! ------------------------------------
@@ -367,5 +367,5 @@
       ! Compute the fraction of nanophytoplankton that is made of calcifiers
       ! --------------------------------------------------------------------
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zlim1 =  tr(ji,jj,jk,jpnh4,Kbb) / ( tr(ji,jj,jk,jpnh4,Kbb) + concnnh4 ) + tr(ji,jj,jk,jpno3,Kbb)    &
          &        / ( tr(ji,jj,jk,jpno3,Kbb) + concnno3 ) * ( 1.0 - tr(ji,jj,jk,jpnh4,Kbb)   &
@@ -385,5 +385,5 @@
       END_3D
       !
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          ! denitrification factor computed from O2 levels
          nitrfac(ji,jj,jk) = MAX(  0.e0, 0.4 * ( 6.e-6  - tr(ji,jj,jk,jpoxy,Kbb) )    &
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p5zmeso.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p5zmeso.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p5zmeso.F90	(revision 13295)
@@ -98,5 +98,5 @@
       IF ( bmetexc2 ) zmetexcess = 1.0
 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zcompam   = MAX( ( tr(ji,jj,jk,jpmes,Kbb) - 1.e-9 ), 0.e0 )
          zfact     = xstep * tgfunc2(ji,jj,jk) * zcompam
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p5zmicro.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p5zmicro.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p5zmicro.F90	(revision 13295)
@@ -96,5 +96,5 @@
       IF ( bmetexc ) zmetexcess = 1.0
       !
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zcompaz = MAX( ( tr(ji,jj,jk,jpzoo,Kbb) - 1.e-9 ), 0.e0 )
          zfact   = xstep * tgfunc2(ji,jj,jk) * zcompaz
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p5zmort.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p5zmort.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p5zmort.F90	(revision 13295)
@@ -82,5 +82,5 @@
       !
       prodcal(:,:,:) = 0.  !: calcite production variable set to zero
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zcompaph = MAX( ( tr(ji,jj,jk,jpphy,Kbb) - 1e-9 ), 0.e0 )
          !   Squared mortality of Phyto similar to a sedimentation term during
@@ -148,5 +148,5 @@
       IF( ln_timing )   CALL timing_start('p5z_pico')
       !
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zcompaph = MAX( ( tr(ji,jj,jk,jppic,Kbb) - 1e-9 ), 0.e0 )
          !  Squared mortality of Phyto similar to a sedimentation term during
@@ -207,5 +207,5 @@
       !
 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
 
          zcompadi = MAX( ( tr(ji,jj,jk,jpdia,Kbb) - 1E-9), 0. )
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p5zprod.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p5zprod.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p5zprod.F90	(revision 13295)
@@ -125,5 +125,5 @@
       ! day length in hours
       zstrn(:,:) = 0.
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zargu = TAN( zcodel ) * TAN( gphit(ji,jj) * rad )
          zargu = MAX( -1., MIN(  1., zargu ) )
@@ -132,5 +132,5 @@
 
          ! Impact of the day duration on phytoplankton growth
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
             zval = MAX( 1., zstrn(ji,jj) )
@@ -152,5 +152,5 @@
       WHERE( zstrn(:,:) < 1.e0 ) zstrn(:,:) = 24.
 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
             ! Computation of the P-I slope for nanos and diatoms
@@ -186,5 +186,5 @@
       END_3D
 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
 
           IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
@@ -208,5 +208,5 @@
 
       !  Sea-ice effect on production                                                                               
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          zprbio(ji,jj,jk)  = zprbio(ji,jj,jk) * ( 1. - fr_i(ji,jj) )
          zprpic(ji,jj,jk)  = zprpic(ji,jj,jk) * ( 1. - fr_i(ji,jj) ) 
@@ -216,5 +216,5 @@
 
       ! Computation of the various production terms of nanophytoplankton 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
             !  production terms for nanophyto.
@@ -249,5 +249,5 @@
 
       ! Computation of the various production terms of picophytoplankton 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
             !  production terms for picophyto.
@@ -282,5 +282,5 @@
 
       ! Computation of the various production terms of diatoms
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
             !  production terms for diatomees
@@ -316,5 +316,5 @@
       END_3D
 
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
                !  production terms for nanophyto. ( chlorophyll )
@@ -347,5 +347,5 @@
 
       !   Update the arrays TRA which contain the biological sources and sinks
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
         zprontot = zpronewn(ji,jj,jk) + zproregn(ji,jj,jk)
         zproptot = zpronewp(ji,jj,jk) + zproregp(ji,jj,jk)
@@ -410,5 +410,5 @@
      IF( ln_ligand ) THEN
          zpligprod1(:,:,:) = 0._wp    ;    zpligprod2(:,:,:) = 0._wp             
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
            zdocprod = excretd * zprorcad(ji,jj,jk) + excretn * zprorcan(ji,jj,jk) + excretp * zprorcap(ji,jj,jk)
            zfeup    = texcretn * zprofen(ji,jj,jk) + texcretd * zprofed(ji,jj,jk) + texcretp * zprofep(ji,jj,jk)
Index: /NEMO/trunk/src/TOP/PISCES/SED/sedchem.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/SED/sedchem.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/SED/sedchem.F90	(revision 13295)
@@ -138,5 +138,5 @@
          CALL sed_chem_cst
       ELSE
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ikt = mbkt(ji,jj) 
             IF ( tmask(ji,jj,ikt) == 1 ) THEN
Index: /NEMO/trunk/src/TOP/PISCES/SED/seddta.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/SED/seddta.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/SED/seddta.F90	(revision 13295)
@@ -96,5 +96,5 @@
       !    -----------------------------------------------------------
       IF (ln_sediment_offline) THEN
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ikt = mbkt(ji,jj)
             zwsbio4(ji,jj) = wsbio2 / rday
@@ -102,5 +102,5 @@
          END_2D
       ELSE
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ikt = mbkt(ji,jj)
             zdep = e3t(ji,jj,ikt,Kmm) / rDt_trc
@@ -111,5 +111,5 @@
 
       trc_data(:,:,:) = 0.
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ikt = mbkt(ji,jj)
          IF ( tmask(ji,jj,ikt) == 1 ) THEN
Index: /NEMO/trunk/src/TOP/PISCES/SED/sedini.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/SED/sedini.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/SED/sedini.F90	(revision 13295)
@@ -135,5 +135,5 @@
       ! Determination of sediments number of points and allocate global variables
       epkbot(:,:) = 0.
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ikt = mbkt(ji,jj) 
          IF( tmask(ji,jj,ikt) == 1 ) epkbot(ji,jj) = e3t_1d(ikt)
@@ -247,5 +247,5 @@
       ! Computation of 1D array of sediments points
       indoce = 0
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          IF (  epkbot(ji,jj) > 0. ) THEN
             indoce          = indoce + 1
Index: /NEMO/trunk/src/TOP/PISCES/SED/sedsfc.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/SED/sedsfc.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/SED/sedsfc.F90	(revision 13295)
@@ -48,5 +48,5 @@
 
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          ikt = mbkt(ji,jj)
          IF ( tmask(ji,jj,ikt) == 1 ) THEN
Index: /NEMO/trunk/src/TOP/PISCES/SED/trcdmp_sed.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/SED/trcdmp_sed.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/SED/trcdmp_sed.F90	(revision 13295)
@@ -93,5 +93,5 @@
                CALL trc_dta( kt, Kmm, sf_trcdta(jl), rf_trfac(jl), ztrcdta )   ! read tracer data at nit000
                !
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   ikt = mbkt(ji,jj)
                   tr(ji,jj,ikt,jn,Kbb) = ztrcdta(ji,jj,ikt) + ( tr(ji,jj,ikt,jn,Kbb) -  ztrcdta(ji,jj,ikt) )     &
Index: /NEMO/trunk/src/TOP/PISCES/trcwri_pisces.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/trcwri_pisces.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/PISCES/trcwri_pisces.F90	(revision 13295)
@@ -69,5 +69,5 @@
             zo2min   (:,:) = tr(:,:,1,jpoxy,Kmm) * tmask(:,:,1)
             zdepo2min(:,:) = gdepw(:,:,1,Kmm)   * tmask(:,:,1)
-            DO_3D_11_11( 2, jpkm1 )
+            DO_3D( 1, 1, 1, 1, 2, jpkm1 )
                IF( tmask(ji,jj,jk) == 1 ) then
                   IF( tr(ji,jj,jk,jpoxy,Kmm) < zo2min(ji,jj) ) then
Index: /NEMO/trunk/src/TOP/TRP/trcatf.F90
===================================================================
--- /NEMO/trunk/src/TOP/TRP/trcatf.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/TRP/trcatf.F90	(revision 13295)
@@ -239,5 +239,5 @@
       !
       DO jn = 1, jptra      
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             ze3t_b = e3t(ji,jj,jk,Kbb)
             ze3t_n = e3t(ji,jj,jk,Kmm)
@@ -314,5 +314,5 @@
       !
       DO jn = 1, jptra      
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             ze3t_b = 1._wp + r3t(ji,jj,Kbb) * tmask(ji,jj,jk)
             ze3t_n = 1._wp + r3t(ji,jj,Kmm) * tmask(ji,jj,jk)
Index: /NEMO/trunk/src/TOP/TRP/trcdmp.F90
===================================================================
--- /NEMO/trunk/src/TOP/TRP/trcdmp.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/TRP/trcdmp.F90	(revision 13295)
@@ -113,10 +113,10 @@
                !
                CASE( 0 )                !==  newtonian damping throughout the water column  ==!
-                  DO_3D_00_00( 1, jpkm1 )
+                  DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                      ptr(ji,jj,jk,jn,Krhs) = ptr(ji,jj,jk,jn,Krhs) + restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - ptr(ji,jj,jk,jn,Kbb) )
                   END_3D
                   !
                CASE ( 1 )                !==  no damping in the turbocline (avt > 5 cm2/s)  ==!
-                  DO_3D_00_00( 1, jpkm1 )
+                  DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                      IF( avt(ji,jj,jk) <= avt_c )  THEN 
                         ptr(ji,jj,jk,jn,Krhs) = ptr(ji,jj,jk,jn,Krhs) + restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - ptr(ji,jj,jk,jn,Kbb) )
@@ -125,5 +125,5 @@
                   !
                CASE ( 2 )               !==  no damping in the mixed layer   ==! 
-                  DO_3D_00_00( 1, jpkm1 )
+                  DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                      IF( gdept(ji,jj,jk,Kmm) >= hmlp (ji,jj) ) THEN
                         ptr(ji,jj,jk,jn,Krhs) = ptr(ji,jj,jk,jn,Krhs) + restotr(ji,jj,jk) * ( ztrcdta(ji,jj,jk) - ptr(ji,jj,jk,jn,Kbb) )
Index: /NEMO/trunk/src/TOP/TRP/trcldf.F90
===================================================================
--- /NEMO/trunk/src/TOP/TRP/trcldf.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/TRP/trcldf.F90	(revision 13295)
@@ -82,5 +82,5 @@
       zahv(:,:,:) = rldf * ahtv(:,:,:)
       !                                  !* Enhanced zonal diffusivity coefficent in the equatorial domain
-      DO_3D_11_11( 1, jpk )
+      DO_3D( 1, 1, 1, 1, 1, jpk )
          IF( gdept(ji,jj,jk,Kmm) > 200. .AND. gphit(ji,jj) < 5. .AND. gphit(ji,jj) > -5. ) THEN
             zdep = MAX( gdept(ji,jj,jk,Kmm) - 1000., 0. ) / 1000.
Index: /NEMO/trunk/src/TOP/TRP/trcrad.F90
===================================================================
--- /NEMO/trunk/src/TOP/TRP/trcrad.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/TRP/trcrad.F90	(revision 13295)
@@ -168,5 +168,5 @@
               IF( l_trdtrc )   ztrtrd(:,:,:) = ptr(:,:,:,jn,itime)                       ! save input tr(:,:,:,:,Kbb) for trend computation           
               !
-              DO_3D_11_11( 1, jpkm1 )
+              DO_3D( 1, 1, 1, 1, 1, jpkm1 )
                  IF( ztrneg(ji,jj,jn) /= 0. ) THEN                                 ! if negative values over the 3x3 box
                     !
Index: /NEMO/trunk/src/TOP/TRP/trcsbc.F90
===================================================================
--- /NEMO/trunk/src/TOP/TRP/trcsbc.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/TRP/trcsbc.F90	(revision 13295)
@@ -121,5 +121,5 @@
          !
          DO jn = 1, jptra
-            DO_2D_01_00
+            DO_2D( 0, 1, 0, 0 )
                sbc_trc(ji,jj,jn) = zsfx(ji,jj) * r1_rho0 * ptr(ji,jj,1,jn,Kmm)
             END_2D
@@ -129,5 +129,5 @@
          !
          DO jn = 1, jptra
-            DO_2D_01_00
+            DO_2D( 0, 1, 0, 0 )
                sbc_trc(ji,jj,jn) = ( zsfx(ji,jj) + fmmflx(ji,jj) ) * r1_rho0 * ptr(ji,jj,1,jn,Kmm)
             END_2D
@@ -137,5 +137,5 @@
          !
          DO jn = 1, jptra
-            DO_2D_01_00
+            DO_2D( 0, 1, 0, 0 )
                zse3t = 1. / e3t(ji,jj,1,Kmm)
                ! tracer flux at the ice/ocean interface (tracer/m2/s)
@@ -161,5 +161,5 @@
          IF( l_trdtrc )   ztrtrd(:,:,:) = ptr(:,:,:,jn,Krhs)  ! save trends
          !
-         DO_2D_01_00
+         DO_2D( 0, 1, 0, 0 )
             zse3t = zfact / e3t(ji,jj,1,Kmm)
             ptr(ji,jj,1,jn,Krhs) = ptr(ji,jj,1,jn,Krhs) + ( sbc_trc_b(ji,jj,jn) + sbc_trc(ji,jj,jn) ) * zse3t
Index: /NEMO/trunk/src/TOP/TRP/trcsink.F90
===================================================================
--- /NEMO/trunk/src/TOP/TRP/trcsink.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/TRP/trcsink.F90	(revision 13295)
@@ -74,5 +74,5 @@
          iiter(:,:) = 1
       ELSE
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             iiter(ji,jj) = 1
             DO jk = 1, jpkm1
@@ -86,5 +86,5 @@
       ENDIF
 
-      DO_3D_11_11( 1,jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1,jpkm1 )
          IF( tmask(ji,jj,jk) == 1.0 ) THEN
            zwsmax = 0.5 * e3t(ji,jj,jk,Kmm) * rday / rsfact
@@ -146,5 +146,5 @@
       DO jn = 1, 2
          !  first guess of the slopes interior values
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             !
             zstep = rsfact / REAL( kiter(ji,jj), wp ) / 2.
@@ -186,5 +186,5 @@
       END DO
 
-      DO_3D_11_11( 1,jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1,jpkm1 )
          zflx = ( psinkflx(ji,jj,jk) - psinkflx(ji,jj,jk+1) ) / e3t(ji,jj,jk,Kmm)
          ztrb(ji,jj,jk) = ztrb(ji,jj,jk) + 2. * zflx
Index: /NEMO/trunk/src/TOP/TRP/trdmxl_trc.F90
===================================================================
--- /NEMO/trunk/src/TOP/TRP/trdmxl_trc.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/TRP/trdmxl_trc.F90	(revision 13295)
@@ -125,5 +125,5 @@
 
             IF( jpktrd_trc < jpk ) THEN                           ! description ???
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   IF( nmld_trc(ji,jj) <= jpktrd_trc ) THEN
                      zvlmsk(ji,jj) = tmask(ji,jj,1)
@@ -148,5 +148,5 @@
          ! ... Weights for vertical averaging
          wkx_trc(:,:,:) = 0.e0
-         DO_3D_11_11( 1, jpktrd_trc )
+         DO_3D( 1, 1, 1, 1, 1, jpktrd_trc )
             IF( jk - nmld_trc(ji,jj) < 0 )   wkx_trc(ji,jj,jk) = e3t(ji,jj,jk,Kmm) * tmask(ji,jj,jk)
          END_3D
@@ -259,5 +259,5 @@
          !
          DO jn = 1, jptra
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                ik = nmld_trc(ji,jj)
                IF( ln_trdtrc(jn) )    &
Index: /NEMO/trunk/src/TOP/trcbc.F90
===================================================================
--- /NEMO/trunk/src/TOP/trcbc.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/trcbc.F90	(revision 13295)
@@ -415,5 +415,5 @@
          ! Remove river dilution for tracers with absent river load
          IF( ln_rnf_ctl .AND. .NOT.ln_trc_cbc(jn) ) THEN
-            DO_2D_01_00
+            DO_2D( 0, 1, 0, 0 )
                DO jk = 1, nk_rnf(ji,jj)
                   zrnf = (rnf(ji,jj) + rnf_b(ji,jj)) * 0.5_wp * r1_rho0 / h_rnf(ji,jj)
@@ -429,5 +429,5 @@
             jl = n_trc_indsbc(jn)
             sf_trcsbc(jl)%fnow(:,:,1) = MAX( rtrn, sf_trcsbc(jl)%fnow(:,:,1) ) ! avoid nedgative value due to interpolation
-            DO_2D_01_00
+            DO_2D( 0, 1, 0, 0 )
                zfact = 1. / ( e3t(ji,jj,1,Kmm) * rn_sbc_time )
                ptr(ji,jj,1,jn,Krhs) = ptr(ji,jj,1,jn,Krhs) + rf_trsfac(jl) * sf_trcsbc(jl)%fnow(ji,jj,1) * zfact
@@ -439,5 +439,5 @@
             IF( l_offline )   rn_rfact = 1._wp
             jl = n_trc_indcbc(jn)
-            DO_2D_01_00
+            DO_2D( 0, 1, 0, 0 )
                DO jk = 1, nk_rnf(ji,jj)
                   zfact = rn_rfact / ( e1e2t(ji,jj) * h_rnf(ji,jj) * rn_cbc_time ) * tmask(ji,jj,1)
Index: /NEMO/trunk/src/TOP/trcdta.F90
===================================================================
--- /NEMO/trunk/src/TOP/trcdta.F90	(revision 13294)
+++ /NEMO/trunk/src/TOP/trcdta.F90	(revision 13295)
@@ -199,5 +199,5 @@
                WRITE(numout,*) 'trc_dta: interpolates passive tracer data onto the s- or mixed s-z-coordinate mesh'
             ENDIF
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                DO jk = 1, jpk                        ! determines the intepolated T-S profiles at each (i,j) points
                   zl = gdept(ji,jj,jk,Kmm)
Index: /NEMO/trunk/tests/BENCH/MY_SRC/usrdef_hgr.F90
===================================================================
--- /NEMO/trunk/tests/BENCH/MY_SRC/usrdef_hgr.F90	(revision 13294)
+++ /NEMO/trunk/tests/BENCH/MY_SRC/usrdef_hgr.F90	(revision 13295)
@@ -74,5 +74,5 @@
       ! Position coordinates (in grid points)
       !                          ==========
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          
          zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos
Index: /NEMO/trunk/tests/BENCH/MY_SRC/usrdef_istate.F90
===================================================================
--- /NEMO/trunk/tests/BENCH/MY_SRC/usrdef_istate.F90	(revision 13294)
+++ /NEMO/trunk/tests/BENCH/MY_SRC/usrdef_istate.F90	(revision 13295)
@@ -69,10 +69,10 @@
       ! we must define z2d as bellow.
       ! Once we decide to forget trunk compatibility, we must simply define z2d as:
-!!$      DO_2D_00_00
+!!$      DO_2D( 0, 0, 0, 0 )
 !!$         z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) )
 !!$      END_2D
       igloi = Ni0glo + 2 * COUNT( (/ jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7 /) )
       igloj = Nj0glo + 2 * COUNT( (/ jperio == 2 .OR. jperio == 7 /) ) + 1 * COUNT( (/ jperio >= 4 .AND. jperio <= 6 /) )
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * igloi, wp ) / REAL( igloi * igloj, wp ) )
       END_2D
@@ -81,5 +81,5 @@
       pssh(:,:) = z2d(:,:)                                                ! +/- 0.05 m
       !
-      DO_3D_00_00( 1, jpkm1 )
+      DO_3D( 0, 0, 0, 0, 1, jpkm1 )
          zfact = REAL(jk-1,wp) / REAL(jpk-1,wp)   ! 0 to 1 to add a basic stratification
          ! temperature choosen to lead to ~50% ice at the beginning if rn_thres_sst = 0.5
Index: /NEMO/trunk/tests/BENCH/MY_SRC/usrdef_sbc.F90
===================================================================
--- /NEMO/trunk/tests/BENCH/MY_SRC/usrdef_sbc.F90	(revision 13294)
+++ /NEMO/trunk/tests/BENCH/MY_SRC/usrdef_sbc.F90	(revision 13295)
@@ -109,10 +109,10 @@
       ! we must define z2d as bellow.
       ! Once we decide to forget trunk compatibility, we must simply define z2d as:
-!!$      DO_2D_00_00
+!!$      DO_2D( 0, 0, 0, 0 )
 !!$         z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) )
 !!$      END_2D
       igloi = Ni0glo + 2 * COUNT( (/ jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7 /) )
       igloj = Nj0glo + 2 * COUNT( (/ jperio == 2 .OR. jperio == 7 /) ) + 1 * COUNT( (/ jperio >= 4 .AND. jperio <= 6 /) )
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * igloi, wp ) / REAL( igloi * igloj, wp ) )
       END_2D
Index: /NEMO/trunk/tests/CANAL/MY_SRC/diawri.F90
===================================================================
--- /NEMO/trunk/tests/CANAL/MY_SRC/diawri.F90	(revision 13294)
+++ /NEMO/trunk/tests/CANAL/MY_SRC/diawri.F90	(revision 13295)
@@ -156,5 +156,5 @@
       CALL iom_put(  "sst", ts(:,:,1,jp_tem,Kmm) )    ! surface temperature
       IF ( iom_use("sbt") ) THEN
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ikbot = mbkt(ji,jj)
             z2d(ji,jj) = ts(ji,jj,ikbot,jp_tem,Kmm)
@@ -166,5 +166,5 @@
       CALL iom_put(  "sss", ts(:,:,1,jp_sal,Kmm) )    ! surface salinity
       IF ( iom_use("sbs") ) THEN
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ikbot = mbkt(ji,jj)
             z2d(ji,jj) = ts(ji,jj,ikbot,jp_sal,Kmm)
@@ -176,5 +176,5 @@
          zztmp = rho0 * 0.25
          z2d(:,:) = 0._wp
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zztmp2 = (  ( rCdU_bot(ji+1,jj)+rCdU_bot(ji  ,jj) ) * uu(ji  ,jj,mbku(ji  ,jj),Kmm)  )**2   &
                &   + (  ( rCdU_bot(ji  ,jj)+rCdU_bot(ji-1,jj) ) * uu(ji-1,jj,mbku(ji-1,jj),Kmm)  )**2   &
@@ -191,5 +191,5 @@
       CALL iom_put(  "ssu", uu(:,:,1,Kmm) )            ! surface i-current
       IF ( iom_use("sbu") ) THEN
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ikbot = mbku(ji,jj)
             z2d(ji,jj) = uu(ji,jj,ikbot,Kmm)
@@ -201,5 +201,5 @@
       CALL iom_put(  "ssv", vv(:,:,1,Kmm) )            ! surface j-current
       IF ( iom_use("sbv") ) THEN
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ikbot = mbkv(ji,jj)
             z2d(ji,jj) = vv(ji,jj,ikbot,Kmm)
@@ -231,5 +231,5 @@
 
       IF ( iom_use("sstgrad") .OR. iom_use("sstgrad2") ) THEN
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zztmp  = ts(ji,jj,1,jp_tem,Kmm)
             zztmpx = ( ts(ji+1,jj,1,jp_tem,Kmm) - zztmp ) * r1_e1u(ji,jj) + ( zztmp - ts(ji-1,jj  ,1,jp_tem,Kmm) ) * r1_e1u(ji-1,jj)
@@ -247,5 +247,5 @@
       IF( iom_use("heatc") ) THEN
          z2d(:,:)  = 0._wp 
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + e3t(ji,jj,jk,Kmm) * ts(ji,jj,jk,jp_tem,Kmm) * tmask(ji,jj,jk)
          END_3D
@@ -255,5 +255,5 @@
       IF( iom_use("saltc") ) THEN
          z2d(:,:)  = 0._wp 
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + e3t(ji,jj,jk,Kmm) * ts(ji,jj,jk,jp_sal,Kmm) * tmask(ji,jj,jk)
          END_3D
@@ -263,5 +263,5 @@
       IF( iom_use("salt2c") ) THEN
          z2d(:,:)  = 0._wp 
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + e3t(ji,jj,jk,Kmm) * ts(ji,jj,jk,jp_sal,Kmm) * ts(ji,jj,jk,jp_sal,Kmm) * tmask(ji,jj,jk)
          END_3D
@@ -271,5 +271,5 @@
       IF ( iom_use("eken") ) THEN
          z3d(:,:,jpk) = 0._wp 
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             zztmp  = 0.25_wp * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm)
             z3d(ji,jj,jk) = zztmp * (  uu(ji-1,jj,jk,Kmm)**2 * e2u(ji-1,jj) * e3u(ji-1,jj,jk,Kmm)   &
@@ -287,5 +287,5 @@
          z3d(1,:, : ) = 0._wp
          z3d(:,1, : ) = 0._wp
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             z3d(ji,jj,jk) = 0.25_wp * ( uu(ji  ,jj,jk,Kmm) * uu(ji  ,jj,jk,Kmm) * e1e2u(ji  ,jj) * e3u(ji  ,jj,jk,Kmm)  &
                &                      + uu(ji-1,jj,jk,Kmm) * uu(ji-1,jj,jk,Kmm) * e1e2u(ji-1,jj) * e3u(ji-1,jj,jk,Kmm)  &
@@ -298,5 +298,5 @@
 
          z2d(:,:)  = 0._wp 
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + e3t(ji,jj,jk,Kmm) * z3d(ji,jj,jk) * tmask(ji,jj,jk)
          END_3D
@@ -310,5 +310,5 @@
          
          z3d(:,:,jpk) = 0._wp 
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             z3d(ji,jj,jk) = (   e2v(ji+1,jj  ) * vv(ji+1,jj  ,jk,Kmm) - e2v(ji,jj) * vv(ji,jj,jk,Kmm)    &
                &              - e1u(ji  ,jj+1) * uu(ji  ,jj+1,jk,Kmm) + e1u(ji,jj) * uu(ji,jj,jk,Kmm)  ) * r1_e1e2f(ji,jj)
@@ -317,10 +317,10 @@
          CALL iom_put( "relvor", z3d )                  ! relative vorticity
 
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             z3d(ji,jj,jk) = ff_f(ji,jj) + z3d(ji,jj,jk) 
          END_3D
          CALL iom_put( "absvor", z3d )                  ! absolute vorticity
 
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             ze3  = (  e3t(ji,jj+1,jk,Kmm)*tmask(ji,jj+1,jk) + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk)   &
                &    + e3t(ji,jj  ,jk,Kmm)*tmask(ji,jj  ,jk) + e3t(ji+1,jj  ,jk,Kmm)*tmask(ji+1,jj  ,jk)  )
@@ -348,5 +348,5 @@
       IF( iom_use("u_heattr") ) THEN
          z2d(:,:) = 0._wp 
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * ( ts(ji,jj,jk,jp_tem,Kmm) + ts(ji+1,jj,jk,jp_tem,Kmm) )
          END_3D
@@ -357,5 +357,5 @@
       IF( iom_use("u_salttr") ) THEN
          z2d(:,:) = 0.e0 
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * ( ts(ji,jj,jk,jp_sal,Kmm) + ts(ji+1,jj,jk,jp_sal,Kmm) )
          END_3D
@@ -375,5 +375,5 @@
       IF( iom_use("v_heattr") ) THEN
          z2d(:,:) = 0.e0 
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * ( ts(ji,jj,jk,jp_tem,Kmm) + ts(ji,jj+1,jk,jp_tem,Kmm) )
          END_3D
@@ -384,5 +384,5 @@
       IF( iom_use("v_salttr") ) THEN
          z2d(:,:) = 0._wp 
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * ( ts(ji,jj,jk,jp_sal,Kmm) + ts(ji,jj+1,jk,jp_sal,Kmm) )
          END_3D
@@ -393,5 +393,5 @@
       IF( iom_use("tosmint") ) THEN
          z2d(:,:) = 0._wp
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + e3t(ji,jj,jk,Kmm) *  ts(ji,jj,jk,jp_tem,Kmm)
          END_3D
@@ -401,5 +401,5 @@
       IF( iom_use("somint") ) THEN
          z2d(:,:)=0._wp
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             z2d(ji,jj) = z2d(ji,jj) + e3t(ji,jj,jk,Kmm) * ts(ji,jj,jk,jp_sal,Kmm)
          END_3D
Index: /NEMO/trunk/tests/CANAL/MY_SRC/domvvl.F90
===================================================================
--- /NEMO/trunk/tests/CANAL/MY_SRC/domvvl.F90	(revision 13294)
+++ /NEMO/trunk/tests/CANAL/MY_SRC/domvvl.F90	(revision 13295)
@@ -190,5 +190,5 @@
       gdept(:,:,1,Kbb) = 0.5_wp * e3w(:,:,1,Kbb)
       gdepw(:,:,1,Kbb) = 0.0_wp
-      DO_3D_11_11( 2, jpk )
+      DO_3D( 1, 1, 1, 1, 2, jpk )
          !    zcoef = tmask - wmask    ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt
          !                             ! 1 everywhere from mbkt to mikt + 1 or 1 (if no isf)
@@ -238,5 +238,5 @@
          ENDIF
          IF ( ln_vvl_zstar_at_eqtor ) THEN   ! use z-star in vicinity of the Equator
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
 !!gm  case |gphi| >= 6 degrees is useless   initialized just above by default
                IF( ABS(gphit(ji,jj)) >= 6.) THEN
@@ -407,5 +407,5 @@
          zwu(:,:) = 0._wp
          zwv(:,:) = 0._wp
-         DO_3D_10_10( 1, jpkm1 )
+         DO_3D( 1, 0, 1, 0, 1, jpkm1 )
             un_td(ji,jj,jk) = rn_ahe3 * umask(ji,jj,jk) * e2_e1u(ji,jj)           &
                &            * ( tilde_e3t_b(ji,jj,jk) - tilde_e3t_b(ji+1,jj  ,jk) )
@@ -415,9 +415,9 @@
             zwv(ji,jj) = zwv(ji,jj) + vn_td(ji,jj,jk)
          END_3D
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             un_td(ji,jj,mbku(ji,jj)) = un_td(ji,jj,mbku(ji,jj)) - zwu(ji,jj)
             vn_td(ji,jj,mbkv(ji,jj)) = vn_td(ji,jj,mbkv(ji,jj)) - zwv(ji,jj)
          END_2D
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             tilde_e3t_a(ji,jj,jk) = tilde_e3t_a(ji,jj,jk) + (   un_td(ji-1,jj  ,jk) - un_td(ji,jj,jk)    &
                &                                          +     vn_td(ji  ,jj-1,jk) - vn_td(ji,jj,jk)    &
@@ -647,5 +647,5 @@
       gdepw(:,:,1,Kmm) = 0.0_wp
       gde3w(:,:,1) = gdept(:,:,1,Kmm) - ssh(:,:,Kmm)
-      DO_3D_11_11( 2, jpk )
+      DO_3D( 1, 1, 1, 1, 2, jpk )
         !    zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk))   ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt
                                                            ! 1 for jk = mikt
@@ -702,5 +702,5 @@
          !
       CASE( 'U' )                   !* from T- to U-point : hor. surface weighted mean
-         DO_3D_10_10( 1, jpk )
+         DO_3D( 1, 0, 1, 0, 1, jpk )
             pe3_out(ji,jj,jk) = 0.5_wp * (  umask(ji,jj,jk) * (1.0_wp - zlnwd) + zlnwd ) * r1_e1e2u(ji,jj)   &
                &                       * (   e1e2t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) )     &
@@ -711,5 +711,5 @@
          !
       CASE( 'V' )                   !* from T- to V-point : hor. surface weighted mean
-         DO_3D_10_10( 1, jpk )
+         DO_3D( 1, 0, 1, 0, 1, jpk )
             pe3_out(ji,jj,jk) = 0.5_wp * ( vmask(ji,jj,jk)  * (1.0_wp - zlnwd) + zlnwd ) * r1_e1e2v(ji,jj)   &
                &                       * (   e1e2t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) )     &
@@ -720,5 +720,5 @@
          !
       CASE( 'F' )                   !* from U-point to F-point : hor. surface weighted mean
-         DO_3D_10_10( 1, jpk )
+         DO_3D( 1, 0, 1, 0, 1, jpk )
             pe3_out(ji,jj,jk) = 0.5_wp * (  umask(ji,jj,jk) * umask(ji,jj+1,jk) * (1.0_wp - zlnwd) + zlnwd ) &
                &                       *    r1_e1e2f(ji,jj)                                                  &
@@ -887,5 +887,5 @@
                   ssh(:,:,Kbb) = -ssh_ref
 
-                  DO_2D_11_11
+                  DO_2D( 1, 1, 1, 1 )
                      IF( ht_0(ji,jj)-ssh_ref <  rn_wdmin1 ) THEN ! if total depth is less than min depth
                         ssh(ji,jj,Kbb) = rn_wdmin1 - (ht_0(ji,jj) )
@@ -903,5 +903,5 @@
                e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm)
 
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   IF ( ht_0(ji,jj) .LE. 0.0 .AND. NINT( ssmask(ji,jj) ) .EQ. 1) THEN
                      CALL ctl_stop( 'dom_vvl_rst: ht_0 must be positive at potentially wet points' )
Index: /NEMO/trunk/tests/CANAL/MY_SRC/trazdf.F90
===================================================================
--- /NEMO/trunk/tests/CANAL/MY_SRC/trazdf.F90	(revision 13294)
+++ /NEMO/trunk/tests/CANAL/MY_SRC/trazdf.F90	(revision 13295)
@@ -156,9 +156,9 @@
             IF( l_ldfslp ) THEN            ! isoneutral diffusion: add the contribution 
                IF( ln_traldf_msc  ) THEN     ! MSC iso-neutral operator 
-                  DO_3D_00_00( 2, jpkm1 )
+                  DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                      zwt(ji,jj,jk) = zwt(ji,jj,jk) + akz(ji,jj,jk)  
                   END_3D
                ELSE                          ! standard or triad iso-neutral operator
-                  DO_3D_00_00( 2, jpkm1 )
+                  DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                      zwt(ji,jj,jk) = zwt(ji,jj,jk) + ah_wslp2(ji,jj,jk)
                   END_3D
@@ -168,5 +168,5 @@
             ! Diagonal, lower (i), upper (s)  (including the bottom boundary condition since avt is masked)
             IF( ln_zad_Aimp ) THEN         ! Adaptive implicit vertical advection
-               DO_3D_00_00( 1, jpkm1 )
+               DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                   zzwi = - p2dt * zwt(ji,jj,jk  ) / e3w(ji,jj,jk  ,Kmm)
                   zzws = - p2dt * zwt(ji,jj,jk+1) / e3w(ji,jj,jk+1,Kmm)
@@ -177,5 +177,5 @@
                END_3D
             ELSE
-               DO_3D_00_00( 1, jpkm1 )
+               DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                   zwi(ji,jj,jk) = - p2dt * zwt(ji,jj,jk  ) / e3w(ji,jj,jk,Kmm)
                   zws(ji,jj,jk) = - p2dt * zwt(ji,jj,jk+1) / e3w(ji,jj,jk+1,Kmm)
@@ -203,8 +203,8 @@
             !   used as a work space array: its value is modified.
             !
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                zwt(ji,jj,1) = zwd(ji,jj,1)
             END_2D
-            DO_3D_00_00( 2, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 2, jpkm1 )
                zwt(ji,jj,jk) = zwd(ji,jj,jk) - zwi(ji,jj,jk) * zws(ji,jj,jk-1) / zwt(ji,jj,jk-1)
             END_3D
@@ -212,16 +212,16 @@
          ENDIF 
          !         
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pt(ji,jj,1,jn,Kaa) = e3t(ji,jj,1,Kbb) * pt(ji,jj,1,jn,Kbb) + p2dt * e3t(ji,jj,1,Kmm) * pt(ji,jj,1,jn,Krhs)
          END_2D
-         DO_3D_00_00( 2, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 2, jpkm1 )
             zrhs = e3t(ji,jj,jk,Kbb) * pt(ji,jj,jk,jn,Kbb) + p2dt * e3t(ji,jj,jk,Kmm) * pt(ji,jj,jk,jn,Krhs)   ! zrhs=right hand side
             pt(ji,jj,jk,jn,Kaa) = zrhs - zwi(ji,jj,jk) / zwt(ji,jj,jk-1) * pt(ji,jj,jk-1,jn,Kaa)
          END_3D
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             pt(ji,jj,jpkm1,jn,Kaa) = pt(ji,jj,jpkm1,jn,Kaa) / zwt(ji,jj,jpkm1) * tmask(ji,jj,jpkm1)
          END_2D
-         DO_3DS_00_00( jpk-2, 1, -1 )
+         DO_3DS( 0, 0, 0, 0, jpk-2, 1, -1 )
             pt(ji,jj,jk,jn,Kaa) = ( pt(ji,jj,jk,jn,Kaa) - zws(ji,jj,jk) * pt(ji,jj,jk+1,jn,Kaa) )   &
                &             / zwt(ji,jj,jk) * tmask(ji,jj,jk)
Index: /NEMO/trunk/tests/CANAL/MY_SRC/usrdef_hgr.F90
===================================================================
--- /NEMO/trunk/tests/CANAL/MY_SRC/usrdef_hgr.F90	(revision 13294)
+++ /NEMO/trunk/tests/CANAL/MY_SRC/usrdef_hgr.F90	(revision 13295)
@@ -90,5 +90,5 @@
 #endif
          
-      DO_2D_11_11         
+      DO_2D( 1, 1, 1, 1 )         
          zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos
          ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos
Index: /NEMO/trunk/tests/CANAL/MY_SRC/usrdef_istate.F90
===================================================================
--- /NEMO/trunk/tests/CANAL/MY_SRC/usrdef_istate.F90	(revision 13294)
+++ /NEMO/trunk/tests/CANAL/MY_SRC/usrdef_istate.F90	(revision 13295)
@@ -166,5 +166,5 @@
          pssh(:,1) = - ff_t(:,1) / grav * pu(:,1,1) * e2t(:,1)
          DO jl=1, jpnj
-            DO_2D_00_00
+            DO_2D( 0, 0, 0, 0 )
                pssh(ji,jj) = pssh(ji,jj-1) - ff_t(ji,jj) / grav * pu(ji,jj,1) * e2t(ji,jj)
             END_2D
@@ -183,5 +183,5 @@
       CASE(4)    ! geostrophic zonal pulse
    
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF ( ABS(glamt(ji,jj)) <= zjetx ) THEN
                zdu = rn_uzonal
@@ -217,5 +217,5 @@
          zP0 = rho0 * zf0 * zumax * zlambda * SQRT(EXP(1._wp)/2._wp)
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             zx = glamt(ji,jj) * 1.e3
             zy = gphit(ji,jj) * 1.e3
@@ -248,5 +248,5 @@
          ! velocities:
          za = 2._wp * zP0 / zlambda**2
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zx = glamu(ji,jj) * 1.e3
             zy = gphiu(ji,jj) * 1.e3
@@ -263,5 +263,5 @@
          END_2D
          !
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             zx = glamv(ji,jj) * 1.e3
             zy = gphiv(ji,jj) * 1.e3
Index: /NEMO/trunk/tests/ICE_ADV1D/MY_SRC/usrdef_hgr.F90
===================================================================
--- /NEMO/trunk/tests/ICE_ADV1D/MY_SRC/usrdef_hgr.F90	(revision 13294)
+++ /NEMO/trunk/tests/ICE_ADV1D/MY_SRC/usrdef_hgr.F90	(revision 13295)
@@ -78,5 +78,5 @@
       zphi0 = -REAL( (Nj0glo-2)/2, wp) * 1.e-3 * rn_dy
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos
          ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos
Index: /NEMO/trunk/tests/ICE_ADV2D/MY_SRC/usrdef_hgr.F90
===================================================================
--- /NEMO/trunk/tests/ICE_ADV2D/MY_SRC/usrdef_hgr.F90	(revision 13294)
+++ /NEMO/trunk/tests/ICE_ADV2D/MY_SRC/usrdef_hgr.F90	(revision 13295)
@@ -90,5 +90,5 @@
 #endif         
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos
          ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos
Index: /NEMO/trunk/tests/ICE_AGRIF/MY_SRC/usrdef_hgr.F90
===================================================================
--- /NEMO/trunk/tests/ICE_AGRIF/MY_SRC/usrdef_hgr.F90	(revision 13294)
+++ /NEMO/trunk/tests/ICE_AGRIF/MY_SRC/usrdef_hgr.F90	(revision 13295)
@@ -99,5 +99,5 @@
 #endif         
 
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos
          ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos
Index: /NEMO/trunk/tests/ISOMIP+/MY_SRC/dtatsd.F90
===================================================================
--- /NEMO/trunk/tests/ISOMIP+/MY_SRC/dtatsd.F90	(revision 13294)
+++ /NEMO/trunk/tests/ISOMIP+/MY_SRC/dtatsd.F90	(revision 13295)
@@ -191,5 +191,5 @@
          ENDIF
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             DO jk = 1, jpk                        ! determines the intepolated T-S profiles at each (i,j) points
                zl = gdept_0(ji,jj,jk)
@@ -224,5 +224,5 @@
          !
          IF( ln_zps ) THEN                      ! zps-coordinate (partial steps) interpolation at the last ocean level
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
                ik = mbkt(ji,jj) 
                IF( ik > 1 ) THEN
Index: /NEMO/trunk/tests/ISOMIP+/MY_SRC/eosbn2.F90
===================================================================
--- /NEMO/trunk/tests/ISOMIP+/MY_SRC/eosbn2.F90	(revision 13294)
+++ /NEMO/trunk/tests/ISOMIP+/MY_SRC/eosbn2.F90	(revision 13295)
@@ -243,5 +243,5 @@
       CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             !
             zh  = pdep(ji,jj,jk) * r1_Z0                                  ! depth
@@ -279,5 +279,5 @@
       CASE( np_seos )                !==  simplified EOS  ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             zt  = pts  (ji,jj,jk,jp_tem) - 10._wp
             zs  = pts  (ji,jj,jk,jp_sal) - 35._wp
@@ -294,5 +294,5 @@
       CASE( np_leos )                !==  linear ISOMIP EOS  ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             zt  = pts  (ji,jj,jk,jp_tem) - (-1._wp)
             zs  = pts  (ji,jj,jk,jp_sal) - 34.2_wp
@@ -356,5 +356,5 @@
             END DO
             !
-            DO_3D_11_11( 1, jpkm1 )
+            DO_3D( 1, 1, 1, 1, 1, jpkm1 )
                !
                ! compute density (2*nn_sto_eos) times:
@@ -406,5 +406,5 @@
          ! Non-stochastic equation of state
          ELSE
-            DO_3D_11_11( 1, jpkm1 )
+            DO_3D( 1, 1, 1, 1, 1, jpkm1 )
                !
                zh  = pdep(ji,jj,jk) * r1_Z0                                  ! depth
@@ -444,5 +444,5 @@
       CASE( np_seos )                !==  simplified EOS  ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             zt  = pts  (ji,jj,jk,jp_tem) - 10._wp
             zs  = pts  (ji,jj,jk,jp_sal) - 35._wp
@@ -462,5 +462,5 @@
       CASE( np_leos )                !==  linear ISOMIP EOS  ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             zt  = pts  (ji,jj,jk,jp_tem) - (-1._wp)
             zs  = pts  (ji,jj,jk,jp_sal) - 34.2_wp
@@ -513,5 +513,5 @@
       CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==!
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             !
             zh  = pdep(ji,jj) * r1_Z0                                  ! depth
@@ -548,5 +548,5 @@
       CASE( np_seos )                !==  simplified EOS  ==!
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             !
             zt    = pts  (ji,jj,jp_tem)  - 10._wp
@@ -564,5 +564,5 @@
       CASE( np_leos )                !==  ISOMIP EOS  ==!
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             !
             zt    = pts  (ji,jj,jp_tem)  - (-1._wp)
@@ -611,5 +611,5 @@
       CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             !
             zh  = gdept(ji,jj,jk,Kmm) * r1_Z0                                ! depth
@@ -664,5 +664,5 @@
       CASE( np_seos )                  !==  simplified EOS  ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             zt  = pts (ji,jj,jk,jp_tem) - 10._wp   ! pot. temperature anomaly (t-T0)
             zs  = pts (ji,jj,jk,jp_sal) - 35._wp   ! abs. salinity anomaly (s-S0)
@@ -680,5 +680,5 @@
       CASE( np_leos )                  !==  linear ISOMIP EOS  ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             zt  = pts (ji,jj,jk,jp_tem) - (-1._wp)
             zs  = pts (ji,jj,jk,jp_sal) - 34.2_wp   ! abs. salinity anomaly (s-S0)
@@ -734,5 +734,5 @@
       CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==!
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             !
             zh  = pdep(ji,jj) * r1_Z0                                  ! depth
@@ -787,5 +787,5 @@
       CASE( np_seos )                  !==  simplified EOS  ==!
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             !
             zt    = pts  (ji,jj,jp_tem) - 10._wp   ! pot. temperature anomaly (t-T0)
@@ -803,5 +803,5 @@
       CASE( np_leos )                  !==  linear ISOMIP EOS  ==!
          !
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             !
             zt    = pts  (ji,jj,jp_tem) - (-1._wp)   ! pot. temperature anomaly (t-T0)
@@ -965,5 +965,5 @@
       IF( ln_timing )   CALL timing_start('bn2')
       !
-      DO_3D_11_11( 2, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 2, jpkm1 )
          zrw =   ( gdepw(ji,jj,jk  ,Kmm) - gdept(ji,jj,jk,Kmm) )   &
             &  / ( gdept(ji,jj,jk-1,Kmm) - gdept(ji,jj,jk,Kmm) ) 
@@ -1013,5 +1013,5 @@
       z1_T0   = 1._wp/40._wp
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !
          zt  = ctmp   (ji,jj) * z1_T0
@@ -1066,5 +1066,5 @@
          !
          z1_S0 = 1._wp / 35.16504_wp
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             zs= SQRT( ABS( psal(ji,jj) ) * z1_S0 )           ! square root salinity
             ptf(ji,jj) = ((((1.46873e-03_wp*zs-9.64972e-03_wp)*zs+2.28348e-02_wp)*zs &
@@ -1173,5 +1173,5 @@
       CASE( np_teos10, np_eos80 )                !==  polynomial TEOS-10 / EOS-80 ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             !
             zh  = gdept(ji,jj,jk,Kmm) * r1_Z0                                ! depth
@@ -1232,5 +1232,5 @@
       CASE( np_seos )                !==  Vallis (2006) simplified EOS  ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             zt  = pts(ji,jj,jk,jp_tem) - 10._wp  ! temperature anomaly (t-T0)
             zs = pts (ji,jj,jk,jp_sal) - 35._wp  ! abs. salinity anomaly (s-S0)
@@ -1248,5 +1248,5 @@
       CASE( np_leos )                !==  linear ISOMIP EOS  ==!
          !
-         DO_3D_11_11( 1, jpkm1 )
+         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
             zt  = pts(ji,jj,jk,jp_tem) - (-1._wp)  ! temperature anomaly (t-T0)
             zs = pts (ji,jj,jk,jp_sal) - 34.2_wp   ! abs. salinity anomaly (s-S0)
Index: /NEMO/trunk/tests/ISOMIP+/MY_SRC/istate.F90
===================================================================
--- /NEMO/trunk/tests/ISOMIP+/MY_SRC/istate.F90	(revision 13294)
+++ /NEMO/trunk/tests/ISOMIP+/MY_SRC/istate.F90	(revision 13295)
@@ -105,5 +105,5 @@
                ! Apply minimum wetdepth criterion
                !
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   IF( ht_0(ji,jj) + ssh(ji,jj,Kbb)  < rn_wdmin1 ) THEN
                      ssh(ji,jj,Kbb) = tmask(ji,jj,1)*( rn_wdmin1 - (ht_0(ji,jj)) )
@@ -159,5 +159,5 @@
       !
 !!gm  the use of umsak & vmask is not necessary below as uu(:,:,:,Kmm), vv(:,:,:,Kmm), uu(:,:,:,Kbb), vv(:,:,:,Kbb) are always masked
-      DO_3D_11_11( 1, jpkm1 )
+      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
          uu_b(ji,jj,Kmm) = uu_b(ji,jj,Kmm) + e3u(ji,jj,jk,Kmm) * uu(ji,jj,jk,Kmm) * umask(ji,jj,jk)
          vv_b(ji,jj,Kmm) = vv_b(ji,jj,Kmm) + e3v(ji,jj,jk,Kmm) * vv(ji,jj,jk,Kmm) * vmask(ji,jj,jk)
Index: /NEMO/trunk/tests/ISOMIP+/MY_SRC/tradmp.F90
===================================================================
--- /NEMO/trunk/tests/ISOMIP+/MY_SRC/tradmp.F90	(revision 13294)
+++ /NEMO/trunk/tests/ISOMIP+/MY_SRC/tradmp.F90	(revision 13295)
@@ -112,5 +112,5 @@
       CASE( 0 )                        !*  newtonian damping throughout the water column  *!
          DO jn = 1, jpts
-            DO_3D_00_00( 1, jpkm1 )
+            DO_3D( 0, 0, 0, 0, 1, jpkm1 )
                pts(ji,jj,jk,jn,Krhs) = pts(ji,jj,jk,jn,Krhs)           &
                   &                  + resto(ji,jj,jk) * ( zts_dta(ji,jj,jk,jn) - pts(ji,jj,jk,jn,Kbb) )
@@ -119,5 +119,5 @@
          !
       CASE ( 1 )                       !*  no damping in the turbocline (avt > 5 cm2/s)  *!
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             IF( avt(ji,jj,jk) <= avt_c ) THEN
                pts(ji,jj,jk,jp_tem,Krhs) = pts(ji,jj,jk,jp_tem,Krhs)   &
@@ -129,5 +129,5 @@
          !
       CASE ( 2 )                       !*  no damping in the mixed layer   *!
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             IF( gdept(ji,jj,jk,Kmm) >= hmlp (ji,jj) ) THEN
                pts(ji,jj,jk,jp_tem,Krhs) = pts(ji,jj,jk,jp_tem,Krhs)   &
Index: /NEMO/trunk/tests/ISOMIP/MY_SRC/usrdef_hgr.F90
===================================================================
--- /NEMO/trunk/tests/ISOMIP/MY_SRC/usrdef_hgr.F90	(revision 13294)
+++ /NEMO/trunk/tests/ISOMIP/MY_SRC/usrdef_hgr.F90	(revision 13295)
@@ -77,5 +77,5 @@
       !
       !                       !==  grid point position  ==!   (in degrees)
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !                       ! longitude   (west coast at lon=0°)
          plamt(ji,jj) = rn_e1deg * (  - 0.5 + REAL( mig0_oldcmp(ji)-1 , wp )  )  
@@ -91,5 +91,5 @@
       !
       !                       !==  Horizontal scale factors  ==!   (in meters)
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !                       ! e1   (zonal)
          pe1t(ji,jj) = ra * rad * COS( rad * pphit(ji,jj) ) * rn_e1deg
Index: /NEMO/trunk/tests/ISOMIP/MY_SRC/usrdef_zgr.F90
===================================================================
--- /NEMO/trunk/tests/ISOMIP/MY_SRC/usrdef_zgr.F90	(revision 13294)
+++ /NEMO/trunk/tests/ISOMIP/MY_SRC/usrdef_zgr.F90	(revision 13295)
@@ -126,5 +126,5 @@
          END DO
          ! top scale factors and depth at T- and W-points
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ik = k_top(ji,jj)
             IF ( ik > 2 ) THEN
@@ -145,5 +145,5 @@
          END_2D
          ! bottom scale factors and depth at T- and W-points
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ik = k_bot(ji,jj)
             pdepw(ji,jj,ik+1) = MIN( zht(ji,jj) , pdepw_1d(ik+1) )
@@ -158,5 +158,5 @@
          pe3u (:,:,:) = pe3t(:,:,:)
          pe3uw(:,:,:) = pe3w(:,:,:)
-         DO_3D_00_00( 1, jpk )
+         DO_3D( 0, 0, 0, 0, 1, jpk )
          !                                   ! Computed as the minimum of neighbooring scale factors
             pe3v (ji,jj,jk) = MIN( pe3t(ji,jj,jk), pe3t(ji,jj+1,jk) )
Index: /NEMO/trunk/tests/LOCK_EXCHANGE/MY_SRC/usrdef_hgr.F90
===================================================================
--- /NEMO/trunk/tests/LOCK_EXCHANGE/MY_SRC/usrdef_hgr.F90	(revision 13294)
+++ /NEMO/trunk/tests/LOCK_EXCHANGE/MY_SRC/usrdef_hgr.F90	(revision 13295)
@@ -74,5 +74,5 @@
       !                       !==  grid point position  ==!   (in kilometers)
       zfact = rn_dx * 1.e-3         ! conversion in km
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !                       ! longitude
          plamt(ji,jj) = zfact * (  - 0.5 + REAL( mig0_oldcmp(ji)-1 , wp )  )  
Index: /NEMO/trunk/tests/OVERFLOW/MY_SRC/usrdef_hgr.F90
===================================================================
--- /NEMO/trunk/tests/OVERFLOW/MY_SRC/usrdef_hgr.F90	(revision 13294)
+++ /NEMO/trunk/tests/OVERFLOW/MY_SRC/usrdef_hgr.F90	(revision 13295)
@@ -74,5 +74,5 @@
       !                       !==  grid point position  ==!   (in kilometers)
       zfact = rn_dx * 1.e-3         ! conversion in km
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !                       ! longitude
          plamt(ji,jj) = zfact * (  - 0.5 + REAL( mig0_oldcmp(ji)-1 , wp )  )  
Index: /NEMO/trunk/tests/OVERFLOW/MY_SRC/usrdef_zgr.F90
===================================================================
--- /NEMO/trunk/tests/OVERFLOW/MY_SRC/usrdef_zgr.F90	(revision 13294)
+++ /NEMO/trunk/tests/OVERFLOW/MY_SRC/usrdef_zgr.F90	(revision 13295)
@@ -184,5 +184,5 @@
             pe3vw(:,:,jk) = pe3w_1d (jk)
          END DO
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             ik = k_bot(ji,jj)
             pdepw(ji,jj,ik+1) = MIN( zht(ji,jj) , pdepw_1d(ik+1) )
Index: /NEMO/trunk/tests/VORTEX/MY_SRC/domvvl.F90
===================================================================
--- /NEMO/trunk/tests/VORTEX/MY_SRC/domvvl.F90	(revision 13294)
+++ /NEMO/trunk/tests/VORTEX/MY_SRC/domvvl.F90	(revision 13295)
@@ -190,5 +190,5 @@
       gdept(:,:,1,Kbb) = 0.5_wp * e3w(:,:,1,Kbb)
       gdepw(:,:,1,Kbb) = 0.0_wp
-      DO_3D_11_11( 2, jpk )
+      DO_3D( 1, 1, 1, 1, 2, jpk )
          !    zcoef = tmask - wmask    ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt
          !                             ! 1 everywhere from mbkt to mikt + 1 or 1 (if no isf)
@@ -238,5 +238,5 @@
          ENDIF
          IF ( ln_vvl_zstar_at_eqtor ) THEN   ! use z-star in vicinity of the Equator
-            DO_2D_11_11
+            DO_2D( 1, 1, 1, 1 )
 !!gm  case |gphi| >= 6 degrees is useless   initialized just above by default
                IF( ABS(gphit(ji,jj)) >= 6.) THEN
@@ -407,5 +407,5 @@
          zwu(:,:) = 0._wp
          zwv(:,:) = 0._wp
-         DO_3D_10_10( 1, jpkm1 )
+         DO_3D( 1, 0, 1, 0, 1, jpkm1 )
             un_td(ji,jj,jk) = rn_ahe3 * umask(ji,jj,jk) * e2_e1u(ji,jj)           &
                &            * ( tilde_e3t_b(ji,jj,jk) - tilde_e3t_b(ji+1,jj  ,jk) )
@@ -415,9 +415,9 @@
             zwv(ji,jj) = zwv(ji,jj) + vn_td(ji,jj,jk)
          END_3D
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             un_td(ji,jj,mbku(ji,jj)) = un_td(ji,jj,mbku(ji,jj)) - zwu(ji,jj)
             vn_td(ji,jj,mbkv(ji,jj)) = vn_td(ji,jj,mbkv(ji,jj)) - zwv(ji,jj)
          END_2D
-         DO_3D_00_00( 1, jpkm1 )
+         DO_3D( 0, 0, 0, 0, 1, jpkm1 )
             tilde_e3t_a(ji,jj,jk) = tilde_e3t_a(ji,jj,jk) + (   un_td(ji-1,jj  ,jk) - un_td(ji,jj,jk)    &
                &                                          +     vn_td(ji  ,jj-1,jk) - vn_td(ji,jj,jk)    &
@@ -647,5 +647,5 @@
       gdepw(:,:,1,Kmm) = 0.0_wp
       gde3w(:,:,1) = gdept(:,:,1,Kmm) - ssh(:,:,Kmm)
-      DO_3D_11_11( 2, jpk )
+      DO_3D( 1, 1, 1, 1, 2, jpk )
         !    zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk))   ! 0 everywhere tmask = wmask, ie everywhere expect at jk = mikt
                                                            ! 1 for jk = mikt
@@ -702,5 +702,5 @@
          !
       CASE( 'U' )                   !* from T- to U-point : hor. surface weighted mean
-         DO_3D_10_10( 1, jpk )
+         DO_3D( 1, 0, 1, 0, 1, jpk )
             pe3_out(ji,jj,jk) = 0.5_wp * (  umask(ji,jj,jk) * (1.0_wp - zlnwd) + zlnwd ) * r1_e1e2u(ji,jj)   &
                &                       * (   e1e2t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) )     &
@@ -711,5 +711,5 @@
          !
       CASE( 'V' )                   !* from T- to V-point : hor. surface weighted mean
-         DO_3D_10_10( 1, jpk )
+         DO_3D( 1, 0, 1, 0, 1, jpk )
             pe3_out(ji,jj,jk) = 0.5_wp * ( vmask(ji,jj,jk)  * (1.0_wp - zlnwd) + zlnwd ) * r1_e1e2v(ji,jj)   &
                &                       * (   e1e2t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) )     &
@@ -720,5 +720,5 @@
          !
       CASE( 'F' )                   !* from U-point to F-point : hor. surface weighted mean
-         DO_3D_10_10( 1, jpk )
+         DO_3D( 1, 0, 1, 0, 1, jpk )
             pe3_out(ji,jj,jk) = 0.5_wp * (  umask(ji,jj,jk) * umask(ji,jj+1,jk) * (1.0_wp - zlnwd) + zlnwd ) &
                &                       *    r1_e1e2f(ji,jj)                                                  &
@@ -887,5 +887,5 @@
                   ssh(:,:,Kbb) = -ssh_ref
 
-                  DO_2D_11_11
+                  DO_2D( 1, 1, 1, 1 )
                      IF( ht_0(ji,jj)-ssh_ref <  rn_wdmin1 ) THEN ! if total depth is less than min depth
                         ssh(ji,jj,Kbb) = rn_wdmin1 - (ht_0(ji,jj) )
@@ -903,5 +903,5 @@
                e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm)
 
-               DO_2D_11_11
+               DO_2D( 1, 1, 1, 1 )
                   IF ( ht_0(ji,jj) .LE. 0.0 .AND. NINT( ssmask(ji,jj) ) .EQ. 1) THEN
                      CALL ctl_stop( 'dom_vvl_rst: ht_0 must be positive at potentially wet points' )
Index: /NEMO/trunk/tests/VORTEX/MY_SRC/usrdef_hgr.F90
===================================================================
--- /NEMO/trunk/tests/VORTEX/MY_SRC/usrdef_hgr.F90	(revision 13294)
+++ /NEMO/trunk/tests/VORTEX/MY_SRC/usrdef_hgr.F90	(revision 13295)
@@ -98,5 +98,5 @@
 #endif
          
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zti = REAL( mig0_oldcmp(ji) - 1, wp )   ! start at i=0 in the global grid without halos
          ztj = REAL( mjg0_oldcmp(jj) - 1, wp )   ! start at j=0 in the global grid without halos
Index: /NEMO/trunk/tests/VORTEX/MY_SRC/usrdef_istate.F90
===================================================================
--- /NEMO/trunk/tests/VORTEX/MY_SRC/usrdef_istate.F90	(revision 13294)
+++ /NEMO/trunk/tests/VORTEX/MY_SRC/usrdef_istate.F90	(revision 13295)
@@ -75,5 +75,5 @@
       ! Sea level:
       za = -zP0 * (1._wp-EXP(-zH)) / (grav*(zH-1._wp + EXP(-zH)))
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zx = glamt(ji,jj) * 1.e3
          zy = gphit(ji,jj) * 1.e3
@@ -83,5 +83,5 @@
       !
       ! temperature:         
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          zx = glamt(ji,jj) * 1.e3
          zy = gphit(ji,jj) * 1.e3
@@ -102,5 +102,5 @@
       ! velocities:
       za = 2._wp * zP0 / (zf0 * rho0 * zlambda**2)
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zx = glamu(ji,jj) * 1.e3
          zy = gphiu(ji,jj) * 1.e3
@@ -116,5 +116,5 @@
       END_2D
       !
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zx = glamv(ji,jj) * 1.e3
          zy = gphiv(ji,jj) * 1.e3
Index: /NEMO/trunk/tests/WAD/MY_SRC/usrdef_hgr.F90
===================================================================
--- /NEMO/trunk/tests/WAD/MY_SRC/usrdef_hgr.F90	(revision 13294)
+++ /NEMO/trunk/tests/WAD/MY_SRC/usrdef_hgr.F90	(revision 13295)
@@ -74,5 +74,5 @@
       !                       !==  grid point position  ==!   (in kilometers)
       zfact = rn_dx * 1.e-3         ! conversion in km
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          !                       ! longitude
          plamt(ji,jj) = zfact * (  - 0.5 + REAL( mig0_oldcmp(ji)-1 , wp )  )  
Index: /NEMO/trunk/tests/WAD/MY_SRC/usrdef_istate.F90
===================================================================
--- /NEMO/trunk/tests/WAD/MY_SRC/usrdef_istate.F90	(revision 13294)
+++ /NEMO/trunk/tests/WAD/MY_SRC/usrdef_istate.F90	(revision 13295)
@@ -176,5 +176,5 @@
       ! Apply minimum wetdepth criterion
       !
-      DO_2D_11_11
+      DO_2D( 1, 1, 1, 1 )
          IF( ht_0(ji,jj) + pssh(ji,jj) < rn_wdmin1 ) THEN
             pssh(ji,jj) = ptmask(ji,jj,1)*( rn_wdmin1 - ht_0(ji,jj) )
Index: /NEMO/trunk/tests/WAD/MY_SRC/usrdef_zgr.F90
===================================================================
--- /NEMO/trunk/tests/WAD/MY_SRC/usrdef_zgr.F90	(revision 13294)
+++ /NEMO/trunk/tests/WAD/MY_SRC/usrdef_zgr.F90	(revision 13295)
@@ -243,5 +243,5 @@
       ! at v-point: averaging zht
       zhv = 0._wp
-      DO_2D_00_00
+      DO_2D( 0, 0, 0, 0 )
          zhv(ji,jj) = 0.5_wp * ( zht(ji,jj) + zht(ji,jj+1) )
       END_2D
@@ -280,5 +280,5 @@
          ht_0 = zht
          k_bot(:,:) = jpkm1 * k_top(:,:)  !* bottom ocean = jpk-1 (here use k_top as a land mask)
-         DO_2D_11_11
+         DO_2D( 1, 1, 1, 1 )
             IF( zht(ji,jj) <= -(rn_wdld - rn_wdmin2)) THEN
                k_bot(ji,jj) = 0
@@ -289,5 +289,5 @@
          !                                !* terrain-following coordinate with e3.(k)=cst)
          !                                !  OVERFLOW case : identical with j-index (T=V, U=F)
-         DO_2D_00_00
+         DO_2D( 0, 0, 0, 0 )
             z1_jpkm1 = 1._wp / REAL( k_bot(ji,jj) - k_top(ji,jj) + 1 , wp)
             DO jk = 1, jpk
