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 8167)
+++ /branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 8168)
@@ -499,7 +499,19 @@
         <field id="tke"          long_name="Turbulent Kinetic Energy"                  unit="m2/s2"    />
         <field id="tke_niw"      long_name="Turbulent Kinetic Energy due to near-inertial wave breaking"  unit="m2/s2" />
-        <!-- diag_vor_int and diag_vor_mn: available with TODO FLAGS and TODO FLAGS -->
-        <field id="dia_vor_int"    long_name="vertical integral vorticity tendencies"  standard_name="vertically_integrated_vorticity_tendencies"   unit="s-2"      grid_ref="grid_W_2D" />
-        <field id="dia_vor_mn"    long_name="vertical mean vorticity tendencies"  standard_name="vertical_mean_vorticity_tendencies"   unit="s-2"      grid_ref="grid_W_2D" />
+        <!-- variables available with dyn_vrt_dia - available with TODO FLAGS and TODO FLAGS -->
+        <field id="dia_vor_int-11"    long_name="vertical integral vorticity tendencies for hpg"  standard_name="vertically_integrated_vorticity_tendencies_hpg"   unit="s-2"      grid_ref="grid_W_2D" />
+        <field id="dia_vor_mean-12"    long_name="vertical mean vorticity tendencies for hpg"  standard_name="vertical_mean_vorticity_tendencies_hpg"   unit="s-2"      grid_ref="grid_W_2D" />
+        <field id="dia_vor_int-21"    long_name="vertical integral vorticity tendencies for keg"  standard_name="vertically_integrated_vorticity_tendencies_keg"   unit="s-2"      grid_ref="grid_W_2D" />
+        <field id="dia_vor_mean-22"    long_name="vertical mean vorticity tendencies for keg"  standard_name="vertical_mean_vorticity_tendencies_keg"   unit="s-2"      grid_ref="grid_W_2D" />
+        <field id="dia_vor_int-31"    long_name="vertical integral vorticity tendencies for ldf"  standard_name="vertically_integrated_vorticity_tendencies_ldf"   unit="s-2"      grid_ref="grid_W_2D" />
+        <field id="dia_vor_mean-32"    long_name="vertical mean vorticity tendencies for ldf"  standard_name="vertical_mean_vorticity_tendencies_ldf"   unit="s-2"      grid_ref="grid_W_2D" />
+        <field id="dia_vor_int-41"    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-42"    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-51"    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-52"    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-61"    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-62"    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-71"    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-72"    long_name="vertical mean vorticity tendencies for zdf"  standard_name="vertical_mean_vorticity_tendencies_zdf"   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 8167)
+++ /branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/divcur.F90	(revision 8168)
@@ -343,5 +343,6 @@
 
 
-   SUBROUTINE dyn_vrt_dia_3d( utend, vtend, id_dia_vor_int, id_dia_vor_mn)
+   ! TODO - remove kt only used for validation
+   SUBROUTINE dyn_vrt_dia_3d( utend, vtend, id_dia_vor_int, id_dia_vor_mn, kt)
 
       !!----------------------------------------------------------------------
@@ -356,12 +357,14 @@
       !!
       !!----------------------------------------------------------------------
-      REAL :: utend(jpi,jpj,jpk) ! contribution to du/dt
-      REAL :: vtend(jpi,jpj,jpk) ! contribution to dv/dt
-      INTEGER :: id_dia_vor_int  ! identifier for the vertical integral vorticity diagnostic
-      INTEGER :: id_dia_vor_mn   ! identifier for the vertical mean vorticity diagnostic
-      !
-      !!----------------------------------------------------------------------
-      !
-      INTEGER  ::   ji, jj, jk   ! dummy loop indices
+      REAL,    INTENT(in) :: utend(jpi,jpj,jpk) ! contribution to du/dt
+      REAL,    INTENT(in) :: vtend(jpi,jpj,jpk) ! contribution to dv/dt
+      INTEGER, INTENT(in) :: id_dia_vor_int  ! identifier for the vertical integral vorticity diagnostic
+      INTEGER, INTENT(in) :: id_dia_vor_mn   ! identifier for the vertical mean vorticity diagnostic
+      INTEGER             ::   kt   ! ocean time-step index
+      !
+      !!----------------------------------------------------------------------
+      !
+      INTEGER  ::   ji, jj, jk     ! dummy loop indices
+      INTEGER  ::   ji_min, ji_max ! dummy loop indices for dynspg_flt
       !
       REAL(wp), POINTER, DIMENSION(:,:) :: u_int   ! u vertical integral
