Index: branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/CONFIG/SHARED/field_def.xml
===================================================================
--- branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 8299)
+++ branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 8300)
@@ -508,10 +508,16 @@
         <field id="dia_vor_int-spg"    long_name="vertical integral vorticity tendencies for spg"  standard_name="vertically_integrated_vorticity_tendencies_spg"   unit="s-2"      grid_ref="grid_W_2D" />
         <field id="dia_vor_mean-spg"    long_name="vertical mean vorticity tendencies for spg"  standard_name="vertical_mean_vorticity_tendencies_spg"   unit="s-2"      grid_ref="grid_W_2D" />
-        <field id="dia_vor_int-vor"    long_name="vertical integral vorticity tendencies for vor"  standard_name="vertically_integrated_vorticity_tendencies_vor"   unit="s-2"      grid_ref="grid_W_2D" />
-        <field id="dia_vor_mean-vor"    long_name="vertical mean vorticity tendencies for vor"  standard_name="vertical_mean_vorticity_tendencies_vor"   unit="s-2"      grid_ref="grid_W_2D" />
+        <field id="dia_vor_int-rvo"    long_name="vertical integral vorticity tendencies for rvo"  standard_name="vertically_integrated_vorticity_tendencies_rvo"   unit="s-2"      grid_ref="grid_W_2D" />
+        <field id="dia_vor_mean-rvo"    long_name="vertical mean vorticity tendencies for rvo"  standard_name="vertical_mean_vorticity_tendencies_rvo"   unit="s-2"      grid_ref="grid_W_2D" />
+        <field id="dia_vor_int-pvo"    long_name="vertical integral vorticity tendencies for pvo"  standard_name="vertically_integrated_vorticity_tendencies_pvo"   unit="s-2"      grid_ref="grid_W_2D" />
+        <field id="dia_vor_mean-pvo"    long_name="vertical mean vorticity tendencies for pvo"  standard_name="vertical_mean_vorticity_tendencies_pvo"   unit="s-2"      grid_ref="grid_W_2D" />
         <field id="dia_vor_int-zad"    long_name="vertical integral vorticity tendencies for zad"  standard_name="vertically_integrated_vorticity_tendencies_zad"   unit="s-2"      grid_ref="grid_W_2D" />
         <field id="dia_vor_mean-zad"    long_name="vertical mean vorticity tendencies for zad"  standard_name="vertical_mean_vorticity_tendencies_zad"   unit="s-2"      grid_ref="grid_W_2D" />
         <field id="dia_vor_int-zdf"    long_name="vertical integral vorticity tendencies for zdf"  standard_name="vertically_integrated_vorticity_tendencies_zdf"   unit="s-2"      grid_ref="grid_W_2D" />
         <field id="dia_vor_mean-zdf"    long_name="vertical mean vorticity tendencies for zdf"  standard_name="vertical_mean_vorticity_tendencies_zdf"   unit="s-2"      grid_ref="grid_W_2D" />
+        <field id="dia_vor_int-bfr"    long_name="vertical integral vorticity tendencies for bfr"  standard_name="vertically_integrated_vorticity_tendencies_bfr"   unit="s-2"      grid_ref="grid_W_2D" />
+        <field id="dia_vor_mean-bfr"    long_name="vertical mean vorticity tendencies for bfr"  standard_name="vertical_mean_vorticity_tendencies_bfr"   unit="s-2"      grid_ref="grid_W_2D" />
+        <field id="dia_vor_int-atf"    long_name="vertical integral vorticity tendencies for atf"  standard_name="vertically_integrated_vorticity_tendencies_atf"   unit="s-2"      grid_ref="grid_W_2D" />
+        <field id="dia_vor_mean-atf"    long_name="vertical mean vorticity tendencies for atf"  standard_name="vertical_mean_vorticity_tendencies_atf"   unit="s-2"      grid_ref="grid_W_2D" />
       </field_group>
           
Index: branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/divcur.F90
===================================================================
--- branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/divcur.F90	(revision 8299)
+++ branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/divcur.F90	(revision 8300)
@@ -343,6 +343,5 @@
 
 
-   ! TODO - remove kt only used for validation
-   SUBROUTINE dyn_vrt_dia_3d( utend, vtend, id_dia_vor, kt)
+   SUBROUTINE dyn_vrt_dia_3d( utend, vtend, id_dia_vor)
 
       !!----------------------------------------------------------------------
@@ -360,5 +359,4 @@
       REAL             :: vtend(jpi,jpj,jpk) ! contribution to dv/dt
       CHARACTER(len=3) :: id_dia_vor         ! identifier for the diagnostic
-      INTEGER          :: kt                 ! ocean time-step index TODO remove after validation
       !
       !!----------------------------------------------------------------------
@@ -378,11 +376,4 @@
       ! Calculate the vertical integrals of utend & of vtend
       !
-      ! TODO remove - for validation only
-      IF ( kt == 1 ) THEN
-          WRITE(numout, *) 'dyn_vrt_dia_3d id:', id_dia_vor,       &
-                 &         ':bathy:', bathy(17,12),                &
-                 &         ':mbathy:', mbathy(17,12)
-      END IF
-      
       DO jk = 1, jpkm1
           DO jj = 2, jpjm1
@@ -392,31 +383,9 @@
                   v_int(ji,jj) = v_int(ji,jj) + ( vtend(ji,jj,jk) * fse3v(ji,jj,jk) &
                                  &                 * e2v(ji,jj) * vmask(ji,jj,jk) )
-
-                  ! TODO remove - for validation only
-                  IF ( kt == 1 .AND. ji == 17 .AND. jj == 12 ) THEN
-                      WRITE(numout, *) 'dyn_vrt_dia_3d id:', id_dia_vor,       &
-                             &         ' :ji: ',     ji,                       &
-                             &         ' :jj: ',     jj,                       &
-                             &         ' :jk: ',     jk,                       &
-                             &         ' :u_int:',   u_int(ji,jj),             &
-                             &         ' :u_tend: ', utend(ji,jj,jk),          &
-                             &         ' :e1u: ',    e1u(ji,jj),               &
-                             &         ' :umask: ',  umask(ji,jj,jk),          &
-                             &         ' :fse3u: ',  fse3u(ji,jj,jk)
-                      WRITE(numout, *) 'dyn_vrt_dia_3d id:', id_dia_vor,       &
-                             &         ' :ji: ',     ji,                       &
-                             &         ' :jj: ',     jj,                       &
-                             &         ' :jk: ',     jk,                       &
-                             &         ' :v_int:',   v_int(ji,jj),             &
-                             &         ' :v_tend: ', vtend(ji,jj,jk),          &
-                             &         ' :e2v: ',    e2v(ji,jj),               &
-                             &         ' :vmask: ',  vmask(ji,jj,jk),          &
-                             &         ' :fse3v: ',  fse3v(ji,jj,jk)
-                  END IF
               END DO
           END DO
       END DO
 
-      CALL dyn_vrt_dia_2d(u_int, v_int, id_dia_vor, kt)
+      CALL dyn_vrt_dia_2d(u_int, v_int, id_dia_vor)
 
       CALL wrk_dealloc(jpi, jpj, u_int)
@@ -426,6 +395,5 @@
 
 
-   ! TODO - remove kt only used for validation
-   SUBROUTINE dyn_vrt_dia_2d( u_int, v_int, id_dia_vor, kt)
+   SUBROUTINE dyn_vrt_dia_2d( u_int, v_int, id_dia_vor)
 
       !!----------------------------------------------------------------------
@@ -448,5 +416,4 @@
       REAL             :: v_int(jpi,jpj)  ! v vertical integral
       CHARACTER(len=3) :: id_dia_vor      ! identifier for the vorticity diagnostic
