Index: /NEMO/trunk/src/OCE/ZDF/zdfmxl.F90
===================================================================
--- /NEMO/trunk/src/OCE/ZDF/zdfmxl.F90	(revision 15089)
+++ /NEMO/trunk/src/OCE/ZDF/zdfmxl.F90	(revision 15090)
@@ -144,9 +144,9 @@
       ! w-level of the turbocline and mixing layer (iom_use)
       imld(:,:) = mbkt(A2D(nn_hls)) + 1                ! Initialization to the number of w ocean point
-      DO_3DS( 1, 1, 1, 1, jpkm1, nlb10, -1 )   ! from the bottom to nlb10
+      DO_3DS( nn_hls, nn_hls, nn_hls, nn_hls, jpkm1, nlb10, -1 )   ! from the bottom to nlb10
          IF( avt (ji,jj,jk) < avt_c * wmask(ji,jj,jk) )   imld(ji,jj) = jk      ! Turbocline
       END_3D
       ! depth of the mixing layer
-      DO_2D_OVR( 1, 1, 1, 1 )
+      DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls )
          iik = imld(ji,jj)
          hmld (ji,jj) = gdepw(ji,jj,iik  ,Kmm) * ssmask(ji,jj)    ! Turbocline depth
Index: /NEMO/trunk/src/OFF/dtadyn.F90
===================================================================
--- /NEMO/trunk/src/OFF/dtadyn.F90	(revision 15089)
+++ /NEMO/trunk/src/OFF/dtadyn.F90	(revision 15090)
@@ -419,5 +419,5 @@
       gdepw(:,:,1,Kmm) = 0.0_wp
       !
-      DO_3D( 1, 1, 1, 1, 2, jpk )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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)
@@ -503,5 +503,5 @@
          !
          nk_rnf(:,:) = 0                               ! set the number of level over which river runoffs are applied
-         DO_2D( 1, 1, 1, 1 )
+         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
             IF( h_rnf(ji,jj) > 0._wp ) THEN
                jk = 2
@@ -517,5 +517,6 @@
          END_2D
          !
-         DO_2D( 1, 1, 1, 1 )                           ! set the associated depth
+         ! set the associated depth
+         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
             h_rnf(ji,jj) = 0._wp
             DO jk = 1, nk_rnf(ji,jj)
@@ -552,5 +553,6 @@
       !!----------------------------------------------------------------------
       !
-      DO_2D( 1, 1, 1, 1 )               ! update the depth over which runoffs are distributed
+      !  update the depth over which runoffs are distributed
+      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
          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/TOP/C14/trcsms_c14.F90
===================================================================
--- /NEMO/trunk/src/TOP/C14/trcsms_c14.F90	(revision 15089)
+++ /NEMO/trunk/src/TOP/C14/trcsms_c14.F90	(revision 15090)
@@ -81,5 +81,5 @@
       ! -------------------------------------------------------------------
 
-      DO_2D( 1, 1, 1, 1 )
+      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
          IF( tmask(ji,jj,1) >  0. ) THEN
             !
@@ -128,10 +128,10 @@
       !
       ! Add the surface flux to the trend of jp_c14
-      DO_2D( 1, 1, 1, 1 )
+      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
          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( 1, 1, 1, 1, 1, jpk )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/C14/trcwri_c14.F90	(revision 15090)
@@ -60,5 +60,5 @@
          zz3d(:,:,:) = 0._wp
          !
-         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1 )
+         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
             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 15089)
+++ /NEMO/trunk/src/TOP/CFC/trcini_cfc.F90	(revision 15090)
@@ -132,5 +132,5 @@
       !---------------------------------------------------------------------------------------
       zyd = ylatn - ylats      
-      DO_2D( 1, 1, 1, 1 )
+      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
          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 15089)
+++ /NEMO/trunk/src/TOP/CFC/trcsms_cfc.F90	(revision 15090)
@@ -126,5 +126,5 @@
          
          !                                                         !------------!
-         DO_2D( 1, 1, 1, 1 )                                       !  i-j loop  !
+         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )                   !  i-j loop  !
             !                                                      !------------!
             ! space interpolation