@@ -370,4 +373,12 @@
       CALL wrk_alloc(jpi, jpj, u_int)
       CALL wrk_alloc(jpi, jpj, v_int)
+
+      ji_min = 1
+      ji_max = jpi
+
+      IF ( id_dia_vor_int == 71 .OR. id_dia_vor_mn == 72 ) THEN
+          ji_min = fs_2
+          ji_max = fs_jpim1
+      END IF
 
       u_int(:,:) = 0.0_wp
@@ -380,12 +391,30 @@
       DO jk = 1,jpk
           DO jj = 1,jpj
-              DO ji = 1,jpi
+              DO ji = ji_min,ji_max
                   u_int(ji,jj) = u_int(ji,jj) + utend(ji,jj,jk)*fse3u(ji,jj,jk)
                   v_int(ji,jj) = v_int(ji,jj) + vtend(ji,jj,jk)*fse3v(ji,jj,jk)
+
+                  ! TODO remove - for validation only
+                  IF ( kt == 1 .AND. ji == 17 .AND. jj == 12 .AND. id_dia_vor_int == 11 ) THEN
+                      WRITE(numout, *) 'dyn_vrt_dia_3d id:', id_dia_vor_int,   &
+                             &         ':ji:', ji,                             &
+                             &         ':jj:', jj,                             &
+                             &         ':jk:', jk,                             &
+                             &         ':u_int:', u_int(ji,jj),                &
+                             &         ':u_tend:', utend(ji,jj,jk),            &
+                             &         ':fse3u:', fse3u(ji,jj,jk)
+                      WRITE(numout, *) 'dyn_vrt_dia_3d id:', id_dia_vor_int,   &
+                             &         ':ji:', ji,                             &
+                             &         ':jj:', jj,                             &
+                             &         ':jk:', jk,                             &
+                             &         ':v_int:', v_int(ji,jj),                &
+                             &         ':v_tend:', vtend(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_int, id_dia_vor_mn)
+      CALL dyn_vrt_dia_2d(u_int, v_int, id_dia_vor_int, id_dia_vor_mn, kt)
 
       CALL wrk_dealloc(jpi, jpj, u_int)
@@ -395,5 +424,6 @@
 
 
-   SUBROUTINE dyn_vrt_dia_2d( u_int, v_int, id_dia_vor_int, id_dia_vor_mn)
+   ! TODO - remove kt only used for validation
+   SUBROUTINE dyn_vrt_dia_2d( u_int, v_int, id_dia_vor_int, id_dia_vor_mn, kt)
 
       !!----------------------------------------------------------------------
@@ -413,8 +443,9 @@
       !!
       !!----------------------------------------------------------------------
-      REAL :: u_int(jpi,jpj)     ! u vertical integral
-      REAL :: v_int(jpi,jpj)     ! v vertical integral
+      REAL    :: u_int(jpi,jpj)  ! u vertical integral
+      REAL    :: v_int(jpi,jpj)  ! v vertical integral
       INTEGER :: id_dia_vor_int  ! identifier for the vertical integral vorticity diagnostic
       INTEGER :: id_dia_vor_mn   ! identifier for the vertical mean vorticity diagnostic
+      INTEGER :: kt              ! ocean time-step index
       !
       !!----------------------------------------------------------------------
@@ -427,4 +458,6 @@
       REAL(wp), POINTER, DIMENSION(:,:) :: vor_int ! vort trend of vert integrals
       REAL(wp), POINTER, DIMENSION(:,:) :: vor_mn  ! vort trend of vert means
+      CHARACTER(len=20) ::   cid_dia_vor_int       ! Identifier for iom_put
+      CHARACTER(len=20) ::   cid_dia_vor_mn        ! Identifier for iom_put
 
       CALL wrk_alloc(jpi, jpj, u_mn)