-      INTEGER          :: kt              ! ocean time-step index TODO remove after validation
       !
       !!----------------------------------------------------------------------
@@ -483,18 +450,4 @@
                   &              - ( u_int(ji,jj+1) - u_int(ji,jj) ) )   &
                   &            / ( e1f(ji,jj)    * e2f(ji,jj) )
-
-              ! TODO remove - for validation only
-              IF ( kt == 1 .AND. ji == 17 .AND. jj == 12 ) THEN
-                  WRITE(numout, *) 'dyn_vrt_dia_2d id:', id_dia_vor,     &
-                       &           ':ji:', ji,                           &
-                       &           ':jj:', jj,                           &
-                       &           ':vor_int:', vor_int(ji,jj),          &
-                       &           ':v_int(i+1):', v_int(ji+1,jj),       &
-                       &           ':v_int:', v_int(ji,jj),              &
-                       &           ':u_int:', u_int(ji,jj),              &
-                       &           ':u_int(j+1):', u_int(ji,jj+1),       &
-                       &           ':e1f:', e1f(ji,jj),                  &
-                       &           ':e2f:', e2f(ji,jj)
-              END IF
           END DO
       END DO
@@ -514,5 +467,5 @@
               ikbv = mbkv(ji,jj)
 
-              IF (ikbu .ne. 0.0_wp) THEN      ! Don't divide by 0!
+              IF (gdepw_n(ji,jj,ikbu+1) .ne. 0.0_wp) THEN      ! Don't divide by 0!
                   u_mn(ji,jj) = u_int(ji,jj) / gdepw_n(ji,jj,ikbu+1)
               ELSE
@@ -520,19 +473,8 @@
               END IF
 
-              IF (ikbv .ne. 0.0_wp) THEN      ! Don't divide by 0!
+              IF (gdepw_n(ji,jj,ikbv+1) .ne. 0.0_wp) THEN      ! Don't divide by 0!
                   v_mn(ji,jj) = v_int(ji,jj) / gdepw_n(ji,jj,ikbv+1)
               ELSE
                   v_mn(ji,jj) = 0.0_wp
-              END IF
-
-              ! TODO remove - for validation only
-              IF ( kt == 1 .AND. ji == 17 .AND. jj == 12 ) THEN
-                  WRITE(numout, *) 'dyn_vrt_dia_2d id:', id_dia_vor,          &
-                       &           ':gdepw_n(ikbu):', gdepw_n(ji,jj,ikbu+1),  &
-                       &           ':u_int:', u_int(ji,jj),                   &
-                       &           ':u_mn:', u_mn(ji,jj),                     &
-                       &           ':gdepw_n(ikbv):', gdepw_n(ji,jj,ikbv+1),  &
-                       &           ':v_int:', v_int(ji,jj),                   &
-                       &           ':v_mn:', v_mn(ji,jj)
               END IF
           END DO
@@ -549,18 +491,4 @@
                   &             - ( u_mn(ji,jj+1) - u_mn(ji,jj) ) )      &
                   &          / ( e1f(ji,jj)   * e2f(ji,jj) )
-
-              ! TODO remove - for validation only
-              IF ( kt == 1 .AND. ji == 17 .AND. jj == 12 ) THEN
-                  WRITE(numout, *) 'dyn_vrt_dia_2d id:', id_dia_vor,     &
-                       &           ':ji:', ji,                           &
-                       &           ':jj:', jj,                           &
-                       &           ':vor_mn:', vor_mn(ji,jj),            &
-                       &           ':v_mn(i+1):', v_mn(ji+1,jj),         &
-                       &           ':v_mn:', v_mn(ji,jj),                &
-                       &           ':u_mn:', u_mn(ji,jj),                &
-                       &           ':u_mn(j+1):', u_mn(ji,jj+1),         &
-                       &           ':e1f:', e1f(ji,jj),                  &
-                       &           ':e2f:', e2f(ji,jj)
-              END IF
           END DO
       END DO
@@ -568,5 +496,4 @@
       ! Multiply by the surface mask
       vor_mn(:,:) = vor_mn(:,:) * fmask(:,:,1)
-
 
       ! Call iom_put for the vertical integral vorticity tendencies
Index: branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynbfr.F90
===================================================================
--- branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynbfr.F90	(revision 8299)
+++ branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynbfr.F90	(revision 8300)
@@ -22,4 +22,5 @@
    USE timing         ! Timing
    USE wrk_nemo       ! Memory Allocation
+   USE divcur         ! for dyn_vrt_dia
 
    IMPLICIT NONE
@@ -52,4 +53,5 @@
       INTEGER  ::   ikbu, ikbv   ! local integers
       REAL(wp) ::   zm1_2dt      ! local scalar
+      CHARACTER(len=3) ::  id_dyn_vrt_bfr = "bfr"    ! TODO remove once flags set properly
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdu, ztrdv
       !!---------------------------------------------------------------------
@@ -65,5 +67,5 @@
         zm1_2dt = - 1._wp / ( 2._wp * rdt )
 
-        IF( l_trddyn )   THEN                      ! temporary save of ua and va trends
+        IF( l_trddyn .OR. ( id_dyn_vrt_bfr == "bfr" ) )   THEN                      ! temporary save of ua and va trends
            CALL wrk_alloc( jpi,jpj,jpk, ztrdu, ztrdv )
            ztrdu(:,:,:) = ua(:,:,:)
@@ -101,8 +103,13 @@
 
         !
-        IF( l_trddyn )   THEN                      ! save the vertical diffusive trends for further diagnostics
+        IF( l_trddyn .OR. ( id_dyn_vrt_bfr == "bfr" ) )   THEN                      ! save the vertical diffusive trends for further diagnostics
            ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
            ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
-           CALL trd_dyn( ztrdu(:,:,:), ztrdv(:,:,:), jpdyn_bfr, kt )
+           IF( l_trddyn )  THEN
+              CALL trd_dyn( ztrdu(:,:,:), ztrdv(:,:,:), jpdyn_bfr, kt )
+           ENDIF
+           IF( id_dyn_vrt_bfr == "bfr" )  THEN
+              CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_dyn_vrt_bfr )
+           ENDIF
            CALL wrk_dealloc( jpi,jpj,jpk, ztrdu, ztrdv )
         ENDIF
Index: branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90
===================================================================
--- branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 8299)
+++ branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 8300)
@@ -83,5 +83,6 @@
       !!             - send trends to trd_dyn for futher diagnostics (l_trddyn=T)
       !!----------------------------------------------------------------------
-      INTEGER, INTENT(in) ::   kt   ! ocean time-step index
+      INTEGER, INTENT(in) ::   kt                     ! ocean time-step index
+      CHARACTER(len=3)    ::   id_vrt_dia_hpg = "hpg" ! TODO remove once flags set properly
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdu, ztrdv
       !!----------------------------------------------------------------------
@@ -89,5 +90,5 @@
       IF( nn_timing == 1 )  CALL timing_start('dyn_hpg')
       !
-      IF( l_trddyn ) THEN                    ! Temporary saving of ua and va trends (l_trddyn)
+      IF( l_trddyn .or. ( id_vrt_dia_hpg == "hpg" ) ) THEN    ! Temporary saving of ua and va trends (l_trddyn)
          CALL wrk_alloc( jpi,jpj,jpk, ztrdu, ztrdv )
          ztrdu(:,:,:) = ua(:,:,:)
@@ -104,8 +105,14 @@
       END SELECT
       !
-      IF( l_trddyn ) THEN      ! save the hydrostatic pressure gradient trends for momentum trend diagnostics
+      IF( l_trddyn .or. ( id_vrt_dia_hpg == "hpg" ) ) THEN      ! save the hydrostatic pressure gradient trends for momentum trend diagnostics
          ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
          ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