Index: /NEMO/trunk/src/TOP/PISCES/P2Z/p2zexp.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P2Z/p2zexp.F90	(revision 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P2Z/p2zexp.F90	(revision 15090)
@@ -121,5 +121,5 @@
       ELSE
         !
-        DO_2D( 1, 1, 1, 1 )
+        DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
            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( 1, 1, 1, 1, jpkb, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpk )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1 )
+      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
          IF( tmask(ji,jj,1) == 0 )   dmin3(ji,jj,1) = 0._wp
       END_2D
Index: /NEMO/trunk/src/TOP/PISCES/P2Z/p2zopt.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P2Z/p2zopt.F90	(revision 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P2Z/p2zopt.F90	(revision 15090)
@@ -95,5 +95,5 @@
       !                                          ! Photosynthetically Available Radiation (PAR)
       zcoef = 12 * redf / rcchl / rpig           ! --------------------------------------
-      DO_3D( 1, 1, 1, 1, 2, jpk )                     ! local par at w-levels
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )                   ! mean par at t-levels
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) ! mean par at t-levels
          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( 1, 1, 1, 1, 1, jpkm1 )                   ! (i.e. 1rst T-level strictly below EL bottom)
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 )  ! (i.e. 1rst T-level strictly below EL bottom)
         IF( etot(ji,jj,jk) >= zpar100(ji,jj) )   neln(ji,jj) = jk + 1 
       END_3D
       !                                               ! Euphotic layer depth
-      DO_2D( 1, 1, 1, 1 )
+      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
          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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P2Z/p2zsed.F90	(revision 15090)
@@ -89,5 +89,5 @@
 
       ! tracer flux divergence at t-point added to the general trend
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zagg.F90	(revision 15090)
@@ -60,5 +60,5 @@
       IF( ln_p4z ) THEN
          !
-         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 )
             !
             zfact = xstep * xdiss(ji,jj,jk)
@@ -102,5 +102,5 @@
       ELSE    ! ln_p5z
         !
-         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zbc.F90	(revision 15090)
@@ -112,5 +112,5 @@
       IF( ll_river ) THEN
           jl = n_trc_indcbc(jpno3)
-          DO_2D( 1, 1, 1, 1 )
+          DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
              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( 1, 1, 1, 1 )
+         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
             zdep    = rfact / e3t(ji,jj,1,Kmm)
             zwflux  = fmmflx(ji,jj) / 1000._wp
@@ -313,5 +313,5 @@
          CALL lbc_lnk( 'p4zbc', zcmask , 'T', 1.0_wp )      ! lateral boundary conditions on cmask   (sign unchanged)
          !
-         DO_3D( 1, 1, 1, 1, 1, jpk )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zbio.F90	(revision 15090)
@@ -72,5 +72,5 @@
       xdiss(:,:,:) = 1.
 !!gm the use of nmld should be better here?
-      DO_3D( 1, 1, 1, 1, 2, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zche.F90	(revision 15090)
@@ -179,5 +179,5 @@
       ! 0.04°C relative to an exact computation
       ! ---------------------------------------------------------------------
-      DO_3D( 1, 1, 1, 1, 1, jpk )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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) )
@@ -188,5 +188,5 @@
       ! CHEMICAL CONSTANTS - SURFACE LAYER
       ! ----------------------------------
-      DO_2D( 1, 1, 1, 1 )
+      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
          !                             ! SET ABSOLUTE TEMPERATURE
          ztkel = tempis(ji,jj,1) + 273.15
@@ -204,5 +204,5 @@
       ! OXYGEN SOLUBILITY - DEEP OCEAN
       ! -------------------------------
-      DO_3D( 1, 1, 1, 1, 1, jpk )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpk )
          ztkel = tempis(ji,jj,jk) + 273.15
          zsal  = salinprac(ji,jj,jk) + ( 1.- tmask(ji,jj,jk) ) * 35.
@@ -223,5 +223,5 @@
       ! CHEMICAL CONSTANTS - DEEP OCEAN
       ! -------------------------------
