Index: /NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/tests/CANAL/EXPREF/file_def_nemo-oce.xml
===================================================================
--- /NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/tests/CANAL/EXPREF/file_def_nemo-oce.xml	(revision 12755)
+++ /NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/tests/CANAL/EXPREF/file_def_nemo-oce.xml	(revision 12756)
@@ -15,6 +15,6 @@
 	  <field field_ref="soce" /> 
 	  <field field_ref="ssh"  />
-	  <field field_ref="salgrad"  />
-	  <field field_ref="ke_zint"  />
+	  <field field_ref="socegrad"  />
+	  <field field_ref="eken_int"  />
 	  <field field_ref="relvor"  />
 	  <field field_ref="potvor"  />
Index: /NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/tests/CANAL/MY_SRC/diawri.F90
===================================================================
--- /NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/tests/CANAL/MY_SRC/diawri.F90	(revision 12755)
+++ /NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/tests/CANAL/MY_SRC/diawri.F90	(revision 12756)
@@ -230,5 +230,5 @@
       IF( iom_use('logavs') )   CALL iom_put( "logavs", LOG( MAX( 1.e-20_wp, avs(:,:,:) ) ) )
 
-      IF ( iom_use("salgrad") .OR. iom_use("salgrad2") ) THEN
+      IF ( iom_use("socegrad") .OR. iom_use("socegrad2") ) THEN
          z3d(:,:,jpk) = 0.
          DO jk = 1, jpkm1
@@ -244,7 +244,7 @@
          END DO
          CALL lbc_lnk( 'diawri', z3d, 'T', 1. )
-         CALL iom_put( "salgrad2",  z3d )          ! square of module of sal gradient
+         CALL iom_put( "socegrad2",  z3d )          ! square of module of sal gradient
          z3d(:,:,:) = SQRT( z3d(:,:,:) )
-         CALL iom_put( "salgrad" ,  z3d )          ! module of sal gradient
+         CALL iom_put( "socegrad" ,  z3d )          ! module of sal gradient
       ENDIF
          
@@ -299,12 +299,12 @@
             END DO
          END DO
-         CALL iom_put( "salt2c", rau0 * z2d )          ! vertically integrated salt content (PSU*kg/m2)
-      ENDIF
-      !
-      IF ( iom_use("eken") ) THEN
+         CALL iom_put( "salt2c", rau0 * z2d )          ! vertically integrated squared salt content (PSU*kg/m2)
+      ENDIF
+      !
+      IF ( iom_use("eken") .OR. iom_use("eken_int") ) THEN
          z3d(:,:,jpk) = 0._wp 
          DO jk = 1, jpkm1
-            DO jj = 2, jpj
-               DO ji = 2, jpi
+            DO jj = 2, jpjm1
+               DO ji = 2, jpim1
                   zztmpx = 0.5 * ( un(ji-1,jj  ,jk) + un(ji,jj,jk) )
                   zztmpy = 0.5 * ( vn(ji  ,jj-1,jk) + vn(ji,jj,jk) )
@@ -315,25 +315,4 @@
          CALL lbc_lnk( 'diawri', z3d, 'T', 1. )
          CALL iom_put( "eken", z3d )                 ! kinetic energy
-      ENDIF
-
-      IF ( iom_use("ke") .or. iom_use("ke_zint") ) THEN
-         !
-         z3d(:,:,jpk) = 0._wp
-         z3d(1,:, : ) = 0._wp
-         z3d(:,1, : ) = 0._wp
-         DO jk = 1, jpkm1
-            DO jj = 2, jpj
-               DO ji = 2, jpi
-                  z3d(ji,jj,jk) = 0.25_wp * ( un(ji  ,jj,jk) * un(ji  ,jj,jk) * e1e2u(ji  ,jj) * e3u_n(ji  ,jj,jk)  &
-                     &                      + un(ji-1,jj,jk) * un(ji-1,jj,jk) * e1e2u(ji-1,jj) * e3u_n(ji-1,jj,jk)  &
-                     &                      + vn(ji,jj  ,jk) * vn(ji,jj  ,jk) * e1e2v(ji,jj  ) * e3v_n(ji,jj  ,jk)  &
-                     &                      + vn(ji,jj-1,jk) * vn(ji,jj-1,jk) * e1e2v(ji,jj-1) * e3v_n(ji,jj-1,jk)  )  &
-                     &                    * r1_e1e2t(ji,jj) / e3t_n(ji,jj,jk) * tmask(ji,jj,jk)
-               END DO
-            END DO
-         END DO
-         
-         CALL lbc_lnk( 'diawri', z3d, 'T', 1. )
-         CALL iom_put( "ke", z3d ) ! kinetic energy
 
          z2d(:,:)  = 0._wp 
@@ -341,10 +320,9 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  z2d(ji,jj) = z2d(ji,jj) + e3t_n(ji,jj,jk) * z3d(ji,jj,jk) * tmask(ji,jj,jk)
-               END DO
-            END DO
-         END DO
-         CALL iom_put( "ke_zint", z2d )   ! vertically integrated kinetic energy
-
+                  z2d(ji,jj) = z2d(ji,jj) + e3t_n(ji,jj,jk) * z3d(ji,jj,jk) * e1e2t(ji,jj) * tmask(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         CALL iom_put( "eken_int", z2d )   ! vertically integrated kinetic energy
       ENDIF
       !
@@ -358,5 +336,5 @@
                DO ji = 1, fs_jpim1   ! vector opt.
                   z3d(ji,jj,jk) = (  e2v(ji+1,jj  ) * vn(ji+1,jj  ,jk) - e2v(ji,jj) * vn(ji,jj,jk)    &
-                     &              - e1u(ji  ,jj+1) * un(ji  ,jj+1,jk) + e1u(ji,jj) * un(ji,jj,jk)  ) * r1_e1e2f(ji,jj)
+                     &             - e1u(ji  ,jj+1) * un(ji  ,jj+1,jk) + e1u(ji,jj) * un(ji,jj,jk)  ) * r1_e1e2f(ji,jj)
                END DO
             END DO