-         CALL trd_dyn( ztrdu, ztrdv, jpdyn_hpg, kt )
+         !
+         IF( id_vrt_dia_hpg == "hpg" ) THEN
+             CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_vrt_dia_hpg )
+         END IF
+         IF( l_trddyn ) THEN
+             CALL trd_dyn( ztrdu, ztrdv, jpdyn_hpg, kt )
+         END IF
          CALL wrk_dealloc( jpi,jpj,jpk, ztrdu, ztrdv )
       ENDIF
@@ -379,13 +386,10 @@
       INTEGER, INTENT(in) ::   kt    ! ocean time-step index
       !!
-      CHARACTER(len=3) :: id_vrt_dia_hpg = "hpg" ! TODO remove once flags set properly
       INTEGER  ::   ji, jj, jk                 ! dummy loop indices
       REAL(wp) ::   zcoef0, zuap, zvap, znad   ! temporary scalars
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  zhpi, zhpj
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::  zuhpg, zvhpg
       !!----------------------------------------------------------------------
       !
       CALL wrk_alloc( jpi,jpj,jpk, zhpi, zhpj )
-      CALL wrk_alloc( jpi,jpj,jpk, zuhpg, zvhpg )
       !
       IF( kt == nit000 ) THEN
@@ -415,10 +419,7 @@
             zvap = -zcoef0 * ( rhd   (ji,jj+1,1) + rhd   (ji,jj,1) + 2._wp * znad )   &
                &           * ( fsde3w(ji,jj+1,1) - fsde3w(ji,jj,1) ) / e2v(ji,jj)
-            ! combine gradient and correction
-            zuhpg(ji,jj,1) = zhpi(ji,jj,1) + zuap
-            zvhpg(ji,jj,1) = zhpj(ji,jj,1) + zvap
             ! add to the general momentum trend
-            ua(ji,jj,1) = ua(ji,jj,1) + zuhpg(ji,jj,1)
-            va(ji,jj,1) = va(ji,jj,1) + zvhpg(ji,jj,1)
+            ua(ji,jj,1) = ua(ji,jj,1) + zhpi(ji,jj,1) + zuap
+            va(ji,jj,1) = va(ji,jj,1) + zhpj(ji,jj,1) + zvap
          END DO
       END DO
@@ -440,19 +441,10 @@
                zvap = -zcoef0 * ( rhd   (ji  ,jj+1,jk) + rhd   (ji,jj,jk) + 2._wp * znad )   &
                   &           * ( fsde3w(ji  ,jj+1,jk) - fsde3w(ji,jj,jk) ) / e2v(ji,jj)
-               ! combine gradient and correction
-               zuhpg(ji,jj,jk) = zhpi(ji,jj,jk) + zuap
-               zvhpg(ji,jj,jk) = zhpj(ji,jj,jk) + zvap
                ! add to the general momentum trend
-               ua(ji,jj,jk) = ua(ji,jj,jk) + zuhpg(ji,jj,jk)
-               va(ji,jj,jk) = va(ji,jj,jk) + zvhpg(ji,jj,jk)
+               ua(ji,jj,jk) = ua(ji,jj,jk) + zhpi(ji,jj,jk) + zuap
+               va(ji,jj,jk) = va(ji,jj,jk) + zhpj(ji,jj,jk) + zvap
             END DO
          END DO
       END DO
-      !
-      ! calculate dia_vor_int & dia_vor_mn if required
-      IF ( id_vrt_dia_hpg == "hpg" ) THEN
-          ! TODO - remove kt only used for validation
-          CALL dyn_vrt_dia_3d(zuhpg, zvhpg, id_vrt_dia_hpg, kt)
-      END IF
       !
       CALL wrk_dealloc( jpi,jpj,jpk, zhpi, zhpj )
Index: branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90
===================================================================
--- branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90	(revision 8299)
+++ branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90	(revision 8300)
@@ -72,11 +72,11 @@
       !!                 Hollingsworth et al., Quart. J. Roy. Meteor. Soc., 1983.
       !!----------------------------------------------------------------------
-      INTEGER, INTENT( in ) ::   kt         ! ocean time-step index
-      INTEGER, INTENT( in ) ::   kscheme    ! =0/1   type of KEG scheme 
+      INTEGER, INTENT( in ) ::   kt        ! ocean time-step index
+      INTEGER, INTENT( in ) ::   kscheme   ! =0/1   type of KEG scheme 
       !
       CHARACTER(len=3) :: id_vrt_dia_keg = "keg" ! TODO remove once flags set properly
-      INTEGER  ::  ji, jj, jk               ! dummy loop indices
-      REAL(wp) ::  zu, zv                   ! temporary scalars
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zhke, zhkei, zhkej
+      INTEGER  ::   ji, jj, jk             ! dummy loop indices
+      REAL(wp) ::   zu, zv                 ! temporary scalars
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zhke
       REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrdu, ztrdv 
       !!----------------------------------------------------------------------
@@ -84,5 +84,5 @@
       IF( nn_timing == 1 )   CALL timing_start('dyn_keg')
       !
-      CALL wrk_alloc( jpi,jpj,jpk,   zhke, zhkei, zhkej )
+      CALL wrk_alloc( jpi,jpj,jpk,   zhke )
       !
       IF( kt == nit000 ) THEN
@@ -92,5 +92,5 @@
       ENDIF
 
-      IF( l_trddyn ) THEN           ! Save ua and va trends
+      IF( l_trddyn .or. ( id_vrt_dia_keg == "keg" ) ) THEN           ! Save ua and va trends
          CALL wrk_alloc( jpi,jpj,jpk,   ztrdu, ztrdv )
          ztrdu(:,:,:) = ua(:,:,:) 
@@ -139,21 +139,22 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zhkei(ji,jj,jk) = - ( zhke(ji+1,jj  ,jk) - zhke(ji,jj,jk) ) / e1u(ji,jj)
-               zhkej(ji,jj,jk) = - ( zhke(ji  ,jj+1,jk) - zhke(ji,jj,jk) ) / e2v(ji,jj)
-               ua(ji,jj,jk) = ua(ji,jj,jk) + zhkei(ji,jj,jk)
-               va(ji,jj,jk) = va(ji,jj,jk) + zhkej(ji,jj,jk)
+               ua(ji,jj,jk) = ua(ji,jj,jk) - ( zhke(ji+1,jj  ,jk) - zhke(ji,jj,jk) ) / e1u(ji,jj)
+               va(ji,jj,jk) = va(ji,jj,jk) - ( zhke(ji  ,jj+1,jk) - zhke(ji,jj,jk) ) / e2v(ji,jj)
             END DO 
          END DO
       END DO
       !
-      IF ( id_vrt_dia_keg == "keg" ) THEN
-          ! TODO - remove kt only used for validation
-          CALL dyn_vrt_dia_3d(zhkei, zhkej, id_vrt_dia_keg, kt)
-      END IF
-      !
-      IF( l_trddyn ) THEN                 ! save the Kinetic Energy trends for diagnostic
+      IF( l_trddyn .or. ( id_vrt_dia_keg == "keg" ) ) THEN      ! save the Kinetic Energy trends for diagnostic
          ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
          ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
-         CALL trd_dyn( ztrdu, ztrdv, jpdyn_keg, kt )
+         !
+         IF( id_vrt_dia_keg == "keg" ) THEN
+             CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_vrt_dia_keg )
+         END IF
+         !
+         IF( l_trddyn ) THEN
+             CALL trd_dyn( ztrdu, ztrdv, jpdyn_keg, kt )
+         END IF
+         !
          CALL wrk_dealloc( jpi,jpj,jpk,   ztrdu, ztrdv )
       ENDIF
@@ -162,5 +163,5 @@
          &                       tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' )
       !