-      DO_3D( 1, 1, 1, 1, 1, jpk )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpk )
           ! SET PRESSION ACCORDING TO SAUNDER (1980)
           zplat   = SIN ( ABS(gphit(ji,jj)*3.141592654/180.) )
@@ -451,5 +451,5 @@
       IF( ln_timing )  CALL timing_start('ahini_for_at')
       !
-      DO_3D( 1, 1, 1, 1, 1, jpk )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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)
@@ -549,5 +549,5 @@
 
    ! TOTAL H+ scale: conversion factor for Htot = aphscale * Hfree
-   DO_3D( 1, 1, 1, 1, 1, jpk )
+   DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpk )
       IF (rmask(ji,jj,jk) == 1.) THEN
          p_alktot = tr(ji,jj,jk,jptal,Kbb) * 1000. / (rhop(ji,jj,jk) + rtrn)
@@ -578,5 +578,5 @@
 
    DO jn = 1, jp_maxniter_atgen 
-   DO_3D( 1, 1, 1, 1, 1, jpk )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zfechem.F90	(revision 15090)
@@ -92,5 +92,5 @@
       ! Chemistry is supposed to be fast enough to be at equilibrium
       ! ------------------------------------------------------------
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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]).
@@ -173,5 +173,5 @@
       IF( ln_ligand ) THEN
          !
-         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zflx.F90	(revision 15090)
@@ -110,5 +110,5 @@
       IF( l_co2cpl )   satmco2(:,:) = atm_co2(:,:)
 
-      DO_2D( 1, 1, 1, 1 )
+      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
          ! DUMMY VARIABLES FOR DIC, H+, AND BORATE
          zfact = rhop(ji,jj,1) / 1000. + rtrn
@@ -126,5 +126,5 @@
       ! -------------------------------------------
 
-      DO_2D( 1, 1, 1, 1 )
+      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
          ztc  = MIN( 35., ts(ji,jj,1,jp_tem,Kmm) )
          ztc2 = ztc * ztc
@@ -145,5 +145,5 @@
 
 
-      DO_2D( 1, 1, 1, 1 )
+      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
          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/p4zint.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zint.F90	(revision 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zint.F90	(revision 15090)
@@ -50,5 +50,5 @@
       ! Computation of the silicon dependant half saturation  constant for silica uptake
       ! ---------------------------------------------------
-      DO_2D( 1, 1, 1, 1 )
+      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
          zvar = tr(ji,jj,1,jpsil,Kbb) * tr(ji,jj,1,jpsil,Kbb)
          xksimax(ji,jj) = MAX( xksimax(ji,jj), ( 1.+ 7.* zvar / ( xksilim * xksilim + zvar ) ) * 1e-6 )
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zligand.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zligand.F90	(revision 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zligand.F90	(revision 15090)
@@ -52,5 +52,5 @@
       IF( ln_timing )   CALL timing_start('p4z_ligand')
       !
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
          !
          ! ------------------------------------------------------------------
Index: /NEMO/trunk/src/TOP/PISCES/P4Z/p4zlim.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/P4Z/p4zlim.F90	(revision 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zlim.F90	(revision 15090)
@@ -98,5 +98,5 @@
       IF( ln_timing )   CALL timing_start('p4z_lim')
       !
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zlys.F90	(revision 15090)
@@ -74,6 +74,5 @@
 
       CALL solve_at_general( zhinit, zhi, Kbb )
-
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 +86,5 @@
       !     ---------------------------------------------------------
 
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zmeso.F90	(revision 15090)
@@ -81,5 +81,5 @@
       IF( ln_timing )   CALL timing_start('p4z_meso')
       !
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zmicro.F90	(revision 15090)
@@ -79,5 +79,5 @@
       IF( ln_timing )   CALL timing_start('p4z_micro')
       !
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zmort.F90	(revision 15090)
@@ -77,5 +77,5 @@
       !
       prodcal(:,:,:) = 0._wp   ! calcite production variable set to zero
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zopt.F90	(revision 15090)
@@ -85,5 +85,5 @@
       IF( ln_p5z )   zchl3d(:,:,:) = zchl3d(:,:,:)    + tr(:,:,:,jppch,Kbb)
       !
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
          zchl = ( zchl3d(ji,jj,jk) + rtrn ) * 1.e6
          zchl = MIN(  10. , MAX( 0.05, zchl )  )
@@ -156,5 +156,5 @@
       heup_01(:,:) = gdepw(:,:,2,Kmm)
 
-      DO_3D( 1, 1, 1, 1, 2, nksr )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 2, nksr)
         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
@@ -174,5 +174,5 @@
       zetmp2 (:,:)   = 0.e0
 
-      DO_3D( 1, 1, 1, 1, 1, nksr )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, nksr)
          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
@@ -185,5 +185,5 @@
       zpar(:,:,:) = etot_ndcy(:,:,:)  ! diagnostic : PAR with no diurnal cycle 
       !
-      DO_3D( 1, 1, 1, 1, 1, nksr )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, nksr)
          IF( gdepw(ji,jj,jk+1,Kmm) <= hmld(ji,jj) ) THEN
             z1_dep = 1. / ( zdepmoy(ji,jj) + rtrn )
