Index: trunk/NEMO/OPA_SRC/DYN/dynhpg.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 78)
+++ trunk/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 84)
@@ -162,5 +162,5 @@
       END DO
 
-      IF( l_ctl .AND. lwp ) THEN         ! print sum trends (used for debugging)
+      IF(l_ctl) THEN         ! print sum trends (used for debugging)
          zuap = SUM( ua(2:jpim1,2:jpjm1,1:jpkm1) * umask(2:jpim1,2:jpjm1,1:jpkm1) )
          zvap = SUM( va(2:jpim1,2:jpjm1,1:jpkm1) * vmask(2:jpim1,2:jpjm1,1:jpkm1) )
@@ -317,5 +317,5 @@
       END DO
 
-      IF( l_ctl .AND. lwp ) THEN         ! print sum trends (used for debugging)
+      IF(l_ctl) THEN         ! print sum trends (used for debugging)
          zuap = SUM( ua(2:jpim1,2:jpjm1,1:jpkm1) * umask(2:jpim1,2:jpjm1,1:jpkm1) )
          zvap = SUM( va(2:jpim1,2:jpjm1,1:jpkm1) * vmask(2:jpim1,2:jpjm1,1:jpkm1) )
@@ -428,5 +428,5 @@
       END DO
 
-      IF( l_ctl .AND. lwp ) THEN         ! print sum trends (used for debugging)
+      IF(l_ctl) THEN         ! print sum trends (used for debugging)
          zuap = SUM( ua(2:jpim1,2:jpjm1,1:jpkm1) * umask(2:jpim1,2:jpjm1,1:jpkm1) )
          zvap = SUM( va(2:jpim1,2:jpjm1,1:jpkm1) * vmask(2:jpim1,2:jpjm1,1:jpkm1) )
Index: trunk/NEMO/OPA_SRC/DYN/dynhpg_atsk.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DYN/dynhpg_atsk.F90	(revision 78)
+++ trunk/NEMO/OPA_SRC/DYN/dynhpg_atsk.F90	(revision 84)
@@ -150,5 +150,5 @@
       !                                                ! ===============
 
-      IF( l_ctl .AND. lwp ) THEN         ! print sum trends (used for debugging)
+      IF(l_ctl) THEN         ! print sum trends (used for debugging)
          zuap = SUM( ua(2:jpim1,2:jpjm1,1:jpkm1) * umask(2:jpim1,2:jpjm1,1:jpkm1) )
          zvap = SUM( va(2:jpim1,2:jpjm1,1:jpkm1) * vmask(2:jpim1,2:jpjm1,1:jpkm1) )
@@ -295,4 +295,12 @@
       END DO                                           !   End of slab
       !                                                ! ===============
+
+      IF(l_ctl) THEN         ! print sum trends (used for debugging)
+         zuap = SUM( ua(2:jpim1,2:jpjm1,1:jpkm1) * umask(2:jpim1,2:jpjm1,1:jpkm1) )
+         zvap = SUM( va(2:jpim1,2:jpjm1,1:jpkm1) * vmask(2:jpim1,2:jpjm1,1:jpkm1) )
+         WRITE(numout,*) ' hpg  - Ua: ', zuap-u_ctl, ' Va: ', zvap-v_ctl
+         u_ctl = zuap   ;   v_ctl = zvap
+      ENDIF   
+
    END SUBROUTINE dyn_hpg_atsk
 
@@ -402,5 +410,5 @@
       !                                                ! ===============
 
-      IF( l_ctl .AND. lwp ) THEN         ! print sum trends (used for debugging)
+      IF(l_ctl) THEN         ! print sum trends (used for debugging)
          WRITE(numout,*) ' hpg  - Ua: ', SUM(ua*umask), ' Va: ', SUM(va*vmask)
          zuap = SUM( ua(2:jpim1,2:jpjm1,1:jpkm1) * umask(2:jpim1,2:jpjm1,1:jpkm1) )
Index: trunk/NEMO/OPA_SRC/DYN/dynkeg.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DYN/dynkeg.F90	(revision 78)
+++ trunk/NEMO/OPA_SRC/DYN/dynkeg.F90	(revision 84)
@@ -119,5 +119,5 @@
       !                                                ! ===============
 
-      IF( l_ctl .AND. lwp ) THEN         ! print sum trends (used for debugging)
+      IF(l_ctl) THEN         ! print sum trends (used for debugging)
          zua = SUM( ua(2:jpim1,2:jpjm1,1:jpkm1) * umask(2:jpim1,2:jpjm1,1:jpkm1) )
          zva = SUM( va(2:jpim1,2:jpjm1,1:jpkm1) * vmask(2:jpim1,2:jpjm1,1:jpkm1) )