-      CALL wrk_dealloc( jpi,jpj,jpk,   zhke, zhkei, zhkej )
+      CALL wrk_dealloc( jpi,jpj,jpk,   zhke )
       !
       IF( nn_timing == 1 )   CALL timing_stop('dyn_keg')
Index: branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf.F90
===================================================================
--- branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf.F90	(revision 8299)
+++ branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf.F90	(revision 8300)
@@ -28,6 +28,7 @@
    USE lib_mpp        ! distribued memory computing library
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
-   USE wrk_nemo        ! Memory Allocation
-   USE timing          ! Timing
+   USE wrk_nemo       ! Memory Allocation
+   USE timing         ! Timing
+   USE divcur         ! Used by dyn_vrt_dia
 
    IMPLICIT NONE
@@ -57,4 +58,5 @@
       INTEGER, INTENT(in) ::   kt   ! ocean time-step index
       !
+      CHARACTER(len=3)    ::   id_vrt_dia_ldf = "ldf"  ! TODO Replace once proper flags in place
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdu, ztrdv
       !!----------------------------------------------------------------------
@@ -62,5 +64,5 @@
       IF( nn_timing == 1 )  CALL timing_start('dyn_ldf')
       !
-      IF( l_trddyn )   THEN                      ! temporary save of ta and sa trends
+      IF( l_trddyn .or. ( id_vrt_dia_ldf == "ldf" ) )   THEN               ! temporary save of ta and sa trends
          CALL wrk_alloc( jpi, jpj, jpk, ztrdu, ztrdv )
          ztrdu(:,:,:) = ua(:,:,:) 
@@ -103,8 +105,13 @@
       END SELECT
 
-      IF( l_trddyn ) THEN                        ! save the horizontal diffusive trends for further diagnostics
+      IF( l_trddyn .or. ( id_vrt_dia_ldf == "ldf" ) ) THEN    ! save the horizontal diffusive trends for further diagnostics
          ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
          ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
-         CALL trd_dyn( ztrdu, ztrdv, jpdyn_ldf, kt )
+         IF( id_vrt_dia_ldf == "ldf" ) THEN
+             CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_vrt_dia_ldf )
+         END IF
+         IF( l_trddyn ) THEN
+             CALL trd_dyn( ztrdu, ztrdv, jpdyn_ldf, kt )
+         END IF
          CALL wrk_dealloc( jpi, jpj, jpk, ztrdu, ztrdv )
       ENDIF
Index: branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilap.F90
===================================================================
--- branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilap.F90	(revision 8299)
+++ branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilap.F90	(revision 8300)
@@ -19,5 +19,4 @@
    USE dom_oce         ! ocean space and time domain
    USE ldfdyn_oce      ! ocean dynamics: lateral physics
-   USE divcur          ! for dyn_vrt_dia_3d
    !
    USE in_out_manager  ! I/O manager
@@ -76,9 +75,8 @@
       INTEGER, INTENT(in) ::   kt   ! ocean time-step index
       !
-      CHARACTER(len=3) :: id_vrt_dia_ldf = "ldf"  ! TODO remove once flags set properly
       INTEGER  ::   ji, jj, jk                  ! dummy loop indices
-      REAL(wp) ::   zbt, ze2u, ze2v             ! temporary scalar
+      REAL(wp) ::   zua, zva, zbt, ze2u, ze2v   ! temporary scalar
       REAL(wp), POINTER, DIMENSION(:,:  ) :: zcu, zcv
-      REAL(wp), POINTER, DIMENSION(:,:,:) :: zuf, zut, zlu, zlv, zua, zva
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zuf, zut, zlu, zlv
       !!----------------------------------------------------------------------
       !
@@ -86,5 +84,5 @@
       !
       CALL wrk_alloc( jpi, jpj,      zcu, zcv           )
-      CALL wrk_alloc( jpi, jpj, jpk, zuf, zut, zlu, zlv, zua, zva ) 
+      CALL wrk_alloc( jpi, jpj, jpk, zuf, zut, zlu, zlv ) 
       !
       IF( kt == nit000 .AND. lwp ) THEN
@@ -192,15 +190,13 @@
                ze2u = e2u(ji,jj) * fse3u(ji,jj,jk)
                ze2v = e1v(ji,jj) * fse3v(ji,jj,jk)
-               ! horizontal biharmonic diffusive trends multiplied by the
-               ! eddy viscosity coef. (at u- and v-points)
-               zua(ji,jj,jk) = ( - ( zuf(ji  ,jj,jk) - zuf(ji,jj-1,jk) ) / ze2u   &
-                  &  + ( zut(ji+1,jj,jk) - zut(ji,jj  ,jk) ) / e1u(ji,jj) )       &
-                  &  * ( fsahmu(ji,jj,jk)*nkahm_smag +(1 -nkahm_smag ))
-               zva(ji,jj,jk) = ( + ( zuf(ji,jj  ,jk) - zuf(ji-1,jj,jk) ) / ze2v   &
-                  &  + ( zut(ji,jj+1,jk) - zut(ji  ,jj,jk) ) / e2v(ji,jj) )       &
-                  &  * ( fsahmv(ji,jj,jk)*nkahm_smag +(1 -nkahm_smag ))
+               ! horizontal biharmonic diffusive trends
+               zua = - ( zuf(ji  ,jj,jk) - zuf(ji,jj-1,jk) ) / ze2u   &
+                  &  + ( zut(ji+1,jj,jk) - zut(ji,jj  ,jk) ) / e1u(ji,jj)
+
+               zva = + ( zuf(ji,jj  ,jk) - zuf(ji-1,jj,jk) ) / ze2v   &
+                  &  + ( zut(ji,jj+1,jk) - zut(ji  ,jj,jk) ) / e2v(ji,jj)
                ! add it to the general momentum trends
-               ua(ji,jj,jk) = ua(ji,jj,jk) + zua(ji,jj,jk)
-               va(ji,jj,jk) = va(ji,jj,jk) + zva(ji,jj,jk)
+               ua(ji,jj,jk) = ua(ji,jj,jk) + zua * ( fsahmu(ji,jj,jk)*nkahm_smag +(1 -nkahm_smag ))
+               va(ji,jj,jk) = va(ji,jj,jk) + zva * ( fsahmv(ji,jj,jk)*nkahm_smag +(1 -nkahm_smag ))
             END DO
          END DO
@@ -209,11 +205,6 @@
       END DO                                           !   End of slab
       !                                                ! ===============
-      IF ( id_vrt_dia_ldf == "ldf" ) THEN
-          ! TODO - remove kt only used for validation
-          CALL dyn_vrt_dia_3d(zua, zva, id_vrt_dia_ldf, kt)
-      END IF
-      !
       CALL wrk_dealloc( jpi, jpj,      zcu, zcv           )
-      CALL wrk_dealloc( jpi, jpj, jpk, zuf, zut, zlu, zlv, zua, zva ) 
+      CALL wrk_dealloc( jpi, jpj, jpk, zuf, zut, zlu, zlv ) 
       !
       IF( nn_timing == 1 )  CALL timing_stop('dyn_ldf_bilap')
Index: branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90
===================================================================
--- branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 8299)
+++ branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 8300)
@@ -46,4 +46,5 @@
    USE prtctl          ! Print control
    USE timing          ! Timing
+   USE divcur          ! for dyn_vrt_dia
 #if defined key_agrif
    USE agrif_opa_interp
@@ -106,4 +107,5 @@
       REAL(wp) ::   zue3a, zue3n, zue3b, zuf, zec      ! local scalars
       REAL(wp) ::   zve3a, zve3n, zve3b, zvf, z1_2dt   !   -      -
