Index: NEMO/trunk/cfgs/SHARED/field_def_nemo-ice.xml
===================================================================
--- NEMO/trunk/cfgs/SHARED/field_def_nemo-ice.xml	(revision 14717)
+++ NEMO/trunk/cfgs/SHARED/field_def_nemo-ice.xml	(revision 14718)
@@ -178,10 +178,7 @@
       <field id="hfxcndtop"    long_name="Net conductive heat flux at the ice surface (neg = ice cooling)"  standard_name="conductive_heat_flux_at_sea_ice_surface"    unit="W/m2" />
       <field id="hfxcndbot"    long_name="Net conductive heat flux at the ice bottom (neg = ice cooling)"   standard_name="conductive_heat_flux_at_sea_ice_bottom"     unit="W/m2" />
-      <!-- clem: uncomment when uncommented in iceupdate.F90 -->
-      <!--
       <field id="hfxmelt"      long_name="Melt heat flux at the ice surface"       unit="W/m2" />
       <field id="hfxldmelt"    long_name="Heat flux in the lead for ice melting"   unit="W/m2" />
       <field id="hfxldgrow"    long_name="Heat flux in the lead for ice growth"    unit="W/m2" />
-      -->
 
       <!-- diags -->
@@ -351,5 +348,6 @@
       <field id="SH_icearea"      long_name="Sea ice area South"                     standard_name="sea_ice_area_s"                     unit="1e6_km2"  />
 
-      <!-- available with ln_icediaout -->
+      <!-- available with ln_icediahsb -->
+      <!-- global forcings  -->
       <field id="ibgfrcvoltop"    long_name="global mean ice/snow forcing at interface ice/snow-atm (volume equivalent ocean volume)"   unit="km3"      />
       <field id="ibgfrcvolbot"    long_name="global mean ice/snow forcing at interface ice/snow-ocean (volume equivalent ocean volume)" unit="km3"      />
@@ -360,4 +358,5 @@
       <field id="ibgfrchfxbot"    long_name="global mean heat flux below ice (on top of ocean) "                                        unit="W/m2"     />
 
+      <!-- global drifts (conservation checks) -->
       <field id="ibgvolume"       long_name="drift in ice/snow volume (equivalent ocean volume)"                                        unit="km3"      />
       <field id="ibgsaltco"       long_name="drift in ice salt content (equivalent ocean volume)"                                       unit="pss*km3"  />
@@ -365,10 +364,13 @@
       <field id="ibgheatfx"       long_name="drift in ice/snow heat flux"                                                               unit="W/m2"     />
 
+      <!-- global contents -->
       <field id="ibgvol_tot"      long_name="global mean ice volume"                                                                    unit="km3"      />
       <field id="sbgvol_tot"      long_name="global mean snow volume"                                                                   unit="km3"      />
       <field id="ibgarea_tot"     long_name="global mean ice area"                                                                      unit="km2"      />
-      <field id="ibgsalt_tot"     long_name="global mean ice salt content"                                                              unit="1e-3*km3" />
+      <field id="ibgsalt_tot"     long_name="global mean ice salt content"                                                              unit="pss*km3"  />
       <field id="ibgheat_tot"     long_name="global mean ice heat content"                                                              unit="1e20J"    />
       <field id="sbgheat_tot"     long_name="global mean snow heat content"                                                             unit="1e20J"    />
+      <field id="ipbgvol_tot"     long_name="global mean ice pond volume"                                                               unit="km3"      />
+      <field id="ilbgvol_tot"     long_name="global mean ice pond lid volume"                                                           unit="km3"      />
 
     </field_group>
@@ -502,6 +504,9 @@
     </field_group>
 
+    <!--============================-->
+    <!--  CONSERVATION diagnostics  -->
+    <!--============================-->
+
     <field_group id="ICE_globalbudget"  grid_ref="grid_scalar" >
-      <!-- global contents -->
       <field field_ref="ibgvol_tot"       name="ibgvol_tot"   />
       <field field_ref="sbgvol_tot"       name="sbgvol_tot"   />
@@ -510,22 +515,46 @@
       <field field_ref="ibgheat_tot"      name="ibgheat_tot"  />
       <field field_ref="sbgheat_tot"      name="sbgheat_tot"  />