@@ -435,4 +468,7 @@
       CALL lbc_lnk( u_int, 'U', 1. )
       CALL lbc_lnk( v_int, 'V', 1. )
+
+      WRITE ( cid_dia_vor_int, "(A16,I2)" ) "dia_vor_int-",  id_dia_vor_int
+      WRITE ( cid_dia_vor_mn,  "(A17,I2)" ) "dia_vor_mean-", id_dia_vor_mn
 
       !
@@ -448,4 +484,22 @@
                   &            - u_int(ji,jj+1) * e1u(ji,jj+1) )   &
                   &           / ( e1f(ji,jj)    * e2f(ji,jj) )
+
+              ! TODO remove - for validation only
+              IF ( kt == 1 .AND. ji == 17 .AND. jj == 12 .AND. id_dia_vor_int == 11 ) THEN
+                  WRITE(numout, *) 'dyn_vrt_dia_2d id:', id_dia_vor_int, &
+                       &           ':ji:', ji,                           &
+                       &           ':jj:', jj,                           &
+                       &           ':vor_int:', vor_int(ji,jj),          &
+                       &           ':v_int(i+1):', v_int(ji+1,jj),       &
+                       &           ':e2v(j+1):', e2v(ji+1,jj),           &
+                       &           ':v_int:', v_int(ji,jj),              &
+                       &           ':e2v:', e2v(ji,jj),                  &
+                       &           ':u_int:', u_int(ji,jj),              &
+                       &           ':e1u:', e1u(ji,jj),                  &
+                       &           ':u_int(j+1):', u_int(ji,jj+1),       &
+                       &           ':e1u(j+1):', e1u(ji,jj+1),           &
+                       &           ':e1f:', e1f(ji,jj),                  &
+                       &           ':e2f:', e2f(ji,jj)
+              END IF
           END DO
       END DO
@@ -473,4 +527,15 @@
               ELSE
                   v_mn(ji,jj) = 0.0_wp
+              END IF
+
+              ! TODO remove - for validation only
+              IF ( kt == 1 .AND. ji == 17 .AND. jj == 12 .AND. id_dia_vor_int == 11 ) THEN
+                  WRITE(numout, *) 'dyn_vrt_dia_2d id:', id_dia_vor_int, &
+                       &           ':ikbu:', ikbu,                       &
+                       &           ':u_int:', u_int(ji,jj),              &
+                       &           ':u_mn:', u_mn(ji,jj),                &
+                       &           ':ikbv:', ikbv,                       &
+                       &           ':v_int:', v_int(ji,jj),              &
+                       &           ':v_mn:', v_mn(ji,jj)
               END IF
           END DO
@@ -489,4 +554,22 @@
                   &           - u_mn(ji,jj+1) * e1u(ji,jj+1) )   &
                   &          / ( e1f(ji,jj)   * e2f(ji,jj) )
+
+              ! TODO remove - for validation only
+              IF ( kt == 1 .AND. ji == 17 .AND. jj == 12 .AND. id_dia_vor_int == 11 ) THEN
+                  WRITE(numout, *) 'dyn_vrt_dia_2d id:', id_dia_vor_int, &
+                       &           ':ji:', ji,                           &
+                       &           ':jj:', jj,                           &
+                       &           ':vor_mn:', vor_mn(ji,jj),            &
+                       &           ':v_mn(i+1):', v_mn(ji+1,jj),         &
+                       &           ':e2v(j+1):', e2v(ji+1,jj),           &
+                       &           ':v_mn:', v_mn(ji,jj),                &
+                       &           ':e2v:', e2v(ji,jj),                  &
+                       &           ':u_mn:', u_mn(ji,jj),                &
+                       &           ':e1u:', e1u(ji,jj),                  &
+                       &           ':u_mn(j+1):', u_mn(ji,jj+1),         &
+                       &           ':e1u(j+1):', e1u(ji,jj+1),           &
+                       &           ':e1f:', e1f(ji,jj),                  &
+                       &           ':e2f:', e2f(ji,jj)
+              END IF
           END DO
       END DO
