Index: /trunk/NEMO/OFF_SRC/dtadyn.F90
===================================================================
--- /trunk/NEMO/OFF_SRC/dtadyn.F90	(revision 1322)
+++ /trunk/NEMO/OFF_SRC/dtadyn.F90	(revision 1323)
@@ -23,4 +23,5 @@
    USE zdfddm          ! vertical  physics: double diffusion
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
+   USE zpshde
    USE lib_mpp         ! distributed memory computing library
 
@@ -143,6 +144,4 @@
 
       !! * Local declarations
-
-
       NAMELIST/namdyn/ ndtadyn, ndtatot, nsptint,            & 
           &                nficdyn, lperdyn
@@ -198,5 +197,5 @@
 
       !! * Local declarations
-      INTEGER ::   iper, iperm1, iswap   
+      INTEGER ::   ji,jj,iper, iperm1, iswap   
 
       REAL(wp) :: zpdtan, zpdtpe, zdemi, zt
@@ -297,11 +296,15 @@
             CALL eos( tn, sn, rhd, rhop )   ! Time-filtered in situ density 
             CALL bn2( tn, sn, rn2 )         ! before Brunt-Vaisala frequency
+            IF( ln_zps )   &
+            CALL zps_hde( kt, tn , sn , rhd,  &  ! Partial steps: before Horizontal DErivative
+                              gtu, gsu, gru,  &  ! of t, s, rd at the bottom ocean level
+                              gtv, gsv, grv )
             CALL zdf_mxl( kt )              ! mixed layer depth
             CALL ldf_slp( kt, rhd, rn2 )
 
-            uslpdta(:,:,:,2)=uslp(:,:,:)
-            vslpdta(:,:,:,2)=vslp(:,:,:)
-            wslpidta(:,:,:,2)=wslpi(:,:,:)
-            wslpjdta(:,:,:,2)=wslpj(:,:,:)
+            uslpdta (:,:,:,2) = uslp(:,:,:)
+            vslpdta (:,:,:,2) = vslp(:,:,:)
+            wslpidta(:,:,:,2) = wslpi(:,:,:)
+            wslpjdta(:,:,:,2) = wslpj(:,:,:)
 #endif
        !
@@ -369,4 +372,8 @@
             CALL eos( tn, sn, rhd, rhop )   ! Time-filtered in situ density
             CALL bn2( tn, sn, rn2 )         ! before Brunt-Vaisala frequency
+            IF( ln_zps )   &
+            CALL zps_hde( kt, tn , sn , rhd,  &  ! Partial steps: before Horizontal DErivative
+                              gtu, gsu, gru,  &  ! of t, s, rd at the bottom ocean level
+                              gtv, gsv, grv )
             CALL zdf_mxl( kt )              ! mixed layer depth
             CALL ldf_slp( kt, rhd, rn2 )
@@ -466,4 +473,8 @@
             CALL eos( tn, sn, rhd, rhop )   ! Time-filtered in situ density
             CALL bn2( tn, sn, rn2 )         ! before Brunt-Vaisala frequency
+            IF( ln_zps )   &
+            CALL zps_hde( kt, tn , sn , rhd,  &  ! Partial steps: before Horizontal DErivative
+                              gtu, gsu, gru,  &  ! of t, s, rd at the bottom ocean level
+                              gtv, gsv, grv )
             CALL zdf_mxl( kt )              ! mixed layer depth
             CALL ldf_slp( kt, rhd, rn2 )
@@ -551,7 +562,7 @@
                     wndm(:,:) = flx(:,:,jpwind)
                     fr_i(:,:) = flx(:,:,jpice)
-                    emp(:,:) = flx(:,:,jpemp)
+                    emp(:,:)  = flx(:,:,jpemp)
                     emps(:,:) = emp(:,:)
-                    qsr(:,:) = flx(:,:,jpqsr)
+                    qsr(:,:)  = flx(:,:,jpqsr)
 
           END IF 
@@ -670,21 +681,16 @@
          zemp, zqsr, zmld, zice, zwspd
 #if defined key_trcbbl_dif   ||   defined key_trcbbl_adv
-      REAL(wp), DIMENSION(jpi,jpj) :: &
-        zbblx, zbbly
+      REAL(wp), DIMENSION(jpi,jpj) :: zbblx, zbbly
 #endif
 
 #if ! defined key_off_degrad
-
 #  if defined key_traldf_c2d
-      REAL(wp), DIMENSION(jpi,jpj) ::   &
-         zahtw
+      REAL(wp), DIMENSION(jpi,jpj) :: zahtw 
 #   if defined key_trcldf_eiv
-      REAL(wp), DIMENSION(jpi,jpj) ::   &
-         zaeiw
+      REAL(wp), DIMENSION(jpi,jpj) :: zaeiw 
 #   endif
 #  endif
 
 #else
-
    REAL(wp), DIMENSION(jpi,jpj,jpk) ::   &
       zahtu, zahtv, zahtw  !  Lateral diffusivity
@@ -707,6 +713,7 @@
          clname_v = 'dyna_grid_V.nc', &
          clname_w = 'dyna_grid_W.nc'
-      !
+      !---------------------------------------------------------------
       ! 0. Initialization
+      
       ! cas d'un fichier non periodique : on utilise deux fois le premier et
       ! le dernier champ temporel