-
-      <!-- global drifts (conservation checks) -->
-      <field field_ref="ibgvolume"        name="ibgvolume"    />
-      <field field_ref="ibgsaltco"        name="ibgsaltco"    />
-      <field field_ref="ibgheatco"        name="ibgheatco"    />
-      <field field_ref="ibgheatfx"        name="ibgheatfx"    />
-
-      <!-- global forcings  -->
-      <field field_ref="ibgfrcvoltop"     name="ibgfrcvoltop" />
-      <field field_ref="ibgfrcvolbot"     name="ibgfrcvolbot" />
-      <field field_ref="ibgfrctemtop"     name="ibgfrctemtop" />
-      <field field_ref="ibgfrctembot"     name="ibgfrctembot" />
-      <field field_ref="ibgfrcsal"        name="ibgfrcsal"    />
-      <field field_ref="ibgfrchfxtop"     name="ibgfrchfxtop" />
-      <field field_ref="ibgfrchfxbot"     name="ibgfrchfxbot" />
-    </field_group>
-
-
+      <field field_ref="ipbgvol_tot"      name="ipbgvol_tot"  />
+      <field field_ref="ilbgvol_tot"      name="ilbgvol_tot"  />
+    </field_group>
+    
+    <field_group id="ICE_budget"        grid_ref="grid_T_2D" >
+      <!-- general -->
+      <field field_ref="icemask"          name="simsk"      />
+      <field field_ref="iceconc"          name="siconc"     />
+      <field field_ref="icetemp"          name="sitemp"     />
+      <field field_ref="snwtemp"          name="sntemp"     />
+      <field field_ref="icettop"          name="sittop"     />
+      <field field_ref="icetbot"          name="sitbot"     />
+      <!-- heat fluxes -->
+      <field field_ref="qt_oce_ai"        name="qt_oce_ai"  />
+      <field field_ref="qt_atm_oi"        name="qt_atm_oi"  />
+      <field field_ref="qtr_ice_top"      name="qtr_ice_top"/>
+      <field field_ref="qtr_ice_bot"      name="qtr_ice_bot"/>
+      <field field_ref="qt_ice"           name="qt_ice"     />
+      <field field_ref="qsr_ice"          name="qsr_ice"    />
+      <field field_ref="qns_ice"          name="qns_ice"    />
+      <field field_ref="qemp_ice"         name="qemp_ice"   />
+      <field field_ref="hfxsub"           name="hfxsub"     />
+      <field field_ref="hfxspr"           name="hfxspr"     />
+      <field field_ref="hfxcndtop"        name="hfxcndtop"  />
+      <field field_ref="hfxcndbot"        name="hfxcndbot"  />
+      <field field_ref="hfxsensib"        name="hfxsensib"  />
+      <field field_ref="hfxmelt"          name="hfxmelt"    />
+      <field field_ref="hfxldmelt"        name="hfxldmelt"  />
+      <field field_ref="hfxldgrow"        name="hfxldgrow"  />
+      <!-- salt fluxes -->
+      <field field_ref="sfxice"           name="sfxice"     />
+      <!-- mass fluxes -->
+      <field field_ref="vfxice"           name="vfxice"     />
+      <field field_ref="vfxsnw"           name="vfxsnw"     />
+      <field field_ref="vfxpnd"           name="vfxpnd"     />
+      <field field_ref="vfxsub"           name="vfxsub"     />
+      <field field_ref="vfxsub_err"       name="vfxsub_err" />
+      <field field_ref="vfxsnw_sub"       name="vfxsnw_sub" />
+      <field field_ref="vfxsnw_pre"       name="vfxsnw_pre" />
+    </field_group>
+
+    
     <!--============================-->
     <!-- SIMIP sea ice field groups -->
Index: NEMO/trunk/cfgs/SHARED/field_def_nemo-oce.xml
===================================================================
--- NEMO/trunk/cfgs/SHARED/field_def_nemo-oce.xml	(revision 14717)
+++ NEMO/trunk/cfgs/SHARED/field_def_nemo-oce.xml	(revision 14718)
@@ -241,4 +241,8 @@
     <field id="mf_mf"       long_name="mass flux"              standard_name="mf_mass_flux"          unit="m"      grid_ref="grid_T_3D" />
 
+    <!-- fluxes from damping -->
+    <field id="sflx_dmp_cea"  long_name="salt flux due to damping"  standard_name="salt_flux_due_to_damping"          unit="g/m2/s"   />
+    <field id="hflx_dmp_cea"  long_name="heat flux due to damping"  standard_name="heat_flux_due_to_damping"          unit="W/m2"     />
+
   </field_group> <!-- grid_T -->
 
@@ -375,5 +379,5 @@
       <field id="emp_oce"      long_name="Evap minus Precip over ocean"         standard_name="evap_minus_precip_over_sea_water"                                     unit="kg/m2/s"   />
       <field id="emp_ice"      long_name="Evap minus Precip over ice"           standard_name="evap_minus_precip_over_sea_ice"                                       unit="kg/m2/s"   />
-      <field id="saltflx"      long_name="Downward salt flux"                                                                                                        unit="1e-3/m2/s" />
+      <field id="saltflx"      long_name="Downward salt flux"                                                                                                        unit="g/m2/s"    />
       <field id="fmmflx"       long_name="Water flux due to freezing/melting"                                                                                        unit="kg/m2/s"   />
       <field id="snowpre"      long_name="Snow precipitation"                   standard_name="snowfall_flux"                                                        unit="kg/m2/s"   />
@@ -475,4 +479,5 @@
       <field id="hflx_rain_cea" long_name="heat flux due to rainfall"                                standard_name="temperature_flux_due_to_rainfall_expressed_as_heat_flux_into_sea_water"        unit="W/m2"     />
       <field id="hflx_evap_cea" long_name="heat flux due to evaporation"                             standard_name="temperature_flux_due_to_evaporation_expressed_as_heat_flux_out_of_sea_water"   unit="W/m2"     />
+      <field id="hflx_subl_cea" long_name="heat flux due to sublimation (from atm. forcings)"        standard_name="temperature_flux_due_to_sublimation_expressed_as_heat_flux_out_of_sea_ice"     unit="W/m2"     />
       <field id="hflx_prec_cea" long_name="heat flux due to all precip"                              standard_name="temperature_flux_due_to_all_precip_expressed_as_heat_flux_into_sea_water"      unit="W/m2"     />
       <field id="hflx_snow_cea" long_name="heat flux due to snow falling"                            standard_name="heat_flux_onto_ocean_and_ice_due_to_snow_thermodynamics"                       unit="W/m2"     />
@@ -481,4 +486,5 @@
       <field id="hflx_ice_cea"  long_name="heat flux due to ice thermodynamics"                      standard_name="heat_flux_into_sea_water_due_to_sea_ice_thermodynamics"                        unit="W/m2"     />
       <field id="hflx_rnf_cea"  long_name="heat flux due to runoffs"                                 standard_name="temperature_flux_due_to_runoff_expressed_as_heat_flux_into_sea_water"          unit="W/m2"     />