@@ -197,5 +197,5 @@
       zetmp4 (:,:)   = 0.e0
       !
-      DO_3D( 1, 1, 1, 1, 1, nksr )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, nksr)
          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
@@ -207,5 +207,5 @@
       ediatm(:,:,:) = ediat(:,:,:)
       !
-      DO_3D( 1, 1, 1, 1, 1, nksr )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, nksr)
          IF( gdepw(ji,jj,jk+1,Kmm) <= hmld(ji,jj) ) THEN
             z1_dep = 1. / ( zdepmoy(ji,jj) + rtrn )
@@ -217,5 +217,5 @@
       IF( ln_p5z ) THEN
          ALLOCATE( zetmp5(jpi,jpj) )  ;   zetmp5 (:,:) = 0.e0
-         DO_3D( 1, 1, 1, 1, 1, nksr )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, nksr)
             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
@@ -225,5 +225,5 @@
          epicom(:,:,:) = epico(:,:,:)
          !
-         DO_3D( 1, 1, 1, 1, 1, nksr )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, nksr)
             IF( gdepw(ji,jj,jk+1,Kmm) <= hmld(ji,jj) ) THEN
                z1_dep = 1. / ( zdepmoy(ji,jj) + rtrn )
@@ -300,5 +300,5 @@
         pe3(:,:,1) = zqsr(:,:) * EXP( -0.5 * ekr(:,:,1) )
         !
-        DO_3D( 1, 1, 1, 1, 2, nksr )
+        DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 2, nksr)
            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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zpoc.F90	(revision 15090)
@@ -107,5 +107,5 @@
      ! -----------------------------------------------------------------------
      ztremint(:,:,:) = zremigoc(:,:,:)
-     DO_3D( 1, 1, 1, 1, 2, jpkm1 )
+     DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
         IF (tmask(ji,jj,jk) == 1.) THEN
           zdep = hmld(ji,jj)
@@ -192,5 +192,5 @@
 
       IF( ln_p4z ) THEN
-         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
             ! POC disaggregation by turbulence and bacterial activity. 
             ! --------------------------------------------------------
@@ -212,5 +212,5 @@
          END_3D
       ELSE
-         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
              ! POC disaggregation by turbulence and bacterial activity. 
             ! --------------------------------------------------------
@@ -260,5 +260,5 @@
      ! ----------------------------------------------------------------
      ! 
-     DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+     DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+     DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
         IF (tmask(ji,jj,jk) == 1.) THEN
           zdep = hmld(ji,jj)
@@ -310,5 +310,5 @@
      ! -----------------------------------------------------------------------
      !
-     DO_3D( 1, 1, 1, 1, 2, jpkm1 )
+     DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 2, jpkm1)
         IF (tmask(ji,jj,jk) == 1.) THEN
           zdep = hmld(ji,jj)
@@ -384,5 +384,5 @@
 
      IF( ln_p4z ) THEN
-         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+       DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zprod.F90	(revision 15090)
@@ -110,5 +110,5 @@
       ! day length in hours
       zstrn(:,:) = 0.