Index: trunk/NEMO/OPA_SRC/DYN/dynldf_bilap.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DYN/dynldf_bilap.F90	(revision 78)
+++ trunk/NEMO/OPA_SRC/DYN/dynldf_bilap.F90	(revision 84)
@@ -219,4 +219,12 @@
       END DO                                           !   End of slab
       !                                                ! ===============
+
+      IF(l_ctl) THEN         ! print sum trends (used for debugging)
+         zua = SUM( ua(2:jpim1,2:jpjm1,1:jpkm1) * umask(2:jpim1,2:jpjm1,1:jpkm1) )
+         zva = SUM( va(2:jpim1,2:jpjm1,1:jpkm1) * vmask(2:jpim1,2:jpjm1,1:jpkm1) )
+         WRITE(numout,*) ' ldf  - Ua: ', zua-u_ctl, ' Va: ', zva-v_ctl
+         u_ctl = zua   ;   v_ctl = zva
+      ENDIF
+
    END SUBROUTINE dyn_ldf_bilap
 
Index: trunk/NEMO/OPA_SRC/DYN/dynldf_bilapg.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DYN/dynldf_bilapg.F90	(revision 78)
+++ trunk/NEMO/OPA_SRC/DYN/dynldf_bilapg.F90	(revision 84)
@@ -73,4 +73,5 @@
       !! * Local declarations
       INTEGER ::   ji, jj, jk                 ! dummy loop indices
+      REAL(wp) ::   zua, zva                  ! temporary scalars
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   &
          wk1, wk2,            &  ! work array used for rotated biharmonic
@@ -126,4 +127,11 @@
       END DO                                           !   End of slab
       !                                                ! ===============
+
+      IF(l_ctl) THEN         ! print sum trends (used for debugging)
+         zua = SUM( ua(2:jpim1,2:jpjm1,1:jpkm1) * umask(2:jpim1,2:jpjm1,1:jpkm1) )
+         zva = SUM( va(2:jpim1,2:jpjm1,1:jpkm1) * vmask(2:jpim1,2:jpjm1,1:jpkm1) )
+         WRITE(numout,*) ' ldf  - Ua: ', zua-u_ctl, ' Va: ', zva-v_ctl
+         u_ctl = zua   ;   v_ctl = zva
+      ENDIF
 
    END SUBROUTINE dyn_ldf_bilapg
Index: trunk/NEMO/OPA_SRC/DYN/dynldf_lap.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DYN/dynldf_lap.F90	(revision 78)
+++ trunk/NEMO/OPA_SRC/DYN/dynldf_lap.F90	(revision 84)
@@ -118,5 +118,5 @@
       !                                                ! ===============
 
-      IF( l_ctl .AND. lwp ) THEN         ! print sum trends (used for debugging)
+      IF(l_ctl) THEN         ! print sum trends (used for debugging)
          zua = SUM( ua(2:jpim1,2:jpjm1,1:jpkm1) * umask(2:jpim1,2:jpjm1,1:jpkm1) )
          zva = SUM( va(2:jpim1,2:jpjm1,1:jpkm1) * vmask(2:jpim1,2:jpjm1,1:jpkm1) )
Index: trunk/NEMO/OPA_SRC/DYN/dynnxt.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 78)
+++ trunk/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 84)
@@ -133,7 +133,5 @@
       !                                                ! ===============
 
-      IF( l_ctl .AND. lwp ) THEN         ! print sum fields (used for debugging)
-         WRITE(numout,*) ' nxt  - Un: ', SUM(un*umask), ' Vn: ', SUM(vn*vmask)
-      ENDIF
+      IF(l_ctl)   WRITE(numout,*) ' nxt  - Un: ', SUM(un*umask), ' Vn: ', SUM(vn*vmask)
 
    END SUBROUTINE dyn_nxt
Index: trunk/NEMO/OPA_SRC/DYN/dynspg_fsc.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DYN/dynspg_fsc.F90	(revision 78)
+++ trunk/NEMO/OPA_SRC/DYN/dynspg_fsc.F90	(revision 84)
@@ -347,5 +347,5 @@
       END DO
 
-      IF( l_ctl .AND. lwp ) THEN         ! print sum trends (used for debugging)
+      IF(l_ctl) THEN         ! print sum trends (used for debugging)
          WRITE(numout,*) ' spg  - Ua: ', SUM( ua(2:jpim1,2:jpjm1,1:jpkm1)*umask(2:jpim1,2:jpjm1,1:jpkm1) ),   &
             &                   ' Va: ', SUM( va(2:jpim1,2:jpjm1,1:jpkm1)*vmask(2:jpim1,2:jpjm1,1:jpkm1) )