+      <field id="sflx_rnf_cea"  long_name="salt flux due to runoffs"                                 standard_name="salt_flux_due_to_runoffs"                                                      unit="g/m2/s"   />
       <field id="hflx_cal_cea"  long_name="heat flux due to calving"                                 standard_name="heat_flux_into_sea_water_due_to_calving"                                       unit="W/m2"     />
       <field id="hflx_icb_cea"  long_name="heat flux due to iceberg"                                 standard_name="heat_flux_into_sea_water_due_to_icebergs"                                      unit="W/m2"     />
@@ -490,4 +496,11 @@
       <field id="ticemel_cea"   long_name="Rate of Melt at Upper Surface of Sea Ice (cell average)"  standard_name="tendency_of_sea_ice_amount_due_to_surface_melting"                             unit="kg/m2/s"  />
 
+      <!-- fluxes from relaxation and freshwater budget -->
+      <field id="sflx_ssr_cea"  long_name="salt flux due to restoring"    standard_name="salt_flux_due_to_restoring"    unit="g/m2/s"   />
+      <field id="hflx_ssr_cea"  long_name="heat flux due to restoring"    standard_name="heat_flux_due_to_restoring"    unit="W/m2"     />
+      <field id="vflx_ssr_cea"  long_name="volume flux due to restoring"  standard_name="volume_flux_due_to_restoring"  unit="kg/m2/s"  />
+      <field id="hflx_fwb_cea"  long_name="heat flux due to fwb"          standard_name="heat_flux_due_to_fwb"          unit="W/m2"     />
+      <field id="vflx_fwb_cea"  long_name="volume flux due to fwb"        standard_name="volume_flux_due_to_fwb"        unit="kg/m2/s"  />
+      
       <!-- ice field (nn_ice=1)  -->
       <field id="ice_cover"    long_name="Ice fraction"                                                 standard_name="sea_ice_area_fraction"                              unit="1"            />
@@ -1253,3 +1266,60 @@
   </field_group>
 
+  <!--============================-->
+  <!--  CONSERVATION diagnostics  -->
+  <!--============================-->
+
+  <field_group id="OCE_budget"        grid_ref="grid_T_2D" >
+    <field field_ref="sst"                 name="tos"          />
+    <field field_ref="sss"                 name="sos"          />
+    <field field_ref="ssh"                 name="zos"          />
+    <!-- mass flux -->
+    <field field_ref="empmr"               name="empmr"        />
+    <field field_ref="runoffs"             name="runoffs"      />
+    <field field_ref="emp_ice"             name="emp_ice"      />
+    <field field_ref="emp_oce"             name="emp_oce"      />
+    <field field_ref="iceshelf_cea"        name="iceshelf"     />
+    <field field_ref="iceberg_cea"         name="iceberg"      />
+    <field field_ref="calving_cea"         name="calving"      />
+    <!-- <field field_ref="berg_floating_melt"  name="calving" /> -->
+    <field field_ref="precip"              name="precip"       />
+    <field field_ref="snowpre"             name="snowpre"      />
+    <field field_ref="rain"                name="rain"         />
+    <field field_ref="evap_ao_cea"         name="evap_ao"      />
+    <field field_ref="subl_ai_cea"         name="subl_ai"      />
+    <field field_ref="snow_ai_cea"         name="snow_ai"      />
+    <field field_ref="snow_ao_cea"         name="snow_ao"      />
+    <!-- heat flux -->
+    <field field_ref="qsr"                 name="qsr"          />
+    <field field_ref="qns"                 name="qns"          />
+    <field field_ref="qt_oce"              name="qt_oce"       />
+    <field field_ref="qemp_oce"            name="qemp_oce"     />
+    <field field_ref="hflx_rain_cea"       name="hflx_rain"    />
+    <field field_ref="hflx_evap_cea"       name="hflx_evap"    />
+    <field field_ref="hflx_snow_cea"       name="hflx_snow"    />
+    <field field_ref="hflx_snow_ao_cea"    name="hflx_snow_ao" />
+    <field field_ref="hflx_snow_ai_cea"    name="hflx_snow_ai" />
+    <field field_ref="hflx_rnf_cea"        name="hflx_rnf"     />
+    <field field_ref="hflx_icb_cea"        name="hflx_icb"     />
+    <field field_ref="hflx_isf_cea"        name="hflx_isf"     />
+    <!-- salt flux (includes ssr) -->
+    <field field_ref="saltflx"             name="saltflx"      />
+    <field field_ref="sflx_rnf_cea"        name="sflx_rnf"     />
+    <!-- relaxation and damping -->
+    <field field_ref="hflx_ssr_cea"        name="hflx_ssr"     />
+    <field field_ref="vflx_ssr_cea"        name="vflx_ssr"     />
+    <field field_ref="sflx_ssr_cea"        name="sflx_ssr"     />
+    <field field_ref="hflx_dmp_cea"        name="hflx_dmp"     />
+    <field field_ref="sflx_dmp_cea"        name="sflx_dmp"     />
+    <field field_ref="hflx_fwb_cea"        name="hflx_fwb"     />
+    <field field_ref="vflx_fwb_cea"        name="vflx_fwb"     />
+  </field_group>
+
+  <field_group id="OCE_globalbudget"  grid_ref="grid_scalar" >
+    <field field_ref="voltot"              name="scvoltot"     />
+    <field field_ref="saltot"              name="scsaltot"     />
+    <field field_ref="temptot"             name="sctemtot"     />
+  </field_group>
+
+  
 </field_definition>