-      DO_2D( 1, 1, 1, 1 )
+      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
          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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
 
           IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
@@ -205,5 +205,5 @@
       !  Sea-ice effect on production
 
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zrem.F90	(revision 15090)
@@ -89,5 +89,5 @@
       ! that was modeling explicitely bacteria
       ! -------------------------------------------------------
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
 
          ! Bacterial uptake of iron. No iron is available in DOC. So
@@ -226,5 +226,5 @@
       ! ---------------------------------------------------------------
 
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zsed.F90	(revision 15090)
@@ -94,5 +94,5 @@
          ! OA: Warning, the following part is necessary to avoid CFL problems above the sediments
          ! --------------------------------------------------------------------
-         DO_2D( 1, 1, 1, 1 )
+         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
             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( 1, 1, 1, 1 )
+         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
            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( 1, 1, 1, 1 )
+      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
          ikt  = mbkt(ji,jj)
          zdep = xstep / e3t(ji,jj,ikt,Kmm) 
@@ -142,5 +142,5 @@
       !
       IF( .NOT.lk_sed ) THEN
-         DO_2D( 1, 1, 1, 1 )
+         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
             ikt  = mbkt(ji,jj)
             zdep = xstep / e3t(ji,jj,ikt,Kmm) 
@@ -160,5 +160,5 @@
       ENDIF
       !
-      DO_2D( 1, 1, 1, 1 )
+      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
          ikt  = mbkt(ji,jj)
          zdep = xstep / e3t(ji,jj,ikt,Kmm) 
@@ -172,5 +172,5 @@
       !
       IF( ln_p5z ) THEN
-         DO_2D( 1, 1, 1, 1 )
+         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
             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( 1, 1, 1, 1 )
+         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
             ikt  = mbkt(ji,jj)
             zdep = xstep / e3t(ji,jj,ikt,Kmm) 
@@ -224,5 +224,5 @@
       ENDDO
       IF( ln_p4z ) THEN
-         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zsink.F90	(revision 15090)
@@ -81,5 +81,5 @@
       !    by data and from the coagulation theory
       !    -----------------------------------------------------------
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p4zsms.F90	(revision 15090)
@@ -130,5 +130,5 @@
          xnegtr(:,:,:) = 1.e0
          DO jn = jp_pcs0, jp_pcs1
-            DO_3D( 1, 1, 1, 1, 1, jpk )
+            DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p5zlim.F90	(revision 15090)
@@ -131,5 +131,5 @@
       zratchl = 6.0
       !
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
          ! Size estimation of nanophytoplankton
          ! ------------------------------------
@@ -367,5 +367,5 @@
       ! Compute the fraction of nanophytoplankton that is made of calcifiers
       ! --------------------------------------------------------------------
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p5zmeso.F90	(revision 15090)
@@ -98,5 +98,5 @@
       IF ( bmetexc2 ) zmetexcess = 1.0
 
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p5zmicro.F90	(revision 15090)
@@ -96,5 +96,5 @@
       IF ( bmetexc ) zmetexcess = 1.0
       !
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p5zmort.F90	(revision 15090)
@@ -82,5 +82,5 @@
       !
       prodcal(:,:,:) = 0.  !: calcite production variable set to zero
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/PISCES/P4Z/p5zprod.F90	(revision 15090)
@@ -125,5 +125,5 @@
       ! day length in hours
       zstrn(:,:) = 0.
-      DO_2D( 1, 1, 1, 1 )
+      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
          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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
 
           IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
@@ -208,5 +208,5 @@
 
       !  Sea-ice effect on production                                                                               
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1)
          IF( etot_ndcy(ji,jj,jk) > 1.E-3 ) THEN
             !  production terms for diatomees
@@ -316,5 +316,5 @@
       END_3D
 
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1, 1, jpkm1 )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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/trcwri_pisces.F90
===================================================================
--- /NEMO/trunk/src/TOP/PISCES/trcwri_pisces.F90	(revision 15089)
+++ /NEMO/trunk/src/TOP/PISCES/trcwri_pisces.F90	(revision 15090)
@@ -69,5 +69,5 @@
             zo2min   (:,:) = tr(:,:,1,jpoxy,Kmm) * tmask(:,:,1)
             zdepo2min(:,:) = gdepw(:,:,1,Kmm)   * tmask(:,:,1)