+      CHARACTER(len=3) ::  id_dyn_vrt_atf = "atf"      ! TODO remove once flags done
       REAL(wp), POINTER, DIMENSION(:,:)   ::  zue, zve
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  ze3u_f, ze3v_f, zua, zva 
@@ -203,16 +205,18 @@
 #endif
 
-      IF( l_trddyn ) THEN             ! prepare the atf trend computation + some diagnostics
+      IF( l_trddyn .OR. ( id_dyn_vrt_atf == "atf" ) ) THEN             ! prepare the atf trend computation + some diagnostics
          z1_2dt = 1._wp / (2. * rdt)        ! Euler or leap-frog time step 
-         IF( neuler == 0 .AND. kt == nit000 )   z1_2dt = 1._wp / rdt
-         !
-         !                                  ! Kinetic energy and Conversion
-         IF( ln_KE_trd  )   CALL trd_dyn( ua, va, jpdyn_ken, kt )
-         !
-         IF( ln_dyn_trd ) THEN              ! 3D output: total momentum trends
-            zua(:,:,:) = ( ua(:,:,:) - ub(:,:,:) ) * z1_2dt
-            zva(:,:,:) = ( va(:,:,:) - vb(:,:,:) ) * z1_2dt
-            CALL iom_put( "utrd_tot", zua )        ! total momentum trends, except the asselin time filter
-            CALL iom_put( "vtrd_tot", zva )
+         IF( l_trddyn )  THEN
+            IF( neuler == 0 .AND. kt == nit000 )   z1_2dt = 1._wp / rdt
+            !
+            !                                  ! Kinetic energy and Conversion
+            IF( ln_KE_trd  )   CALL trd_dyn( ua, va, jpdyn_ken, kt )
+            !
+            IF( ln_dyn_trd ) THEN              ! 3D output: total momentum trends
+               zua(:,:,:) = ( ua(:,:,:) - ub(:,:,:) ) * z1_2dt
+               zva(:,:,:) = ( va(:,:,:) - vb(:,:,:) ) * z1_2dt
+               CALL iom_put( "utrd_tot", zua )        ! total momentum trends, except the asselin time filter
+               CALL iom_put( "vtrd_tot", zva )
+            ENDIF
          ENDIF
          !
@@ -392,8 +396,13 @@
       !
 
-      IF( l_trddyn ) THEN                ! 3D output: asselin filter trends on momentum
+      IF( l_trddyn .OR. ( id_dyn_vrt_atf == "atf" ) ) THEN                ! 3D output: asselin filter trends on momentum
          zua(:,:,:) = ( ub(:,:,:) - zua(:,:,:) ) * z1_2dt
          zva(:,:,:) = ( vb(:,:,:) - zva(:,:,:) ) * z1_2dt
-         CALL trd_dyn( zua, zva, jpdyn_atf, kt )
+         IF( id_dyn_vrt_atf == "atf" ) THEN                ! 3D output: asselin filter trends on momentum
+            CALL dyn_vrt_dia_3d( zua, zva, id_dyn_vrt_atf )
+         ENDIF
+         IF( l_trddyn ) THEN                ! 3D output: asselin filter trends on momentum
+            CALL trd_dyn( zua, zva, jpdyn_atf, kt )
+         ENDIF
       ENDIF
       !
Index: branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90
===================================================================
--- branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 8299)
+++ branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 8300)
@@ -35,4 +35,5 @@
    USE wrk_nemo       ! Memory Allocation
    USE timing         ! Timing
+   USE divcur         ! for dyn_vrt_dia_3d
 
 
@@ -89,4 +90,5 @@
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdu, ztrdv
       REAL(wp), POINTER, DIMENSION(:,:)   ::  zpice
+      CHARACTER(len=3) ::  id_vrt_dia_spg = "spg"          ! TODO remove once flags set properly
       !!----------------------------------------------------------------------
       !
@@ -99,5 +101,5 @@
 
 
-      IF( l_trddyn )   THEN                      ! temporary save of ta and sa trends
+      IF( l_trddyn .or. ( id_vrt_dia_spg == "spg" ) )   THEN      ! temporary save of ta and sa trends
          CALL wrk_alloc( jpi, jpj, jpk, ztrdu, ztrdv ) 
          ztrdu(:,:,:) = ua(:,:,:)
@@ -188,5 +190,5 @@
       END SELECT
       !                    
-      IF( l_trddyn )   THEN                      ! save the surface pressure gradient trends for further diagnostics
+      IF( l_trddyn .or. ( id_vrt_dia_spg == "spg" ) )   THEN      ! save the surface pressure gradient trends for further diagnostics
          SELECT CASE ( nspg )
          CASE ( 0, 1 )
@@ -199,5 +201,12 @@
             ztrdv(:,:,:) = ( va(:,:,:) - vb(:,:,:) ) / z2dt - ztrdv(:,:,:)
          END SELECT
-         CALL trd_dyn( ztrdu, ztrdv, jpdyn_spg, kt )
+         !
+         IF( id_vrt_dia_spg == "spg" ) THEN
+             CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_vrt_dia_spg )
+         END IF
+         !
+         IF( l_trddyn ) THEN
+             CALL trd_dyn( ztrdu, ztrdv, jpdyn_spg, kt )
+         END IF
          !
          CALL wrk_dealloc( jpi, jpj, jpk, ztrdu, ztrdv ) 
Index: branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90
===================================================================
--- branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 8299)
+++ branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 8300)
@@ -48,5 +48,4 @@
    USE lib_fortran
    USE timing          ! Timing
-   USE divcur          ! for dyn_vrt_dia_3d
 #if defined key_agrif
    USE agrif_opa_interp
@@ -109,5 +108,4 @@
       INTEGER, INTENT(  out) ::   kindic   ! solver convergence flag (<0 if not converge)
       !
-      CHARACTER(len=3) ::  id_vrt_dia_spg = "spg" ! TODO remove once flags set properly
       INTEGER  ::   ji, jj, jk   ! dummy loop indices
       REAL(wp) ::   z2dt, z2dtg, zgcb, zbtd, ztdgu, ztdgv   ! local scalars
@@ -132,8 +130,4 @@
          !                                                        ! gcx, gcxb
       ENDIF
-
-      IF ( l_trddyn .OR. ( id_vrt_dia_spg == "spg" ) )   THEN
-         CALL wrk_alloc( jpi, jpj, jpk, ztrdu, ztrdv )
-      END IF
 
       ! Local constant initialization
@@ -190,6 +184,6 @@
          END DO
          !
-                                          ! temporary save of spg trends
-         IF ( l_trddyn .OR. ( id_vrt_dia_spg == "spg" ) )   THEN
+         IF( l_trddyn )   THEN                      ! temporary save of spg trends
+            CALL wrk_alloc( jpi, jpj, jpk, ztrdu, ztrdv )
             DO jk = 1, jpkm1              ! unweighted time stepping 
                DO jj = 2, jpjm1
@@ -334,25 +328,23 @@
 #endif      
 
-      IF ( l_trddyn .OR. ( id_vrt_dia_spg == "spg" ) )   THEN                     
+      IF( l_trddyn )   THEN                     
          ztrdu(:,:,:) = ua(:,:,:)                 ! save the after velocity before the filtered SPG
          ztrdv(:,:,:) = va(:,:,:)
          !
