Index: NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/cfgs/SHARED/field_def_nemo-ice.xml
===================================================================
--- NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/cfgs/SHARED/field_def_nemo-ice.xml	(revision 14617)
+++ NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/cfgs/SHARED/field_def_nemo-ice.xml	(revision 14807)
@@ -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/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/cfgs/SHARED/field_def_nemo-oce.xml
===================================================================
--- NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/cfgs/SHARED/field_def_nemo-oce.xml	(revision 14617)
+++ NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/cfgs/SHARED/field_def_nemo-oce.xml	(revision 14807)
@@ -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,65 @@
   </field_group>
 
+  <!--============================-->
+  <!--  CONSERVATION diagnostics  -->
+  <!--============================-->
+  <!-- BE CAREFUL: this group (OCE_budget) cannot be called in file_def.xml as such (unless nn_fsbc=1)
+                   If doing so, the last output (in time) of the netcdf file 
+		   would be corrupted (NaN values). However calling each of these
+		   variables directly in the file_def.xml works. It is probably 
+		   because there is a mix up of sbc variables with other variables
+    -->
+  <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>
