Index: /NEMO/trunk/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-oce.xml
===================================================================
--- /NEMO/trunk/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-oce.xml	(revision 9989)
+++ /NEMO/trunk/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-oce.xml	(revision 9990)
@@ -37,4 +37,5 @@
 	  <field field_ref="wspd"         name="windsp"   />
 	  <field field_ref="precip"       name="precip"   />
+	  <field field_ref="berg_melt_qlat"  name="berg_melt_qlat" />
 	  <!-- ice and snow -->
 	  <field field_ref="snowpre" />
Index: /NEMO/trunk/cfgs/SHARED/field_def_nemo-oce.xml
===================================================================
--- /NEMO/trunk/cfgs/SHARED/field_def_nemo-oce.xml	(revision 9989)
+++ /NEMO/trunk/cfgs/SHARED/field_def_nemo-oce.xml	(revision 9990)
@@ -531,4 +531,6 @@
       <field_group id="icbvar" domain_ref="grid_T"  > 
         <field id="berg_melt"          long_name="icb melt rate of icebergs"                       unit="kg/m2/s"                    />
+        <field id="berg_melt_hcflx"    long_name="icb heat flux to ocean due to melting heat content"   unit="J/m2/s"                />
+        <field id="berg_melt_qlat"     long_name="icb heat flux to ocean due to melting latent heat"    unit="J/m2/s"                />
         <field id="berg_buoy_melt"     long_name="icb buoyancy component of iceberg melt rate"     unit="kg/m2/s"                    />
         <field id="berg_eros_melt"     long_name="icb erosion component of iceberg melt rate"      unit="kg/m2/s"                    />
Index: /NEMO/trunk/src/OCE/ICB/icbdia.F90
===================================================================
--- /NEMO/trunk/src/OCE/ICB/icbdia.F90	(revision 9989)
+++ /NEMO/trunk/src/OCE/ICB/icbdia.F90	(revision 9990)
@@ -51,4 +51,6 @@
 
    REAL(wp), DIMENSION(:,:)  , ALLOCATABLE, PUBLIC  ::   berg_melt       ! Melting+erosion rate of icebergs     [kg/s/m2]
+   REAL(wp), DIMENSION(:,:)  , ALLOCATABLE, PUBLIC  ::   berg_melt_hcflx ! Heat flux to ocean due to heat content of melting icebergs [J/s/m2]
+   REAL(wp), DIMENSION(:,:)  , ALLOCATABLE, PUBLIC  ::   berg_melt_qlat  ! Heat flux to ocean due to latent heat of melting icebergs [J/s/m2]
    REAL(wp), DIMENSION(:,:)  , ALLOCATABLE, PUBLIC  ::   buoy_melt       ! Buoyancy component of melting rate   [kg/s/m2]
    REAL(wp), DIMENSION(:,:)  , ALLOCATABLE, PUBLIC  ::   eros_melt       ! Erosion component of melting rate    [kg/s/m2]
@@ -101,4 +103,6 @@
 
       ALLOCATE( berg_melt    (jpi,jpj)   )           ;   berg_melt   (:,:)   = 0._wp
+      ALLOCATE( berg_melt_hcflx(jpi,jpj) )           ;   berg_melt_hcflx(:,:)   = 0._wp
+      ALLOCATE( berg_melt_qlat(jpi,jpj)  )           ;   berg_melt_qlat(:,:)   = 0._wp
       ALLOCATE( buoy_melt    (jpi,jpj)   )           ;   buoy_melt   (:,:)   = 0._wp
       ALLOCATE( eros_melt    (jpi,jpj)   )           ;   eros_melt   (:,:)   = 0._wp
@@ -364,4 +368,6 @@
       IF( .NOT.ln_bergdia )   RETURN
       berg_melt   (:,:)   = 0._wp
+      berg_melt_hcflx(:,:)   = 0._wp
+      berg_melt_qlat(:,:)   = 0._wp
       buoy_melt   (:,:)   = 0._wp
       eros_melt   (:,:)   = 0._wp
@@ -384,4 +390,7 @@
       !
       CALL iom_put( "berg_melt"        , berg_melt   (:,:)   )   ! Melt rate of icebergs                     [kg/m2/s]
+      !! NB. The berg_melt_hcflx field is currently always zero - see comment in icbthm.F90
+      CALL iom_put( "berg_melt_hcflx"  , berg_melt_hcflx(:,:))   ! Heat flux to ocean due to heat content of melting icebergs [J/m2/s]
+      CALL iom_put( "berg_melt_qlat"   , berg_melt_qlat(:,:) )   ! Heat flux to ocean due to latent heat of melting icebergs [J/m2/s]
       CALL iom_put( "berg_buoy_melt"   , buoy_melt   (:,:)   )   ! Buoyancy component of iceberg melt rate   [kg/m2/s]
       CALL iom_put( "berg_eros_melt"   , eros_melt   (:,:)   )   ! Erosion component of iceberg melt rate    [kg/m2/s]
