Index: branches/UKMO/dev_r5518_GO6_GloSea6_package/NEMOGCM/CONFIG/SHARED/field_def.xml
===================================================================
--- branches/UKMO/dev_r5518_GO6_GloSea6_package/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 15218)
+++ branches/UKMO/dev_r5518_GO6_GloSea6_package/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 15219)
@@ -109,4 +109,6 @@
          <field id="28d"          long_name="Depth of 28C isotherm"                          standard_name="depth_of_isosurface_of_sea_water_potential_temperature"                            unit="m"       />
          <field id="hc300"        long_name="Heat content 0-300m"                            standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"                      />
+         <field id="tav300"      long_name="Average potential temperature 0-300m"            standard_name="sea_water_potential_temperature" unit="degC" />
+         <field id="sav300"       long_name="Average salinity 0-300m"                        standard_name="sea_water_practical_salinity"    unit="0.001" />
 
          <!-- variables available with key_diaar5 -->
Index: branches/UKMO/dev_r5518_GO6_GloSea6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_GloSea6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90	(revision 15218)
+++ branches/UKMO/dev_r5518_GO6_GloSea6_package/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90	(revision 15219)
@@ -37,4 +37,6 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hd28   !: depth of 28 C isotherm                         [m]
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   htc3   !: heat content of first 300 m                    [W]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tav3   !: Average temp of first 300 m                    [degC]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sav3   !: Average salinity of first 300 m                [PSU]
 
    !! * Substitutions
@@ -53,4 +55,6 @@
       !
       ALLOCATE(hth(jpi,jpj), hd20(jpi,jpj), hd28(jpi,jpj), htc3(jpi,jpj), STAT=dia_hth_alloc)
+      !
+      ALLOCATE(tav3(jpi,jpj), sav3(jpi,jpj), STAT=dia_hth_alloc)
       !
       IF( lk_mpp           )   CALL mpp_sum ( dia_hth_alloc )
@@ -92,4 +96,5 @@
       REAL(wp)                         ::   zztmp, zzdep          ! temporary scalars inside do loop
       REAL(wp)                         ::   zu, zv, zw, zut, zvt  ! temporary workspace
+      REAL(wp)                         ::   depth_remain          ! temporary float
       REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   zabs2      ! MLD: abs( tn - tn(10m) ) = ztem2 
       REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ztm2       ! Top of thermocline: tn = tn(10m) - ztem2     
@@ -300,4 +305,59 @@
       CALL iom_put( "28d", hd28 )   ! depth of the 28 isotherm
 
+      ! ---------------------------------------- !
+      !  Average temp & salinity of first 300 m  !
+      !  Copied from the hc300 section below     !
+      ! ---------------------------------------- !
+      ! find ilevel with (ilevel+1) the deepest W-level above 300m (we assume we can use e3t_0 to do this search...)
+      ilevel   = 0
+      zthick_0 = 0._wp
+      DO jk = 1, jpkm1                      
+         zthick_0 = zthick_0 + e3t_1d(jk)
+         IF( zthick_0 < 300. )   ilevel = jk
+      END DO
+      ! surface boundary condition
+      IF( lk_vvl ) THEN   ;   zthick(:,:) = 0._wp       ;   tav3(:,:) = 0._wp  ; sav3(:,:) = 0._wp 
+      ELSE
+        ! For the surface layer calculate the integrated temp and salinity
+        ! The SSH "layer" is considered to be at the same temp/salinity as the
+        ! first ocean level.
+        zthick(:,:) = sshn(:,:) * tmask(:,:,1)
+        tav3(:,:) = tsn(:,:,1,jp_tem) * tmask(:,:,1) * zthick(:,:)  
+        sav3(:,:) = tsn(:,:,1,jp_sal) * tmask(:,:,1) * zthick(:,:) 
+      ENDIF
+
+      ! integration down to ilevel
+      ! For each level above 300m (1 to ilevel) calculate the integrated
+      ! temp and salinty (T|S * layer thickness), and sum the thickness
+      DO jk = 1, ilevel
+         zthick(:,:) = zthick(:,:) + fse3t(:,:,jk) * tmask(:,:,jk)
+         tav3  (:,:) = tav3  (:,:) + tsn(:,:,jk,jp_tem) * tmask(:,:,jk) * fse3t(:,:,jk)
+         sav3  (:,:) = sav3  (:,:) + tsn(:,:,jk,jp_sal) * tmask(:,:,jk) * fse3t(:,:,jk)
+      END DO
+
+      DO jj = 1, jpj
+         DO ji = 1, jpi
+            ! What distance is there remaining to get to 300m
+            depth_remain = 300.0 - zthick(ji,jj)
+            
+            ! add the value of reamining thickness * T|S of the level beyond
+            ! 300m. 
+            tav3(ji,jj) = tav3(ji,jj) + tsn(ji,jj,ilevel+1,jp_tem) * MIN( fse3t(ji,jj,ilevel+1), depth_remain )  &
+                                                                   * tmask(ji,jj,ilevel+1)
+            sav3(ji,jj) = sav3(ji,jj) + tsn(ji,jj,ilevel+1,jp_sal) * MIN( fse3t(ji,jj,ilevel+1), depth_remain )  &
+                                                                   * tmask(ji,jj,ilevel+1)
+            ! Add the remaining depth, this should take us to 300m (in most
+            ! places)
+            zthick(ji,jj) = zthick(ji,jj) + MIN( fse3t(ji,jj,ilevel+1), depth_remain ) * tmask(ji,jj,ilevel+1)
+            ! Divide by the depth to get the integrated temp|salinity
+            tav3(ji,jj) = tav3(ji,jj) / zthick(ji,jj)
+            sav3(ji,jj) = sav3(ji,jj) / zthick(ji,jj)
+
+         END DO
+      END DO
+
+      CALL iom_put( "tav300", tav3 )      ! first 300m average temperature
+      CALL iom_put( "sav300", sav3 )      ! first 300m average salinity
+
       ! ----------------------------- !
       !  Heat content of first 300 m  !