-            DO_3D( 1, 1, 1, 1, 2, jpkm1 )
+            DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/TRP/trcatf.F90	(revision 15090)
@@ -239,6 +239,6 @@
       ENDIF
       !
-      DO jn = 1, jptra      
-         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO jn = 1, jptra  
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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)
@@ -313,5 +313,5 @@
       !
       DO jn = 1, jptra      
-         DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 )    
             ze3t_b = e3t(ji,jj,jk,Kbb)
             ze3t_n = e3t(ji,jj,jk,Kmm)
Index: /NEMO/trunk/src/TOP/TRP/trcsink.F90
===================================================================
--- /NEMO/trunk/src/TOP/TRP/trcsink.F90	(revision 15089)
+++ /NEMO/trunk/src/TOP/TRP/trcsink.F90	(revision 15090)
@@ -74,5 +74,5 @@
          iiter(:,:) = 1
       ELSE
-         DO_2D( 1, 1, 1, 1 )
+         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
             iiter(ji,jj) = 1
             DO jk = 1, jpkm1
@@ -86,5 +86,5 @@
       ENDIF
 
-      DO_3D( 1, 1, 1, 1, 1,jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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( 1, 1, 1, 1 )
+         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
             !
             zstep = rsfact / REAL( kiter(ji,jj), wp ) / 2.
@@ -186,5 +186,5 @@
       END DO
 
-      DO_3D( 1, 1, 1, 1, 1,jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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 15089)
+++ /NEMO/trunk/src/TOP/TRP/trdmxl_trc.F90	(revision 15090)
@@ -124,6 +124,6 @@
             isum  = 0   ;   zvlmsk(:,:) = 0.e0
 
-            IF( jpktrd_trc < jpk ) THEN                           ! description ???
-               DO_2D( 1, 1, 1, 1 )
+            IF( jpktrd_trc < jpk ) THEN   
+               DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
                   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( 1, 1, 1, 1, 1, jpktrd_trc )                       ! initialize wkx_trc with vertical scale factor in mixed-layer
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpktrd_trc )                    ! description ???
             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( 1, 1, 1, 1 )
+            DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )                    ! description ???
                ik = nmld_trc(ji,jj)
                IF( ln_trdtrc(jn) )    &
Index: /NEMO/trunk/src/TOP/TRP/trdmxl_trc_rst.F90
===================================================================
--- /NEMO/trunk/src/TOP/TRP/trdmxl_trc_rst.F90	(revision 15089)
+++ /NEMO/trunk/src/TOP/TRP/trdmxl_trc_rst.F90	(revision 15090)
@@ -12,5 +12,5 @@
    USE iom             ! I/O module
    USE trc             ! for ctrcnm
-   USE trdmxl_trc_oce  ! for lk_trdmxl_trc
+   USE trdtrc_oce  ! for lk_trdmxl_trc
 
    IMPLICIT NONE
@@ -53,5 +53,5 @@
          clpath = TRIM(cn_trcrst_outdir)
          IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/'