@@ -494,12 +577,8 @@
 
       ! Call iom_put for the vertical integral vorticity tendencies
-      IF (id_dia_vor_int == 1) THEN
-          CALL iom_put( "dia_vor_int", vor_int(:,:))
-      ENDIF
+      CALL iom_put( cid_dia_vor_int, vor_int(:,:))
 
       ! Call iom_put for the vertical mean vorticity tendencies
-      IF (id_dia_vor_int == 1) THEN
-          CALL iom_put( "dia_vor_mn", vor_mn(:,:))
-      ENDIF
+      CALL iom_put( cid_dia_vor_mn, vor_mn(:,:))
 
       CALL wrk_dealloc(jpi, jpj, u_mn)
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 8167)
+++ /branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 8168)
@@ -379,12 +379,14 @@
       INTEGER, INTENT(in) ::   kt    ! ocean time-step index
       !!
-      INTEGER  ::   id_dia_vrt_hpg_int  = 1    ! TODO remove once flags set properly
-      INTEGER  ::   id_dia_vrt_hpg_mean = 1    ! TODO remove once flags set properly
+      INTEGER  ::   id_dia_vrt_hpg_int  = 11   ! TODO remove once flags set properly
+      INTEGER  ::   id_dia_vrt_hpg_mean = 12   ! 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
@@ -404,4 +406,9 @@
       DO jj = 2, jpjm1
          DO ji = fs_2, fs_jpim1   ! vector opt.
+            ! hydrostatic pressure gradient along s-surfaces
+            zhpi(ji,jj,1) = zcoef0 / e1u(ji,jj) * ( fse3w(ji+1,jj  ,1) * ( znad + rhd(ji+1,jj  ,1) )   &
+               &                                  - fse3w(ji  ,jj  ,1) * ( znad + rhd(ji  ,jj  ,1) ) )
+            zhpj(ji,jj,1) = zcoef0 / e2v(ji,jj) * ( fse3w(ji  ,jj+1,1) * ( znad + rhd(ji  ,jj+1,1) )   &
+               &                                  - fse3w(ji  ,jj  ,1) * ( znad + rhd(ji  ,jj  ,1) ) )
             ! s-coordinate pressure gradient correction
             zuap = -zcoef0 * ( rhd   (ji+1,jj,1) + rhd   (ji,jj,1) + 2._wp * znad )   &
@@ -409,12 +416,10 @@
             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)
-            ! hydrostatic pressure gradient along s-surfaces added to above correction
-            zhpi(ji,jj,1) = zuap + zcoef0 / e1u(ji,jj) * ( fse3w(ji+1,jj  ,1) * ( znad + rhd(ji+1,jj  ,1) )   &
-               &                                  - fse3w(ji  ,jj  ,1) * ( znad + rhd(ji  ,jj  ,1) ) )
-            zhpj(ji,jj,1) = zvap + zcoef0 / e2v(ji,jj) * ( fse3w(ji  ,jj+1,1) * ( znad + rhd(ji  ,jj+1,1) )   &
-               &                                  - fse3w(ji  ,jj  ,1) * ( znad + rhd(ji  ,jj  ,1) ) )
+            ! combine gradient and corerction
+            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) + zhpi(ji,jj,1)
-            va(ji,jj,1) = va(ji,jj,1) + zhpj(ji,jj,1)
+            ua(ji,jj,1) = ua(ji,jj,1) + zuhpg(ji,jj,1)
+            va(ji,jj,1) = va(ji,jj,1) + zvhpg(ji,jj,1)
          END DO
       END DO