Index: NEMO/trunk/src/ICE/icedia.F90
===================================================================
--- NEMO/trunk/src/ICE/icedia.F90	(revision 14717)
+++ NEMO/trunk/src/ICE/icedia.F90	(revision 14718)
@@ -67,4 +67,5 @@
       REAL(wp)   ::   zbg_ivol, zbg_item, zbg_area, zbg_isal
       REAL(wp)   ::   zbg_svol, zbg_stem
+      REAL(wp)   ::   zbg_ipvol, zbg_ilvol
       REAL(wp)   ::   z_frc_voltop, z_frc_temtop, z_frc_sal
       REAL(wp)   ::   z_frc_volbot, z_frc_tembot
@@ -87,5 +88,6 @@
       ! ----------------------- !
       IF(  iom_use('ibgvol_tot' ) .OR. iom_use('sbgvol_tot' ) .OR. iom_use('ibgarea_tot') .OR. &
-         & iom_use('ibgsalt_tot') .OR. iom_use('ibgheat_tot') .OR. iom_use('sbgheat_tot') ) THEN
+         & iom_use('ibgsalt_tot') .OR. iom_use('ibgheat_tot') .OR. iom_use('sbgheat_tot') .OR. &
+         & iom_use('ipbgvol_tot' ) .OR. iom_use('ilbgvol_tot' ) ) THEN
 
          zbg_ivol = glob_sum( 'icedia', vt_i(:,:) * e1e2t(:,:) ) * 1.e-9  ! ice volume (km3)
@@ -95,4 +97,7 @@
          zbg_item = glob_sum( 'icedia', et_i(:,:) * e1e2t(:,:) ) * 1.e-20 ! heat content (1.e20 J)
          zbg_stem = glob_sum( 'icedia', et_s(:,:) * e1e2t(:,:) ) * 1.e-20 ! heat content (1.e20 J)
+         ! ponds
+         zbg_ipvol = glob_sum( 'icedia', vt_ip(:,:) * e1e2t(:,:) ) * 1.e-9  ! ice pond volume (km3)
+         zbg_ilvol = glob_sum( 'icedia', vt_il(:,:) * e1e2t(:,:) ) * 1.e-9  ! ice pond lid volume (km3)
 
          CALL iom_put( 'ibgvol_tot'  , zbg_ivol )
@@ -102,4 +107,7 @@
          CALL iom_put( 'ibgheat_tot' , zbg_item )
          CALL iom_put( 'sbgheat_tot' , zbg_stem )
+         ! ponds
+         CALL iom_put( 'ipbgvol_tot' , zbg_ipvol )
+         CALL iom_put( 'ilbgvol_tot' , zbg_ilvol )
 
       ENDIF
Index: NEMO/trunk/src/ICE/iceupdate.F90
===================================================================
--- NEMO/trunk/src/ICE/iceupdate.F90	(revision 14717)
+++ NEMO/trunk/src/ICE/iceupdate.F90	(revision 14718)
@@ -289,7 +289,7 @@
       IF( iom_use('hfxcndbot'  ) )   CALL iom_put( 'hfxcndbot'  , SUM( qcn_ice_bot * a_i_b, dim=3 ) )   ! Bottom conduction flux
       IF( iom_use('hfxcndtop'  ) )   CALL iom_put( 'hfxcndtop'  , SUM( qcn_ice_top * a_i_b, dim=3 ) )   ! Surface conduction flux
-!!    IF( iom_use('hfxmelt'    ) )   CALL iom_put( 'hfxmelt'    , SUM( qml_ice     * a_i_b, dim=3 ) )   ! Surface melt flux
-!!    IF( iom_use('hfxldmelt'  ) )   CALL iom_put( 'hfxldmelt'  ,      fhld        * at_i_b         )   ! Heat in lead for ice melting 
-!!    IF( iom_use('hfxldgrow'  ) )   CALL iom_put( 'hfxldgrow'  ,      qlead       * r1_Dt_ice      )   ! Heat in lead for ice growth
+      IF( iom_use('hfxmelt'    ) )   CALL iom_put( 'hfxmelt'    , SUM( qml_ice     * a_i_b, dim=3 ) )   ! Surface melt flux
+      IF( iom_use('hfxldmelt'  ) )   CALL iom_put( 'hfxldmelt'  ,      fhld        * at_i_b         )   ! Heat in lead for ice melting 
+      IF( iom_use('hfxldgrow'  ) )   CALL iom_put( 'hfxldgrow'  ,      qlead       * r1_Dt_ice      )   ! Heat in lead for ice growth
 
       ! controls
Index: NEMO/trunk/src/OCE/SBC/sbcblk.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbcblk.F90	(revision 14717)
+++ NEMO/trunk/src/OCE/SBC/sbcblk.F90	(revision 14718)
@@ -892,8 +892,12 @@
       REAL(wp) ::   zztmp,zz1,zz2,zz3    ! local variable
       REAL(wp), DIMENSION(jpi,jpj) ::   zqlw              ! net long wave radiative heat flux
-      !!---------------------------------------------------------------------
-      !
-      ! local scalars ( place there for vector optimisation purposes)
-
+      REAL(wp), DIMENSION(jpi,jpj) ::   zcptrain, zcptsnw, zcptn ! Heat content per unit mass (J/kg)
+      !!---------------------------------------------------------------------
+      !
+      ! Heat content per unit mass (J/kg)
+      zcptrain(:,:) = (      ptair        - rt0 ) * rcp  * tmask(:,:,1)
+      zcptsnw (:,:) = ( MIN( ptair, rt0 ) - rt0 ) * rcpi * tmask(:,:,1)
+      zcptn   (:,:) =        ptsk                 * rcp  * tmask(:,:,1)
+      !
       ! ----------------------------------------------------------------------------- !
       !     III    Net longwave radiative FLUX                                        !