-         IF(lwp) WRITE(numout,*) '             open ocean restart_mld_trc NetCDF  'TRIM(clpath)//TRIM(clname)
+         IF(lwp) WRITE(numout,*) '             open ocean restart_mld_trc NetCDF  ', TRIM(clpath)//TRIM(clname)
          CALL iom_open( TRIM(clpath)//TRIM(clname), nummldw_trc, ldwrt = .TRUE. )
       ENDIF
Index: /NEMO/trunk/src/TOP/trcais.F90
===================================================================
--- /NEMO/trunk/src/TOP/trcais.F90	(revision 15089)
+++ /NEMO/trunk/src/TOP/trcais.F90	(revision 15090)
@@ -170,5 +170,5 @@
                IF( ln_trc_ais(jn) ) THEN
                   jl = n_trc_indais(jn)
-                  DO_2D( 1, 1, 1, 1 )
+                  DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
                      zfact = 1. / e3t(ji,jj,1,Kmm)
                      ptr(ji,jj,jk,jn,Krhs) = ptr(ji,jj,1,jn,Krhs) + fwficb(ji,jj) * r1_rho0 * ptr(ji,jj,1,jn,Kmm) * zfact
@@ -182,5 +182,5 @@
                IF( ln_trc_ais(jn) ) THEN
                   jl = n_trc_indais(jn)
-                  DO_2D( 1, 1, 1, 1 )
+                  DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
                      IF( ln_isfpar_mlt ) THEN
                         zcalv = fwfisf_par(ji,jj) * r1_rho0 / rhisf_tbl_par(ji,jj)
@@ -214,5 +214,5 @@
                IF( ln_trc_ais(jn) ) THEN
                   jl = n_trc_indais(jn)
-                  DO_2D( 1, 1, 1, 1 )
+                  DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
                      DO jk = 1, icblev
                         zcalv  =  fwficb(ji,jj) * r1_rho0 
@@ -229,5 +229,5 @@
                IF( ln_trc_ais(jn) ) THEN
                   jl = n_trc_indais(jn)
-                  DO_2D( 1, 1, 1, 1 )
+                  DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
                      IF( ln_isfpar_mlt ) THEN
                         zcalv = - fwfisf_par(ji,jj) * r1_rho0 / rhisf_tbl_par(ji,jj)
Index: /NEMO/trunk/src/TOP/trcopt.F90
===================================================================
--- /NEMO/trunk/src/TOP/trcopt.F90	(revision 15089)
+++ /NEMO/trunk/src/TOP/trcopt.F90	(revision 15090)
@@ -86,5 +86,5 @@
       !     Attenuation coef. function of Chlorophyll and wavelength (RGB)
       !     --------------------------------------------------------------
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 )
          ztmp = ( zchl(ji,jj,jk) + rtrn ) * 1.e6
          ztmp = MIN(  10. , MAX( 0.05, ztmp )  )
@@ -108,5 +108,5 @@
          !
          DO jk = 2, nksrp + 1
-            DO_2D(1, 1, 1, 1)
+            DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
                   ze0(ji,jj,jk) = ze0(ji,jj,jk-1) * EXP( -e3t(ji,jj,jk-1,Kmm) * (1. / rn_si0) )
                   ze1(ji,jj,jk) = ze1(ji,jj,jk-1) * EXP( -ekb  (ji,jj,jk-1 )        )
@@ -147,5 +147,5 @@
       !     Weighted broadband attenuation coefficient
       !     ------------------------------------------
-      DO_3D( 1, 1, 1, 1, 1, jpkm1 )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 )
          ztmp = ze1(ji,jj,jk)* ekb(ji,jj,jk) + ze2(ji,jj,jk) * ekg(ji,jj,jk) + ze3(ji,jj,jk) * ekr(ji,jj,jk)
          xeps(ji,jj,jk) = ztmp / e3t(ji,jj,jk,Kmm) / (etot(ji,jj,jk) + rtrn)
@@ -163,5 +163,5 @@
       heup_01(:,:) = gdepw(:,:,2,Kmm)
       !
-      DO_3D( 1, 1, 1, 1, 2, nksrp )
+      DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 2, nksrp )
         IF( etot_ndcy(ji,jj,jk) * tmask(ji,jj,jk) >=  zqsr100(ji,jj) )  THEN
            ! Euphotic level (1st T-level strictly below Euphotic layer)
@@ -214,5 +214,5 @@
          pe3(:,:,1) = zqsr(:,:) * EXP( -0.5 * ekr(:,:,1) )
          !
-         DO_3D( 1, 1, 1, 1, 2, nksrp )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 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) ) )
@@ -226,5 +226,5 @@
          we3(:,:) = zqsr(:,:)
          !
-         DO_3D( 1, 1, 1, 1, 1, nksrp )
+         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, nksrp )
             ! integrate PAR over current t-level
             pe1(ji,jj,jk) = we1(ji,jj) / (ekb(ji,jj,jk) + rtrn) * (1. - EXP( -ekb(ji,jj,jk) ))
