Index: /NEMO/branches/UKMO/dev_r10037_vorticity_trends/cfgs/SHARED/field_def_nemo-oce.xml
===================================================================
--- /NEMO/branches/UKMO/dev_r10037_vorticity_trends/cfgs/SHARED/field_def_nemo-oce.xml	(revision 10812)
+++ /NEMO/branches/UKMO/dev_r10037_vorticity_trends/cfgs/SHARED/field_def_nemo-oce.xml	(revision 10813)
@@ -798,23 +798,23 @@
      <!-- variables available with ln_dyn_vor -->
      <field id="vort_prg_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_keg_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_rvo_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_pvo_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_ldf_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_zad_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_zdf_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_spg_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_swf_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_bfr_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_prg_int"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_keg_int"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_rvo_int"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_pvo_int"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_ldf_int"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_zad_int"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_zdf_int"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-     <field id="vort_spg_int"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-<!--     <field id="vort_swf_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" />
-         <field id="vort_bfr_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> -->
+     <field id="vort_keg_avg"       long_name="curl(vertical avg) vort trend: KE gradient         or hor. adv."    unit="m/s^2" />
+     <field id="vort_rvo_avg"       long_name="curl(vertical avg) vort trend: relative  vorticity or metric term"  unit="m/s^2" />
+     <field id="vort_pvo_avg"       long_name="curl(vertical avg) vort trend: planetary vorticity"                 unit="m/s^2" />
+     <field id="vort_ldf_avg"       long_name="curl(vertical avg) vort trend: lateral   diffusion"                 unit="m/s^2" />
+     <field id="vort_zad_avg"       long_name="curl(vertical avg) vort trend: vertical  advection"                 unit="m/s^2" />
+     <field id="vort_zdf_avg"       long_name="curl(vertical avg) vort trend: vertical  diffusion"                 unit="m/s^2" />
+     <field id="vort_spg_avg"       long_name="curl(vertical avg) vort trend: surface  pressure gradient"          unit="m/s^2" />
+     <field id="vort_swf_avg"       long_name="curl(vertical avg) vort trend: wind stress"                         unit="m/s^2" />
+     <field id="vort_bfr_avg"       long_name="curl(vertical avg) vort trend: bottom friction (explicit)"          unit="m/s^2" />
+     <field id="vort_prg_int"       long_name="curl(vertical int) vort trend: internal pressure gradient"          unit="m/s^2" />
+     <field id="vort_keg_int"       long_name="curl(vertical int) vort trend: KE gradient         or hor. adv."    unit="m/s^2" />
+     <field id="vort_rvo_int"       long_name="curl(vertical int) vort trend: relative  vorticity or metric term"  unit="m/s^2" />
+     <field id="vort_pvo_int"       long_name="curl(vertical int) vort trend: planetary vorticity"                 unit="m/s^2" />
+     <field id="vort_ldf_int"       long_name="curl(vertical int) vort trend: lateral   diffusion"                 unit="m/s^2" />
+     <field id="vort_zad_int"       long_name="curl(vertical int) vort trend: vertical  advection"                 unit="m/s^2" />
+     <field id="vort_zdf_int"       long_name="curl(vertical int) vort trend: vertical  diffusion"                 unit="m/s^2" />
+     <field id="vort_spg_int"       long_name="curl(vertical int) vort trend: surface  pressure gradient"          unit="m/s^2" />
+     <field id="vort_swf_int"       long_name="curl(vertical int) vort trend: wind stress"                         unit="m/s^2" />
+     <field id="vort_bfr_int"       long_name="curl(vertical int) vort trend: bottom friction (explicit)"          unit="m/s^2" /> 
    </field_group>
 
Index: /NEMO/branches/UKMO/dev_r10037_vorticity_trends/src/OCE/TRD/trdvor.F90
===================================================================
--- /NEMO/branches/UKMO/dev_r10037_vorticity_trends/src/OCE/TRD/trdvor.F90	(revision 10812)
+++ /NEMO/branches/UKMO/dev_r10037_vorticity_trends/src/OCE/TRD/trdvor.F90	(revision 10813)
@@ -43,5 +43,7 @@
    INTEGER, SAVE, ALLOCATABLE, DIMENSION(:) ::   ndexvor1   ! needed for IOIPSL output
    INTEGER ::   ndebug     ! (0/1) set it to 1 in case of problem to have more print
-
+   INTEGER, SAVE :: n_hf_lastcalc  ! last timestep for which r1_hf_n was calculated. 
+
+   REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::   r1_hf_n      ! reciprocal of water column height at F-points
    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::   vor_avr      ! average
    REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::   vor_avrb     ! before vorticity (kt-1)