@@ -424,4 +429,11 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
+               ! hydrostatic pressure gradient along s-surfaces
+               zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1) + zcoef0 / e1u(ji,jj)   &
+                  &           * (  fse3w(ji+1,jj,jk) * ( rhd(ji+1,jj,jk) + rhd(ji+1,jj,jk-1) + 2*znad )   &
+                  &              - fse3w(ji  ,jj,jk) * ( rhd(ji  ,jj,jk) + rhd(ji  ,jj,jk-1) + 2*znad )  )
+               zhpj(ji,jj,jk) = zhpj(ji,jj,jk-1) + zcoef0 / e2v(ji,jj)   &
+                  &           * (  fse3w(ji,jj+1,jk) * ( rhd(ji,jj+1,jk) + rhd(ji,jj+1,jk-1) + 2*znad )   &
+                  &              - fse3w(ji,jj  ,jk) * ( rhd(ji,jj,  jk) + rhd(ji,jj  ,jk-1) + 2*znad )  )
                ! s-coordinate pressure gradient correction
                zuap = -zcoef0 * ( rhd   (ji+1,jj  ,jk) + rhd   (ji,jj,jk) + 2._wp * znad )   &
@@ -429,14 +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)
-               ! hydrostatic pressure gradient along s-surfaces added to above correction
-               zhpi(ji,jj,jk) = zuap + zhpi(ji,jj,jk-1) + zcoef0 / e1u(ji,jj)   &
-                  &           * (  fse3w(ji+1,jj,jk) * ( rhd(ji+1,jj,jk) + rhd(ji+1,jj,jk-1) + 2*znad )   &
-                  &              - fse3w(ji  ,jj,jk) * ( rhd(ji  ,jj,jk) + rhd(ji  ,jj,jk-1) + 2*znad )  )
-               zhpj(ji,jj,jk) = zvap + zhpj(ji,jj,jk-1) + zcoef0 / e2v(ji,jj)   &
-                  &           * (  fse3w(ji,jj+1,jk) * ( rhd(ji,jj+1,jk) + rhd(ji,jj+1,jk-1) + 2*znad )   &
-                  &              - fse3w(ji,jj  ,jk) * ( rhd(ji,jj,  jk) + rhd(ji,jj  ,jk-1) + 2*znad )  )
+               ! combine gradient and corerction
+               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) + zhpi(ji,jj,jk)
-               va(ji,jj,jk) = va(ji,jj,jk) + zhpj(ji,jj,jk)
+               ua(ji,jj,jk) = ua(ji,jj,jk) + zuhpg(ji,jj,jk)
+               va(ji,jj,jk) = va(ji,jj,jk) + zvhpg(ji,jj,jk)
             END DO
          END DO
@@ -444,6 +452,7 @@
       !
       ! calculate dia_vor_int & dia_vor_mn if required
-      IF ( ( id_dia_vrt_hpg_int == 1 ) .or. ( id_dia_vrt_hpg_mean == 1 ) ) THEN
-          CALL dyn_vrt_dia_3d(zhpi, zhpj, id_dia_vrt_hpg_int, id_dia_vrt_hpg_mean)
+      IF ( ( id_dia_vrt_hpg_int == 11 ) .or. ( id_dia_vrt_hpg_mean == 12 ) ) THEN
+          ! TODO - remove kt only used for validation
+          CALL dyn_vrt_dia_3d(zuhpg, zvhpg, id_dia_vrt_hpg_int, id_dia_vrt_hpg_mean, kt)
       END IF
       !
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 8167)
+++ /branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90	(revision 8168)
@@ -75,8 +75,8 @@
       INTEGER, INTENT( in ) ::   kscheme    ! =0/1   type of KEG scheme 
       !
-      INTEGER  ::   id_dia_vrt_keg_int  = 1 ! TODO remove once flags set properly
-      INTEGER  ::   id_dia_vrt_keg_mean = 1 ! TODO remove once flags set properly
-      INTEGER  ::   ji, jj, jk              ! dummy loop indices
-      REAL(wp) ::   zu, zv                  ! temporary scalars
+      INTEGER  ::  id_dia_vrt_keg_int  = 21 ! TODO remove once flags set properly
+      INTEGER  ::  id_dia_vrt_keg_mean = 22 ! 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
       REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrdu, ztrdv 
@@ -148,6 +148,7 @@
       END DO
       !