@@ -907,14 +911,11 @@
       ! ----------------------------------------------------------------------------- !
       !
-      emp (:,:) = (  pevp(:,:)                                       &   ! mass flux (evap. - precip.)
-         &         - pprec(:,:) * rn_pfac  ) * tmask(:,:,1)
-      !
-      qns(:,:) = zqlw(:,:) + psen(:,:) + plat(:,:)                   &   ! Downward Non Solar
-         &     - psnow(:,:) * rn_pfac * rLfus                        &   ! remove latent melting heat for solid precip
-         &     - pevp(:,:) * ptsk(:,:) * rcp                         &   ! remove evap heat content at SST
-         &     + ( pprec(:,:) - psnow(:,:) ) * rn_pfac               &   ! add liquid precip heat content at Tair
-         &     * ( ptair(:,:) - rt0 ) * rcp                          &
-         &     + psnow(:,:) * rn_pfac                                &   ! add solid  precip heat content at min(Tair,Tsnow)
-         &     * ( MIN( ptair(:,:), rt0 ) - rt0 ) * rcpi
+      emp (:,:) = ( pevp(:,:) - pprec(:,:) * rn_pfac ) * tmask(:,:,1)      ! mass flux (evap. - precip.)
+      !
+      qns(:,:) = zqlw(:,:) + psen(:,:) + plat(:,:)                     &   ! Downward Non Solar
+         &     - psnow(:,:) * rn_pfac * rLfus                          &   ! remove latent melting heat for solid precip
+         &     - pevp(:,:) * zcptn(:,:)                                &   ! remove evap heat content at SST
+         &     + ( pprec(:,:) - psnow(:,:) ) * rn_pfac * zcptrain(:,:) &   ! add liquid precip heat content at Tair
+         &     + psnow(:,:) * rn_pfac * zcptsnw(:,:)                       ! add solid  precip heat content at min(Tair,Tsnow)
       qns(:,:) = qns(:,:) * tmask(:,:,1)
       !
@@ -1000,5 +1001,5 @@
       ! C-grid ice dynamics :   U & V-points (same as ocean)
       DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
-      wndm_ice(ji,jj) = SQRT( pwndi(ji,jj) * pwndi(ji,jj) + pwndj(ji,jj) * pwndj(ji,jj) )
+         wndm_ice(ji,jj) = SQRT( pwndi(ji,jj) * pwndi(ji,jj) + pwndj(ji,jj) * pwndj(ji,jj) )
       END_2D
       !
@@ -1120,6 +1121,6 @@
       REAL(wp), DIMENSION(jpi,jpj,jpl) ::   z_dqsb        ! sensible  heat sensitivity over ice
       REAL(wp), DIMENSION(jpi,jpj)     ::   zevap, zsnw   ! evaporation and snw distribution after wind blowing (SI3)
-      REAL(wp), DIMENSION(jpi,jpj)     ::   ztmp, ztmp2
       REAL(wp), DIMENSION(jpi,jpj)     ::   ztri
+      REAL(wp), DIMENSION(jpi,jpj)     ::   zcptrain, zcptsnw, zcptn ! Heat content per unit mass (J/kg)
       !!---------------------------------------------------------------------
       !
@@ -1130,4 +1131,9 @@
       dqla_ice(:,:,:) = 0._wp
 
+      ! Heat content per unit mass (J/kg)
+      zcptrain(:,:) = (      ptair        - rt0 ) * rcp  * tmask(:,:,1)
+      zcptsnw (:,:) = ( MIN( ptair, rt0 ) - rt0 ) * rcpi * tmask(:,:,1)
+      zcptn   (:,:) =        sst_m                * rcp  * tmask(:,:,1)
+      !
       !                                     ! ========================== !
       DO jl = 1, jpl                        !  Loop over ice categories  !
@@ -1205,10 +1211,8 @@
 
       ! --- heat flux associated with emp --- !