-         IF ( l_trddyn ) THEN
-            CALL wrk_alloc( jpi, jpj, zpw )
-            !
-            zpw(:,:) = - z2dt * gcx(:,:)
-            CALL iom_put( "ssh_flt" , zpw )          ! output equivalent ssh modification due to implicit filter
-            !
-            !                                        ! save surface pressure flux: -pw at z=0
-            zpw(:,:) = - rau0 * grav * sshn(:,:) * wn(:,:,1) * tmask(:,:,1)
-            CALL iom_put( "pw0_exp" , zpw )
-            zpw(:,:) = wn(:,:,1)
-            CALL iom_put( "w0" , zpw )
-            zpw(:,:) =  rau0 * z2dtg * gcx(:,:) * wn(:,:,1) * tmask(:,:,1)
-            CALL iom_put( "pw0_flt" , zpw )
-            !
-            CALL wrk_dealloc( jpi, jpj, zpw ) 
-            !                                   
-         ENDIF
+         CALL wrk_alloc( jpi, jpj, zpw )
+         !
+         zpw(:,:) = - z2dt * gcx(:,:)
+         CALL iom_put( "ssh_flt" , zpw )          ! output equivalent ssh modification due to implicit filter
+         !
+         !                                        ! save surface pressure flux: -pw at z=0
+         zpw(:,:) = - rau0 * grav * sshn(:,:) * wn(:,:,1) * tmask(:,:,1)
+         CALL iom_put( "pw0_exp" , zpw )
+         zpw(:,:) = wn(:,:,1)
+         CALL iom_put( "w0" , zpw )
+         zpw(:,:) =  rau0 * z2dtg * gcx(:,:) * wn(:,:,1) * tmask(:,:,1)
+         CALL iom_put( "pw0_flt" , zpw )
+         !
+         CALL wrk_dealloc( jpi, jpj, zpw ) 
+         !                                   
       ENDIF
       
@@ -371,16 +363,8 @@
       END DO
 
-      IF ( l_trddyn .OR. ( id_vrt_dia_spg == "spg" ) )   THEN                      ! save the explicit SPG trends for further diagnostics
+      IF( l_trddyn )   THEN                      ! save the explicit SPG trends for further diagnostics
          ztrdu(:,:,:) = ( ua(:,:,:) - ztrdu(:,:,:) ) / z2dt
          ztrdv(:,:,:) = ( va(:,:,:) - ztrdv(:,:,:) ) / z2dt
-         !
-         IF ( l_trddyn ) THEN
-            CALL trd_dyn( ztrdu, ztrdv, jpdyn_spgflt, kt )
-         END IF
-         !
-         IF ( id_vrt_dia_spg == "spg" ) THEN
-            ! TODO remove kt after validation
-            CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_vrt_dia_spg, kt )
-         END IF
+         CALL trd_dyn( ztrdu, ztrdv, jpdyn_spgflt, kt )
          !
          CALL wrk_dealloc( jpi, jpj, jpk, ztrdu, ztrdv ) 
Index: branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90
===================================================================
--- branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 8299)
+++ branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 8300)
@@ -81,4 +81,6 @@
       INTEGER, INTENT( in ) ::   kt   ! ocean time-step index
       !
+      CHARACTER(len=3)      ::   id_vrt_dia_rvo = "rvo"      ! TODO remove once flags set properly
+      CHARACTER(len=3)      ::   id_vrt_dia_pvo = "pvo"      ! TODO remove once flags set properly
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdu, ztrdv
       !!----------------------------------------------------------------------
@@ -86,5 +88,5 @@
       IF( nn_timing == 1 )  CALL timing_start('dyn_vor')
       !
-      IF( l_trddyn )   CALL wrk_alloc( jpi,jpj,jpk, ztrdu, ztrdv )
+      IF( l_trddyn .or. ( id_vrt_dia_rvo == "rvo" ) )   CALL wrk_alloc( jpi,jpj,jpk, ztrdu, ztrdv )
       !
       !                                          ! vorticity term 
@@ -106,5 +108,5 @@
          !
       CASE ( 0 )                                       ! energy conserving scheme
-         IF( l_trddyn )   THEN
+         IF( l_trddyn .or. ( id_vrt_dia_rvo == "rvo" ) )   THEN
             ztrdu(:,:,:) = ua(:,:,:)
             ztrdv(:,:,:) = va(:,:,:)
@@ -112,5 +114,10 @@
             ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
             ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
-            CALL trd_dyn( ztrdu, ztrdv, jpdyn_rvo, kt )
+            IF( l_trddyn ) THEN
+                CALL trd_dyn( ztrdu, ztrdv, jpdyn_rvo, kt )
+            END IF
+            IF( id_vrt_dia_rvo == "rvo" ) THEN
+                CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_vrt_dia_rvo )
+            END IF
             ztrdu(:,:,:) = ua(:,:,:)
             ztrdv(:,:,:) = va(:,:,:)
@@ -118,5 +125,10 @@
             ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
             ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
-            CALL trd_dyn( ztrdu, ztrdv, jpdyn_pvo, kt )
+            IF( l_trddyn ) THEN
+                CALL trd_dyn( ztrdu, ztrdv, jpdyn_pvo, kt )
+            END IF
+            IF( id_vrt_dia_pvo == "pvo" ) THEN
+                CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_vrt_dia_pvo )
+            END IF
          ELSE
             CALL vor_ene( kt, ntot, ua, va )                ! total vorticity
@@ -124,5 +136,5 @@
          !
       CASE ( 1 )                                       ! enstrophy conserving scheme
-         IF( l_trddyn )   THEN    
+         IF( l_trddyn .or. ( id_vrt_dia_rvo == "rvo" ) )   THEN
             ztrdu(:,:,:) = ua(:,:,:)
             ztrdv(:,:,:) = va(:,:,:)
@@ -130,5 +142,10 @@
             ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
             ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
-            CALL trd_dyn( ztrdu, ztrdv, jpdyn_rvo, kt )
+            IF( l_trddyn ) THEN
+                CALL trd_dyn( ztrdu, ztrdv, jpdyn_rvo, kt )
+            END IF
+            IF( id_vrt_dia_rvo == "rvo" ) THEN
+                CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_vrt_dia_rvo )
+            END IF
             ztrdu(:,:,:) = ua(:,:,:)
             ztrdv(:,:,:) = va(:,:,:)
@@ -136,5 +153,10 @@
             ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
             ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
-            CALL trd_dyn( ztrdu, ztrdv, jpdyn_pvo, kt )
+            IF( l_trddyn ) THEN
+                CALL trd_dyn( ztrdu, ztrdv, jpdyn_pvo, kt )
+            END IF
+            IF( id_vrt_dia_pvo == "pvo" ) THEN
+                CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_vrt_dia_pvo )
+            END IF
          ELSE
             CALL vor_ens( kt, ntot, ua, va )                ! total vorticity
@@ -142,5 +164,5 @@
          !
       CASE ( 2 )                                       ! mixed ene-ens scheme
-         IF( l_trddyn )   THEN
+         IF( l_trddyn .or. ( id_vrt_dia_rvo == "rvo" ) )   THEN
             ztrdu(:,:,:) = ua(:,:,:)
             ztrdv(:,:,:) = va(:,:,:)
@@ -148,5 +170,10 @@
             ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
             ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
-            CALL trd_dyn( ztrdu, ztrdv, jpdyn_rvo, kt )
+            IF( l_trddyn ) THEN
+                CALL trd_dyn( ztrdu, ztrdv, jpdyn_rvo, kt )
+            END IF
+            IF( id_vrt_dia_rvo == "rvo" ) THEN
+                CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_vrt_dia_rvo )
+            END IF
             ztrdu(:,:,:) = ua(:,:,:)
             ztrdv(:,:,:) = va(:,:,:)
@@ -154,5 +181,10 @@
             ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
             ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
-            CALL trd_dyn( ztrdu, ztrdv, jpdyn_pvo, kt )
+            IF( l_trddyn ) THEN
+                CALL trd_dyn( ztrdu, ztrdv, jpdyn_pvo, kt )
+            END IF
+            IF( id_vrt_dia_pvo == "pvo" ) THEN
+                CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_vrt_dia_pvo )
+            END IF
          ELSE
             CALL vor_mix( kt )                               ! total vorticity (mix=ens-ene)