-      IF ( ( id_dia_vrt_keg_int == 1 ) .or. ( id_dia_vrt_keg_mean == 1 ) ) THEN
-          CALL dyn_vrt_dia_3d(zhkei, zhkej, id_dia_vrt_keg_int, id_dia_vrt_keg_mean)
+      IF ( ( id_dia_vrt_keg_int == 21 ) .or. ( id_dia_vrt_keg_mean == 22 ) ) THEN
+          ! TODO - remove kt only used for validation
+          CALL dyn_vrt_dia_3d(zhkei, zhkej, id_dia_vrt_keg_int, id_dia_vrt_keg_mean, kt)
       END IF
       !
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 8167)
+++ /branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilap.F90	(revision 8168)
@@ -76,6 +76,6 @@
       INTEGER, INTENT(in) ::   kt   ! ocean time-step index
       !
-      INTEGER  :: id_dia_vrt_ldf_int  = 1      ! TODO remove once flags set properly
-      INTEGER  :: id_dia_vrt_ldf_mean = 1      ! TODO remove once flags set properly
+      INTEGER  :: id_dia_vrt_ldf_int  = 31     ! TODO remove once flags set properly
+      INTEGER  :: id_dia_vrt_ldf_mean = 32     ! TODO remove once flags set properly
       INTEGER  ::   ji, jj, jk                  ! dummy loop indices
       REAL(wp) ::   zbt, ze2u, ze2v             ! temporary scalar
@@ -194,9 +194,9 @@
                ze2v = e1v(ji,jj) * fse3v(ji,jj,jk)
                ! horizontal biharmonic diffusive trends
-               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)       &
+               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)       &
+               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 ))
                ! add it to the general momentum trends
@@ -209,6 +209,7 @@
       END DO                                           !   End of slab
       !                                                ! ===============
-      IF ( ( id_dia_vrt_ldf_int == 1 ) .or. ( id_dia_vrt_ldf_mean == 1 ) ) THEN
-          CALL dyn_vrt_dia_3d(zua, zva, id_dia_vrt_ldf_int, id_dia_vrt_ldf_mean)
+      IF ( ( id_dia_vrt_ldf_int == 31 ) .or. ( id_dia_vrt_ldf_mean == 32 ) ) THEN
+          ! TODO - remove kt only used for validation
+          CALL dyn_vrt_dia_3d(zua, zva, id_dia_vrt_ldf_int, id_dia_vrt_ldf_mean, kt)
       END IF
       !
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 8167)
+++ /branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 8168)
@@ -561,6 +561,6 @@
       REAL(wp), INTENT(inout), DIMENSION(jpi,jpj,jpk) ::   pva    ! total v-trend
       !!
-      INTEGER  :: id_dia_vrt_vor_int = 1                          ! TODO remove once flags set properly
-      INTEGER  :: id_dia_vrt_vor_mn  = 1                          ! TODO remove once flags set properly
+      INTEGER  :: id_dia_vrt_vor_int = 51                         ! TODO remove once flags set properly
+      INTEGER  :: id_dia_vrt_vor_mn  = 52                         ! TODO remove once flags set properly
       INTEGER  ::   ji, jj, jk                                    ! dummy loop indices
       INTEGER  ::   ierr                                          ! local integer
@@ -707,6 +707,7 @@
       END DO                                           !   End of slab
       !                                                ! ===============
-      IF ( ( id_dia_vrt_vor_int == 1 ) .or. ( id_dia_vrt_vor_mn == 1 ) ) THEN
-          CALL dyn_vrt_dia_3d(zua, zva, id_dia_vrt_vor_int, id_dia_vrt_vor_mn)
+      IF ( ( id_dia_vrt_vor_int == 51 ) .or. ( id_dia_vrt_vor_mn == 52 ) ) THEN
+          ! TODO - remove kt only used for validation
+          CALL dyn_vrt_dia_3d(zua, zva, id_dia_vrt_vor_int, id_dia_vrt_vor_mn, kt)
       END IF
       !
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 8167)
+++ /branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90	(revision 8168)
@@ -60,7 +60,7 @@
       INTEGER, INTENT(in) ::   kt   ! ocean time-step inedx
       !