Index: trunk/NEMO/OPA_SRC/DYN/dynspg_fsc_atsk.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DYN/dynspg_fsc_atsk.F90	(revision 78)
+++ trunk/NEMO/OPA_SRC/DYN/dynspg_fsc_atsk.F90	(revision 84)
@@ -18,9 +18,10 @@
    USE oce             ! ocean dynamics and tracers 
    USE dom_oce         ! ocean space and time domain
-   USE trdtra_oce     ! ocean active tracer trend 
-   USE trddyn_oce     ! ocean dynamics trend
+   USE zdf_oce         ! ocean vertical physics
+   USE trdtra_oce      ! ocean active tracer trend 
+   USE trddyn_oce      ! ocean dynamics trend
    USE in_out_manager  ! I/O manager
    USE phycst          ! physical constant
-   USE ocesbc          ! Ocen Surface Boundary condition
+   USE ocesbc          ! Ocean Surface Boundary condition
    USE flxrnf          ! ???
    USE sol_oce         ! ocean elliptic solver
@@ -30,5 +31,4 @@
    USE obc_oce         ! Lateral open boundary condition
    USE obcdyn          ! open boudary condition
-   USE obcdyn          !    "              "
    USE obcvol          !    "              "
    USE lib_mpp         ! ???
@@ -362,4 +362,9 @@
          END DO
 
+         IF(l_ctl) THEN         ! print sum trends (used for debugging)
+            WRITE(numout,*) ' spg  - Ua: ', SUM( ua(2:jpim1,2:jpjm1,1:jpkm1)*umask(2:jpim1,2:jpjm1,1:jpkm1) ),   &
+               &                   ' Va: ', SUM( va(2:jpim1,2:jpjm1,1:jpkm1)*vmask(2:jpim1,2:jpjm1,1:jpkm1) )
+         ENDIF
+
          ! 8. Sea surface elevation time stepping
          ! --------------------------------------
Index: trunk/NEMO/OPA_SRC/DYN/dynzad.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DYN/dynzad.F90	(revision 78)
+++ trunk/NEMO/OPA_SRC/DYN/dynzad.F90	(revision 84)
@@ -126,5 +126,5 @@
       !                                                ! ===============
 
-      IF( l_ctl .AND. lwp ) THEN         ! print sum trends (used for debugging)
+      IF(l_ctl) THEN         ! print sum trends (used for debugging)
          zua = SUM( ua(2:jpim1,2:jpjm1,1:jpkm1) * umask(2:jpim1,2:jpjm1,1:jpkm1) )
          zva = SUM( va(2:jpim1,2:jpjm1,1:jpkm1) * vmask(2:jpim1,2:jpjm1,1:jpkm1) )
@@ -227,5 +227,5 @@
       END DO
 
-      IF( l_ctl .AND. lwp ) THEN         ! print sum trends (used for debugging)
+      IF(l_ctl) THEN         ! print sum trends (used for debugging)
          zua = SUM( ua(2:jpim1,2:jpjm1,1:jpkm1) * umask(2:jpim1,2:jpjm1,1:jpkm1) )
          zva = SUM( va(2:jpim1,2:jpjm1,1:jpkm1) * vmask(2:jpim1,2:jpjm1,1:jpkm1) )
Index: trunk/NEMO/OPA_SRC/DYN/dynzdf_imp.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 78)
+++ trunk/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 84)
@@ -342,5 +342,5 @@
       END DO
 
-      IF( l_ctl .AND. lwp ) THEN         ! print sum trends (used for debugging)
+      IF(l_ctl) THEN         ! print sum trends (used for debugging)
          zua = SUM( ua(2:jpim1,2:jpjm1,1:jpkm1) * umask(2:jpim1,2:jpjm1,1:jpkm1) )
          zva = SUM( va(2:jpim1,2:jpjm1,1:jpkm1) * vmask(2:jpim1,2:jpjm1,1:jpkm1) )
Index: trunk/NEMO/OPA_SRC/DYN/dynzdf_imp_atsk.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DYN/dynzdf_imp_atsk.F90	(revision 78)
+++ trunk/NEMO/OPA_SRC/DYN/dynzdf_imp_atsk.F90	(revision 84)
@@ -312,4 +312,12 @@
       END DO                                           !   End of slab
       !                                                ! ===============
+
+      IF(l_ctl) THEN         ! print sum trends (used for debugging)
+         zua = SUM( ua(2:jpim1,2:jpjm1,1:jpkm1) * umask(2:jpim1,2:jpjm1,1:jpkm1) )
+         zva = SUM( va(2:jpim1,2:jpjm1,1:jpkm1) * vmask(2:jpim1,2:jpjm1,1:jpkm1) )
+         WRITE(numout,*) ' zdf  - Ua: ', zua-u_ctl, ' Va: ', zva-v_ctl
+         u_ctl = zua   ;   v_ctl = zva
+      ENDIF
+
    END SUBROUTINE dyn_zdf_imp_tsk
 