@@ -471,5 +480,5 @@
 
 
-   SUBROUTINE icb_dia_melt(ki, kj, pmnew, pheat, pmass_scale,     &
+   SUBROUTINE icb_dia_melt(ki, kj, pmnew, pheat_hcflux, pheat_latent, pmass_scale,     &
       &                    pdM, pdMbitsE, pdMbitsM, pdMb, pdMe,   &
       &                    pdMv, pz1_dt_e1e2 )
@@ -477,5 +486,5 @@
       !!----------------------------------------------------------------------
       INTEGER , INTENT(in) ::   ki, kj
-      REAL(wp), INTENT(in) ::   pmnew, pheat, pmass_scale
+      REAL(wp), INTENT(in) ::   pmnew, pheat_hcflux, pheat_latent, pmass_scale
       REAL(wp), INTENT(in) ::   pdM, pdMbitsE, pdMbitsM, pdMb, pdMe, pdMv, pz1_dt_e1e2
       !!----------------------------------------------------------------------
@@ -484,4 +493,6 @@
       !
       berg_melt (ki,kj) = berg_melt (ki,kj) + pdM      * pz1_dt_e1e2   ! kg/m2/s
+      berg_melt_hcflx (ki,kj) = berg_melt_hcflx (ki,kj) + pheat_hcflux * pz1_dt_e1e2   ! J/m2/s
+      berg_melt_qlat (ki,kj) = berg_melt_qlat (ki,kj) + pheat_latent * pz1_dt_e1e2   ! J/m2/s
       bits_src  (ki,kj) = bits_src  (ki,kj) + pdMbitsE * pz1_dt_e1e2   ! mass flux into bergy bitskg/m2/s
       bits_melt (ki,kj) = bits_melt (ki,kj) + pdMbitsM * pz1_dt_e1e2   ! melt rate of bergy bits kg/m2/s
@@ -489,5 +500,5 @@
       eros_melt (ki,kj) = eros_melt (ki,kj) + pdMe     * pz1_dt_e1e2   ! erosion rate kg/m2/s
       conv_melt (ki,kj) = conv_melt (ki,kj) + pdMv     * pz1_dt_e1e2   ! kg/m2/s
-      heat_to_ocean_net = heat_to_ocean_net + pheat * pmass_scale * berg_dt         ! J
+      heat_to_ocean_net = heat_to_ocean_net + (pheat_hcflux + pheat_latent) * pmass_scale * berg_dt         ! J
       IF( pmnew <= 0._wp ) nbergs_melted = nbergs_melted + 1                        ! Delete the berg if completely melted
       !
Index: /NEMO/trunk/src/OCE/ICB/icbthm.F90
===================================================================
--- /NEMO/trunk/src/OCE/ICB/icbthm.F90	(revision 9989)
+++ /NEMO/trunk/src/OCE/ICB/icbthm.F90	(revision 9990)
@@ -50,5 +50,5 @@
       REAL(wp) ::   zM, zT, zW, zL, zSST, zVol, zLn, zWn, zTn, znVol, zIC, zDn
       REAL(wp) ::   zMv, zMe, zMb, zmelt, zdvo, zdva, zdM, zSs, zdMe, zdMb, zdMv
-      REAL(wp) ::   zMnew, zMnew1, zMnew2, zheat, z1_12
+      REAL(wp) ::   zMnew, zMnew1, zMnew2, zheat_hcflux, zheat_latent, z1_12
       REAL(wp) ::   zMbits, znMbits, zdMbitsE, zdMbitsM, zLbits, zAbits, zMbb
       REAL(wp) ::   zxi, zyj, zff, z1_rday, z1_e1e2, zdt, z1_dt, z1_dt_e1e2
@@ -68,4 +68,5 @@
       !
       berg_grid%floating_melt(:,:) = 0._wp
+      ! calving_hflx re-used here as temporary workspace for the heat flux associated with melting
       berg_grid%calving_hflx(:,:)  = 0._wp
       !
@@ -166,7 +167,11 @@
             zmelt    = ( zdM - ( zdMbitsE - zdMbitsM ) ) * z1_dt   ! kg/s
             berg_grid%floating_melt(ii,ij) = berg_grid%floating_melt(ii,ij) + zmelt    * z1_e1e2    ! kg/m2/s
-            zheat = zmelt * pt%heat_density              ! kg/s x J/kg = J/s
-            berg_grid%calving_hflx (ii,ij) = berg_grid%calving_hflx (ii,ij) + zheat    * z1_e1e2    ! W/m2
-            CALL icb_dia_melt( ii, ij, zMnew, zheat, this%mass_scaling,       &
+            !! NB. The src_calving_hflx field is currently hardwired to zero in icb_stp, which means that the
+            !!     heat density of the icebergs is zero and the heat content flux to the ocean from iceberg
+            !!     melting is always zero. Leaving the term in the code until such a time as this is fixed. DS.
+            zheat_hcflux = zmelt * pt%heat_density       ! heat content flux : kg/s x J/kg = J/s
+            zheat_latent = - zmelt * rLfus               ! latent heat flux:  kg/s x J/kg = J/s
+            berg_grid%calving_hflx (ii,ij) = berg_grid%calving_hflx (ii,ij) + ( zheat_hcflux + zheat_latent ) * z1_e1e2    ! W/m2
+            CALL icb_dia_melt( ii, ij, zMnew, zheat_hcflux, zheat_latent, this%mass_scaling,       &
                &                       zdM, zdMbitsE, zdMbitsM, zdMb, zdMe,   &
                &                       zdMv, z1_dt_e1e2 )
@@ -214,5 +219,5 @@
       IF(.NOT. ln_passive_mode ) THEN
          emp (:,:) = emp (:,:) - berg_grid%floating_melt(:,:)
-!!       qns (:,:) = qns (:,:) + berg_grid%calving_hflx (:,:)  !!gm heat flux not yet properly coded ==>> need it, SOLVE that!
+         qns (:,:) = qns (:,:) + berg_grid%calving_hflx (:,:)  
       ENDIF
       !
