Index: /branches/UKMO/v3_6_extra_CMIP6_diagnostics/NEMOGCM/CONFIG/SHARED/field_def.xml
===================================================================
--- /branches/UKMO/v3_6_extra_CMIP6_diagnostics/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 7039)
+++ /branches/UKMO/v3_6_extra_CMIP6_diagnostics/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 7040)
@@ -782,4 +782,5 @@
       <field id="ketrd_convP2K" long_name="ke-trend: conversion (potential to kinetic)"      unit="W/s^3"                        />
       <field id="KE"            long_name="kinetic energy: u(n)*u(n+1)/2"                    unit="W/s^2"                        />   
+      <field id="ketrd_eiv"     long_name="Kinetic energy trend from mesoscale eddy advection"   unit="W/s^2"                        />   
 
       <!-- variables available with ln_PE_trd -->
Index: /branches/UKMO/v3_6_extra_CMIP6_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_eiv.F90
===================================================================
--- /branches/UKMO/v3_6_extra_CMIP6_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_eiv.F90	(revision 7039)
+++ /branches/UKMO/v3_6_extra_CMIP6_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_eiv.F90	(revision 7040)
@@ -240,4 +240,6 @@
        CALL dia_ptr_ohst_components( jp_sal, 'eiv', z3d )
     ENDIF
+
+    IF( ln_trddyn .AND. ln_KE_trd ) CALL trd_dyn(u_eiv, v_eiv, jptrd_eivke, kt )
 # endif  
 
Index: /branches/UKMO/v3_6_extra_CMIP6_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trd_oce.F90
===================================================================
--- /branches/UKMO/v3_6_extra_CMIP6_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trd_oce.F90	(revision 7039)
+++ /branches/UKMO/v3_6_extra_CMIP6_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trd_oce.F90	(revision 7040)
@@ -56,5 +56,5 @@
    !
    !                                                  !!!* Momentum trends indices
-   INTEGER, PUBLIC, PARAMETER ::   jptot_dyn  = 15     !: Total trend nb: change it when adding/removing one indice below
+   INTEGER, PUBLIC, PARAMETER ::   jptot_dyn  = 16     !: Total trend nb: change it when adding/removing one indice below
    !                               ===============     !  
    INTEGER, PUBLIC, PARAMETER ::   jpdyn_hpg  =  1     !: hydrostatic pressure gradient 
@@ -73,4 +73,5 @@
    INTEGER, PUBLIC, PARAMETER ::   jpdyn_spgflt  = 14  !: filter contribution to surface pressure gradient (spg_flt)
    INTEGER, PUBLIC, PARAMETER ::   jpdyn_spgexp  = 15  !: explicit contribution to surface pressure gradient (spg_flt)
+   INTEGER, PUBLIC, PARAMETER ::   jpdyn_eivke   = 16  !: K.E trend from Gent McWilliams scheme
    !
    !!----------------------------------------------------------------------
Index: /branches/UKMO/v3_6_extra_CMIP6_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90
===================================================================
--- /branches/UKMO/v3_6_extra_CMIP6_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90	(revision 7039)
+++ /branches/UKMO/v3_6_extra_CMIP6_diagnostics/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90	(revision 7040)
@@ -27,4 +27,5 @@
    USE lib_mpp        ! MPP library
    USE wrk_nemo       ! Memory allocation
+   USE ldfslp         ! Isopycnal slopes
 
    IMPLICIT NONE
@@ -42,4 +43,6 @@
 #  include "domzgr_substitute.h90"
 #  include "vectopt_loop_substitute.h90"
+#  include "ldfeiv_substitute.h90"
+
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
@@ -102,6 +105,4 @@
       ENDIF
       !
-      zke(:,:,jpk) = 0._wp
-      zke(1,:, : ) = 0._wp
       zke(:,1, : ) = 0._wp
       DO jk = 1, jpkm1
@@ -192,4 +193,23 @@
                     CALL ken_p2k( kt , zke )
                       CALL iom_put( "ketrd_convP2K", zke )     ! conversion -rau*g*w
+        CASE( jpdyn_eivke )
+            ! CMIP6 diagnostic tknebto = tendency of KE from
+            ! parameterized mesoscale eddy advection
+            ! = vertical_integral( k (N S)^2 ) rho dz
+            ! rho = reference density
+            ! S = isoneutral slope.
+            ! Most terms are on W grid so work on this grid
+            zke2d(:,:) = 0._wp
+            DO jk = 1,jpk
+               DO ji = 1,jpi
+                  DO jj = 1,jpj
+                     zke2d(ji,jj) = zke2d(ji,jj) +  rau0 * fsaeiw(ji, jj, jk)               &
+                          &                      * ( wslpi(ji, jj, jk) * wslpi(ji,jj,jk)    &
+                          &                      +   wslpj(ji, jj, jk) * wslpj(ji,jj,jk) )  &
+                          &                      *   bn2(ji,jj,jk) * fse3w(ji, jj, jk)
+                  ENDDO
+               ENDDO
+            ENDDO
+            iom_put("ketrd_eiv", zke2d)
          !
       END SELECT