@@ -160,5 +192,5 @@
          !
       CASE ( 3 )                                       ! energy and enstrophy conserving scheme
-         IF( l_trddyn )   THEN
+         IF( l_trddyn .or. ( id_vrt_dia_rvo == "rvo" ) )   THEN
             ztrdu(:,:,:) = ua(:,:,:)
             ztrdv(:,:,:) = va(:,:,:)
@@ -166,5 +198,10 @@
             ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
             ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
-            CALL trd_dyn( ztrdu, ztrdv, jpdyn_rvo, kt )
+            IF( l_trddyn ) THEN
+                CALL trd_dyn( ztrdu, ztrdv, jpdyn_rvo, kt )
+            END IF
+            IF( id_vrt_dia_rvo == "rvo" ) THEN
+                CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_vrt_dia_rvo )
+            END IF
             ztrdu(:,:,:) = ua(:,:,:)
             ztrdv(:,:,:) = va(:,:,:)
@@ -172,5 +209,10 @@
             ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
             ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
-            CALL trd_dyn( ztrdu, ztrdv, jpdyn_pvo, kt )
+            IF( l_trddyn ) THEN
+                CALL trd_dyn( ztrdu, ztrdv, jpdyn_pvo, kt )
+            END IF
+            IF( id_vrt_dia_pvo == "pvo" ) THEN
+                CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_vrt_dia_pvo )
+            END IF
          ELSE
             CALL vor_een( kt, ntot, ua, va )                ! total vorticity
@@ -183,5 +225,5 @@
          &                     tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' )
       !
-      IF( l_trddyn )   CALL wrk_dealloc( jpi,jpj,jpk, ztrdu, ztrdv )
+      IF( l_trddyn .or. (id_vrt_dia_rvo == "rvo" ) )   CALL wrk_dealloc( jpi,jpj,jpk, ztrdu, ztrdv )
       !
       IF( nn_timing == 1 )  CALL timing_stop('dyn_vor')
@@ -561,13 +603,11 @@
       REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) ::   pva    ! total v-trend
       !!
-      CHARACTER(len=3) :: id_vrt_dia_vor = "vor"                  ! TODO remove once flags set properly
       INTEGER  ::   ji, jj, jk                                    ! dummy loop indices
       INTEGER  ::   ierr                                          ! local integer
-      REAL(wp) ::   zfac12                                        ! local scalars
+      REAL(wp) ::   zfac12, zua, zva                              ! local scalars
       REAL(wp) ::   zmsk, ze3                                     ! local scalars
       !                                                           !  3D workspace 
       REAL(wp), POINTER    , DIMENSION(:,:  )         :: zwx, zwy, zwz
       REAL(wp), POINTER    , DIMENSION(:,:  )         :: ztnw, ztne, ztsw, ztse
-      REAL(wp), POINTER    , DIMENSION(:,:,:)         :: zua, zva
 #if defined key_vvl
       REAL(wp), POINTER    , DIMENSION(:,:,:)         :: ze3f     !  3D workspace (lk_vvl=T)
@@ -581,5 +621,4 @@
       CALL wrk_alloc( jpi, jpj,      zwx , zwy , zwz        ) 
       CALL wrk_alloc( jpi, jpj,      ztnw, ztne, ztsw, ztse ) 
-      CALL wrk_alloc( jpi, jpj, jpk, zua, zva               ) 
 #if defined key_vvl
       CALL wrk_alloc( jpi, jpj, jpk, ze3f                   )
@@ -691,14 +730,10 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zua(ji,jj,jk) = + zfac12 / 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) )
-               zva(ji,jj,jk) = - zfac12 / e2v(ji,jj) * (  ztsw(ji,jj+1) * zwx(ji-1,jj+1)     &
-                  &                                     + ztse(ji,jj+1) * zwx(ji  ,jj+1)     &
-                  &                                     + ztnw(ji,jj  ) * zwx(ji-1,jj  )     &
-                  &                                     + ztne(ji,jj  ) * zwx(ji  ,jj  ) )
-               pua(ji,jj,jk) = pua(ji,jj,jk) + zua(ji,jj,jk)
-               pva(ji,jj,jk) = pva(ji,jj,jk) + zva(ji,jj,jk)
+               zua = + zfac12 / 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) )
+               zva = - zfac12 / e2v(ji,jj) * (  ztsw(ji,jj+1) * zwx(ji-1,jj+1) + ztse(ji,jj+1) * zwx(ji  ,jj+1)   &
+                  &                           + ztnw(ji,jj  ) * zwx(ji-1,jj  ) + ztne(ji,jj  ) * zwx(ji  ,jj  ) )
+               pua(ji,jj,jk) = pua(ji,jj,jk) + zua
+               pva(ji,jj,jk) = pva(ji,jj,jk) + zva
             END DO  
          END DO  
@@ -706,12 +741,6 @@
       END DO                                           !   End of slab
       !                                                ! ===============
-      IF ( id_vrt_dia_vor == "vor" ) THEN
-          ! TODO - remove kt only used for validation
-          CALL dyn_vrt_dia_3d(zua, zva, id_vrt_dia_vor, kt)
-      END IF
-      !
       CALL wrk_dealloc( jpi, jpj,      zwx , zwy , zwz        ) 
       CALL wrk_dealloc( jpi, jpj,      ztnw, ztne, ztsw, ztse ) 
-      CALL wrk_dealloc( jpi, jpj, jpk, zua, zva               ) 
 #if defined key_vvl
       CALL wrk_dealloc( jpi, jpj, jpk, ze3f                   )
Index: branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90
===================================================================
--- branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90	(revision 8299)
+++ branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90	(revision 8300)
@@ -61,9 +61,9 @@
       !
       CHARACTER(len=3) :: id_vrt_dia_zad = "zad" ! TODO remove once flags set properly
-      INTEGER  ::   ji, jj, jk                ! dummy loop indices
+      INTEGER  ::   ji, jj, jk                   ! dummy loop indices
+      INTEGER  ::   zua, zva                     ! temporary scalars
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  zwuw , zwvw
       REAL(wp), POINTER, DIMENSION(:,:  ) ::  zww
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdu, ztrdv
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::  zua, zva
       !!----------------------------------------------------------------------
       !
@@ -71,5 +71,5 @@
       !
       CALL wrk_alloc( jpi,jpj, zww ) 
-      CALL wrk_alloc( jpi,jpj,jpk, zwuw , zwvw, zua, zva ) 
+      CALL wrk_alloc( jpi,jpj,jpk, zwuw , zwvw )
       !
       IF( kt == nit000 ) THEN
@@ -78,5 +78,5 @@
       ENDIF
 
-      IF( l_trddyn )   THEN         ! Save ua and va trends
+      IF( l_trddyn .OR. ( id_vrt_dia_zad == "zad" ) )   THEN         ! Save ua and va trends
          CALL wrk_alloc( jpi, jpj, jpk, ztrdu, ztrdv ) 
          ztrdu(:,:,:) = ua(:,:,:) 
@@ -123,19 +123,25 @@
             DO ji = fs_2, fs_jpim1       ! vector opt.
                !                         ! vertical momentum advective trends
-               zua(ji,jj,jk) = - ( zwuw(ji,jj,jk) + zwuw(ji,jj,jk+1) ) /            &
-                   &                ( e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk) )
-               zva(ji,jj,jk) = - ( zwvw(ji,jj,jk) + zwvw(ji,jj,jk+1) ) /            &
-                   &                ( e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk) )
+               zua = - ( zwuw(ji,jj,jk) + zwuw(ji,jj,jk+1) ) / ( e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk) )
+               zva = - ( zwvw(ji,jj,jk) + zwvw(ji,jj,jk+1) ) / ( e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk) )
                !                         ! add the trends to the general momentum trends