-      qemp_oce(:,:) = - ( 1._wp - at_i_b(:,:) ) * zevap(:,:) * sst_m(:,:) * rcp                  & ! evap at sst
-         &          + ( tprecip(:,:) - sprecip(:,:) ) * ( ptair(:,:) - rt0 ) * rcp               & ! liquid precip at Tair
-         &          +   sprecip(:,:) * ( 1._wp - zsnw ) *                                        & ! solid precip at min(Tair,Tsnow)
-         &              ( ( MIN( ptair(:,:), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus )
-      qemp_ice(:,:) =   sprecip(:,:) * zsnw *                                                    & ! solid precip (only)
-         &              ( ( MIN( ptair(:,:), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus )
+      qemp_oce(:,:) = - ( 1._wp - at_i_b(:,:) ) * zevap(:,:) * zcptn(:,:)         & ! evap at sst
+         &          + ( tprecip(:,:) - sprecip(:,:) )   *   zcptrain(:,:)         & ! liquid precip at Tair
+         &          +   sprecip(:,:) * ( 1._wp - zsnw ) * ( zcptsnw (:,:) - rLfus ) ! solid precip at min(Tair,Tsnow)
+      qemp_ice(:,:) =   sprecip(:,:) *           zsnw   * ( zcptsnw (:,:) - rLfus ) ! solid precip (only)
 
       ! --- total solar and non solar fluxes --- !
@@ -1218,5 +1222,5 @@
 
       ! --- heat content of precip over ice in J/m3 (to be used in 1D-thermo) --- !
-      qprec_ice(:,:) = rhos * ( ( MIN( ptair(:,:), rt0 ) - rt0 ) * rcpi * tmask(:,:,1) - rLfus )
+      qprec_ice(:,:) = rhos * ( zcptsnw(:,:) - rLfus )
 
       ! --- heat content of evap over ice in W/m2 (to be used in 1D-thermo) ---
@@ -1250,22 +1254,27 @@
       !
       IF( iom_use('evap_ao_cea') .OR. iom_use('hflx_evap_cea') ) THEN
-         ztmp(:,:) = zevap(:,:) * ( 1._wp - at_i_b(:,:) )
-         IF( iom_use('evap_ao_cea'  ) )  CALL iom_put( 'evap_ao_cea'  , ztmp(:,:) * tmask(:,:,1) )   ! ice-free oce evap (cell average)
-         IF( iom_use('hflx_evap_cea') )  CALL iom_put( 'hflx_evap_cea', ztmp(:,:) * sst_m(:,:) * rcp * tmask(:,:,1) )   ! heat flux from evap (cell average)
-      ENDIF
-      IF( iom_use('hflx_rain_cea') ) THEN
-         ztmp(:,:) = rcp * ( SUM( (ptsu-rt0) * a_i_b, dim=3 ) + sst_m(:,:) * ( 1._wp - at_i_b(:,:) ) )
-         IF( iom_use('hflx_rain_cea') )  CALL iom_put( 'hflx_rain_cea', ( tprecip(:,:) - sprecip(:,:) ) * ztmp(:,:) )   ! heat flux from rain (cell average)
-      ENDIF
-      IF( iom_use('hflx_snow_cea') .OR. iom_use('hflx_snow_ao_cea') .OR. iom_use('hflx_snow_ai_cea')  )  THEN
-         WHERE( SUM( a_i_b, dim=3 ) > 1.e-10 )
-            ztmp(:,:) = rcpi * SUM( (ptsu-rt0) * a_i_b, dim=3 ) / SUM( a_i_b, dim=3 )
-         ELSEWHERE
-            ztmp(:,:) = rcp * sst_m(:,:)
-         ENDWHERE
-         ztmp2(:,:) = sprecip(:,:) * ( ztmp(:,:) - rLfus )
-         IF( iom_use('hflx_snow_cea')    ) CALL iom_put('hflx_snow_cea'   , ztmp2(:,:) ) ! heat flux from snow (cell average)
-         IF( iom_use('hflx_snow_ao_cea') ) CALL iom_put('hflx_snow_ao_cea', ztmp2(:,:) * ( 1._wp - zsnw(:,:) ) ) ! heat flux from snow (over ocean)
-         IF( iom_use('hflx_snow_ai_cea') ) CALL iom_put('hflx_snow_ai_cea', ztmp2(:,:) *           zsnw(:,:)   ) ! heat flux from snow (over ice)
+         CALL iom_put( 'evap_ao_cea'  , zevap(:,:) * ( 1._wp - at_i_b(:,:) ) * tmask(:,:,1)              )   ! ice-free oce evap (cell average)
+         CALL iom_put( 'hflx_evap_cea', zevap(:,:) * ( 1._wp - at_i_b(:,:) ) * tmask(:,:,1) * zcptn(:,:) )   ! heat flux from evap (cell average)
+      ENDIF
+      IF( iom_use('rain') .OR. iom_use('rain_ao_cea') .OR. iom_use('hflx_rain_cea') ) THEN
+         CALL iom_put( 'rain'         ,   tprecip(:,:) - sprecip(:,:)                             )          ! liquid precipitation 
+         CALL iom_put( 'rain_ao_cea'  , ( tprecip(:,:) - sprecip(:,:) ) * ( 1._wp - at_i_b(:,:) ) )          ! liquid precipitation over ocean (cell average)
+         CALL iom_put( 'hflx_rain_cea', ( tprecip(:,:) - sprecip(:,:) ) * zcptrain(:,:) )                    ! heat flux from rain (cell average)
+      ENDIF
+      IF(  iom_use('snow_ao_cea')   .OR. iom_use('snow_ai_cea')      .OR. &
+         & iom_use('hflx_snow_cea') .OR. iom_use('hflx_snow_ao_cea') .OR. iom_use('hflx_snow_ai_cea')  )  THEN
+         CALL iom_put( 'snow_ao_cea'     , sprecip(:,:)                            * ( 1._wp - zsnw(:,:) ) ) ! Snow over ice-free ocean  (cell average)
+         CALL iom_put( 'snow_ai_cea'     , sprecip(:,:)                            *           zsnw(:,:)   ) ! Snow over sea-ice         (cell average)
+         CALL iom_put( 'hflx_snow_cea'   , sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) )                         ! heat flux from snow (cell average)
+         CALL iom_put( 'hflx_snow_ao_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) * ( 1._wp - zsnw(:,:) ) ) ! heat flux from snow (over ocean)
+         CALL iom_put( 'hflx_snow_ai_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) *           zsnw(:,:)   ) ! heat flux from snow (over ice)
+      ENDIF
+      IF( iom_use('hflx_prec_cea') ) THEN                                                                    ! heat flux from precip (cell average)
+         CALL iom_put('hflx_prec_cea' ,    sprecip(:,:)                  * ( zcptsnw (:,:) - rLfus )  &
+            &                          + ( tprecip(:,:) - sprecip(:,:) ) *   zcptrain(:,:) )
+      ENDIF
+      IF( iom_use('subl_ai_cea') .OR. iom_use('hflx_subl_cea') ) THEN
+         CALL iom_put( 'subl_ai_cea'  , SUM( a_i_b(:,:,:) *  evap_ice(:,:,:), dim=3 ) * tmask(:,:,1) ) ! Sublimation over sea-ice (cell average)
+         CALL iom_put( 'hflx_subl_cea', SUM( a_i_b(:,:,:) * qevap_ice(:,:,:), dim=3 ) * tmask(:,:,1) ) ! Heat flux from sublimation (cell average)
       ENDIF
       !
Index: NEMO/trunk/src/OCE/SBC/sbccpl.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbccpl.F90	(revision 14717)
+++ NEMO/trunk/src/OCE/SBC/sbccpl.F90	(revision 14718)
@@ -1924,8 +1924,8 @@
       IF( iom_use('snow_ao_cea') )   CALL iom_put( 'snow_ao_cea' , sprecip(:,:) * ( 1._wp - zsnw(:,:) )                  )  ! Snow over ice-free ocean  (cell average)
       IF( iom_use('snow_ai_cea') )   CALL iom_put( 'snow_ai_cea' , sprecip(:,:) *           zsnw(:,:)                    )  ! Snow over sea-ice         (cell average)
-      IF( iom_use('rain_ao_cea') )   CALL iom_put( 'rain_ao_cea' , ( tprecip(:,:) - sprecip(:,:) ) * picefr(:,:)         )  ! liquid precipitation over ocean (cell average)
-      IF( iom_use('subl_ai_cea') )   CALL iom_put( 'subl_ai_cea' , frcv(jpr_ievp)%z3(:,:,1) * picefr(:,:) * tmask(:,:,1) )     ! Sublimation over sea-ice (cell average)
+      IF( iom_use('rain_ao_cea') )   CALL iom_put( 'rain_ao_cea' , ( tprecip(:,:) - sprecip(:,:) ) * ziceld(:,:)         )  ! liquid precipitation over ocean (cell average)
+      IF( iom_use('subl_ai_cea') )   CALL iom_put( 'subl_ai_cea' , zevap_ice_total(:,:) * picefr(:,:) * tmask(:,:,1)     )  ! Sublimation over sea-ice (cell average)
       IF( iom_use('evap_ao_cea') )   CALL iom_put( 'evap_ao_cea' , ( frcv(jpr_tevp)%z3(:,:,1)  &
-         &                                                         - frcv(jpr_ievp)%z3(:,:,1) * picefr(:,:) ) * tmask(:,:,1) ) ! ice-free oce evap (cell average)
+         &                                                         - zevap_ice_total(:,:) * picefr(:,:) ) * tmask(:,:,1) )  ! ice-free oce evap (cell average)
       ! note: runoff output is done in sbcrnf (which includes icebergs too) and iceshelf output is done in sbcisf
 !!      IF( srcv(jpr_rnf)%laction )   CALL iom_put( 'runoffs' , rnf(:,:) * tmask(:,:,1)                                 )  ! runoff
@@ -2100,4 +2100,6 @@
       IF (        iom_use('hflx_snow_ai_cea') ) &                                                    ! heat flux from snow (over ice)
          &   CALL iom_put('hflx_snow_ai_cea', sprecip(:,:) * ( zcptsnw(:,:) - rLfus ) *  zsnw(:,:) )
+      IF(         iom_use('hflx_subl_cea') )    &                                                    ! heat flux from sublimation
+         &   CALL iom_put('hflx_subl_cea' ,   SUM( qevap_ice(:,:,:) * a_i(:,:,:), dim=3 ) * tmask(:,:,1) )
       ! note: hflx for runoff and iceshelf are done in sbcrnf and sbcisf resp.
       !
Index: NEMO/trunk/src/OCE/SBC/sbcfwb.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbcfwb.F90	(revision 14717)
+++ NEMO/trunk/src/OCE/SBC/sbcfwb.F90	(revision 14718)
@@ -123,4 +123,7 @@
             emp(:,:) = emp(:,:) - z_fwfprv(1)        * tmask(:,:,1)
             qns(:,:) = qns(:,:) + zcoef * sst_m(:,:) * tmask(:,:,1) ! account for change to the heat budget due to fw correction
+            ! outputs
+            IF( iom_use('hflx_fwb_cea') )  CALL iom_put( 'hflx_fwb_cea', zcoef * sst_m(:,:) * tmask(:,:,1) )
+            IF( iom_use('vflx_fwb_cea') )  CALL iom_put( 'vflx_fwb_cea', z_fwfprv(1)        * tmask(:,:,1) )
          ENDIF
          !
@@ -154,4 +157,7 @@
             emp(:,:) = emp(:,:) + a_fwb              * tmask(:,:,1)
             qns(:,:) = qns(:,:) - zcoef * sst_m(:,:) * tmask(:,:,1) ! account for change to the heat budget due to fw correction
+            ! outputs
+            IF( iom_use('hflx_fwb_cea') )  CALL iom_put( 'hflx_fwb_cea', -zcoef * sst_m(:,:) * tmask(:,:,1) )
+            IF( iom_use('vflx_fwb_cea') )  CALL iom_put( 'vflx_fwb_cea', -a_fwb              * tmask(:,:,1) )
          ENDIF
          ! Output restart information
@@ -201,4 +207,7 @@
             qns(:,:) = qns(:,:) - zerp_cor(:,:) * rcp * sst_m(:,:)  ! account for change to the heat budget due to fw correction
             erp(:,:) = erp(:,:) + zerp_cor(:,:)
+            ! outputs
+            IF( iom_use('hflx_fwb_cea') )  CALL iom_put( 'hflx_fwb_cea', -zerp_cor(:,:) * rcp * sst_m(:,:) )
+            IF( iom_use('vflx_fwb_cea') )  CALL iom_put( 'vflx_fwb_cea', -zerp_cor(:,:) )
             !
             IF( lwp ) THEN                   ! control print
Index: NEMO/trunk/src/OCE/SBC/sbcrnf.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbcrnf.F90	(revision 14717)
+++ NEMO/trunk/src/OCE/SBC/sbcrnf.F90	(revision 14718)
@@ -131,6 +131,10 @@
              IF( ln_rnf_icb ) THEN
                 fwficb(:,:) = rn_rfact * ( sf_i_rnf(1)%fnow(:,:,1) ) * tmask(:,:,1)  ! updated runoff value at time step kt
-                CALL iom_put( 'iceberg_cea'  , fwficb(:,:)  )         ! output iceberg flux
-                CALL iom_put( 'hflx_icb_cea' , fwficb(:,:) * rLfus )   ! output Heat Flux into Sea Water due to Iceberg Thermodynamics -->
+                rnf(:,:) = rnf(:,:) + fwficb(:,:)
+                qns(:,:) = qns(:,:) - fwficb(:,:) * rLfus
+                !!qns_tot(:,:) = qns_tot(:,:) - fwficb(:,:) * rLfus                
+                !!qns_oce(:,:) = qns_oce(:,:) - fwficb(:,:) * rLfus                
+                CALL iom_put( 'iceberg_cea'  ,  fwficb(:,:)  )          ! output iceberg flux
+                CALL iom_put( 'hflx_icb_cea' , -fwficb(:,:) * rLfus )   ! output Heat Flux into Sea Water due to Iceberg Thermodynamics -->
              ENDIF
          ENDIF
@@ -152,4 +156,5 @@
                                          CALL iom_put( 'runoffs'     , rnf(:,:)                         )   ! output runoff mass flux
          IF( iom_use('hflx_rnf_cea') )   CALL iom_put( 'hflx_rnf_cea', rnf_tsc(:,:,jp_tem) * rho0 * rcp )   ! output runoff sensible heat (W/m2)
+         IF( iom_use('sflx_rnf_cea') )   CALL iom_put( 'sflx_rnf_cea', rnf_tsc(:,:,jp_sal) * rho0       )   ! output runoff salt flux (g/m2/s)
       ENDIF
       !
Index: NEMO/trunk/src/OCE/SBC/sbcssr.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbcssr.F90	(revision 14717)
+++ NEMO/trunk/src/OCE/SBC/sbcssr.F90	(revision 14718)
@@ -94,4 +94,7 @@
             !                                      ! ========================= !
             !
+            qrp(:,:) = 0._wp ! necessary init
+            erp(:,:) = 0._wp
+            !
             IF( nn_sstr == 1 ) THEN                                   !* Temperature restoring term
                DO_2D( 1, 1, 1, 1 )
@@ -135,6 +138,11 @@
                   qns(ji,jj) = qns(ji,jj) - zerp * rcp * sst_m(ji,jj)
                   erp(ji,jj) = zerp
+                  qrp(ji,jj) = qrp(ji,jj) - zerp * rcp * sst_m(ji,jj)
                END_2D
             ENDIF
+            ! outputs
+            CALL iom_put( 'hflx_ssr_cea', qrp(:,:) )
+            IF( nn_sssr == 1 )   CALL iom_put( 'sflx_ssr_cea',  erp(:,:) * sss_m(:,:) )
+            IF( nn_sssr == 2 )   CALL iom_put( 'vflx_ssr_cea', -erp(:,:) )
             !
          ENDIF
Index: NEMO/trunk/src/OCE/TRA/tradmp.F90
===================================================================
--- NEMO/trunk/src/OCE/TRA/tradmp.F90	(revision 14717)
+++ NEMO/trunk/src/OCE/TRA/tradmp.F90	(revision 14718)
@@ -101,5 +101,5 @@
       IF( ln_timing )   CALL timing_start('tra_dmp')
       !
-      IF( l_trdtra )   THEN                    !* Save ta and sa trends
+      IF( l_trdtra .OR. iom_use('hflx_dmp_cea') .OR. iom_use('sflx_dmp_cea') ) THEN   !* Save ta and sa trends
          ALLOCATE( ztrdts(jpi,jpj,jpk,jpts) )
          ztrdts(:,:,:,:) = pts(:,:,:,:,Krhs)
@@ -139,4 +139,12 @@
          !
       END SELECT
+      !
+      ! outputs (clem trunk)
+      IF( iom_use('hflx_dmp_cea') )       &
+         &   CALL iom_put('hflx_dmp_cea', &
+         &   SUM( ( pts(:,:,:,jp_tem,Krhs) - ztrdts(:,:,:,jp_tem) ) * e3t(:,:,:,Kmm), dim=3 ) * rcp * rho0 ) ! W/m2
+      IF( iom_use('sflx_dmp_cea') )       &
+         &   CALL iom_put('sflx_dmp_cea', &
+         &   SUM( ( pts(:,:,:,jp_sal,Krhs) - ztrdts(:,:,:,jp_sal) ) * e3t(:,:,:,Kmm), dim=3 ) * rho0 )       ! g/m2/s
       !
       IF( l_trdtra )   THEN       ! trend diagnostic