-      INTEGER  ::   id_dia_vrt_zad_int  = 1  ! TODO remove once flags set properly
-      INTEGER  ::   id_dia_vrt_zad_mean = 1  ! TODO remove once flags set properly
-      INTEGER  ::   ji, jj, jk               ! dummy loop indices
+      INTEGER  ::   id_dia_vrt_zad_int  = 61  ! TODO remove once flags set properly
+      INTEGER  ::   id_dia_vrt_zad_mean = 62  ! TODO remove once flags set properly
+      INTEGER  ::   ji, jj, jk                ! dummy loop indices
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  zwuw , zwvw
       REAL(wp), POINTER, DIMENSION(:,:  ) ::  zww
@@ -145,6 +145,7 @@
          &                       tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' )
       !
-      IF ( ( id_dia_vrt_zad_int == 1 ) .or. ( id_dia_vrt_zad_mean == 1 ) ) THEN
-          CALL dyn_vrt_dia_3d(zua, zva, id_dia_vrt_zad_int, id_dia_vrt_zad_mean)
+      IF ( ( id_dia_vrt_zad_int == 61 ) .or. ( id_dia_vrt_zad_mean == 62 ) ) THEN
+          ! TODO - remove kt only used for validation
+          CALL dyn_vrt_dia_3d(zua, zva, id_dia_vrt_zad_int, id_dia_vrt_zad_mean, kt)
       END IF
       !
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 8167)
+++ /branches/UKMO/GO6_dyn_vrt_diag/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 8168)
@@ -69,6 +69,6 @@
       INTEGER  ::   ji, jj, jk   ! dummy loop indices
       INTEGER  ::   ikbu, ikbv   ! local integers
-      INTEGER  ::   id_dia_vrt_zdf_int  = 1 ! TODO remove once flags set properly
-      INTEGER  ::   id_dia_vrt_zdf_mean = 1 ! TODO remove once flags set properly
+      INTEGER  ::   id_dia_vrt_zdf_int = 71 ! TODO remove once flags set properly
+      INTEGER  ::   id_dia_vrt_zdf_mn  = 72 ! TODO remove once flags set properly
       REAL(wp) ::   z1_p2dt, zcoef, zzwi, zzws, zrhs   ! local scalars
       REAL(wp) ::   ze3ua, ze3va
@@ -262,7 +262,7 @@
       END DO
 
+      IF ( ( .NOT. lk_dynspg_ts ) .OR.            &
+           &    ( ( id_dia_vrt_zdf_int == 71 ) .OR. ( id_dia_vrt_zdf_mn == 72 ) ) ) THEN
       ! Normalization to obtain the general momentum trend ua
-      IF ( ( .NOT. lk_dynspg_ts ) .OR.            &
-           &    ( ( id_dia_vrt_zdf_int == 1 ) .OR. ( id_dia_vrt_zdf_mean == 1 ) ) ) THEN
           DO jk = 1, jpkm1
              DO jj = 2, jpjm1   
@@ -367,7 +367,7 @@
       END DO
 
+      IF ( ( .NOT. lk_dynspg_ts ) .OR.            &
+           &    ( ( id_dia_vrt_zdf_int == 71 ) .OR. ( id_dia_vrt_zdf_mn == 72 ) ) ) THEN
       ! Normalization to obtain the general momentum trend va
-      IF ( ( .NOT. lk_dynspg_ts ) .OR.            &
-           &    ( ( id_dia_vrt_zdf_int == 1 ) .OR. ( id_dia_vrt_zdf_mean == 1 ) ) ) THEN
           DO jk = 1, jpkm1
              DO jj = 2, jpjm1   
@@ -377,6 +377,7 @@
              END DO
           END DO
-          IF ( ( id_dia_vrt_zdf_int == 1 ) .OR. (id_dia_vrt_zdf_mean == 1) ) THEN
-              CALL dyn_vrt_dia_3d(zua, zva, id_dia_vrt_zdf_int, id_dia_vrt_zdf_mean)
+          IF ( ( id_dia_vrt_zdf_int == 71 ) .OR. (id_dia_vrt_zdf_mn == 72) ) THEN
+              ! TODO - remove kt only used for validation
+              CALL dyn_vrt_dia_3d(zua, zva, id_dia_vrt_zdf_int, id_dia_vrt_zdf_mn, kt)
           END IF
           IF ( .NOT. lk_dynspg_ts ) THEN