-               ua(ji,jj,jk) = ua(ji,jj,jk) + zua(ji,jj,jk)
-               va(ji,jj,jk) = va(ji,jj,jk) + zva(ji,jj,jk)
+               ua(ji,jj,jk) = ua(ji,jj,jk) + zua
+               va(ji,jj,jk) = va(ji,jj,jk) + zva
             END DO  
          END DO  
       END DO
 
-      IF( l_trddyn ) THEN           ! save the vertical advection trends for diagnostic
+      IF( l_trddyn .OR. ( id_vrt_dia_zad == "zad" ) ) THEN      ! save the vertical advection trends for diagnostic
          ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
          ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
-         CALL trd_dyn( ztrdu, ztrdv, jpdyn_zad, kt )
+         !
+         IF( id_vrt_dia_zad == "zad" ) THEN
+             CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_vrt_dia_zad )
+         ENDIF
+         !
+         IF( l_trddyn ) THEN
+             CALL trd_dyn( ztrdu, ztrdv, jpdyn_zad, kt )
+         ENDIF
+         !
          CALL wrk_dealloc( jpi, jpj, jpk, ztrdu, ztrdv ) 
       ENDIF
@@ -144,11 +150,6 @@
          &                       tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' )
       !
-      IF ( id_vrt_dia_zad == "zad" ) THEN
-          ! TODO - remove kt only used for validation
-          CALL dyn_vrt_dia_3d(zua, zva, id_vrt_dia_zad, kt)
-      END IF
-      !
       CALL wrk_dealloc( jpi,jpj, zww ) 
-      CALL wrk_dealloc( jpi,jpj,jpk, zwuw , zwvw, zua, zva ) 
+      CALL wrk_dealloc( jpi,jpj,jpk, zwuw , zwvw )
       !
       IF( nn_timing == 1 )  CALL timing_stop('dyn_zad')
Index: branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90
===================================================================
--- branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90	(revision 8299)
+++ branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90	(revision 8300)
@@ -27,4 +27,5 @@
    USE wrk_nemo        ! Memory Allocation
    USE timing          ! Timing
+   USE divcur          ! for dyn_vrt_dia
 
    IMPLICIT NONE
@@ -59,4 +60,5 @@
       !
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdu, ztrdv
+      CHARACTER(len=3) :: id_vrt_dia_zdf = "zdf"   ! TODO remove once flags properly set
       !!---------------------------------------------------------------------
       !
@@ -68,5 +70,5 @@
       ENDIF
 
-      IF( l_trddyn )   THEN                      ! temporary save of ta and sa trends
+      IF( l_trddyn .or. ( id_vrt_dia_zdf == "zdf" ) )   THEN      ! temporary save of ta and sa trends
          CALL wrk_alloc( jpi, jpj, jpk, ztrdu, ztrdv ) 
          ztrdu(:,:,:) = ua(:,:,:)
@@ -88,8 +90,16 @@
       END SELECT
 
-      IF( l_trddyn )   THEN                      ! save the vertical diffusive trends for further diagnostics
+      IF( l_trddyn .or. ( id_vrt_dia_zdf == "zdf" ) )   THEN      ! save the vertical diffusive trends for further diagnostics
          ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
          ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
-         CALL trd_dyn( ztrdu, ztrdv, jpdyn_zdf, kt )
+         !
+         IF( id_vrt_dia_zdf == "zdf" ) THEN
+             CALL dyn_vrt_dia_3d( ztrdu, ztrdv, id_vrt_dia_zdf )
+         END IF
+         !
+         IF( l_trddyn ) THEN
+             CALL trd_dyn( ztrdu, ztrdv, jpdyn_zdf, kt )
+         END IF
+         !
          CALL wrk_dealloc( jpi, jpj, jpk, ztrdu, ztrdv ) 
       ENDIF
Index: branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90
===================================================================
--- branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 8299)
+++ branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 8300)
@@ -26,5 +26,4 @@
    USE timing          ! Timing
    USE dynadv          ! dynamics: vector invariant versus flux form
-   USE divcur          ! for dyn_vrt_dia_3d
    USE dynspg_oce, ONLY: lk_dynspg_ts
 
@@ -67,5 +66,4 @@
       REAL(wp), INTENT(in) ::  p2dt   ! vertical profile of tracer time-step
       !!
-      CHARACTER(len=3) ::   id_vrt_dia_zdf = "zdf" ! TODO remove once flags set properly
       INTEGER  ::   ji, jj, jk   ! dummy loop indices
       INTEGER  ::   ikbu, ikbv   ! local integers
@@ -73,5 +71,4 @@
       REAL(wp) ::   ze3ua, ze3va
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  zwi, zwd, zws
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::  zua, zva
       !!----------------------------------------------------------------------
       !
@@ -79,5 +76,4 @@
       !
       CALL wrk_alloc( jpi,jpj,jpk, zwi, zwd, zws ) 
-      CALL wrk_alloc( jpi,jpj,jpk, zua, zva      ) 
       !
       IF( kt == nit000 ) THEN
@@ -261,18 +257,14 @@
       END DO
 
-      IF ( ( .NOT. lk_dynspg_ts ) .OR. ( id_vrt_dia_zdf == "zdf" ) ) THEN
+#if ! defined key_dynspg_ts
       ! Normalization to obtain the general momentum trend ua
-          DO jk = 1, jpkm1
-             DO jj = 2, jpjm1   
-                DO ji = fs_2, fs_jpim1   ! vector opt.
-                   zua(ji,jj,jk) = ( ua(ji,jj,jk) - ub(ji,jj,jk) ) * z1_p2dt
-                END DO
-             END DO
-          END DO
-          IF ( .NOT. lk_dynspg_ts ) THEN
-             ua(:,:,:) = zua(:,:,:)
-          END IF
-      END IF
-
+      DO jk = 1, jpkm1
+         DO jj = 2, jpjm1   
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               ua(ji,jj,jk) = ( ua(ji,jj,jk) - ub(ji,jj,jk) ) * z1_p2dt
+            END DO
+         END DO
+      END DO
+#endif
 
       ! 3. Vertical diffusion on v
@@ -365,21 +357,14 @@
       END DO
 
-      IF ( ( .NOT. lk_dynspg_ts ) .OR. ( id_vrt_dia_zdf == "zdf" ) ) THEN
       ! Normalization to obtain the general momentum trend va
-          DO jk = 1, jpkm1
-             DO jj = 2, jpjm1   
-                DO ji = fs_2, fs_jpim1   ! vector opt.
-                   zva(ji,jj,jk) = ( va(ji,jj,jk) - vb(ji,jj,jk) ) * z1_p2dt
-                END DO
-             END DO
-          END DO
-          IF ( id_vrt_dia_zdf == "zdf" ) THEN
-              ! TODO - remove kt only used for validation
-              CALL dyn_vrt_dia_3d(zua, zva, id_vrt_dia_zdf, kt)
-          END IF
-          IF ( .NOT. lk_dynspg_ts ) THEN
-             va(:,:,:) = zva(:,:,:)
-          END IF
-      END IF
+#if ! defined key_dynspg_ts
+      DO jk = 1, jpkm1
+         DO jj = 2, jpjm1   
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               va(ji,jj,jk) = ( va(ji,jj,jk) - vb(ji,jj,jk) ) * z1_p2dt
+            END DO
+         END DO
+      END DO
+#endif
 
       ! J. Chanut: Lines below are useless ?
@@ -407,5 +392,4 @@
       !
       CALL wrk_dealloc( jpi,jpj,jpk, zwi, zwd, zws) 
-      CALL wrk_dealloc( jpi,jpj,jpk, zua, zva     ) 
       !
       IF( nn_timing == 1 )  CALL timing_stop('dyn_zdf_imp')