@@ -71,5 +73,5 @@
          &      vor_avrbn (jpi,jpj) , rotot   (jpi,jpj) , vor_avrtot(jpi,jpj) ,   &
          &      vor_avrres(jpi,jpj) , vortrd  (jpi,jpj,jpltot_vor,jpltype_vor) ,   &
-         &      ndexvor1  (jpi*jpj)                                ,   STAT= trd_vor_alloc )
+         &      ndexvor1  (jpi*jpj) , r1_hf_n (jpi,jpj)                        ,   STAT= trd_vor_alloc )
          !
       IF( lk_mpp             )   CALL mpp_sum ( trd_vor_alloc )
@@ -89,7 +91,17 @@
       INTEGER                   , INTENT(in   ) ::   kt             ! time step
       !
-      INTEGER ::   ji, jj   ! dummy loop indices
+      INTEGER ::   ji, jj, jk   ! dummy loop indices
       REAL(wp), DIMENSION(jpi,jpj) ::   ztswu, ztswv    ! 2D workspace 
       !!----------------------------------------------------------------------
+
+      IF( n_hf_lastcalc .lt. kt ) THEN
+         ! calculate reciprocal water column depth at F points if not already done this timestep.
+         r1_hf_n(:,:) = 0.0
+         DO jk = 1,jpk
+           r1_hf_n(:,:) = r1_hf_n(:,:) + e3f_n(:,:,jk) * fmask(:,:,jk)
+         END DO
+         r1_hf_n(:,:) = fmask(:,:,1) / ( r1_hf_n(:,:) + 1._wp - fmask(:,:,1) )
+         n_hf_lastcalc = kt
+      ENDIF
 
       SELECT CASE( ktrd ) 
@@ -186,4 +198,15 @@
       END SELECT
 
+      ! Curl(vertical integral)/H diagnostics:
+      ! Curl:
+      DO ji = 1, jpim1
+         DO jj = 1, jpjm1
+            vortrd(ji,jj,ktrd,jptype_vor_int) = (    zvdpvor(ji+1,jj) - zvdpvor(ji,jj)     &
+               &                                 - ( zudpvor(ji,jj+1) - zudpvor(ji,jj) ) ) / ( e1f(ji,jj) * e2f(ji,jj) )
+         END DO
+      END DO
+      ! Average of the Curl and Surface mask:
+      vortrd(:,:,ktrd,jptype_vor_int) = vortrd(:,:,ktrd,jptype_vor_int) * r1_hf_n(:,:) * fmask(:,:,1)
+
       ! Average except for Beta.V
       zudpvor(:,:) = zudpvor(:,:) * r1_hu_n(:,:)
@@ -266,5 +289,5 @@
       END DO
       ! Average of the Curl and Surface mask:
-      vortrd(:,:,ktrd,jptype_vor_int) = vortrd(:,:,ktrd,jptype_vor_int) * r1_hu_n(:,:) * fmask(:,:,1)
+      vortrd(:,:,ktrd,jptype_vor_int) = vortrd(:,:,ktrd,jptype_vor_int) * r1_hf_n(:,:) * fmask(:,:,1)
       !
       ! Curl(vertical mean) diagnostics:
@@ -424,6 +447,6 @@
          IF( iom_use("vort_zdf_int") ) CALL iom_put("vort_zdf_int",vortrd(:,:,jpvor_zdf,jptype_vor_int))
          IF( iom_use("vort_spg_int") ) CALL iom_put("vort_spg_int",vortrd(:,:,jpvor_spg,jptype_vor_int))
-!!$         IF( iom_use("vort_swf_int") ) CALL iom_put("vort_swf_int",vortrd(:,:,jpvor_prg,jptype_vor_int))
-!!$         IF( iom_use("vort_bfr_int") ) CALL iom_put("vort_bfr_int",vortrd(:,:,jpvor_prg,jptype_vor_int))
+         IF( iom_use("vort_swf_int") ) CALL iom_put("vort_swf_int",vortrd(:,:,jpvor_prg,jptype_vor_int))
+         IF( iom_use("vort_bfr_int") ) CALL iom_put("vort_bfr_int",vortrd(:,:,jpvor_prg,jptype_vor_int))
          !
       ENDIF
@@ -465,4 +488,5 @@
       IF( trd_vor_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'trd_vor_init : unable to allocate trdvor arrays' )
 
+      n_hf_lastcalc = 0
       vortrd(:,:,:,:) = 0.0
 
