Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/context_nemo-BASIC.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/context_nemo-BASIC.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/context_nemo-BASIC.xml	(revision 14078)
@@ -0,0 +1,46 @@
+<!--
+ ============================================================================================== 
+    NEMO context
+============================================================================================== 
+-->
+<context id="nemo">
+<!-- $id$ -->
+<!-- Fields definition -->
+    <field_definition src="./field_def_nemo-oce.xml"/>   <!--  NEMO ocean dynamics                     -->
+    <field_definition src="./field_def_nemo-ice.xml"/>   <!--  NEMO ocean sea ice                      -->
+<!--    <field_definition src="./field_def_nemo-bgc.xml"/>   <!--  NEMO ocean biogeochemistry with PISCES  -->
+
+
+<!-- Files definition -->
+    <file_definition src="./file_def_nemo-oce-BASIC.xml"/>     <!--  NEMO ocean dynamics                     -->
+    <file_definition src="./file_def_nemo-ice-BASIC.xml"/>     <!--  NEMO ocean sea ice                      -->
+<!--    <file_definition src="./file_def_nemo-bgc.xml"/>     <!--  NEMO ocean biogeochemistry with PISCES  -->
+    <!-- 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+    
+    <axis_definition>
+      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
+      <axis id="deptht300" axis_ref="deptht" >
+         <zoom_axis begin="0" n="35" />
+      </axis>
+      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
+      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
+      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
+      <axis id="nfloat" long_name="Float number"      unit="-"                 />
+      <axis id="icbcla"  long_name="Iceberg class"      unit="1"               />
+      <axis id="ncatice" long_name="Ice category"       unit="1"               />
+      <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"            />
+      <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"            />
+      <axis id="deptht_surface" axis_ref="deptht" >
+         <zoom_axis begin=" 0 " n=" 1 " />
+      </axis>
+    </axis_definition>
+ 
+    <domain_definition src="./domain_def_nemo.xml"/>
+  
+    <grid_definition src="./grid_def_nemo.xml"/>
+
+</context>
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/context_nemo-CMIP6.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/context_nemo-CMIP6.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/context_nemo-CMIP6.xml	(revision 14078)
@@ -0,0 +1,46 @@
+<!--
+ ============================================================================================== 
+    NEMO context
+============================================================================================== 
+-->
+<context id="nemo">
+<!-- $id$ -->
+<!-- Fields definition -->
+    <field_definition src="./field_def_nemo-oce.xml"/>   <!--  NEMO ocean dynamics                     -->
+    <field_definition src="./field_def_nemo-ice.xml"/>   <!--  NEMO ocean sea ice                      -->
+<!--    <field_definition src="./field_def_nemo-bgc.xml"/>   <!--  NEMO ocean biogeochemistry with PISCES  -->
+
+
+<!-- Files definition -->
+    <file_definition src="./file_def_nemo-oce-CMIP6.xml"/>     <!--  NEMO ocean dynamics                     -->
+    <file_definition src="./file_def_nemo-ice-CMIP6.xml"/>     <!--  NEMO ocean sea ice                      -->
+<!--    <file_definition src="./file_def_nemo-bgc.xml"/>     <!--  NEMO ocean biogeochemistry with PISCES  -->
+    <!-- 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+    
+    <axis_definition>
+      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
+      <axis id="deptht300" axis_ref="deptht" >
+         <zoom_axis begin="0" n="35" />
+      </axis>
+      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
+      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
+      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
+      <axis id="nfloat" long_name="Float number"      unit="-"                 />
+      <axis id="icbcla"  long_name="Iceberg class"      unit="1"               />
+      <axis id="ncatice" long_name="Ice category"       unit="1"               />
+      <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"            />
+      <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"            />
+      <axis id="deptht_surface" axis_ref="deptht" >
+         <zoom_axis begin=" 0 " n=" 1 " />
+      </axis>
+    </axis_definition>
+ 
+    <domain_definition src="./domain_def_nemo.xml"/>
+  
+    <grid_definition src="./grid_def_nemo.xml"/>
+
+</context>
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/context_nemo-CUSTOM.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/context_nemo-CUSTOM.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/context_nemo-CUSTOM.xml	(revision 14078)
@@ -0,0 +1,46 @@
+<!--
+ ============================================================================================== 
+    NEMO context
+============================================================================================== 
+-->
+<context id="nemo">
+<!-- $id$ -->
+<!-- Fields definition -->
+    <field_definition src="./field_def_nemo-oce.xml"/>   <!--  NEMO ocean dynamics                     -->
+    <field_definition src="./field_def_nemo-ice.xml"/>   <!--  NEMO ocean sea ice                      -->
+<!--    <field_definition src="./field_def_nemo-bgc.xml"/>   <!--  NEMO ocean biogeochemistry with PISCES  -->
+
+
+<!-- Files definition -->
+    <file_definition src="./file_def_nemo-oce.xml"/>     <!--  NEMO ocean dynamics                     -->
+    <file_definition src="./file_def_nemo-ice.xml"/>     <!--  NEMO ocean sea ice                      -->
+<!--    <file_definition src="./file_def_nemo-bgc.xml"/>     <!--  NEMO ocean biogeochemistry with PISCES  -->
+    <!-- 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+    
+    <axis_definition>
+      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
+      <axis id="deptht300" axis_ref="deptht" >
+         <zoom_axis begin="0" n="35" />
+      </axis>
+      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
+      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
+      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
+      <axis id="nfloat" long_name="Float number"      unit="-"                 />
+      <axis id="icbcla"  long_name="Iceberg class"      unit="1"               />
+      <axis id="ncatice" long_name="Ice category"       unit="1"               />
+      <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"            />
+      <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"            />
+      <axis id="deptht_surface" axis_ref="deptht" >
+         <zoom_axis begin=" 0 " n=" 1 " />
+      </axis>
+    </axis_definition>
+ 
+    <domain_definition src="./domain_def_nemo.xml"/>
+
+    <grid_definition src="./grid_def_nemo.xml"/>
+  
+</context>
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-BASIC-10D.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-BASIC-10D.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-BASIC-10D.xml	(revision 14078)
@@ -0,0 +1,151 @@
+<?xml version="1.0"?>
+    <!-- $id$ -->
+    
+ <!--
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files for lim3                                =
+=                                         put the variables you want...                                    =
+============================================================================================================
+ -->
+    
+ <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1mo" min_digits="4">
+   
+   <file_group id="10d" output_freq="10d"  output_level="10" enabled=".TRUE.">  <!-- 10d files -->   	
+     <file id="file21" name_suffix="_icemod" description="ice variables" enabled=".true." >
+
+       <!-- ice mask -->
+       <field field_ref="icemask"          name="simsk"   />
+       <field field_ref="icemask05"        name="simsk05" />
+       <field field_ref="icemask15"        name="simsk15" />
+       
+       <!-- general -->
+       <field field_ref="snwvolu"          name="snvolu" />
+       <field field_ref="icethic"          name="sithic" />
+       <field field_ref="icevolu"          name="sivolu" />
+       <field field_ref="iceconc"          name="siconc" />
+       <field field_ref="icesalt"          name="sisali" />
+       <field field_ref="iceapnd"          name="siapnd" />
+       <field field_ref="icevpnd"          name="sivpnd" />
+       <!-- sst_m is always the potential temperature even when using teos10 -->
+       <field field_ref="sst_m_pot"        name="sst_m_pot"  />
+       <field field_ref="sss_m_abs"        name="sss_m_abs"  />
+       
+       <!-- heat -->
+       <field field_ref="icetemp"          name="sitemp" />
+       <field field_ref="icettop"          name="sittop" />
+       <field field_ref="icetbot"          name="sitbot" />
+       
+       <!-- momentum -->
+       <field field_ref="uice"             name="sivelu"  />
+       <field field_ref="vice"             name="sivelv"  />
+       <field field_ref="icevel"           name="sivelo"  />
+       <field field_ref="utau_ai"          name="utau_ai" />
+       <field field_ref="vtau_ai"          name="vtau_ai" />
+       <field field_ref="utau_oi"          name="utau_oi" />
+       <field field_ref="vtau_oi"          name="vtau_oi" />
+       
+       <!-- rheology -->
+       <field field_ref="icediv"           name="sidive"  />
+       <field field_ref="iceshe"           name="sishea"  />
+       <field field_ref="icestr"           name="sistre"  />
+       <field field_ref="normstr"          name="normstr" />
+       <field field_ref="sheastr"          name="sheastr" />
+       <field field_ref="isig1"            name="isig1"   />
+       <field field_ref="isig2"            name="isig2"   />
+       <field field_ref="isig3"            name="isig3"   />
+       
+       <!-- 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="albedo"           name="albedo"     />
+       
+       <field field_ref="hfxcndtop"        name="hfxcndtop"  />
+       <field field_ref="hfxcndbot"        name="hfxcndbot"  />
+       <field field_ref="hfxsensib"        name="hfxsensib"  />
+       
+       <!-- salt fluxes -->
+       <field field_ref="sfxice"           name="sfxice" />
+       
+       <!-- mass fluxes -->
+       <field field_ref="vfxice"           name="vfxice" />
+       <field field_ref="vfxsnw"           name="vfxsnw" />
+       
+       <!-- categories -->
+       <field field_ref="icemask_cat"      name="simskcat"/>
+       <field field_ref="snwthic_cat"      name="snthicat"/>
+       <field field_ref="iceconc_cat"      name="siconcat"/>
+       <field field_ref="icethic_cat"      name="sithicat"/>
+       <field field_ref="icesalt_cat"      name="sisalcat"/>
+       <field field_ref="icetemp_cat"      name="sitemcat"/>
+       <field field_ref="snwtemp_cat"      name="sntemcat"/>
+
+       <!-- mass balance -->
+       <field field_ref="dmithd"           name="sidmassth"        />
+       <field field_ref="dmidyn"           name="sidmassdyn"       />
+       <field field_ref="dmiopw"           name="sidmassgrowthwat" />
+       <field field_ref="dmibog"           name="sidmassgrowthbot" />
+       <field field_ref="dmisni"           name="sidmasssi"        />
+       <field field_ref="dmisub"           name="sidmassevapsubl"  />
+       <field field_ref="dmisum"           name="sidmassmelttop"   />
+       <field field_ref="dmibom"           name="sidmassmeltbot"   />
+       <field field_ref="dmilam"           name="sidmassmeltlat"   />
+       <field field_ref="dmsspr"           name="sndmasssnf"       />
+       <field field_ref="dmsmel"           name="sndmassmelt"      />
+       <field field_ref="dmssub"           name="sndmasssubl"      />
+       <field field_ref="dmsdyn"           name="sndmassdyn"       />
+       <field field_ref="dmsssi"           name="sndmasssi"        />
+
+     </file>
+     
+     <file id="file22" name_suffix="_SBC_scalar" description="scalar variables" enabled=".true." >
+       <!-- global contents -->
+       <field field_ref="ibgvol_tot"       name="ibgvol_tot"   />
+       <field field_ref="sbgvol_tot"       name="sbgvol_tot"   />
+       <field field_ref="ibgarea_tot"      name="ibgarea_tot"  />
+       <field field_ref="ibgsalt_tot"      name="ibgsalt_tot"  />
+       <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" />
+     </file>
+     
+   </file_group>
+   
+   <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+   <file_group id="1h"  output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+   <file_group id="2h"  output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+   <file_group id="3h"  output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+   <file_group id="4h"  output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+   <file_group id="6h"  output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->        
+   <file_group id="1m"  output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
+   <file_group id="2m"  output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+   <file_group id="3m"  output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+   <file_group id="4m"  output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+   <file_group id="6m"  output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+   <file_group id="1y"  output_freq="1y"  output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
+   <file_group id="2y"  output_freq="2y"  output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+   <file_group id="5y"  output_freq="5y"  output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+   <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+   
+ </file_definition>
+ 
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-BASIC-1M.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-BASIC-1M.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-BASIC-1M.xml	(revision 14078)
@@ -0,0 +1,151 @@
+<?xml version="1.0"?>
+    <!-- $id$ -->
+    
+ <!--
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files for lim3                                =
+=                                         put the variables you want...                                    =
+============================================================================================================
+ -->
+    
+ <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1mo" min_digits="4">
+   
+   <file_group id="1m" output_freq="1mo"  output_level="10" enabled=".TRUE.">  <!-- 1m files -->   	
+     <file id="file21" name_suffix="_icemod" description="ice variables" enabled=".true." >
+
+       <!-- ice mask -->
+       <field field_ref="icemask"          name="simsk"   />
+       <field field_ref="icemask05"        name="simsk05" />
+       <field field_ref="icemask15"        name="simsk15" />
+       
+       <!-- general -->
+       <field field_ref="snwvolu"          name="snvolu" />
+       <field field_ref="icethic"          name="sithic" />
+       <field field_ref="icevolu"          name="sivolu" />
+       <field field_ref="iceconc"          name="siconc" />
+       <field field_ref="icesalt"          name="sisali" />
+       <field field_ref="iceapnd"          name="siapnd" />
+       <field field_ref="icevpnd"          name="sivpnd" />
+       <!-- sst_m is always the potential temperature even when using teos10 -->
+       <field field_ref="sst_m_pot"        name="sst_m_pot"  />
+       <field field_ref="sss_m_abs"        name="sss_m_abs"  />
+       
+       <!-- heat -->
+       <field field_ref="icetemp"          name="sitemp" />
+       <field field_ref="icettop"          name="sittop" />
+       <field field_ref="icetbot"          name="sitbot" />
+       
+       <!-- momentum -->
+       <field field_ref="uice"             name="sivelu"  />
+       <field field_ref="vice"             name="sivelv"  />
+       <field field_ref="icevel"           name="sivelo"  />
+       <field field_ref="utau_ai"          name="utau_ai" />
+       <field field_ref="vtau_ai"          name="vtau_ai" />
+       <field field_ref="utau_oi"          name="utau_oi" />
+       <field field_ref="vtau_oi"          name="vtau_oi" />
+       
+       <!-- rheology -->
+       <field field_ref="icediv"           name="sidive"  />
+       <field field_ref="iceshe"           name="sishea"  />
+       <field field_ref="icestr"           name="sistre"  />
+       <field field_ref="normstr"          name="normstr" />
+       <field field_ref="sheastr"          name="sheastr" />
+       <field field_ref="isig1"            name="isig1"   />
+       <field field_ref="isig2"            name="isig2"   />
+       <field field_ref="isig3"            name="isig3"   />
+       
+       <!-- 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="albedo"           name="albedo"     />
+       
+       <field field_ref="hfxcndtop"        name="hfxcndtop"  />
+       <field field_ref="hfxcndbot"        name="hfxcndbot"  />
+       <field field_ref="hfxsensib"        name="hfxsensib"  />
+       
+       <!-- salt fluxes -->
+       <field field_ref="sfxice"           name="sfxice" />
+       
+       <!-- mass fluxes -->
+       <field field_ref="vfxice"           name="vfxice" />
+       <field field_ref="vfxsnw"           name="vfxsnw" />
+       
+       <!-- categories -->
+       <field field_ref="icemask_cat"      name="simskcat"/>
+       <field field_ref="snwthic_cat"      name="snthicat"/>
+       <field field_ref="iceconc_cat"      name="siconcat"/>
+       <field field_ref="icethic_cat"      name="sithicat"/>
+       <field field_ref="icesalt_cat"      name="sisalcat"/>
+       <field field_ref="icetemp_cat"      name="sitemcat"/>
+       <field field_ref="snwtemp_cat"      name="sntemcat"/>
+
+       <!-- mass balance -->
+       <field field_ref="dmithd"           name="sidmassth"        />
+       <field field_ref="dmidyn"           name="sidmassdyn"       />
+       <field field_ref="dmiopw"           name="sidmassgrowthwat" />
+       <field field_ref="dmibog"           name="sidmassgrowthbot" />
+       <field field_ref="dmisni"           name="sidmasssi"        />
+       <field field_ref="dmisub"           name="sidmassevapsubl"  />
+       <field field_ref="dmisum"           name="sidmassmelttop"   />
+       <field field_ref="dmibom"           name="sidmassmeltbot"   />
+       <field field_ref="dmilam"           name="sidmassmeltlat"   />
+       <field field_ref="dmsspr"           name="sndmasssnf"       />
+       <field field_ref="dmsmel"           name="sndmassmelt"      />
+       <field field_ref="dmssub"           name="sndmasssubl"      />
+       <field field_ref="dmsdyn"           name="sndmassdyn"       />
+       <field field_ref="dmsssi"           name="sndmasssi"        />
+
+     </file>
+     
+     <file id="file22" name_suffix="_SBC_scalar" description="scalar variables" enabled=".true." >
+       <!-- global contents -->
+       <field field_ref="ibgvol_tot"       name="ibgvol_tot"   />
+       <field field_ref="sbgvol_tot"       name="sbgvol_tot"   />
+       <field field_ref="ibgarea_tot"      name="ibgarea_tot"  />
+       <field field_ref="ibgsalt_tot"      name="ibgsalt_tot"  />
+       <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" />
+     </file>
+     
+   </file_group>
+   
+   <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+   <file_group id="1h"  output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+   <file_group id="2h"  output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+   <file_group id="3h"  output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+   <file_group id="4h"  output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+   <file_group id="6h"  output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->        
+   <file_group id="1m"  output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
+   <file_group id="2m"  output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+   <file_group id="3m"  output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+   <file_group id="4m"  output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+   <file_group id="6m"  output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+   <file_group id="1y"  output_freq="1y"  output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
+   <file_group id="2y"  output_freq="2y"  output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+   <file_group id="5y"  output_freq="5y"  output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+   <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+   
+ </file_definition>
+ 
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-BASIC-INVALID_PERIOD.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-BASIC-INVALID_PERIOD.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-BASIC-INVALID_PERIOD.xml	(revision 14078)
@@ -0,0 +1,4 @@
+You can't use the standard diagnostic options with the current cycling period.
+Choose the "Custom" option, copy the file_def*.xml files that
+you want to use into the Rose app and adjust the meaning period
+accordingly. 
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-CMIP6-10D.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-CMIP6-10D.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-CMIP6-10D.xml	(revision 14078)
@@ -0,0 +1,151 @@
+<?xml version="1.0"?>
+    <!-- $id$ -->
+    
+ <!--
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files for lim3                                =
+=                                         put the variables you want...                                    =
+============================================================================================================
+ -->
+    
+ <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1mo" min_digits="4">
+   
+   <file_group id="10d" output_freq="10d"  output_level="10" enabled=".TRUE.">  <!-- 10d files -->   	
+     <file id="file21" name_suffix="_icemod" description="ice variables" enabled=".true." >
+
+       <!-- ice mask -->
+       <field field_ref="icemask"          name="simsk"   />
+       <field field_ref="icemask05"        name="simsk05" />
+       <field field_ref="icemask15"        name="simsk15" />
+       
+       <!-- general -->
+       <field field_ref="snwvolu"          name="snvolu" />
+       <field field_ref="icethic"          name="sithic" />
+       <field field_ref="icevolu"          name="sivolu" />
+       <field field_ref="iceconc"          name="siconc" />
+       <field field_ref="icesalt"          name="sisali" />
+       <field field_ref="iceapnd"          name="siapnd" />
+       <field field_ref="icevpnd"          name="sivpnd" />
+       <!-- sst_m is always the potential temperature even when using teos10 -->
+       <field field_ref="sst_m_pot"        name="sst_m_pot"  />
+       <field field_ref="sss_m_abs"        name="sss_m_abs"  />
+       
+       <!-- heat -->
+       <field field_ref="icetemp"          name="sitemp" />
+       <field field_ref="icettop"          name="sittop" />
+       <field field_ref="icetbot"          name="sitbot" />
+       
+       <!-- momentum -->
+       <field field_ref="uice"             name="sivelu"  />
+       <field field_ref="vice"             name="sivelv"  />
+       <field field_ref="icevel"           name="sivelo"  />
+       <field field_ref="utau_ai"          name="utau_ai" />
+       <field field_ref="vtau_ai"          name="vtau_ai" />
+       <field field_ref="utau_oi"          name="utau_oi" />
+       <field field_ref="vtau_oi"          name="vtau_oi" />
+       
+       <!-- rheology -->
+       <field field_ref="icediv"           name="sidive"  />
+       <field field_ref="iceshe"           name="sishea"  />
+       <field field_ref="icestr"           name="sistre"  />
+       <field field_ref="normstr"          name="normstr" />
+       <field field_ref="sheastr"          name="sheastr" />
+       <field field_ref="isig1"            name="isig1"   />
+       <field field_ref="isig2"            name="isig2"   />
+       <field field_ref="isig3"            name="isig3"   />
+       
+       <!-- 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="albedo"           name="albedo"     />
+       
+       <field field_ref="hfxcndtop"        name="hfxcndtop"  />
+       <field field_ref="hfxcndbot"        name="hfxcndbot"  />
+       <field field_ref="hfxsensib"        name="hfxsensib"  />
+       
+       <!-- salt fluxes -->
+       <field field_ref="sfxice"           name="sfxice" />
+       
+       <!-- mass fluxes -->
+       <field field_ref="vfxice"           name="vfxice" />
+       <field field_ref="vfxsnw"           name="vfxsnw" />
+       
+       <!-- categories -->
+       <field field_ref="icemask_cat"      name="simskcat"/>
+       <field field_ref="snwthic_cat"      name="snthicat"/>
+       <field field_ref="iceconc_cat"      name="siconcat"/>
+       <field field_ref="icethic_cat"      name="sithicat"/>
+       <field field_ref="icesalt_cat"      name="sisalcat"/>
+       <field field_ref="icetemp_cat"      name="sitemcat"/>
+       <field field_ref="snwtemp_cat"      name="sntemcat"/>
+       
+       <!-- mass balance -->
+       <field field_ref="dmithd"           name="sidmassth"        />
+       <field field_ref="dmidyn"           name="sidmassdyn"       />
+       <field field_ref="dmiopw"           name="sidmassgrowthwat" />
+       <field field_ref="dmibog"           name="sidmassgrowthbot" />
+       <field field_ref="dmisni"           name="sidmasssi"        />
+       <field field_ref="dmisub"           name="sidmassevapsubl"  />
+       <field field_ref="dmisum"           name="sidmassmelttop"   />
+       <field field_ref="dmibom"           name="sidmassmeltbot"   />
+       <field field_ref="dmilam"           name="sidmassmeltlat"   />
+       <field field_ref="dmsspr"           name="sndmasssnf"       />
+       <field field_ref="dmsmel"           name="sndmassmelt"      />
+       <field field_ref="dmssub"           name="sndmasssubl"      />
+       <field field_ref="dmsdyn"           name="sndmassdyn"       />
+       <field field_ref="dmsssi"           name="sndmasssi"        />
+
+     </file>
+     
+     <file id="file22" name_suffix="_SBC_scalar" description="scalar variables" enabled=".true." >
+       <!-- global contents -->
+       <field field_ref="ibgvol_tot"       name="ibgvol_tot"   />
+       <field field_ref="sbgvol_tot"       name="sbgvol_tot"   />
+       <field field_ref="ibgarea_tot"      name="ibgarea_tot"  />
+       <field field_ref="ibgsalt_tot"      name="ibgsalt_tot"  />
+       <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" />
+     </file>
+     
+   </file_group>
+   
+   <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+   <file_group id="1h"  output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+   <file_group id="2h"  output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+   <file_group id="3h"  output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+   <file_group id="4h"  output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+   <file_group id="6h"  output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->        
+   <file_group id="1m"  output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
+   <file_group id="2m"  output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+   <file_group id="3m"  output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+   <file_group id="4m"  output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+   <file_group id="6m"  output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+   <file_group id="1y"  output_freq="1y"  output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
+   <file_group id="2y"  output_freq="2y"  output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+   <file_group id="5y"  output_freq="5y"  output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+   <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+   
+ </file_definition>
+ 
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-CMIP6-1M.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-CMIP6-1M.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-CMIP6-1M.xml	(revision 14078)
@@ -0,0 +1,151 @@
+<?xml version="1.0"?>
+    <!-- $id$ -->
+    
+ <!--
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files for lim3                                =
+=                                         put the variables you want...                                    =
+============================================================================================================
+ -->
+    
+ <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1mo" min_digits="4">
+   
+   <file_group id="1m" output_freq="1mo"  output_level="10" enabled=".TRUE.">  <!-- 1m files -->   	
+     <file id="file21" name_suffix="_icemod" description="ice variables" enabled=".true." >
+
+       <!-- ice mask -->
+       <field field_ref="icemask"          name="simsk"   />
+       <field field_ref="icemask05"        name="simsk05" />
+       <field field_ref="icemask15"        name="simsk15" />
+       
+       <!-- general -->
+       <field field_ref="snwvolu"          name="snvolu" />
+       <field field_ref="icethic"          name="sithic" />
+       <field field_ref="icevolu"          name="sivolu" />
+       <field field_ref="iceconc"          name="siconc" />
+       <field field_ref="icesalt"          name="sisali" />
+       <field field_ref="iceapnd"          name="siapnd" />
+       <field field_ref="icevpnd"          name="sivpnd" />
+       <!-- sst_m is always the potential temperature even when using teos10 -->
+       <field field_ref="sst_m_pot"        name="sst_m_pot"  />
+       <field field_ref="sss_m_abs"        name="sss_m_abs"  />
+       
+       <!-- heat -->
+       <field field_ref="icetemp"          name="sitemp" />
+       <field field_ref="icettop"          name="sittop" />
+       <field field_ref="icetbot"          name="sitbot" />
+       
+       <!-- momentum -->
+       <field field_ref="uice"             name="sivelu"  />
+       <field field_ref="vice"             name="sivelv"  />
+       <field field_ref="icevel"           name="sivelo"  />
+       <field field_ref="utau_ai"          name="utau_ai" />
+       <field field_ref="vtau_ai"          name="vtau_ai" />
+       <field field_ref="utau_oi"          name="utau_oi" />
+       <field field_ref="vtau_oi"          name="vtau_oi" />
+       
+       <!-- rheology -->
+       <field field_ref="icediv"           name="sidive"  />
+       <field field_ref="iceshe"           name="sishea"  />
+       <field field_ref="icestr"           name="sistre"  />
+       <field field_ref="normstr"          name="normstr" />
+       <field field_ref="sheastr"          name="sheastr" />
+       <field field_ref="isig1"            name="isig1"   />
+       <field field_ref="isig2"            name="isig2"   />
+       <field field_ref="isig3"            name="isig3"   />
+       
+       <!-- 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="albedo"           name="albedo"     />
+       
+       <field field_ref="hfxcndtop"        name="hfxcndtop"  />
+       <field field_ref="hfxcndbot"        name="hfxcndbot"  />
+       <field field_ref="hfxsensib"        name="hfxsensib"  />
+       
+       <!-- salt fluxes -->
+       <field field_ref="sfxice"           name="sfxice" />
+       
+       <!-- mass fluxes -->
+       <field field_ref="vfxice"           name="vfxice" />
+       <field field_ref="vfxsnw"           name="vfxsnw" />
+       
+       <!-- categories -->
+       <field field_ref="icemask_cat"      name="simskcat"/>
+       <field field_ref="snwthic_cat"      name="snthicat"/>
+       <field field_ref="iceconc_cat"      name="siconcat"/>
+       <field field_ref="icethic_cat"      name="sithicat"/>
+       <field field_ref="icesalt_cat"      name="sisalcat"/>
+       <field field_ref="icetemp_cat"      name="sitemcat"/>
+       <field field_ref="snwtemp_cat"      name="sntemcat"/>
+       
+       <!-- mass balance -->
+       <field field_ref="dmithd"           name="sidmassth"        />
+       <field field_ref="dmidyn"           name="sidmassdyn"       />
+       <field field_ref="dmiopw"           name="sidmassgrowthwat" />
+       <field field_ref="dmibog"           name="sidmassgrowthbot" />
+       <field field_ref="dmisni"           name="sidmasssi"        />
+       <field field_ref="dmisub"           name="sidmassevapsubl"  />
+       <field field_ref="dmisum"           name="sidmassmelttop"   />
+       <field field_ref="dmibom"           name="sidmassmeltbot"   />
+       <field field_ref="dmilam"           name="sidmassmeltlat"   />
+       <field field_ref="dmsspr"           name="sndmasssnf"       />
+       <field field_ref="dmsmel"           name="sndmassmelt"      />
+       <field field_ref="dmssub"           name="sndmasssubl"      />
+       <field field_ref="dmsdyn"           name="sndmassdyn"       />
+       <field field_ref="dmsssi"           name="sndmasssi"        />
+
+     </file>
+     
+     <file id="file22" name_suffix="_SBC_scalar" description="scalar variables" enabled=".true." >
+       <!-- global contents -->
+       <field field_ref="ibgvol_tot"       name="ibgvol_tot"   />
+       <field field_ref="sbgvol_tot"       name="sbgvol_tot"   />
+       <field field_ref="ibgarea_tot"      name="ibgarea_tot"  />
+       <field field_ref="ibgsalt_tot"      name="ibgsalt_tot"  />
+       <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" />
+     </file>
+     
+   </file_group>
+   
+   <file_group id="1ts" output_freq="1ts" output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+   <file_group id="1h"  output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+   <file_group id="2h"  output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+   <file_group id="3h"  output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+   <file_group id="4h"  output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+   <file_group id="6h"  output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->        
+   <file_group id="1m"  output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
+   <file_group id="2m"  output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+   <file_group id="3m"  output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+   <file_group id="4m"  output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+   <file_group id="6m"  output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+   <file_group id="1y"  output_freq="1y"  output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
+   <file_group id="2y"  output_freq="2y"  output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+   <file_group id="5y"  output_freq="5y"  output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+   <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+   
+ </file_definition>
+ 
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-CMIP6-INVALID_PERIOD.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-CMIP6-INVALID_PERIOD.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-ice-CMIP6-INVALID_PERIOD.xml	(revision 14078)
@@ -0,0 +1,4 @@
+You can't use the standard diagnostic options with the current cycling period.
+Choose the "Custom" option, copy the file_def*.xml files that
+you want to use into the Rose app and adjust the meaning period
+accordingly. 
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-BASIC-10D.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-BASIC-10D.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-BASIC-10D.xml	(revision 14078)
@@ -0,0 +1,98 @@
+<?xml version="1.0"?>
+
+<!--
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own filesfor ocean dynamics context                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+   
+    <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4">
+    
+      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+
+      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+
+      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+
+      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+
+      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+
+      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
+    
+
+      <file_group id="10d" output_freq="10d" output_level="10" split_freq="10d" enabled=".TRUE."> <!-- real monthly files -->
+
+        <file id="file8" name_suffix="_grid_T" >
+	  <field field_ref="e3t"          name="thkcello"   />
+          <field field_ref="ssh"          name="zos"        />
+          <field field_ref="ssh2"         name="zossq"      />
+          <field field_ref="sst_con"      name="tos_con"    />
+          <field field_ref="sss_abs"      name="sos_abs"    />
+          <field field_ref="sbt_con"      name="thetaob_con"/>
+          <field field_ref="sbs_abs"      name="sob_abs"    />
+          <field field_ref="toce_con"     name="thetao_con" operation="average" freq_op="10d" cell_methods="time: mean (thickness weighted)"   > @toce_con_e3t / @e3t </field>
+          <field field_ref="soce_abs"     name="so_abs"       operation="average" freq_op="10d" cell_methods="time: mean (thickness weighted)"    > @soce_abs_e3t / @e3t </field>
+          <field field_ref="mldzint_1"    name="somxzint1"  />
+	  <field field_ref="qt"           name="hfds"       />
+	  <field field_ref="qsr3d"        name="rsdo"       />
+	  <field field_ref="empmr"        name="sowaflup"   />
+          <field field_ref="ice_cover"    name="soicecov"   />
+          <field field_ref="berg_melt"       name="ficeberg"               />
+          <field field_ref="berg_melt_qlat"  name="berg_latent_heat_flux"  />
+	  <field field_ref="emp_oce"      name="soemp_oce"  />
+	  <field field_ref="emp_ice"      name="soemp_ice"  />
+	  <field field_ref="snowpre"      name="snowpre"    />
+	  <field field_ref="precip"       name="soprecip"   />
+	  <field field_ref="fmmflx"       name="fsitherm"   />
+	  <field field_ref="runoffs"      name="friver"     />
+	  <field field_ref="erp"          name="so_erp"     />
+	  <field field_ref="saltflx"      name="sfdsi"      />
+	  <field field_ref="qlatisf"      name="sohflisf"  />
+	  <field field_ref="qhcisf"       name="sohfcisf"   />
+	  <field field_ref="fwfisf"       name="sowflisf"   />
+        </file>
+
+	<file id="file9" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="e3u"          name="thkcello"   />
+          <field field_ref="ssu"          name="sozocrtx"   />
+          <field field_ref="uoce"         name="uo"      operation="average" freq_op="10d" cell_methods="time: mean (thickness weighted)"    > @uoce_e3u / @e3u </field>
+          <field field_ref="uoce"         name="u2o" standard_name="square_of_sea_water_x_velocity" long_name="UU"  operation="average" freq_op="10d"  cell_methods="time: mean (thickness weighted)"   > @uoce2_e3u / @e3u </field>
+	  <field field_ref="utau"         name="tauuo"      />
+	</file>
+	
+	<file id="file10" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="e3v"          name="thkcello"  />
+          <field field_ref="ssv"          name="somecrty"  />
+          <field field_ref="voce"         name="vo"      operation="average" freq_op="10d" cell_methods="time: mean (thickness weighted)"    > @voce_e3v / @e3v </field>
+          <field field_ref="voce"         name="v2o" standard_name="square_of_sea_water_y_velocity" long_name="VV"  operation="average" freq_op="10d" cell_methods="time: mean (thickness weighted)"    > @voce2_e3v / @e3v </field>
+	  <field field_ref="vtau"         name="tauvo"     />
+	</file>
+	
+	<file id="file11" name_suffix="_grid_W" description="ocean W grid variables" >
+	  <field field_ref="e3w" long_name="W-cell thickness"  />
+	  <field field_ref="woce"         name="wo"            />
+	  <field field_ref="avt"          name="difvho"        />
+	  <field field_ref="avm"          name="difvmo"        />
+	</file>
+
+
+      </file_group>
+
+      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+
+      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+   </file_definition>
+    
+
+
+
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-BASIC-1M.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-BASIC-1M.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-BASIC-1M.xml	(revision 14078)
@@ -0,0 +1,99 @@
+<?xml version="1.0"?>
+
+<!--
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own filesfor ocean dynamics context                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+   
+    <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4">
+    
+      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+
+      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+
+      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+
+      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+
+      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+
+      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
+    
+
+      <file_group id="1m" output_freq="1mo" output_level="10" split_freq="1mo" enabled=".TRUE."> <!-- real monthly files -->
+
+        <file id="file8" name_suffix="_grid_T" >
+	  <field field_ref="e3t"          name="thkcello"  />
+          <field field_ref="ssh"          name="zos"       />
+          <field field_ref="ssh2"         name="zossq"     />
+
+          <field field_ref="sst_con"      name="tos_con"    />
+          <field field_ref="sss_abs"      name="sos_abs"    />
+          <field field_ref="sbt_con"      name="thetaob_con"/>
+          <field field_ref="sbs_abs"      name="sob_abs"    />
+          <field field_ref="toce_con"     name="thetao_con" operation="average" freq_op="1mo"  cell_methods="time: mean (thickness weighted)"   > @toce_con_e3t / @e3t </field>
+          <field field_ref="soce_abs"     name="so_abs"       operation="average" freq_op="1mo"  cell_methods="time: mean (thickness weighted)"   > @soce_abs_e3t / @e3t </field>
+          <field field_ref="mldzint_1"    name="somxzint1"  />
+	  <field field_ref="qt"           name="hfds"       />
+	  <field field_ref="qsr3d"        name="rsdo"       />
+	  <field field_ref="empmr"        name="sowaflup"   />
+          <field field_ref="ice_cover"    name="soicecov"   />
+          <field field_ref="berg_melt"       name="ficeberg"               />
+          <field field_ref="berg_melt_qlat"  name="berg_latent_heat_flux"  />
+	  <field field_ref="emp_oce"      name="soemp_oce"  />
+	  <field field_ref="emp_ice"      name="soemp_ice"  />
+	  <field field_ref="snowpre"      name="snowpre"    />
+	  <field field_ref="precip"       name="soprecip"   />
+	  <field field_ref="fmmflx"       name="fsitherm"   />
+	  <field field_ref="runoffs"      name="friver"     />
+	  <field field_ref="erp"          name="so_erp"     />
+	  <field field_ref="saltflx"      name="sfdsi"      />
+	  <field field_ref="qlatisf"      name="sohflisf"  />
+	  <field field_ref="qhcisf"       name="sohfcisf"   />
+	  <field field_ref="fwfisf"       name="sowflisf"   />
+        </file>
+
+	<file id="file9" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="e3u"          name="thkcello"   />
+          <field field_ref="ssu"          name="sozocrtx"   />
+          <field field_ref="uoce"         name="uo"      operation="average" freq_op="1mo"  cell_methods="time: mean (thickness weighted)"   > @uoce_e3u / @e3u </field>
+          <field field_ref="uoce"         name="u2o" standard_name="square_of_sea_water_x_velocity" long_name="UU"  operation="average" freq_op="1mo"  cell_methods="time: mean (thickness weighted)"   > @uoce2_e3u / @e3u </field>
+	  <field field_ref="utau"         name="tauuo"      />
+	</file>
+	
+	<file id="file10" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="e3v"          name="thkcello"  />
+          <field field_ref="ssv"          name="somecrty"  />
+          <field field_ref="voce"         name="vo"      operation="average" freq_op="1mo"  cell_methods="time: mean (thickness weighted)"   > @voce_e3v / @e3v </field>
+          <field field_ref="voce"         name="v2o" standard_name="square_of_sea_water_y_velocity" long_name="VV"  operation="average" freq_op="1mo" cell_methods="time: mean (thickness weighted)"   > @voce2_e3v / @e3v </field>
+	  <field field_ref="vtau"         name="tauvo"     />
+	</file>
+	
+	<file id="file11" name_suffix="_grid_W" description="ocean W grid variables" >
+	  <field field_ref="e3w" long_name="W-cell thickness"  />
+	  <field field_ref="woce"         name="wo"            />
+	  <field field_ref="avt"          name="difvho"        />
+	  <field field_ref="avm"          name="difvmo"        />
+	</file>
+
+
+      </file_group>
+
+      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+
+      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+   </file_definition>
+    
+
+
+
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-BASIC-INVALID_PERIOD.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-BASIC-INVALID_PERIOD.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-BASIC-INVALID_PERIOD.xml	(revision 14078)
@@ -0,0 +1,4 @@
+You can't use the standard diagnostic options with the current cycling period.
+Choose the "Custom" option, copy the file_def*.xml files that
+you want to use into the Rose app and adjust the meaning period
+accordingly. 
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-CMIP6-10D.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-CMIP6-10D.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-CMIP6-10D.xml	(revision 14078)
@@ -0,0 +1,339 @@
+<?xml version="1.0"?>
+
+<!--
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own filesfor ocean dynamics context                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+   
+    <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4">
+    
+      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+
+      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+
+      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+
+      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+
+      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+
+      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
+    
+
+      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE.">  <!-- 1d files -->   
+
+	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+          <field field_ref="sst_con"          name="tos_con"   standard_name="sea_surface_conservative_temperature"                                 />
+          <field field_ref="sst2_con"         name="tossq_com"   />
+          <field field_ref="sss_abs"          name="sos_abs"   standard_name="sea_surface_absolute_salinity"                                    />
+          <field field_ref="sss2_abs"         name="sossq_abs" long_name="Square of Sea Surface Absolute Salinity"   standard_name="square_of_sea_surface_absolute_Salinity"   unit="1e-06"     > sss_abs * sss_abs </field >
+          <field field_ref="mldr0_3"     name="mlotst"   long_name="Ocean Mixed Layer Thickness Defined by Sigma T"         />
+	  <field field_ref="ssh"       name="zos"   standard_name="sea_surface_height_above_geoid" long_name="Sea Surface Height Above Geoid"      />
+<!-- TO FIX
+          <field field_ref="20d"          name="t20d"  standard_name="depth_of_isosurface_of_sea_water_potential_temperature" />
+-->
+	</file>
+	
+	<file id="file2" name_suffix="_grid_U" description="ocean U grid variables" enabled=".FALSE." >
+          <field field_ref="ssu"          name="sozocrtx"   standard_name="sea_surface_eastward_sea_water_velocity"                 />
+	  <field field_ref="utau"         name="sozotaux"   standard_name="surface_downward_x_stress" />
+	</file>
+	
+	<file id="file3" name_suffix="_grid_V" description="ocean V grid variables"  enabled=".FALSE." >
+          <field field_ref="ssv"          name="somecrty"   standard_name="sea_surface_northward_sea_water_velocity"                 />
+	  <field field_ref="vtau"         name="sometauy"   standard_name="surface_downward_y_stress" />
+	</file>
+
+        <file id="file9" name_suffix="_scalar" description="scalar variables"  enabled=".FALSE." >
+          <field field_ref="sshthster"    name="scsshtst"   />
+          <field field_ref="voltot"       name="scvoltot"   />
+        </file>
+
+      </file_group>
+
+      <file_group id="10d" output_freq="10d"  output_level="10" enabled=".TRUE.">  <!-- 10d files -->   
+
+	<file id="file4" name_suffix="_grid_T" description="ocean T grid variables" >
+          <field field_ref="e3t"          name="thkcello"        standard_name="cell_thickness" />
+<!-- Is this dangerous to include rho0 here as a hard coded value -->
+          <field field_ref="e3t"          name="masscello"        standard_name="sea_water_mass_per_unit_area" unit="kg/m2" long_name="Ocean Grid-Cell Mass per area" > @e3t * 1026.0 </field> 
+          <field field_ref="tpt_dep"      name="zfull"        />
+<!-- TO FIX
+          <field field_ref="20d"          name="t20d"  standard_name="depth_of_isosurface_of_sea_water_potential_temperature" />
+-->
+          <field field_ref="toce_con"         name="thetao_con"       operation="average" freq_op="10d" cell_methods="time: mean (thickness weighted)" > @toce_con_e3t / @e3t </field>
+<!-- TO FIX
+          <field field_ref="toce_vmean"   name="thetaot"   />
+          <field field_ref="toce_vmean300"   name="thetaot300"   />
+-->
+          <field field_ref="soce_abs"         name="so_abs"     operation="average" freq_op="10d" cell_methods="time: mean (thickness weighted)" > @soce_e3t_abs / @e3t </field>
+	  <field field_ref="ssh"       name="zos"   standard_name="sea_surface_height_above_geoid" long_name="Sea Surface Height Above Geoid"      />
+          <field field_ref="ssh2"      name="zossq"  standard_name="square_of_sea_surface_height_above_geoid" long_name="Square of Sea Surface Height Above Geoid"  />
+	  <field field_ref="runoffs"      name="friver"   standard_name="water_flux_into_sea_water_from_rivers"                     />
+	  <field field_ref="qt"           name="hfds"   standard_name="surface_downward_heat_flux_in_sea_water"                     />
+	  <field field_ref="qsr3d"        name="rsdo"   standard_name="downwelling_shortwave_flux_in_sea_water"                     />
+          <field field_ref="mldr0_3"      name="mlotst"   long_name="Ocean Mixed Layer Thickness Defined by Sigma T"         />
+          <field field_ref="mldr0_3"      name="mlotstsq"  long_name="Square of Ocean Mixed Layer Thickness Defined by Sigma T"  standard_name="square_of_ocean_mixed_layer_thickness_defined_by_sigma_theta" > mldr0_3 * mldr0_3 </field>
+          <field field_ref="mldr0_3"      name="mlotstmax"   long_name="Ocean Mixed Layer Thickness Defined by Sigma T" operation="maximum"        />
+          <field field_ref="mldr0_3"      name="mlotstmin"   long_name="Ocean Mixed Layer Thickness Defined by Sigma T" operation="minimum"        />
+          <field field_ref="berg_melt"       name="ficeberg"     standard_name="water_flux_into_sea_water_from_icebergs"      />
+          <field field_ref="berg_melt_qlat"  name="berg_latent_heat_flux"     standard_name="latent_heat_flux_from_icebergs"                                 />
+          <field field_ref="botpres"      name="pbo"                                                                                />
+          <field field_ref="sst_con"          name="tos_con"   standard_name="sea_surface_conservative_temperature"                                 />
+          <field field_ref="sst2_con"          name="tossq_con"   />
+          <field field_ref="sss_abs"          name="sos_abs"   standard_name="sea_surface_absolute_salinity"                                    />
+          <field field_ref="sss2_abs"         name="sossq_abs" long_name="Square of Sea Surface Absolute Salinity"   standard_name="square_of_sea_surface_absolute_Salinity"   unit="1e-06"     > sss_abs * sss_abs </field >
+          <field field_ref="sbt_con"          name="thetaob_con"   standard_name="sea_water_conservative_temperature_at_sea_floor"            />
+          <field field_ref="sbs_abs"          name="sob_abs"   standard_name="sea_water_absolute_salinity_at_sea_floor"                         />
+<!-- TO FIX
+          <field field_ref="rain_ao_cea" name="pr" standard_name="rainfall_flux" long_name="Rainfall Flux" > @rain_ao_cea </field>
+-->
+          <field field_ref="evap_ao_cea" name="evs" standard_name="water_evaporation_flux" long_name="Water Evaporation Flux Where Ice Free Ocean over Sea" />
+          <field field_ref="snow_ao_cea" name="prsn" standard_name="snowfall_flux" long_name="Snowfall Flux" />
+          <field field_ref="hflx_rain_cea" name="hfrainds" long_name="Temperature Flux due to Rain Expressed as Heat Flux In To Sea Water" standard_name="temperature_flux_due_to_rain_expressed_as_heat_flux_into_sea_water" > hflx_rain_cea </field> 
+          <field field_ref="hflx_evap_cea" name="hfevapds" long_name="Temperature Flux due to Evaporation Expressed as Heat Flux Out of Sea Water" standard_name="temperature_flux_due_to_evaporation_expressed_as_heat_flux_out_of_sea_water" />
+          <field field_ref="hflx_rnf_cea" name="hflx_rnf" long_name="Temperature Flux due to Runoff Expressed as Heat Flux into  Sea Water" standard_name="temperature_flux_due_to_runoff_expressed_as_heat_flux_into_sea_water" > hflx_rnf_cea </field> 
+          <field field_ref="saltflx"      name="sfdsi" standard_name="downward_sea_ice_basal_salt_flux" />
+          <field field_ref="fmmflx"       name="fsitherm"      unit="kg/m2/s"   />
+          <field field_ref = "empmr" >@empmr + @fwfisf </field>
+<!-- TO FIX
+          <field field_ref="Age" name="agessc" />
+-->
+          <field field_ref="tnpeo" />
+          <field field_ref="snowpre" name="snowpre" />
+          <field field_ref="snow_ai_cea" name="snow_ai_cea" />
+	  <field field_ref="empmr"        name="sowaflup"   standard_name="water_flux_out_of_sea_ice_and_sea_water"                 />
+	  <field field_ref="saltflx"      name="sosafldo"   standard_name="salt_flux_into_sea_water"                                />
+          <field field_ref="mldkz5"       name="somixhgt"   standard_name="ocean_mixed_layer_thickness_defined_by_vertical_tracer_diffusivity"   />
+          <field field_ref="mldr10_1"     name="somxl010"   standard_name="ocean_mixed_layer_thickness_defined_by_sigma_theta"      />
+          <field field_ref="mldzint_1"    name="somxzint1"   standard_name="ocean_mixed_layer_thickness_defined_by_sigma_theta"      />
+          <field field_ref="ice_cover"    name="soicecov"   standard_name="sea_ice_area_fraction"                                   />
+          <field field_ref="wspd"         name="sowindsp"   standard_name="wind_speed"                                              />          
+          <field field_ref="qlatisf"         name="sohflisf"   standard_name=""                                                        />
+          <field field_ref="qlatisf3d"         name="vohflisf"   standard_name=""                                                        />
+          <field field_ref="qhcisf"         name="sohfcisf"   standard_name=""                                                        />
+          <field field_ref="qhcisf3d"         name="vohfcisf"   standard_name=""                                                        />
+          <field field_ref="fwfisf"       name="sowflisf"   standard_name=""                                                        />
+          <field field_ref="fwfisf3d"     name="vowflisf"   standard_name=""                                                        />
+<!-- TO FIX
+          <field field_ref="ketrd_ldf_vsum"     name="dispkexyfo"   standard_name="Dissipation of kinetic energy by lateral viscosity" grid_ref="vert_sum"/>
+-->
+          <field field_ref="tosmint"       name="opottempmint" />
+          <field field_ref="somint"       name="somint" />
+<!-- TO FIX
+          <field field_ref="toce_e3t_300" name="T300m" />
+          <field field_ref="e3t_300" name="e3t300m" />
+          <field field_ref="toce_e3t_vsum300" name="Tsum300m" />
+          <field field_ref="e3t_vsum300" name="e3t_vsum300m" />
+-->
+          <field field_ref="sbs_abs" name="sob_abs" />
+          <field field_ref="bn2" name="obvfsq" />
+<!-- trend diagnostics-->
+          <field field_ref="ttrd_totad_li"   name="opottempadvect"  unit="W/m2"    />
+          <field field_ref="ttrd_iso_li"     name="opottemppmdiff"  unit="W/m2"    />
+          <field field_ref="ttrd_zdfp_li"    name="opottempdiff"    unit="W/m2"    />
+          <field field_ref="ttrd_evd_li"     name="ttrd_evd_li"                    />
+          <field field_ref="ttrd_qns_li"     name="ttrd_qns_li"                    />
+          <field field_ref="ttrd_qsr_li"     name="rsdoabsorb"      unit="W/m2"    />
+          <field field_ref="ttrd_bbl_li"     name="ttrd_bbl_li"                    />
+          <field field_ref="ttrd_atf_li"     name="ttrd_atf_li"                    />
+          <field field_ref="ttrd_tot_li"     name="opottemptend"    unit="W/m2"    />
+          <field field_ref="strd_totad_li"   name="osaltadvect"     unit="Kg/m2/s" />
+          <field field_ref="strd_iso_li"     name="osaltpmdiff"     unit="kg/m2/s" />
+          <field field_ref="strd_zdfp_li"    name="osaltdiff"       unit="kg/m2/s" />
+          <field field_ref="strd_evd_li"     name="strd_evd_li"                    />
+          <field field_ref="strd_tot_li"     name="osalttend"       unit="kg/m2/s" />
+          <field field_ref="strd_bbl_li"     name="strd_bbl_li"                    />
+          <field field_ref="strd_atf_li"     name="strd_atf_li"                    />
+	</file>
+	
+	<file id="file5" name_suffix="_grid_U" description="ocean U grid variables" >
+          <field field_ref="e3u"          name="thkcello"     standard_name="cell_thickness" />
+          <field field_ref="uoce"         name="uo"     operation="average" freq_op="10d" cell_methods="time: mean (thickness weighted)" > @uoce_e3u / @e3u </field>
+	  <field field_ref="utau"         name="tauuo"   standard_name="surface_downward_x_stress"  />
+          <field field_ref="ut"           name="uto" standard_name="product_of_xward_sea_water_velocity_and_temperature" long_name="UT"  operation="average" freq_op="10d" cell_methods="time: mean (thickness weighted)" > @ut_e3u / @e3u </field>
+          <field field_ref="us"           name="uso" standard_name="product_of_xward_sea_water_velocity_and_salinity" long_name="US"    operation="average" freq_op="10d" cell_methods="time: mean (thickness weighted)" > @us_e3u / @e3u </field>
+          <field field_ref="uoce"         name="u2o" standard_name="square_of_sea_water_x_velocity" long_name="UU"  operation="average" freq_op="10d" cell_methods="time: mean (thickness weighted)" > @uoce2_e3u / @e3u </field>
+          <!-- available with key_diaar5 -->
+          <field field_ref="u_masstr"     name="umo" /> 
+          <field field_ref="u_masstr_vint"     name="umo_vint" /> 
+          <field field_ref="u_heattr"     name="hfx" > @uadv_heattr + @udiff_heattr </field> 
+          <field field_ref="uadv_heattr"     name="hfx_adv" /> 
+          <field field_ref="udiff_heattr"     name="hfx_diff" /> 
+<!--below here not in CMOR format yet -->
+          <field field_ref="u_salttr"     name="sozosatr" />
+	</file>
+	
+	<file id="file6" name_suffix="_grid_V" description="ocean V grid variables" >
+          <field field_ref="e3v"          name="thkcello"        standard_name="cell_thickness" />
+          <field field_ref="voce"         name="vo"     operation="average" freq_op="10d" cell_methods="time: mean (thickness weighted)" > @voce_e3v / @e3v </field>
+	  <field field_ref="vtau"         name="tauvo"   standard_name="surface_downward_y_stress" />
+          <field field_ref="vt"           name="vto" standard_name="product_of_yward_sea_water_velocity_and_temperature" long_name="VT"  operation="average" freq_op="10d" cell_methods="time: mean (thickness weighted)" > @vt_e3v / @e3v </field>
+          <field field_ref="vs"           name="vso" standard_name="product_of_yward_sea_water_velocity_and_salinity" long_name="VS"  operation="average" freq_op="10d" cell_methods="time: mean (thickness weighted)" > @vs_e3v / @e3v </field>
+          <field field_ref="voce"         name="v2o" standard_name="square_of_sea_water_y_velocity" long_name="VV"  operation="average" freq_op="10d" cell_methods="time: mean (thickness weighted)" > @voce2_e3v / @e3v </field>
+          <!-- available with key_diaar5 -->
+          <field field_ref="v_masstr"     name="vmo" /> 
+          <field field_ref="v_heattr"     name="hfy" > @vadv_heattr + @vdiff_heattr </field>
+          <field field_ref="vadv_heattr"     name="hfy_adv" /> 
+          <field field_ref="vdiff_heattr"     name="hfy_diff" /> 
+<!--below here not in CMOR format yet -->
+          <field field_ref="v_salttr"     name="somesatr" />
+	</file>
+	
+	<file id="file7" name_suffix="_grid_W" description="ocean W grid variables" >
+	  <field field_ref="avt"          name="difvho"   standard_name="ocean_vertical_heat_diffusivity"  />
+	  <field field_ref="avs"          name="difvso"   standard_name="ocean_vertical_salt_diffusivity"   />                 
+          <field field_ref="avm"          name="difvmo"   standard_name="ocean_vertical_momentum_diffusivity"               />
+          <field field_ref="avt_evd"      name="avt_evd"  standard_name="enhanced_vertical_heat_diffusivity"               />
+          <field field_ref="av_tmx"       name="diftrto"  standard_name="ocean_vertical_tracer_diffusivity_due_to_tides"               />
+          <field field_ref="w_masstr"     name="wmo" > w_masstr </field>
+	  <field field_ref="woce"         name="wo" standard_name="upward_sea_water_velocity" long_name="W"                  />
+          <field field_ref="woce"         name="w2o" standard_name="square_of_upward_sea_water_velocity" long_name="WW"  operation="average" > woce * woce </field>
+          <field field_ref="wt"           name="wt"         standard_name="product_of_upward_sea_water_velocity_and_temperature" long_name="WT"         />
+          <field field_ref="ws"           name="ws"         standard_name="product_of_upward_sea_water_velocity_and_salinity" long_name="WS"            />
+<!-- TO FIX
+          <field field_ref="wpt_dep"      name="zhalf"        />
+-->
+	</file>
+	
+        <file id="file8" name_suffix="_scalar" description="scalar variables" enabled=".true." >
+          <field field_ref="voltot"       name="scvoltot"   />
+          <field field_ref="temptot"      name="thetaoga" cell_methods="time: mean (volume weighted)"   />
+          <field field_ref="saltot"       name="soga"     cell_methods="time: mean (volume weighted)"   />
+        </file>
+
+        <file id="file10" name_suffix="_diaptr" description="processed diagnostics" >
+          <field field_ref="zomsfglo"     name="zomsfglo"   standard_name="meridional_streamfunction_global"           grid_ref="gznl_W_3D"       />
+          <field field_ref="zotemglo"     name="zotemglo"   standard_name="zonal_mean_temperature_global"              grid_ref="gznl_T_3D"       />
+          <field field_ref="zosrfglo"     name="zosrfglo"   standard_name="zonal_mean_surface_global"                  grid_ref="gznl_T_3D"       />
+          <field field_ref="zosalglo"     name="zosalglo"   standard_name="zonal_mean_salinity_global"                 grid_ref="gznl_T_3D"       />          
+          <field field_ref="zomsfatl"     name="zomsfatl"   standard_name="meridional_streamfunction_atlantic"         grid_ref="gznl_W_3D"       />
+          <field field_ref="zotematl"     name="zotematl"   standard_name="zonal_mean_temperature_atlantic"            grid_ref="gznl_T_3D"       />
+          <field field_ref="zosrfatl"     name="zosrfatl"   standard_name="zonal_mean_surface_atlantic"                grid_ref="gznl_T_3D"       />
+          <field field_ref="zosalatl"     name="zosalatl"   standard_name="zonal_mean_salinity_atlantic"               grid_ref="gznl_T_3D"       />          
+          <field field_ref="zomsfpac"     name="zomsfpac"   standard_name="meridional_streamfunction_pacific"          grid_ref="gznl_W_3D"       />
+          <field field_ref="zotempac"     name="zotempac"   standard_name="zonal_mean_temperature_pacific"             grid_ref="gznl_T_3D"       />
+          <field field_ref="zosrfpac"     name="zosrfpac"   standard_name="zonal_mean_surface_pacific"                 grid_ref="gznl_T_3D"       />
+          <field field_ref="zosalpac"     name="zosalpac"   standard_name="zonal_mean_salinity_pacific"                grid_ref="gznl_T_3D"       />
+          <field field_ref="zomsfind"     name="zomsfind"   standard_name="meridional_streamfunction_indian"           grid_ref="gznl_W_3D"       />
+          <field field_ref="zotemind"     name="zotemind"   standard_name="zonal_mean_temperature_indian"              grid_ref="gznl_T_3D"       />
+          <field field_ref="zosrfind"     name="zosrfind"   standard_name="zonal_mean_surface_indian"                  grid_ref="gznl_T_3D"       />
+          <field field_ref="zosalind"     name="zosalind"   standard_name="zonal_mean_salinity_indian"                 grid_ref="gznl_T_3D"       />          
+          <field field_ref="zomsfipc"     name="zomsfipc"   standard_name="meridional_streamfunction_indian_pacific"   grid_ref="gznl_W_3D"       />
+          <field field_ref="zotemipc"     name="zotemipc"   standard_name="zonal_mean_temperature_indian_pacific"      grid_ref="gznl_T_3D"       />
+          <field field_ref="zosrfipc"     name="zosrfipc"   standard_name="zonal_mean_surface_indian_pacific"          grid_ref="gznl_T_3D"       />
+          <field field_ref="zosalipc"     name="zosalipc"   standard_name="zonal_mean_salinity_indian_pacific"         grid_ref="gznl_T_3D"       />          
+          <field field_ref="sophtadv"     name="sophtadv"   standard_name="advective_heat_transport"                   grid_ref="gznl_T_2D"       />
+          <field field_ref="sophtadv_atl"    name="sophtadv_atlantic"   standard_name="advective_heat_transport_atlantic"/>
+          <field field_ref="sophtadv_pac"    name="sophtadv_pacific"   standard_name="advective_heat_transport_pacific" />
+          <field field_ref="sophtadv_ind"    name="sophtadv_indian"   standard_name="advective_heat_transport_indian"   />
+          <field field_ref="sophtadv_ipc"    name="sophtadv_ipc"   standard_name="advective_heat_transport_indopacific"  />
+          <field field_ref="sophtbtr"     name="hfovbaro"   standard_name="barotropic_heat_transport"                   grid_ref="gznl_T_2D"       />
+          <field field_ref="sophtbtr_atl"    name="hfovbaro_atlantic"   standard_name="barotropic_heat_transport_atlantic"/>
+          <field field_ref="sophtbtr_pac"    name="hfovbaro_pacific"   standard_name="barotropic_heat_transport_pacific" />
+          <field field_ref="sophtbtr_ind"    name="hfovbaro_indian"   standard_name="barotropic_heat_transport_indian"   />
+          <field field_ref="sophtbtr_ipc"    name="hfovbaro_ipc"   standard_name="barotropic_heat_transport_indopacific"  />
+          <field field_ref="sopstadv"     name="sopstadv"   standard_name="advective_salt_transport"                   grid_ref="gznl_T_2D"       />
+          <field field_ref="sopstadv_atl"    name="sopstadv_atlantic"   standard_name="advective_salt_transport_atlantic"/>
+          <field field_ref="sopstadv_pac"    name="sopstadv_pacific"   standard_name="advective_salt_transport_pacific" />
+          <field field_ref="sopstadv_ind"    name="sopstadv_indian"   standard_name="advective_salt_transport_indian"   />
+          <field field_ref="sopstadv_ipc"    name="sopstadv_ipc"   standard_name="advective_salt_transport_indopacific"  />
+          <field field_ref="sopstbtr"     name="sltovbaro"   standard_name="barotropic_salt_transport"     />
+          <field field_ref="sopstbtr_atl"    name="sltovbaro_atlantic"   standard_name="barotropic_salt_transport_atlantic"/>
+          <field field_ref="sopstbtr_pac"    name="sltovbaro_pacific"   standard_name="barotropic_salt_transport_pacific" />
+          <field field_ref="sopstbtr_ind"    name="sltovbaro_indian"   standard_name="barotropic_salt_transport_indian"   />
+          <field field_ref="sopstbtr_ipc"    name="sltovbaro_ipc"   standard_name="barotropic_salt_transport_indopacific"  />
+          <!--The following variables are to be merged into a single variableis with a basin dimenesion in postprocessing  -->
+          <!-- hfbasin -->
+          <field field_ref="sophtadv" name="hfbasin_global" standard_name="northward_ocean_heat_transport" > @sophtadv + @sophtldf </field>
+          <field field_ref="sophtadv" name="hfbasin_atlantic" standard_name="northward_ocean_heat_transport" > @sophtadv_atl + @sophtldf_atl </field>
+          <field field_ref="sophtadv" name="hfbasin_pacific" standard_name="northward_ocean_heat_transport" > @sophtadv_pac + @sophtldf_pac </field>
+          <field field_ref="sophtadv" name="hfbasin_indian" standard_name="northward_ocean_heat_transport" > @sophtadv_ind + @sophtldf_ind </field>
+          <field field_ref="sophtadv" name="hfbasin_indopacific" standard_name="northward_ocean_heat_transport" > @sophtadv_ipc + @sophtldf_ipc </field>
+          <!-- hfbasinpadv -->
+          <field field_ref="sophteiv"     name="hfbasinpadv_global"   standard_name="bolus_heat_transport"                       grid_ref="gznl_T_2D"       />
+          <field field_ref="sophteiv_atl"    name="hfbasinpadv_atlantic"   standard_name="bolus_heat_transport_atlantic"/>
+          <field field_ref="sophteiv_pac"    name="hfbasinpadv_pacific"   standard_name="bolus_heat_transport_pacific" />
+          <field field_ref="sophteiv_ind"    name="hfbasinpadv_indian"   standard_name="bolus_heat_transport_indian"   />
+          <field field_ref="sophteiv_ipc"    name="hfbasinpadv_indopacific"   standard_name="bolus_heat_transport_indopacific"   />
+          <!-- hfbasinpmadv -->
+          <field field_ref="sophteiv"     name="hfbasinpmadv_global"   standard_name="bolus_heat_transport"                       grid_ref="gznl_T_2D"       />
+          <field field_ref="sophteiv_atl"    name="hfbasinpmadv_atlantic"   standard_name="bolus_heat_transport_atlantic"/>
+          <field field_ref="sophteiv_pac"    name="hfbasinpmadv_pacific"   standard_name="bolus_heat_transport_pacific" />
+          <field field_ref="sophteiv_ind"    name="hfbasinpmadv_indian"   standard_name="bolus_heat_transport_indian"   />
+          <field field_ref="sophteiv_ipc"    name="hfbasinpmadv_indopacific"   standard_name="bolus_heat_transport_indopacific"   />
+          <!-- hfbasinpmdiff -->
+          <field field_ref="sophtldf"     name="hfbasinpmdiff_global"   standard_name="diffusive_transport"                       grid_ref="gznl_T_2D"       />
+          <field field_ref="sophtldf_atl"    name="hfbasinpmdiff_atlantic"   standard_name="diffusive_transport_atlantic"/>
+          <field field_ref="sophtldf_pac"    name="hfbasinpmdiff_pacific"   standard_name="diffusive_transport_pacific" />
+          <field field_ref="sophtldf_ind"    name="hfbasinpmdiff_indian"   standard_name="diffusive_transport_indian"   />
+          <field field_ref="sophtldf_ipc"    name="hfbasinpmdiff_indopacific"   standard_name="diffusive_transport_indopacific"   />
+          <!-- hfovovrt -->
+          <field field_ref="sophtove"     name="hfovovrt_global"   standard_name="overturning_heat_transport"                   grid_ref="gznl_T_2D"       />
+          <field field_ref="sophtove_atl"    name="hfovovrt_atlantic"   standard_name="overturning_heat_transport_atlantic"/>
+          <field field_ref="sophtove_pac"    name="hfovovrt_pacific"   standard_name="overturning_heat_transport_pacific" />
+          <field field_ref="sophtove_ind"    name="hfovovrt_indian"   standard_name="overturning_heat_transport_indian"   />
+          <field field_ref="sophtove_ipc"    name="hfovovrt_indopacific"   standard_name="overturning_heat_transport_indopacific"   />
+          <!-- hfovgyre IS THIS DONE CORRECTLY? SHOULD WE ALSO SUBTRACT THE BAROTROPIC TERM? The CMIP6 data request says not to so leave it for now-->
+          <field field_ref="sophtove"     name="hfovgyre_global"   standard_name="gyre_heat_transport"         > @sophtadv - @sophtove </field>
+          <field field_ref="sophtove_atl"    name="hfovgyre_atlantic"   standard_name="gyre_heat_transport_atlantic" > @sophtadv_atl - @sophtove_atl </field>
+          <field field_ref="sophtove_pac"    name="hfovgyre_pacific"   standard_name="gyre_heat_transport_pacific"  > @sophtadv_pac - @sophtove_pac </field>
+          <field field_ref="sophtove_ind"    name="hfovgyre_indian"   standard_name="gyre_heat_transport_indian"   > @sophtadv_ind - @sophtove_ind </field>
+          <field field_ref="sophtove_ipc"    name="hfovgyre_indopacific"   standard_name="gyre_heat_transport_indopacific"   > @sophtadv_ipc - @sophtove_ipc </field>
+          <!-- sltbasin -->
+          <field field_ref="sopstadv" name="sltbasin_global" standard_name="northward_ocean_heat_transport" unit="kg s-1"> (@sopstadv + @sopstldf)/1000 </field>
+          <field field_ref="sopstadv" name="sltbasin_atlantic" standard_name="northward_ocean_heat_transport" unit="kg s-1"> (@sopstadv_atl + @sopstldf_atl)/1000 </field>
+          <field field_ref="sopstadv" name="sltbasin_pacific" standard_name="northward_ocean_heat_transport" unit="kg s-1"> (@sopstadv_pac + @sopstldf_pac)/1000 </field>
+          <field field_ref="sopstadv" name="sltbasin_indian" standard_name="northward_ocean_heat_transport" unit="kg s-1"> (@sopstadv_ind + @sopstldf_ind)/1000 </field>
+          <field field_ref="sopstadv" name="sltbasin_indopacific" standard_name="northward_ocean_heat_transport" unit="kg s-1"> (@sopstadv_ipc + @sopstldf_ipc)/1000 </field>
+          <!-- sltbasinpadv -->
+          <field field_ref="sopsteiv"        name="sltbasinpadv_global"   standard_name="bolus_salt_transport"  unit="kg s-1"> @sopsteiv/1000   </field>
+          <field field_ref="sopsteiv_atl"    name="sltbasinpadv_atlantic"   standard_name="bolus_salt_transport_atlantic" unit="kg s-1"> @sopsteiv_atl/1000   </field>
+          <field field_ref="sopsteiv_pac"    name="sltbasinpadv_pacific"   standard_name="bolus_salt_transport_pacific" unit="kg s-1"> @sopsteiv_pac/1000   </field>
+          <field field_ref="sopsteiv_ind"    name="sltbasinpadv_indian"   standard_name="bolus_salt_transport_indian"  unit="kg s-1"> @sopsteiv_ind/1000   </field>
+          <field field_ref="sopsteiv_ipc"    name="sltbasinpadv_indopacific"   standard_name="bolus_salt_transport_indopacific"  unit="kg s-1"> @sopsteiv_ipc/1000   </field>
+          <!-- sltbasinpmadv -->
+          <field field_ref="sopsteiv"        name="sltbasinpmadv_global"   standard_name="bolus_salt_transport"  unit="kg s-1"> @sopsteiv/1000   </field>        
+          <field field_ref="sopsteiv_atl"    name="sltbasinpmadv_atlantic"   standard_name="bolus_salt_transport_atlantic" unit="kg s-1"> @sopsteiv_atl/1000   </field>
+          <field field_ref="sopsteiv_pac"    name="sltbasinpmadv_pacific"   standard_name="bolus_salt_transport_pacific" unit="kg s-1"> @sopsteiv_pac/1000   </field>
+          <field field_ref="sopsteiv_ind"    name="sltbasinpmadv_indian"   standard_name="bolus_salt_transport_indian"  unit="kg s-1"> @sopsteiv_ind/1000   </field>
+          <field field_ref="sopsteiv_ipc"    name="sltbasinpmadv_indopacific"   standard_name="bolus_salt_transport_indopacific"  unit="kg s-1"> @sopsteiv_ipc/1000   </field>
+          <!-- sltbasinpmdiff -->
+          <field field_ref="sopstldf"     name="sltbasinpmdiff_global"   standard_name="diffusive_transport" unit="kg s-1">   @sopstldf/1000   </field>
+          <field field_ref="sopstldf_atl"    name="sltbasinpmdiff_atlantic"   standard_name="diffusive_transport_atlantic" unit="kg s-1"> @sopstldf_atl/1000   </field>
+          <field field_ref="sopstldf_pac"    name="sltbasinpmdiff_pacific"   standard_name="diffusive_transport_pacific" unit="kg s-1"> @sopstldf_pac/1000   </field>
+          <field field_ref="sopstldf_ind"    name="sltbasinpmdiff_indian"   standard_name="diffusive_transport_indian" unit="kg s-1">  @sopstldf_ind/1000   </field>
+          <field field_ref="sopstldf_ipc"    name="sltbasinpmdiff_indopacific"   standard_name="diffusive_transport_indopacific" unit="kg s-1">  @sopstldf_ipc/1000   </field>
+          <!-- sltovovrt -->
+          <field field_ref="sopstove"     name="sltovovrt_global"   standard_name="overturning_salt_transport"  unit="kg s-1">   @sopstove/1000   </field>       
+          <field field_ref="sopstove_atl"    name="sltovovrt_atlantic"   standard_name="overturning_salt_transport_atlantic" unit="kg s-1">   @sopstove_atl/1000   </field>
+          <field field_ref="sopstove_pac"    name="sltovovrt_pacific"   standard_name="overturning_salt_transport_pacific"  unit="kg s-1">   @sopstove_pac/1000   </field>
+          <field field_ref="sopstove_ipc"    name="sltovovrt_indopacific"   standard_name="overturning_salt_transport_indopacific"   unit="kg s-1">   @sopstove_ipc/1000   </field>
+          <!-- sltovgyre IS THIS DONE CORRECTLY? SHOULD WE ALSO SUBTRACT THE BAROTROPIC TERM?-->
+          <field field_ref="sopstove"     name="sltovgyre_global"   standard_name="gyre_salt_transport"    unit="kg s-1" > (@sopstadv - @sopstove)/1000 </field>
+          <field field_ref="sopstove_atl"    name="sltovgyre_atlantic"   standard_name="gyre_salt_transport_atlantic" unit="kg s-1" > (@sopstadv_atl - @sopstove_atl)/1000 </field>
+          <field field_ref="sopstove_pac"    name="sltovgyre_pacific"   standard_name="gyre_salt_transport_pacific" unit="kg s-1"  > (@sopstadv_pac - @sopstove_pac)/1000 </field>
+          <field field_ref="sopstove_ind"    name="sltovgyre_indian"   standard_name="gyre_salt_transport_indian" unit="kg s-1"   > (@sopstadv_ind - @sopstove_ind)/1000 </field>
+          <field field_ref="sopstove_ipc"    name="sltovgyre_indopacific"   standard_name="gyre_salt_transport_ipc" unit="kg s-1"   > (@sopstadv_ipc - @sopstove_ipc)/1000 </field>
+        </file>
+
+      </file_group>
+
+      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+
+      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+   </file_definition>
+    
+
+
+
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-CMIP6-1M.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-CMIP6-1M.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-CMIP6-1M.xml	(revision 14078)
@@ -0,0 +1,339 @@
+<?xml version="1.0"?>
+
+<!--
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own filesfor ocean dynamics context                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+   
+    <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4">
+    
+      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+
+      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+
+      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+
+      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+
+      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+
+      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
+    
+
+      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE.">  <!-- 1d files -->   
+
+	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+          <field field_ref="sst_con"          name="tos_con"   standard_name="sea_surface_conservative_temperature"                                 />
+          <field field_ref="sst2_con"          name="tossq_con"   />
+          <field field_ref="sss_abs"          name="sos_abs"   standard_name="sea_surface_absolute_salinity"                                    />
+          <field field_ref="sss2_abs"         name="sossq_abs" long_name="Square of Sea Surface Absolute Salinity"   standard_name="square_of_sea_surface_absolute_Salinity"   unit="1e-06"     > sss_abs * sss_abs </field >
+          <field field_ref="mldr0_3"     name="mlotst"   long_name="Ocean Mixed Layer Thickness Defined by Sigma T"         />
+	  <field field_ref="ssh"       name="zos"   standard_name="sea_surface_height_above_geoid" long_name="Sea Surface Height Above Geoid"      />
+<!-- TO FIX
+          <field field_ref="20d"          name="t20d"  standard_name="depth_of_isosurface_of_sea_water_potential_temperature" />
+-->
+	</file>
+	
+	<file id="file2" name_suffix="_grid_U" description="ocean U grid variables" enabled=".FALSE." >
+          <field field_ref="ssu"          name="sozocrtx"   standard_name="sea_surface_eastward_sea_water_velocity"                 />
+	  <field field_ref="utau"         name="sozotaux"   standard_name="surface_downward_x_stress" />
+	</file>
+	
+	<file id="file3" name_suffix="_grid_V" description="ocean V grid variables"  enabled=".FALSE." >
+          <field field_ref="ssv"          name="somecrty"   standard_name="sea_surface_northward_sea_water_velocity"                 />
+	  <field field_ref="vtau"         name="sometauy"   standard_name="surface_downward_y_stress" />
+	</file>
+
+        <file id="file9" name_suffix="_scalar" description="scalar variables"  enabled=".FALSE." >
+          <field field_ref="sshthster"    name="scsshtst"   />
+          <field field_ref="voltot"       name="scvoltot"   />
+        </file>
+
+      </file_group>
+
+      <file_group id="1m" output_freq="1mo"  output_level="10" enabled=".TRUE.">  <!-- 1mo files -->   
+
+	<file id="file4" name_suffix="_grid_T" description="ocean T grid variables" >
+          <field field_ref="e3t"          name="thkcello"     />
+<!-- Is this dangerous to include rho0 here as a hard coded value -->
+          <field field_ref="e3t"          name="masscello"        standard_name="sea_water_mass_per_unit_area" unit="kg/m2" long_name="Ocean Grid-Cell Mass per area" > @e3t * 1026.0 </field> 
+          <field field_ref="tpt_dep"      name="zfull"        />
+<!-- TO FIX
+          <field field_ref="20d"          name="t20d"  standard_name="depth_of_isosurface_of_sea_water_potential_temperature" />
+-->
+          <field field_ref="toce_con"         name="thetao_con"       operation="average" freq_op="1mo" cell_methods="time: mean (thickness weighted)" > @toce_e3t_con / @e3t </field>
+<!-- TO FIX
+          <field field_ref="toce_vmean"   name="thetaot"   />
+          <field field_ref="toce_vmean300"   name="thetaot300"   />
+-->
+          <field field_ref="soce_abs"         name="so_abs"     operation="average" freq_op="1mo"   cell_methods="time: mean (thickness weighted)" > @soce_e3t_abs / @e3t </field>
+	  <field field_ref="ssh"       name="zos"   standard_name="sea_surface_height_above_geoid" long_name="Sea Surface Height Above Geoid"      />
+          <field field_ref="ssh2"      name="zossq"  standard_name="square_of_sea_surface_height_above_geoid" long_name="Square of Sea Surface Height Above Geoid"  />
+	  <field field_ref="runoffs"      name="friver"   standard_name="water_flux_into_sea_water_from_rivers"                     />
+	  <field field_ref="qt"           name="hfds"   standard_name="surface_downward_heat_flux_in_sea_water"                     />
+	  <field field_ref="qsr3d"        name="rsdo"   standard_name="downwelling_shortwave_flux_in_sea_water"                     />
+          <field field_ref="mldr0_3"      name="mlotst"   long_name="Ocean Mixed Layer Thickness Defined by Sigma T"         />
+          <field field_ref="mldr0_3"      name="mlotstsq"  long_name="Square of Ocean Mixed Layer Thickness Defined by Sigma T"  standard_name="square_of_ocean_mixed_layer_thickness_defined_by_sigma_theta" > mldr0_3 * mldr0_3 </field>
+          <field field_ref="mldr0_3"      name="mlotstmax"   long_name="Ocean Mixed Layer Thickness Defined by Sigma T" operation="maximum"        />
+          <field field_ref="mldr0_3"      name="mlotstmin"   long_name="Ocean Mixed Layer Thickness Defined by Sigma T" operation="minimum"        />
+          <field field_ref="berg_melt"       name="ficeberg"     standard_name="water_flux_into_sea_water_from_icebergs"      />
+          <field field_ref="berg_melt_qlat"  name="berg_latent_heat_flux"     standard_name="latent_heat_flux_from_icebergs"                                 />
+          <field field_ref="botpres"      name="pbo"                                                                                />
+          <field field_ref="sst_con"          name="tos_con"   standard_name="sea_surface_conservative_temperature"                                 />
+          <field field_ref="sst2_con"          name="tossq_con"   />
+          <field field_ref="sss_abs"          name="sos_abs"   standard_name="sea_surface_absolute_salinity"                                    />
+          <field field_ref="sss2_abs"         name="sossq_abs" long_name="Square of Sea Surface Absolute Salinity"   standard_name="square_of_sea_surface_absolute_Salinity"   unit="1e-06"     > sss_abs * sss_abs </field >
+          <field field_ref="sbt_con"          name="thetaob_con"   standard_name="sea_water_conservative_temperature_at_sea_floor"            />
+          <field field_ref="sbs_abs"          name="sob_abs"   standard_name="sea_water_salinity_at_sea_floor"                         />
+<!-- TO FIX
+          <field field_ref="rain_ao_cea" name="pr" standard_name="rainfall_flux" long_name="Rainfall Flux" > @rain_ao_cea </field>
+-->
+          <field field_ref="evap_ao_cea" name="evs" standard_name="water_evaporation_flux" long_name="Water Evaporation Flux Where Ice Free Ocean over Sea" />
+          <field field_ref="snow_ao_cea" name="prsn" standard_name="snowfall_flux" long_name="Snowfall Flux" />
+          <field field_ref="hflx_rain_cea" name="hfrainds" long_name="Temperature Flux due to Rain Expressed as Heat Flux In To Sea Water" standard_name="temperature_flux_due_to_rain_expressed_as_heat_flux_into_sea_water" > hflx_rain_cea </field> 
+          <field field_ref="hflx_evap_cea" name="hfevapds" long_name="Temperature Flux due to Evaporation Expressed as Heat Flux Out of Sea Water" standard_name="temperature_flux_due_to_evaporation_expressed_as_heat_flux_out_of_sea_water" />
+          <field field_ref="hflx_rnf_cea" name="hflx_rnf" long_name="Temperature Flux due to Runoff Expressed as Heat Flux into  Sea Water" standard_name="temperature_flux_due_to_runoff_expressed_as_heat_flux_into_sea_water" > hflx_rnf_cea </field> 
+          <field field_ref="saltflx"      name="sfdsi" standard_name="downward_sea_ice_basal_salt_flux" />
+          <field field_ref="fmmflx"       name="fsitherm"      unit="kg/m2/s"   />
+          <field field_ref = "empmr" >@empmr + @fwfisf </field>
+<!-- TO FIX
+          <field field_ref="Age" name="agessc" />
+-->
+          <field field_ref="tnpeo" />
+          <field field_ref="snowpre"     name="snowpre" />
+          <field field_ref="snow_ai_cea" name="snow_ai_cea" />
+	  <field field_ref="empmr"        name="sowaflup"   standard_name="water_flux_out_of_sea_ice_and_sea_water"                 />
+	  <field field_ref="saltflx"      name="sosafldo"   standard_name="salt_flux_into_sea_water"                                />
+          <field field_ref="mldkz5"       name="somixhgt"   standard_name="ocean_mixed_layer_thickness_defined_by_vertical_tracer_diffusivity"   />
+          <field field_ref="mldr10_1"     name="somxl010"   standard_name="ocean_mixed_layer_thickness_defined_by_sigma_theta"      />
+          <field field_ref="mldzint_1"    name="somxzint1"   standard_name="ocean_mixed_layer_thickness_defined_by_sigma_theta"      />
+          <field field_ref="ice_cover"    name="soicecov"   standard_name="sea_ice_area_fraction"                                   />
+          <field field_ref="wspd"         name="sowindsp"   standard_name="wind_speed"                                              />          
+          <field field_ref="qlatisf"         name="sohflisf"   standard_name=""                                                        />
+          <field field_ref="qlatisf3d"         name="vohflisf"   standard_name=""                                                        />
+          <field field_ref="qhcisf"         name="sohfcisf"   standard_name=""                                                        />
+          <field field_ref="qhcisf3d"         name="vohfcisf"   standard_name=""                                                        />
+          <field field_ref="fwfisf"       name="sowflisf"   standard_name=""                                                        />
+          <field field_ref="fwfisf3d"     name="vowflisf"   standard_name=""                                                        />
+<!-- TO FIX
+          <field field_ref="ketrd_ldf_vsum"     name="dispkexyfo"   standard_name="Dissipation of kinetic energy by lateral viscosity" grid_ref="vert_sum"/>
+-->
+          <field field_ref="tosmint"       name="opottempmint" />
+          <field field_ref="somint"       name="somint" />
+<!-- TO FIX
+          <field field_ref="toce_e3t_300" name="T300m" />
+          <field field_ref="e3t_300" name="e3t300m" />
+          <field field_ref="toce_e3t_vsum300" name="Tsum300m" />
+          <field field_ref="e3t_vsum300" name="e3t_vsum300m" />
+-->
+          <field field_ref="sbs_abs" name="sob_abs" />
+          <field field_ref="bn2" name="obvfsq" />
+<!-- trend diagnostics-->
+          <field field_ref="ttrd_totad_li"   name="opottempadvect"  unit="W/m2"    />
+          <field field_ref="ttrd_iso_li"     name="opottemppmdiff"  unit="W/m2"    />
+          <field field_ref="ttrd_zdfp_li"    name="opottempdiff"    unit="W/m2"    />
+          <field field_ref="ttrd_evd_li"     name="ttrd_evd_li"                    />
+          <field field_ref="ttrd_qns_li"     name="ttrd_qns_li"                    />
+          <field field_ref="ttrd_qsr_li"     name="rsdoabsorb"      unit="W/m2"    />
+          <field field_ref="ttrd_bbl_li"     name="ttrd_bbl_li"                    />
+          <field field_ref="ttrd_atf_li"     name="ttrd_atf_li"                    />
+          <field field_ref="ttrd_tot_li"     name="opottemptend"    unit="W/m2"    />
+          <field field_ref="strd_totad_li"   name="osaltadvect"     unit="Kg/m2/s" />
+          <field field_ref="strd_iso_li"     name="osaltpmdiff"     unit="kg/m2/s" />
+          <field field_ref="strd_zdfp_li"    name="osaltdiff"       unit="kg/m2/s" />
+          <field field_ref="strd_evd_li"     name="strd_evd_li"                    />
+          <field field_ref="strd_tot_li"     name="osalttend"       unit="kg/m2/s" />
+          <field field_ref="strd_bbl_li"     name="strd_bbl_li"                    />
+          <field field_ref="strd_atf_li"     name="strd_atf_li"                    />
+	</file>
+	
+	<file id="file5" name_suffix="_grid_U" description="ocean U grid variables" >
+          <field field_ref="e3u"          name="thkcello"     standard_name="cell_thickness" />
+          <field field_ref="uoce"         name="uo"     operation="average" freq_op="1mo"  cell_methods="time: mean (thickness weighted)" > @uoce_e3u / @e3u </field>
+	  <field field_ref="utau"         name="tauuo"   standard_name="surface_downward_x_stress"  />
+          <field field_ref="ut"           name="uto" standard_name="product_of_xward_sea_water_velocity_and_temperature" long_name="UT"  operation="average" freq_op="1mo" cell_methods="time: mean (thickness weighted)" > @ut_e3u / @e3u </field>
+          <field field_ref="us"           name="uso" standard_name="product_of_xward_sea_water_velocity_and_salinity" long_name="US"    operation="average" freq_op="1mo"  cell_methods="time: mean (thickness weighted)"> @us_e3u / @e3u </field>
+          <field field_ref="uoce"         name="u2o" standard_name="square_of_sea_water_x_velocity" long_name="UU"  operation="average" freq_op="1mo"  cell_methods="time: mean (thickness weighted)"> @uoce2_e3u / @e3u </field>
+          <!-- available with key_diaar5 -->
+          <field field_ref="u_masstr"     name="umo" /> 
+          <field field_ref="u_masstr_vint"     name="umo_vint" /> 
+          <field field_ref="u_heattr"     name="hfx" > @uadv_heattr + @udiff_heattr </field> 
+          <field field_ref="uadv_heattr"     name="hfx_adv" /> 
+          <field field_ref="udiff_heattr"     name="hfx_diff" /> 
+<!--below here not in CMOR format yet -->
+          <field field_ref="u_salttr"     name="sozosatr" />
+	</file>
+	
+	<file id="file6" name_suffix="_grid_V" description="ocean V grid variables" >
+          <field field_ref="e3v"          name="thkcello"        standard_name="cell_thickness" />
+          <field field_ref="voce"         name="vo"     operation="average" freq_op="1mo" cell_methods="time: mean (thickness weighted)" > @voce_e3v / @e3v </field>
+	  <field field_ref="vtau"         name="tauvo"   standard_name="surface_downward_y_stress" />
+          <field field_ref="vt"           name="vto" standard_name="product_of_yward_sea_water_velocity_and_temperature" long_name="VT"  operation="average" freq_op="1mo" cell_methods="time: mean (thickness weighted)" > @vt_e3v / @e3v </field>
+          <field field_ref="vs"           name="vso" standard_name="product_of_yward_sea_water_velocity_and_salinity" long_name="VS"  operation="average" freq_op="1mo" cell_methods="time: mean (thickness weighted)" > @vs_e3v / @e3v </field>
+          <field field_ref="voce"         name="v2o" standard_name="square_of_sea_water_y_velocity" long_name="VV"  operation="average" freq_op="1mo" cell_methods="time: mean (thickness weighted)" > @voce2_e3v / @e3v </field>
+          <!-- available with key_diaar5 -->
+          <field field_ref="v_masstr"     name="vmo" /> 
+          <field field_ref="v_heattr"     name="hfy" > @vadv_heattr + @vdiff_heattr </field>
+          <field field_ref="vadv_heattr"     name="hfy_adv" /> 
+          <field field_ref="vdiff_heattr"     name="hfy_diff" /> 
+<!--below here not in CMOR format yet -->
+          <field field_ref="v_salttr"     name="somesatr" />
+	</file>
+	
+	<file id="file7" name_suffix="_grid_W" description="ocean W grid variables" >
+	  <field field_ref="avt"          name="difvho"   standard_name="ocean_vertical_heat_diffusivity"  />
+	  <field field_ref="avs"          name="difvso"   standard_name="ocean_vertical_salt_diffusivity"   />                 
+          <field field_ref="avm"          name="difvmo"   standard_name="ocean_vertical_momentum_diffusivity"               />
+          <field field_ref="avt_evd"      name="avt_evd"  standard_name="enhanced_vertical_heat_diffusivity"               />
+          <field field_ref="av_tmx"       name="diftrto"  standard_name="ocean_vertical_tracer_diffusivity_due_to_tides"               />
+          <field field_ref="w_masstr"     name="wmo" > w_masstr </field>
+	  <field field_ref="woce"         name="wo" standard_name="upward_sea_water_velocity" long_name="W"                  />
+          <field field_ref="woce"         name="w2o" standard_name="square_of_upward_sea_water_velocity" long_name="WW"  operation="average" > woce * woce </field>
+          <field field_ref="wt"           name="wt"         standard_name="product_of_upward_sea_water_velocity_and_temperature" long_name="WT"         />
+          <field field_ref="ws"           name="ws"         standard_name="product_of_upward_sea_water_velocity_and_salinity" long_name="WS"            />
+<!-- TO FIX
+          <field field_ref="wpt_dep"      name="zhalf"        />
+-->
+	</file>
+	
+        <file id="file8" name_suffix="_scalar" description="scalar variables" enabled=".true." >
+          <field field_ref="voltot"       name="scvoltot"   />
+          <field field_ref="temptot"      name="thetaoga"   cell_methods="time: mean (volume weighted)"   />
+          <field field_ref="saltot"       name="soga"       cell_methods="time: mean (volume weighted)"   />
+        </file>
+
+        <file id="file10" name_suffix="_diaptr" description="processed diagnostics" >
+          <field field_ref="zomsfglo"     name="zomsfglo"   standard_name="meridional_streamfunction_global"           grid_ref="gznl_W_3D"       />
+          <field field_ref="zotemglo"     name="zotemglo"   standard_name="zonal_mean_temperature_global"              grid_ref="gznl_T_3D"       />
+          <field field_ref="zosrfglo"     name="zosrfglo"   standard_name="zonal_mean_surface_global"                  grid_ref="gznl_T_3D"       />
+          <field field_ref="zosalglo"     name="zosalglo"   standard_name="zonal_mean_salinity_global"                 grid_ref="gznl_T_3D"       />          
+          <field field_ref="zomsfatl"     name="zomsfatl"   standard_name="meridional_streamfunction_atlantic"         grid_ref="gznl_W_3D"       />
+          <field field_ref="zotematl"     name="zotematl"   standard_name="zonal_mean_temperature_atlantic"            grid_ref="gznl_T_3D"       />
+          <field field_ref="zosrfatl"     name="zosrfatl"   standard_name="zonal_mean_surface_atlantic"                grid_ref="gznl_T_3D"       />
+          <field field_ref="zosalatl"     name="zosalatl"   standard_name="zonal_mean_salinity_atlantic"               grid_ref="gznl_T_3D"       />          
+          <field field_ref="zomsfpac"     name="zomsfpac"   standard_name="meridional_streamfunction_pacific"          grid_ref="gznl_W_3D"       />
+          <field field_ref="zotempac"     name="zotempac"   standard_name="zonal_mean_temperature_pacific"             grid_ref="gznl_T_3D"       />
+          <field field_ref="zosrfpac"     name="zosrfpac"   standard_name="zonal_mean_surface_pacific"                 grid_ref="gznl_T_3D"       />
+          <field field_ref="zosalpac"     name="zosalpac"   standard_name="zonal_mean_salinity_pacific"                grid_ref="gznl_T_3D"       />
+          <field field_ref="zomsfind"     name="zomsfind"   standard_name="meridional_streamfunction_indian"           grid_ref="gznl_W_3D"       />
+          <field field_ref="zotemind"     name="zotemind"   standard_name="zonal_mean_temperature_indian"              grid_ref="gznl_T_3D"       />
+          <field field_ref="zosrfind"     name="zosrfind"   standard_name="zonal_mean_surface_indian"                  grid_ref="gznl_T_3D"       />
+          <field field_ref="zosalind"     name="zosalind"   standard_name="zonal_mean_salinity_indian"                 grid_ref="gznl_T_3D"       />          
+          <field field_ref="zomsfipc"     name="zomsfipc"   standard_name="meridional_streamfunction_indian_pacific"   grid_ref="gznl_W_3D"       />
+          <field field_ref="zotemipc"     name="zotemipc"   standard_name="zonal_mean_temperature_indian_pacific"      grid_ref="gznl_T_3D"       />
+          <field field_ref="zosrfipc"     name="zosrfipc"   standard_name="zonal_mean_surface_indian_pacific"          grid_ref="gznl_T_3D"       />
+          <field field_ref="zosalipc"     name="zosalipc"   standard_name="zonal_mean_salinity_indian_pacific"         grid_ref="gznl_T_3D"       />          
+          <field field_ref="sophtadv"     name="sophtadv"   standard_name="advective_heat_transport"                   grid_ref="gznl_T_2D"       />
+          <field field_ref="sophtadv_atl"    name="sophtadv_atlantic"   standard_name="advective_heat_transport_atlantic"/>
+          <field field_ref="sophtadv_pac"    name="sophtadv_pacific"   standard_name="advective_heat_transport_pacific" />
+          <field field_ref="sophtadv_ind"    name="sophtadv_indian"   standard_name="advective_heat_transport_indian"   />
+          <field field_ref="sophtadv_ipc"    name="sophtadv_ipc"   standard_name="advective_heat_transport_indopacific"  />
+          <field field_ref="sophtbtr"     name="hfovbaro"   standard_name="barotropic_heat_transport"                   grid_ref="gznl_T_2D"       />
+          <field field_ref="sophtbtr_atl"    name="hfovbaro_atlantic"   standard_name="barotropic_heat_transport_atlantic"/>
+          <field field_ref="sophtbtr_pac"    name="hfovbaro_pacific"   standard_name="barotropic_heat_transport_pacific" />
+          <field field_ref="sophtbtr_ind"    name="hfovbaro_indian"   standard_name="barotropic_heat_transport_indian"   />
+          <field field_ref="sophtbtr_ipc"    name="hfovbaro_ipc"   standard_name="barotropic_heat_transport_indopacific"  />
+          <field field_ref="sopstadv"     name="sopstadv"   standard_name="advective_salt_transport"                   grid_ref="gznl_T_2D"       />
+          <field field_ref="sopstadv_atl"    name="sopstadv_atlantic"   standard_name="advective_salt_transport_atlantic"/>
+          <field field_ref="sopstadv_pac"    name="sopstadv_pacific"   standard_name="advective_salt_transport_pacific" />
+          <field field_ref="sopstadv_ind"    name="sopstadv_indian"   standard_name="advective_salt_transport_indian"   />
+          <field field_ref="sopstadv_ipc"    name="sopstadv_ipc"   standard_name="advective_salt_transport_indopacific"  />
+          <field field_ref="sopstbtr"     name="sltovbaro"   standard_name="barotropic_salt_transport"     />
+          <field field_ref="sopstbtr_atl"    name="sltovbaro_atlantic"   standard_name="barotropic_salt_transport_atlantic"/>
+          <field field_ref="sopstbtr_pac"    name="sltovbaro_pacific"   standard_name="barotropic_salt_transport_pacific" />
+          <field field_ref="sopstbtr_ind"    name="sltovbaro_indian"   standard_name="barotropic_salt_transport_indian"   />
+          <field field_ref="sopstbtr_ipc"    name="sltovbaro_ipc"   standard_name="barotropic_salt_transport_indopacific"  />
+          <!--The following variables are to be merged into a single variableis with a basin dimenesion in postprocessing  -->
+          <!-- hfbasin -->
+          <field field_ref="sophtadv" name="hfbasin_global" standard_name="northward_ocean_heat_transport" > @sophtadv + @sophtldf </field>
+          <field field_ref="sophtadv" name="hfbasin_atlantic" standard_name="northward_ocean_heat_transport" > @sophtadv_atl + @sophtldf_atl </field>
+          <field field_ref="sophtadv" name="hfbasin_pacific" standard_name="northward_ocean_heat_transport" > @sophtadv_pac + @sophtldf_pac </field>
+          <field field_ref="sophtadv" name="hfbasin_indian" standard_name="northward_ocean_heat_transport" > @sophtadv_ind + @sophtldf_ind </field>
+          <field field_ref="sophtadv" name="hfbasin_indopacific" standard_name="northward_ocean_heat_transport" > @sophtadv_ipc + @sophtldf_ipc </field>
+          <!-- hfbasinpadv -->
+          <field field_ref="sophteiv"     name="hfbasinpadv_global"   standard_name="bolus_heat_transport"                       grid_ref="gznl_T_2D"       />
+          <field field_ref="sophteiv_atl"    name="hfbasinpadv_atlantic"   standard_name="bolus_heat_transport_atlantic"/>
+          <field field_ref="sophteiv_pac"    name="hfbasinpadv_pacific"   standard_name="bolus_heat_transport_pacific" />
+          <field field_ref="sophteiv_ind"    name="hfbasinpadv_indian"   standard_name="bolus_heat_transport_indian"   />
+          <field field_ref="sophteiv_ipc"    name="hfbasinpadv_indopacific"   standard_name="bolus_heat_transport_indopacific"   />
+          <!-- hfbasinpmadv -->
+          <field field_ref="sophteiv"     name="hfbasinpmadv_global"   standard_name="bolus_heat_transport"                       grid_ref="gznl_T_2D"       />
+          <field field_ref="sophteiv_atl"    name="hfbasinpmadv_atlantic"   standard_name="bolus_heat_transport_atlantic"/>
+          <field field_ref="sophteiv_pac"    name="hfbasinpmadv_pacific"   standard_name="bolus_heat_transport_pacific" />
+          <field field_ref="sophteiv_ind"    name="hfbasinpmadv_indian"   standard_name="bolus_heat_transport_indian"   />
+          <field field_ref="sophteiv_ipc"    name="hfbasinpmadv_indopacific"   standard_name="bolus_heat_transport_indopacific"   />
+          <!-- hfbasinpmdiff -->
+          <field field_ref="sophtldf"     name="hfbasinpmdiff_global"   standard_name="diffusive_transport"                       grid_ref="gznl_T_2D"       />
+          <field field_ref="sophtldf_atl"    name="hfbasinpmdiff_atlantic"   standard_name="diffusive_transport_atlantic"/>
+          <field field_ref="sophtldf_pac"    name="hfbasinpmdiff_pacific"   standard_name="diffusive_transport_pacific" />
+          <field field_ref="sophtldf_ind"    name="hfbasinpmdiff_indian"   standard_name="diffusive_transport_indian"   />
+          <field field_ref="sophtldf_ipc"    name="hfbasinpmdiff_indopacific"   standard_name="diffusive_transport_indopacific"   />
+          <!-- hfovovrt -->
+          <field field_ref="sophtove"     name="hfovovrt_global"   standard_name="overturning_heat_transport"                   grid_ref="gznl_T_2D"       />
+          <field field_ref="sophtove_atl"    name="hfovovrt_atlantic"   standard_name="overturning_heat_transport_atlantic"/>
+          <field field_ref="sophtove_pac"    name="hfovovrt_pacific"   standard_name="overturning_heat_transport_pacific" />
+          <field field_ref="sophtove_ind"    name="hfovovrt_indian"   standard_name="overturning_heat_transport_indian"   />
+          <field field_ref="sophtove_ipc"    name="hfovovrt_indopacific"   standard_name="overturning_heat_transport_indopacific"   />
+          <!-- hfovgyre IS THIS DONE CORRECTLY? SHOULD WE ALSO SUBTRACT THE BAROTROPIC TERM? The CMIP6 data request says not to so leave it for now-->
+          <field field_ref="sophtove"     name="hfovgyre_global"   standard_name="gyre_heat_transport"         > @sophtadv - @sophtove </field>
+          <field field_ref="sophtove_atl"    name="hfovgyre_atlantic"   standard_name="gyre_heat_transport_atlantic" > @sophtadv_atl - @sophtove_atl </field>
+          <field field_ref="sophtove_pac"    name="hfovgyre_pacific"   standard_name="gyre_heat_transport_pacific"  > @sophtadv_pac - @sophtove_pac </field>
+          <field field_ref="sophtove_ind"    name="hfovgyre_indian"   standard_name="gyre_heat_transport_indian"   > @sophtadv_ind - @sophtove_ind </field>
+          <field field_ref="sophtove_ipc"    name="hfovgyre_indopacific"   standard_name="gyre_heat_transport_indopacific"   > @sophtadv_ipc - @sophtove_ipc </field>
+          <!-- sltbasin -->
+          <field field_ref="sopstadv" name="sltbasin_global" standard_name="northward_ocean_heat_transport" unit="kg s-1"> (@sopstadv + @sopstldf)/1000 </field>
+          <field field_ref="sopstadv" name="sltbasin_atlantic" standard_name="northward_ocean_heat_transport" unit="kg s-1"> (@sopstadv_atl + @sopstldf_atl)/1000 </field>
+          <field field_ref="sopstadv" name="sltbasin_pacific" standard_name="northward_ocean_heat_transport" unit="kg s-1"> (@sopstadv_pac + @sopstldf_pac)/1000 </field>
+          <field field_ref="sopstadv" name="sltbasin_indian" standard_name="northward_ocean_heat_transport" unit="kg s-1"> (@sopstadv_ind + @sopstldf_ind)/1000 </field>
+          <field field_ref="sopstadv" name="sltbasin_indopacific" standard_name="northward_ocean_heat_transport" unit="kg s-1"> (@sopstadv_ipc + @sopstldf_ipc)/1000 </field>
+          <!-- sltbasinpadv -->
+          <field field_ref="sopsteiv"        name="sltbasinpadv_global"   standard_name="bolus_salt_transport"  unit="kg s-1"> @sopsteiv/1000   </field>
+          <field field_ref="sopsteiv_atl"    name="sltbasinpadv_atlantic"   standard_name="bolus_salt_transport_atlantic" unit="kg s-1"> @sopsteiv_atl/1000   </field>
+          <field field_ref="sopsteiv_pac"    name="sltbasinpadv_pacific"   standard_name="bolus_salt_transport_pacific" unit="kg s-1"> @sopsteiv_pac/1000   </field>
+          <field field_ref="sopsteiv_ind"    name="sltbasinpadv_indian"   standard_name="bolus_salt_transport_indian"  unit="kg s-1"> @sopsteiv_ind/1000   </field>
+          <field field_ref="sopsteiv_ipc"    name="sltbasinpadv_indopacific"   standard_name="bolus_salt_transport_indopacific"  unit="kg s-1"> @sopsteiv_ipc/1000   </field>
+          <!-- sltbasinpmadv -->
+          <field field_ref="sopsteiv"        name="sltbasinpmadv_global"   standard_name="bolus_salt_transport"  unit="kg s-1"> @sopsteiv/1000   </field>        
+          <field field_ref="sopsteiv_atl"    name="sltbasinpmadv_atlantic"   standard_name="bolus_salt_transport_atlantic" unit="kg s-1"> @sopsteiv_atl/1000   </field>
+          <field field_ref="sopsteiv_pac"    name="sltbasinpmadv_pacific"   standard_name="bolus_salt_transport_pacific" unit="kg s-1"> @sopsteiv_pac/1000   </field>
+          <field field_ref="sopsteiv_ind"    name="sltbasinpmadv_indian"   standard_name="bolus_salt_transport_indian"  unit="kg s-1"> @sopsteiv_ind/1000   </field>
+          <field field_ref="sopsteiv_ipc"    name="sltbasinpmadv_indopacific"   standard_name="bolus_salt_transport_indopacific"  unit="kg s-1"> @sopsteiv_ipc/1000   </field>
+          <!-- sltbasinpmdiff -->
+          <field field_ref="sopstldf"     name="sltbasinpmdiff_global"   standard_name="diffusive_transport" unit="kg s-1">   @sopstldf/1000   </field>
+          <field field_ref="sopstldf_atl"    name="sltbasinpmdiff_atlantic"   standard_name="diffusive_transport_atlantic" unit="kg s-1"> @sopstldf_atl/1000   </field>
+          <field field_ref="sopstldf_pac"    name="sltbasinpmdiff_pacific"   standard_name="diffusive_transport_pacific" unit="kg s-1"> @sopstldf_pac/1000   </field>
+          <field field_ref="sopstldf_ind"    name="sltbasinpmdiff_indian"   standard_name="diffusive_transport_indian" unit="kg s-1">  @sopstldf_ind/1000   </field>
+          <field field_ref="sopstldf_ipc"    name="sltbasinpmdiff_indopacific"   standard_name="diffusive_transport_indopacific" unit="kg s-1">  @sopstldf_ipc/1000   </field>
+          <!-- sltovovrt -->
+          <field field_ref="sopstove"     name="sltovovrt_global"   standard_name="overturning_salt_transport"  unit="kg s-1">   @sopstove/1000   </field>       
+          <field field_ref="sopstove_atl"    name="sltovovrt_atlantic"   standard_name="overturning_salt_transport_atlantic" unit="kg s-1">   @sopstove_atl/1000   </field>
+          <field field_ref="sopstove_pac"    name="sltovovrt_pacific"   standard_name="overturning_salt_transport_pacific"  unit="kg s-1">   @sopstove_pac/1000   </field>
+          <field field_ref="sopstove_ipc"    name="sltovovrt_indopacific"   standard_name="overturning_salt_transport_indopacific"   unit="kg s-1">   @sopstove_ipc/1000   </field>
+          <!-- sltovgyre IS THIS DONE CORRECTLY? SHOULD WE ALSO SUBTRACT THE BAROTROPIC TERM?-->
+          <field field_ref="sopstove"     name="sltovgyre_global"   standard_name="gyre_salt_transport"    unit="kg s-1" > (@sopstadv - @sopstove)/1000 </field>
+          <field field_ref="sopstove_atl"    name="sltovgyre_atlantic"   standard_name="gyre_salt_transport_atlantic" unit="kg s-1" > (@sopstadv_atl - @sopstove_atl)/1000 </field>
+          <field field_ref="sopstove_pac"    name="sltovgyre_pacific"   standard_name="gyre_salt_transport_pacific" unit="kg s-1"  > (@sopstadv_pac - @sopstove_pac)/1000 </field>
+          <field field_ref="sopstove_ind"    name="sltovgyre_indian"   standard_name="gyre_salt_transport_indian" unit="kg s-1"   > (@sopstadv_ind - @sopstove_ind)/1000 </field>
+          <field field_ref="sopstove_ipc"    name="sltovgyre_indopacific"   standard_name="gyre_salt_transport_ipc" unit="kg s-1"   > (@sopstadv_ipc - @sopstove_ipc)/1000 </field>
+        </file>
+
+      </file_group>
+
+      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+
+      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+   </file_definition>
+    
+
+
+
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-CMIP6-INVALID_PERIOD.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-CMIP6-INVALID_PERIOD.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/file_def_nemo-oce-CMIP6-INVALID_PERIOD.xml	(revision 14078)
@@ -0,0 +1,4 @@
+You can't use the standard diagnostic options with the current cycling period.
+Choose the "Custom" option, copy the file_def*.xml files that
+you want to use into the Rose app and adjust the meaning period
+accordingly. 
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/iodef.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/iodef.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/iodef.xml	(revision 14078)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<simulation> 
+
+<!-- ============================================================================================ -->
+<!-- XIOS context                                                                                 -->
+<!-- ============================================================================================ -->
+
+  <context id="xios" >
+
+      <variable_definition>
+	
+	  <variable id="info_level"                type="int">-1</variable>
+	  <variable id="using_server"              type="bool">true</variable>
+	  <variable id="using_oasis"               type="bool">false</variable>
+	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
+	
+      </variable_definition>
+  </context>
+
+<!-- ============================================================================================ -->
+<!-- NEMO  CONTEXT add and suppress the components you need                                       -->
+<!-- ============================================================================================ -->
+
+  <context id="nemo" src="./context_nemo.xml"/>       <!--  NEMO       -->
+
+</simulation>
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/iodef_coupled.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/iodef_coupled.xml	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/METO_GO/EXPREF/iodef_coupled.xml	(revision 14078)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<simulation> 
+
+<!-- ============================================================================================ -->
+<!-- XIOS context                                                                                 -->
+<!-- ============================================================================================ -->
+
+  <context id="xios" >
+
+      <variable_definition>
+	
+	  <variable id="info_level"                type="int">-1</variable>
+	  <variable id="using_server"              type="bool">true</variable>
+	  <variable id="using_oasis"               type="bool">true</variable>
+	  <variable id="oasis_codes_id"            type="string" >toyoce</variable>
+	
+      </variable_definition>
+  </context>
+
+<!-- ============================================================================================ -->
+<!-- NEMO  CONTEXT add and suppress the components you need                                       -->
+<!-- ============================================================================================ -->
+
+  <context id="nemo" src="./context_nemo.xml"/>       <!--  NEMO       -->
+
+</simulation>
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-ice.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-ice.xml	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-ice.xml	(revision 14078)
@@ -28,7 +28,7 @@
        <field field_ref="iceapnd"          name="siapnd" />
        <field field_ref="icevpnd"          name="sivpnd" />
-       <field field_ref="sst_m"            name="sst_m"  />
-       <field field_ref="sss_m"            name="sss_m"  />
-       
+       <field field_ref="sst_m_pot"        name="sst_m_pot"  />
+       <field field_ref="sss_m_abs"        name="sss_m_abs"  />
+
        <!-- heat -->
        <field field_ref="icetemp"          name="sitemp" />
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-oce.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-oce.xml	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/ORCA2_ICE_PISCES/EXPREF/file_def_nemo-oce.xml	(revision 14078)
@@ -14,12 +14,12 @@
         <file id="file11" name_suffix="_grid_T" description="ocean T grid variables" >
           <field field_ref="e3t"      />
-          <field field_ref="toce"         name="thetao"                                                                      operation="instant" freq_op="5d" > @toce_e3t / @e3t </field>
-          <field field_ref="soce"         name="so"                                                                          operation="instant" freq_op="5d" > @soce_e3t / @e3t </field>
-          <field field_ref="sst"          name="tos"   />
-          <field field_ref="sss"          name="sos"   />
+          <field field_ref="toce_con"         name="thetao_con"                                                                      operation="instant" freq_op="5d" > @toce_con_e3t / @e3t </field>
+          <field field_ref="soce_abs"         name="so_abs"                                                                          operation="instant" freq_op="5d" > @soce_abs_e3t / @e3t </field>
+          <field field_ref="sst_con"          name="tos_con"   />
+          <field field_ref="sss_abs"          name="sos_abs"   />
           <field field_ref="ssh"          name="zos"   />
-          <field field_ref="sst"          name="tosstd"       long_name="sea surface temperature standard deviation"         operation="instant" freq_op="5d" > sqrt( @sst2 - @sst * @sst ) </field>
+          <field field_ref="sst_con"          name="tosstd_con"       long_name="sea surface temperature standard deviation"         operation="instant" freq_op="5d" > sqrt( @sst2_con - @sst_con * @sst_con ) </field>
           <field field_ref="ssh"          name="zosstd"       long_name="sea surface height above geoid standard deviation"  operation="instant" freq_op="5d" > sqrt( @ssh2 - @ssh * @ssh ) </field>
-          <field field_ref="sst"          name="sstdcy"       long_name="amplitude of sst diurnal cycle"                     operation="average" freq_op="1d" > @sstmax - @sstmin </field>
+          <field field_ref="sst_con"          name="sstdcy_con"       long_name="amplitude of sst diurnal cycle"                     operation="average" freq_op="1d" > @sstmax_con - @sstmin_con </field>
           <field field_ref="mldkz5"   />
           <field field_ref="mldr10_1" />
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/SHARED/domain_def_nemo.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/SHARED/domain_def_nemo.xml	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/SHARED/domain_def_nemo.xml	(revision 14078)
@@ -181,11 +181,12 @@
      <domain id="EqW" domain_ref="grid_W" > <zoom_domain id="EqW"/> </domain>
 
-	           <!--   zonal mean grid   -->
-     <domain_group id="gznl">
-        <domain id="gznl" long_name="gznl"/>
-        <domain id="ptr" domain_ref="gznl" > 
-            <zoom_domain id="ptr" ibegin="0000" jbegin="0" ni="1" nj="0000" /> 
-        </domain>
-      </domain_group>
+     
+     <!--   zonal mean grid   -->
+     <domain id="gznl" long_name="gznl"/>
+     <domain id="ptr" domain_ref="gznl" >
+	 <zoom_domain id="ptr" ibegin="0000" jbegin="0" ni="1" nj="0000" />
+     </domain>  
+     <domain id="znl_T" domain_ref="gznl" > <zoom_domain id="znl_T"/> </domain>
+     <domain id="znl_W" domain_ref="gznl" > <zoom_domain id="znl_W"/> </domain>
 
      
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/SHARED/field_def_nemo-ice.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/SHARED/field_def_nemo-ice.xml	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/SHARED/field_def_nemo-ice.xml	(revision 14078)
@@ -169,6 +169,10 @@
 
 	  <!-- sbcssm variables -->
-          <field id="sst_m"    unit="degC" />
-          <field id="sss_m"    unit="psu"  />
+          <field id="sst_m_pot"    unit="degC" />
+	  <!-- EOS-80 -->
+          <field id="sss_m_pra"    unit="psu"  />
+          <!-- TEOS-10 -->
+          <field id="sss_m_abs"    unit="psu"  />
+
           <field id="ssu_m"    unit="m/s"  />
           <field id="ssv_m"    unit="m/s"  />
@@ -218,5 +222,5 @@
           <field id="dmisum"       long_name="sea-ice mass change through surface melting"             standard_name="tendency_of_sea_ice_amount_due_to_surface_melting"                       unit="kg/m2/s" />
           <field id="dmibom"       long_name="sea-ice mass change through bottom melting"              standard_name="tendency_of_sea_ice_amount_due_to_basal_melting"                         unit="kg/m2/s" />
-          <field id="dmilam"       long_name="sea-ice mass change through lateral melting"             standard_name="tendency_of_sea_ice_amount_due_to_lateral_melting"                       unit="kg/m2/s" />
+	  <field id="dmilam"       long_name="sea-ice mass change through lateral melting"             standard_name="tendency_of_sea_ice_amount_due_to_lateral_melting"                       unit="kg/m2/s" />
           <field id="dmsspr"       long_name="snow mass change through snow fall"                      standard_name="snowfall_flux"                                                           unit="kg/m2/s" />
           <field id="dmsmel"       long_name="snow mass change through melt"                           standard_name="surface_snow_melt_flux"                                                  unit="kg/m2/s" />
@@ -250,35 +254,20 @@
          <field id="xmtrpice_ave"     long_name="Monthly average of x-ice mass transport"   field_ref="xmtrpice"          grid_ref="grid_U_2D"        freq_op="1mo" freq_offset="_reset_"  > @xmtrpice </field>
          <field id="xmtrpice_section"                                                                                     grid_ref="grid_U_scalar"  > xmtrpice_ave </field>
-         <field id="xmtrpice_strait"                                                        field_ref="xmtrpice_section"  grid_ref="grid_U_4strait_ice"  />
-         <field id="xstrait_mifl"                                                           field_ref="xmtrpice_strait"   grid_ref="grid_U_4strait_ice_hsum" unit="kg/s" detect_missing_value="true" > this * maskMFO_u_ice </field>
 
          <field id="ymtrpice_ave"     long_name="Monthly average of y-ice mass transport"   field_ref="ymtrpice"          grid_ref="grid_V_2D"        freq_op="1mo" freq_offset="_reset_"  > @ymtrpice </field>
          <field id="ymtrpice_section"                                                                                     grid_ref="grid_V_scalar"  > ymtrpice_ave </field>
-         <field id="ymtrpice_strait"                                                        field_ref="ymtrpice_section"  grid_ref="grid_V_4strait_ice"  />
-	 <field id="ystrait_mifl"                                                           field_ref="ymtrpice_strait"   grid_ref="grid_V_4strait_ice_hsum" unit="kg/s" detect_missing_value="true"  > this * maskMFO_v_ice </field>
 
          <field id="xmtrpsnw_ave"     long_name="Monthly average of x-snow mass transport"  field_ref="xmtrpsnw"          grid_ref="grid_U_2D"        freq_op="1mo" freq_offset="_reset_"  > @xmtrpsnw </field>
          <field id="xmtrpsnw_section"                                                                                     grid_ref="grid_U_scalar"  > xmtrpsnw_ave </field>
-         <field id="xmtrpsnw_strait"                                                        field_ref="xmtrpsnw_section"  grid_ref="grid_U_4strait_ice"  />
-         <field id="xstrait_msfl"                                                           field_ref="xmtrpsnw_strait"   grid_ref="grid_U_4strait_ice_hsum" unit="kg/s" detect_missing_value="true" > this * maskMFO_u_ice </field>
 
          <field id="ymtrpsnw_ave"     long_name="Monthly average of y-snow mass transport"  field_ref="ymtrpsnw"          grid_ref="grid_V_2D"        freq_op="1mo" freq_offset="_reset_"  > @ymtrpsnw </field>
          <field id="ymtrpsnw_section"                                                                                     grid_ref="grid_V_scalar"  > ymtrpsnw_ave </field>
-         <field id="ymtrpsnw_strait"                                                        field_ref="ymtrpsnw_section"  grid_ref="grid_V_4strait_ice"  />
-	 <field id="ystrait_msfl"                                                           field_ref="ymtrpsnw_strait"   grid_ref="grid_V_4strait_ice_hsum" unit="kg/s" detect_missing_value="true"  > this * maskMFO_v_ice </field>
 
          <field id="xatrp_ave"        long_name="Monthly average of x-ice area transport"   field_ref="xatrp"             grid_ref="grid_U_2D"        freq_op="1mo" freq_offset="_reset_"  > @xatrp </field>
          <field id="xatrp_section"                                                                                        grid_ref="grid_U_scalar"  > xatrp_ave </field>
-         <field id="xatrp_strait"                                                           field_ref="xatrp_section"     grid_ref="grid_U_4strait_ice"  />
-         <field id="xstrait_arfl"                                                           field_ref="xatrp_strait"      grid_ref="grid_U_4strait_ice_hsum" unit="kg/s" detect_missing_value="true" > this * maskMFO_u_ice </field>
 
          <field id="yatrp_ave"        long_name="Monthly average of y-ice area transport"   field_ref="yatrp"             grid_ref="grid_V_2D"        freq_op="1mo" freq_offset="_reset_"  > @yatrp </field>
          <field id="yatrp_section"                                                                                        grid_ref="grid_V_scalar"  > yatrp_ave </field>
-         <field id="yatrp_strait"                                                           field_ref="yatrp_section"     grid_ref="grid_V_4strait_ice"  />
-	 <field id="ystrait_arfl"                                                           field_ref="yatrp_strait"      grid_ref="grid_V_4strait_ice_hsum" unit="m2/s" detect_missing_value="true"  > this * maskMFO_v_ice </field>
-
-         <field id="strait_mifl"      long_name="Sea ice mass flux through straits"      standard_name="sea_ice_mass_transport_across_line"   unit="kg/s"  freq_op="1mo"  grid_ref="grid_4strait_ice" > xstrait_mifl + ystrait_mifl </field>
-         <field id="strait_msfl"      long_name="Snow mass flux through straits"         standard_name="snow_mass_transport_across_line"      unit="kg/s"  freq_op="1mo"  grid_ref="grid_4strait_ice" > xstrait_msfl + ystrait_msfl </field>
-	 <field id="strait_arfl"      long_name="Sea ice area flux through straits"      standard_name="sea_area_mass_transport_across_line"  unit="m2/s"  freq_op="1mo"  grid_ref="grid_4strait_ice" > xstrait_arfl + ystrait_arfl </field>
+
 
 	</field_group> <!-- SBC_2D -->
@@ -376,6 +365,9 @@
 	  <field field_ref="icevpnd"          name="sivpnd" />
           <field field_ref="iceage"           name="siage"  />
-	  <field field_ref="sst_m"            name="sst_m"  />
-	  <field field_ref="sss_m"            name="sss_m"  />
+	  <field id="sst_m_pot"    unit="degC" />
+	  <!-- EOS-80 -->
+	  <field id="sss_m_pra"    unit="psu"  />
+	  <!-- TEOS-10 -->
+          <field id="sss_m_abs"    unit="psu"  />
 	  
 	  <!-- heat -->
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/SHARED/field_def_nemo-oce.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/SHARED/field_def_nemo-oce.xml	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/SHARED/field_def_nemo-oce.xml	(revision 14078)
@@ -19,16 +19,23 @@
       
       <field_group id="grid_T" grid_ref="grid_T_2D" >
-        <field id="e3t"          long_name="T-cell thickness"                    standard_name="cell_thickness"        unit="m"   grid_ref="grid_T_3D" />
-        <field id="e3ts"         long_name="T-cell thickness"   field_ref="e3t"  standard_name="cell_thickness"        unit="m"   grid_ref="grid_T_SFC"/>
-        <field id="e3t_0"        long_name="Initial T-cell thickness"            standard_name="ref_cell_thickness"    unit="m"   grid_ref="grid_T_3D" />
-        <field id="e3tb"         long_name="bottom T-cell thickness"             standard_name="bottom_cell_thickness" unit="m"   grid_ref="grid_T_2D"/> 
+        <field id="e3t"          long_name="T-cell thickness"                    standard_name="cell_thickness"     unit="m"   grid_ref="grid_T_3D" />
+        <field id="e3t_surf"     long_name="T-cell thickness"   field_ref="e3t"  standard_name="cell_thickness"     unit="m"   grid_ref="grid_T_surface_extract"/>
+        <field id="e3t_0"        long_name="Initial T-cell thickness"            standard_name="ref_cell_thickness" unit="m"   grid_ref="grid_T_3D" />
+        <field id="e3tb"         long_name="bottom T-cell thickness"             standard_name="bottom_cell_thickness" unit="m"   grid_ref="grid_T_2D"/>
         <field id="e3t_300"      field_ref="e3t"                grid_ref="grid_T_zoom_300"       detect_missing_value="true" />
-        <field id="e3t_vsum300"  field_ref="e3t_300"            grid_ref="grid_T_vsum"   detect_missing_value="true" />
+	<field id="e3t_vsum300"  field_ref="e3t_300"            grid_ref="grid_T_vsum"   detect_missing_value="true" />
 	<field id="masscello"    long_name="Sea Water Mass per unit area"   standard_name="sea_water_mass_per_unit_area"   unit="kg/m2"   grid_ref="grid_T_3D"/>
-        <field id="volcello"     long_name="Ocean Volume"                   standard_name="ocean_volume"   unit="m3"       grid_ref="grid_T_3D"/> 
-        <field id="toce"         long_name="temperature"                         standard_name="sea_water_potential_temperature"   unit="degC"     grid_ref="grid_T_3D"/>
-        <field id="toce_e3t"     long_name="temperature (thickness weighted)"                                                      unit="degC"     grid_ref="grid_T_3D" > toce * e3t </field >
-        <field id="soce"         long_name="salinity"                            standard_name="sea_water_practical_salinity"      unit="1e-3"     grid_ref="grid_T_3D"/>
-        <field id="soce_e3t"     long_name="salinity    (thickness weighted)"                                                      unit="1e-3"     grid_ref="grid_T_3D" > soce * e3t </field >
+        <field id="volcello"     long_name="Ocean Volume"                   standard_name="ocean_volume"   unit="m3"       grid_ref="grid_T_3D"/>
+
+        <!-- EOS80 -->
+        <field id="toce_pot"         long_name="potential temperature"           standard_name="sea_water_potential_temperature"      unit="degC"     grid_ref="grid_T_3D"/>
+        <field id="toce_pot_e3t"     long_name="potential temperature (thickness weighted)"                                           unit="degC"     grid_ref="grid_T_3D" > toce_pot * e3t </field >
+        <field id="soce_pra"         long_name="practical salinity"              standard_name="sea_water_practical_salinity"      unit="1e-3"     grid_ref="grid_T_3D"/>
+        <field id="soce_pra_e3t"     long_name="practical salinity    (thickness weighted)"                                        unit="1e-3"     grid_ref="grid_T_3D" > soce_pra * e3t </field >
+        <!-- TEOS10 -->
+        <field id="toce_con"         long_name="conservative temperature"        standard_name="sea_water_conservative_temperature"   unit="degC"     grid_ref="grid_T_3D"/>
+        <field id="toce_con_e3t"     long_name="conservative temperature (thickness weighted)"                                        unit="degC"     grid_ref="grid_T_3D" > toce_con * e3t </field >  
+        <field id="soce_abs"         long_name="absolute salinity"               standard_name="sea_water_absolute_salinity"       unit="1e-3"     grid_ref="grid_T_3D"/>
+        <field id="soce_abs_e3t"     long_name="absolute salinity    (thickness weighted)"                                         unit="1e-3"     grid_ref="grid_T_3D" > soce_abs * e3t </field >
 
         <field id="toce_e3t_300"      field_ref="toce_e3t"          unit="degree_C"     grid_ref="grid_T_zoom_300"      detect_missing_value="true" />
@@ -49,22 +56,42 @@
 	<field id="ahmt_3d"      long_name=" 3D      t-eddy viscosity coefficient"   unit="m2/s or m4/s"  grid_ref="grid_T_3D"/>
 
-        <field id="sst"          long_name="sea surface temperature"                            standard_name="sea_surface_temperature"             unit="degC"     />
-        <field id="sst2"         long_name="square of sea surface temperature"                  standard_name="square_of_sea_surface_temperature"   unit="degC2"     > sst * sst </field >
-        <field id="sstmax"       long_name="max of sea surface temperature"   field_ref="sst"   operation="maximum"                                                 />
-        <field id="sstmin"       long_name="min of sea surface temperature"   field_ref="sst"   operation="minimum"                                                 />
-        <field id="sstgrad"      long_name="module of sst gradient"                                                                                 unit="degC/m"   />
-        <field id="sstgrad2"     long_name="square of module of sst gradient"                                                                       unit="degC2/m2" />
-        <field id="sbt"          long_name="sea bottom temperature"                                                                                 unit="degC"     />
-        <field id="tosmint"      long_name="vertical integral of temperature times density"     standard_name="integral_wrt_depth_of_product_of_density_and_potential_temperature"  unit="(kg m2) degree_C" />
-        <field id="sst_wl"       long_name="Delta SST of warm layer"                                                                                unit="degC"     />
-        <field id="sst_cs"       long_name="Delta SST of cool skin"                                                                                 unit="degC"     />
-	<field id="temp_3m"      long_name="temperature at 3m"                                                                                      unit="degC"     />
-        
-        <field id="sss"          long_name="sea surface salinity"                               standard_name="sea_surface_salinity"                unit="1e-3"     />
-        <field id="sss2"         long_name="square of sea surface salinity"                                                                         unit="1e-6"      > sss * sss </field >
-        <field id="sssmax"       long_name="max of sea surface salinity"      field_ref="sss"   operation="maximum"                                                 />
-        <field id="sssmin"       long_name="min of sea surface salinity"      field_ref="sss"   operation="minimum"                                                 />
-        <field id="sbs"          long_name="sea bottom salinity"                                                                                    unit="0.001"    />
-        <field id="somint"       long_name="vertical integral of salinity times density"        standard_name="integral_wrt_depth_of_product_of_density_and_salinity"  unit="(kg m2) x (1e-3)" /> 
+        <!-- EOS80 -->
+        <field id="sst_pot"          long_name="sea surface potential temperature"                            standard_name="sea_surface_temperature"             unit="degC"     />
+        <field id="sst2_pot"         long_name="square of sea surface potential temperature"                  standard_name="square_of_sea_surface_temperature"   unit="degC2"     > sst_pot * sst_pot </field >
+        <field id="sstmax_pot"       long_name="max of sea surface potential temperature"   field_ref="sst_pot"   operation="maximum"                                                 />
+        <field id="sstmin_pot"       long_name="min of sea surface potential temperature"   field_ref="sst_pot"   operation="minimum"                                                 />
+        <field id="sstgrad_pot"      long_name="module of potential sst gradient"                                                                                 unit="degC/m"   />
+        <field id="sstgrad2_pot"     long_name="square of module of potential sst gradient"                                                                       unit="degC2/m2" />
+        <field id="sbt_pot"          long_name="sea bottom potential temperature"                                                                                 unit="degC"     />
+        <field id="tosmint_pot"      long_name="vertical integral of potential temperature times density"     standard_name="integral_wrt_depth_of_product_of_density_and_potential_temperature"  unit="(kg m2) degree_C" />
+        <field id="sst_wl_pot"       long_name="Delta potential SST of warm layer"                                                                                unit="degC"     />
+        <field id="sst_cs_pot"       long_name="Delta potential SST of cool skin"                                                                                 unit="degC"     />
+	<field id="temp_3m_pot"      long_name="potential temperature at 3m"                                                                                      unit="degC"     />
+
+        <field id="sss_pra"          long_name="sea surface practical salinity"                               standard_name="sea_surface_practical_salinity"                unit="1e-3"     />
+        <field id="sss2_pra"         long_name="square of sea surface practical salinity"                                                                         unit="1e-6"      > sss_pra * sss_pra </field >
+        <field id="sssmax_pra"       long_name="max of sea surface practical salinity"      field_ref="sss_pra"   operation="maximum"                                                 />
+        <field id="sssmin_pra"       long_name="min of sea surface practical salinity"      field_ref="sss_pra"   operation="minimum"                                                 />
+        <field id="sbs_pra"          long_name="sea bottom practical salinity"                                                                                    unit="0.001"    />
+        <field id="somint_pra"       long_name="vertical integral of practical salinity times density"        standard_name="integral_wrt_depth_of_product_of_density_and_practical_salinity"  unit="(kg m2) x (1e-3)" /> 
+        <!-- TEOS10 -->
+        <field id="sst_con"          long_name="sea surface conservative temperature"                            standard_name="sea_surface_conservative_temperature"             unit="degC"     />
+        <field id="sst2_con"         long_name="square of sea surface conservative temperature"                  standard_name="square_of_sea_surface_temperature"   unit="degC2"     > sst_con * sst_con </field >
+        <field id="sstmax_con"       long_name="max of sea surface conservative temperature"   field_ref="sst_con"   operation="maximum"                                                 />
+        <field id="sstmin_con"       long_name="min of sea surface conservative temperature"   field_ref="sst_con"   operation="minimum"                                                 />
+        <field id="sstgrad_con"      long_name="module of conservative sst gradient"                                                                                 unit="degC/m"   />
+        <field id="sstgrad2_con"     long_name="square of module of conservative sst gradient"                                                                       unit="degC2/m2" />
+        <field id="sbt_con"          long_name="sea bottom conservative temperature"                                                                                 unit="degC"     />
+        <field id="tosmint_con"      long_name="vertical integral of conservative temperature times density"     standard_name="integral_wrt_depth_of_product_of_density_and_conservative_temperature"  unit="(kg m2) degree_C" />
+        <field id="sst_wl_con"       long_name="Delta conservative SST of warm layer"                                                                                unit="degC"     />
+        <field id="sst_cs_con"       long_name="Delta conservative SST of cool skin"                                                                                 unit="degC"     />
+	<field id="temp_3m_con"      long_name="conservative temperature at 3m"                                                                                      unit="degC"     />
+
+        <field id="sss_abs"          long_name="sea surface absolute salinity"                               standard_name="sea_surface_absolute_salinity"                unit="1e-3"     />
+        <field id="sss2_abs"         long_name="square of sea surface absolute salinity"                                                                         unit="1e-6"      > sss_abs * sss_abs </field >
+        <field id="sssmax_abs"       long_name="max of sea surface absolute salinity"      field_ref="sss_abs"   operation="maximum"                                                 />
+        <field id="sssmin_abs"       long_name="min of sea surface absolute salinity"      field_ref="sss_abs"   operation="minimum"                                                 />
+        <field id="sbs_abs"          long_name="sea bottom absolute salinity"                                                                                    unit="0.001"    />
+        <field id="somint_abs"       long_name="vertical integral of absolute salinity times density"        standard_name="integral_wrt_depth_of_product_of_density_and_absolute_salinity"  unit="(kg m2) x (1e-3)" />
 
         <field id="taubot"       long_name="bottom stress module"                                                                                   unit="N/m2"     /> 
@@ -85,4 +112,14 @@
         <field id="mldr10_1max"  long_name="Max of Mixed Layer Depth (dsigma = 0.01 wrt 10m)"   field_ref="mldr10_1"   operation="maximum"                                                                          />
         <field id="mldr10_1min"  long_name="Min of Mixed Layer Depth (dsigma = 0.01 wrt 10m)"   field_ref="mldr10_1"   operation="minimum"                                                                          />
+         <field id="mldzint_1"    long_name="Mixed Layer Depth interpolated"                     standard_name="ocean_mixed_layer_thickness"                                                       unit="m"          />
+         <field id="mldzint_2"    long_name="Mixed Layer Depth interpolated"                     standard_name="ocean_mixed_layer_thickness"                                                       unit="m"          />
+         <field id="mldzint_3"    long_name="Mixed Layer Depth interpolated"                     standard_name="ocean_mixed_layer_thickness"                                                       unit="m"          />
+         <field id="mldzint_4"    long_name="Mixed Layer Depth interpolated"                     standard_name="ocean_mixed_layer_thickness"                                                       unit="m"          />
+         <field id="mldzint_5"    long_name="Mixed Layer Depth interpolated"                     standard_name="ocean_mixed_layer_thickness"                                                       unit="m"          />
+         <field id="mldhtc_1"     long_name="Mixed Layer Depth integrated heat content"          standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"       />
+         <field id="mldhtc_2"     long_name="Mixed Layer Depth integrated heat content"          standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"       />
+         <field id="mldhtc_3"     long_name="Mixed Layer Depth integrated heat content"          standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"       />
+         <field id="mldhtc_4"     long_name="Mixed Layer Depth integrated heat content"          standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"       />
+         <field id="mldhtc_5"     long_name="Mixed Layer Depth integrated heat content"          standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"       />
         <field id="heatc"        long_name="Heat content vertically integrated"                 standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content"   unit="J/m2"       />
         <field id="saltc"        long_name="Salt content vertically integrated"                                                                                                                   unit="1e-3*kg/m2" />
@@ -360,6 +397,10 @@
 	  
 	  <!-- sbcssm variables -->
-          <field id="sst_m"    unit="degC" />
-          <field id="sss_m"    unit="psu"  />
+          <field id="sst_m_pot"    unit="degC" />
+	  <!-- EOS-80 -->
+          <field id="sss_m_pra"    unit="psu"  />
+          <!-- TEOS-10 -->
+          <field id="sss_m_abs"    unit="psu"  />
+
           <field id="ssu_m"    unit="m/s"  />
           <field id="ssv_m"    unit="m/s"  />
@@ -393,4 +434,5 @@
 
 
+        <field id="uoce2_e3u"    long_name="ocean current along i-axis squared (thickness weighted)"                                            unit="m3/s2"      grid_ref="grid_U_3D"  > uoce * uoce * e3u </field>
         <field id="ssu"          long_name="ocean surface current along i-axis"                                                                 unit="m/s"                             />
         <field id="sbu"          long_name="ocean bottom current along i-axis"                                                                  unit="m/s"                             />
@@ -450,4 +492,5 @@
         <field id="voce"         long_name="ocean current along j-axis"                             standard_name="sea_water_y_velocity"        unit="m/s"        grid_ref="grid_V_3D" />
         <field id="voce_e3v"     long_name="ocean current along j-axis  (thickness weighted)"                                                   unit="m/s"        grid_ref="grid_V_3D"  > voce * e3v </field>
+        <field id="voce2_e3v"    long_name="ocean current along j-axis squared (thickness weighted)"                                            unit="m3/s2"      grid_ref="grid_V_3D"  > voce * voce * e3v </field>
         <field id="ssv"          long_name="ocean surface current along j-axis"                                                                 unit="m/s"                             />
         <field id="sbv"          long_name="ocean bottom current along j-axis"                                                                  unit="m/s"                             />
@@ -551,4 +594,26 @@
       <field id="ahmf_2d"      long_name=" surface f-eddy viscosity coefficient"   unit="m2/s or m4/s" />
       <field id="ahmf_3d"      long_name=" 3D      f-eddy viscosity coefficient"   unit="m2/s or m4/s"  grid_ref="grid_T_3D"/>
+
+      <!-- product fields -->
+      <field_group id="diaprod">
+	<field id="ut"           long_name="product_of_sea_water_x_velocity_and_potential_temperature"      unit="degree_C m/s"      grid_ref="grid_U_3D"   />
+        <field id="ut_e3u"       long_name="product_of_sea_water_x_velocity_and_potential_temperature * e3u"  unit="degree_C m2/s"   grid_ref="grid_U_3D" > ut * e3u </field >
+	<field id="us"           long_name="product_of_sea_water_x_velocity_and_salinity"                   unit="PSU m/s"       grid_ref="grid_U_3D"   />
+        <field id="us_e3u"       long_name="product_of_sea_water_x_velocity_and_salinity * e3u"             unit="PSU m2/s"      grid_ref="grid_U_3D" > us * e3u </field >
+	<field id="urhop"        long_name="product_of_sea_water_x_velocity_and_potential_density"          unit="(kg/m3).(m/s)" grid_ref="grid_U_3D"   />
+        <field id="urhop_e3u"    long_name="product_of_sea_water_x_velocity_and_potential_density * e3u"    unit="(kg/m3).(m2/s)"   grid_ref="grid_U_3D" > urhop * e3u </field >
+	<field id="vt"           long_name="product_of_sea_water_y_velocity_and_potential_temperature"      unit="degree_C m/s"      grid_ref="grid_V_3D"   />
+        <field id="vt_e3v"       long_name="product_of_sea_water_y_velocity_and_potential_temperature * e3v"  unit="degree_C m2/s"   grid_ref="grid_V_3D" > vt * e3v </field >
+	<field id="vs"           long_name="product_of_sea_water_y_velocity_and_salinity"                   unit="PSU m/s"       grid_ref="grid_V_3D"   />
+        <field id="vs_e3v"       long_name="product_of_sea_water_y_velocity_and_salinity * e3t"             unit="PSU m2/s"      grid_ref="grid_V_3D" > vs * e3v </field >
+	<field id="vrhop"        long_name="product_of_sea_water_y_velocity_and_potential_density"          unit="(kg/m3).(m/s)" grid_ref="grid_V_3D"   />
+        <field id="vrhop_e3v"    long_name="product_of_sea_water_y_velocity_and_potential_density * e3t"    unit="(kg/m3).(m2/s)"  grid_ref="grid_V_3D" > vrhop * e3v </field >
+	<field id="wt"           long_name="product_of_upward_sea_water_velocity_and_potential_temperature" unit="degree_C m/s"      grid_ref="grid_W_3D"   />
+	<field id="ws"           long_name="product_of_upward_sea_water_velocity_and_salinity"              unit="PSU m/s"       grid_ref="grid_W_3D"   />
+	<field id="wrhop"        long_name="product_of_upward_sea_water_velocity_and_potential_density"     unit="(kg/m3).(m/s)" grid_ref="grid_W_3D"   />
+	<field id="uv"           long_name="product_of_sea_water_x_velocity_and_sea_water_y_velocity"       unit="m2/s2   "      grid_ref="grid_T_3D"   />
+	<field id="uw"           long_name="product_of_upward_sea_water_velocity_and_sea_water_x_velocity"  unit="m2/s2   "      grid_ref="grid_W_3D"   />
+	<field id="vw"           long_name="product_of_upward_sea_water_velocity_and_sea_water_y_velocity"  unit="m2/s2"         grid_ref="grid_W_3D"   />
+      </field_group>
 
       <field_group id="scalar"  grid_ref="grid_scalar"  >
@@ -587,14 +652,9 @@
          <field id="uoce_e3u_ave_vsum"    long_name="Vertical sum of u*e3u"                           field_ref="uoce_e3u_ave"         grid_ref="grid_U_vsum"     />
          <field id="uocetr_vsum_section"  long_name="Total 2D transport in i-direction"               field_ref="uoce_e3u_ave_vsum"    grid_ref="grid_U_scalar"  detect_missing_value="true"> this * e2u </field>
-         <field id="uocetr_strait"        long_name="Total transport across lines in i-direction"     field_ref="uocetr_vsum_section"  grid_ref="grid_U_4strait" />
-         <field id="u_masstr_strait"      long_name="Sea water transport across line in i-direction"  field_ref="uocetr_strait"        grid_ref="grid_U_4strait_hsum" unit="kg/s"> this * maskMFO_u * $rau0 </field>
 
          <field id="voce_e3v_ave"         long_name="Monthly average of v*e3v"                        field_ref="voce_e3v"                    freq_op="1mo"   freq_offset="_reset_" > @voce_e3v </field>
          <field id="voce_e3v_ave_vsum"    long_name="Vertical sum of v*e3v"                           field_ref="voce_e3v_ave"         grid_ref="grid_V_vsum"      />
          <field id="vocetr_vsum_section"  long_name="Total 2D transport of in j-direction"            field_ref="voce_e3v_ave_vsum"    grid_ref="grid_V_scalar"  detect_missing_value="true"> this * e1v </field>
-         <field id="vocetr_strait"        long_name="Total transport across lines in j-direction"     field_ref="vocetr_vsum_section"  grid_ref="grid_V_4strait"  />
-         <field id="v_masstr_strait"      long_name="Sea water transport across line in j-direction"  field_ref="vocetr_strait"        grid_ref="grid_V_4strait_hsum" unit="kg/s"> this * maskMFO_v * $rau0 </field>
-
-         <field id="masstr_strait"        long_name="Sea water transport across line"                                                  grid_ref="grid_4strait"  > u_masstr_strait + v_masstr_strait </field>
+
       </field_group>
 
@@ -897,6 +957,11 @@
     
     <field_group id="mooring" >
-      <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"      />
-      <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                   />
+      <!-- EOS80 -->
+      <field field_ref="toce_pot"         name="thetao_pot"   long_name="sea_water_potential_temperature"      />
+      <field field_ref="soce_pra"         name="so_pra"       long_name="sea_water_practical_salinity"                   />
+      <!-- TEOS10 -->
+      <field field_ref="toce_con"         name="thetao_con"   long_name="sea_water_conservative_temperature"      />
+      <field field_ref="soce_abs"         name="so_con"       long_name="sea_water_absolute_salinity"                   />
+
       <field field_ref="uoce"         name="uo"       long_name="sea_water_x_velocity"                 />
       <field field_ref="voce"         name="vo"       long_name="sea_water_y_velocity"                 />
@@ -904,9 +969,16 @@
       <field field_ref="avt"          name="difvho"   long_name="ocean_vertical_heat_diffusivity"      />
       <field field_ref="avm"          name="difvmo"   long_name="ocean_vertical_momentum_diffusivity"  />
-      
-      <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
-      <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"             />
-      <field field_ref="sstgrad"      name="tosgrad"  long_name="module_of_sea_surface_temperature_gradient"    />
-      <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
+
+      <!-- EOS80 -->
+      <field field_ref="sst_pot"          name="tos_pot"      long_name="sea_surface_potential_temperature"                       />
+      <field field_ref="sst2_pot"         name="tossq_pot"    long_name="square_of_sea_surface_potential_temperature"             />
+      <field field_ref="sstgrad_pot"      name="tosgrad_pot"  long_name="module_of_sea_surface_potential_temperature_gradient"    />
+      <field field_ref="sss_pra"          name="sos_pra"      long_name="sea_surface_absolute_salinity"                          />
+      <!-- TEOS10 -->
+      <field field_ref="sst_con"          name="tos_con"      long_name="sea_surface_conservative_temperature"                       />
+      <field field_ref="sst2_con"         name="tossq_con"    long_name="square_of_sea_surface_conservative_temperature"             />
+      <field field_ref="sstgrad_con"      name="tosgrad_con"  long_name="module_of_sea_surface_conservative_temperature_gradient"    />
+      <field field_ref="sss_abs"          name="sos"      long_name="sea_surface_absolute_salinity"                          />
+
       <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
       <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     />
@@ -931,9 +1003,17 @@
 
     <field_group id="groupT" >
-      <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"               />
-      <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                            />
-      <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
-      <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"             />
-      <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
+      <!-- EOS80 -->
+      <field field_ref="toce_pot"         name="thetao_pot"   long_name="sea_water_potential_temperature"               />
+      <field field_ref="soce_pra"         name="so_pra"       long_name="sea_water_practical_salinity"                            />
+      <field field_ref="sst_pot"          name="tos_pot"      long_name="sea_surface_potential_temperature"                       />
+      <field field_ref="sst2_pot"         name="tossq_pot"    long_name="square_of_sea_surface_potential_temperature"             />
+      <field field_ref="sss_pra"          name="sos_pra"      long_name="sea_surface_practical_salinity"                          />
+      <!-- TEOS10 -->
+      <field field_ref="toce_con"         name="thetao_con"   long_name="sea_water_conservative_temperature"               />
+      <field field_ref="soce_abs"         name="so_abs"       long_name="sea_water_absolute_salinity"                            />
+      <field field_ref="sst_con"          name="tos_con"      long_name="sea_surface_conservative_temperature"                       />
+      <field field_ref="sst2_con"         name="tossq_con"    long_name="square_of_sea_surface_conservative_temperature"             />
+      <field field_ref="sss_abs"          name="sos_abs"      long_name="sea_surface_absolute_salinity"                          />
+
       <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
       <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     />
@@ -967,4 +1047,24 @@
     </field_group>
 
+    <!-- TMB diagnostic output -->
+    <field_group  id="1h_grid_T_tmb" grid_ref="grid_T_2D" operation="instant">
+      <!-- EOS80 -->
+      <field id="top_temp_pot"           name="votemper_top_pot"  unit="degC"  />
+      <field id="mid_temp_pot"           name="votemper_mid_pot"  unit="degC"  />
+      <field id="bot_temp_pot"           name="votemper_bot_pot"  unit="degC"  />
+      <field id="top_sal_pra"            name="vosaline_top_pra"  unit="psu"   />
+      <field id="mid_sal_pra"            name="vosaline_mid_pra"  unit="psu"   />
+      <field id="bot_sal_pra"            name="vosaline_bot_pra"  unit="psu"   />
+      <!-- TEOS10 -->
+      <field id="top_temp_con"           name="votemper_top_con"  unit="degC"  />
+      <field id="mid_temp_con"           name="votemper_mid_con"  unit="degC"  />
+      <field id="bot_temp_con"           name="votemper_bot_con"  unit="degC"  />
+      <field id="top_sal_abs"            name="vosaline_top_abs"  unit="psu"   />
+      <field id="mid_sal_abs"            name="vosaline_mid_abs"  unit="psu"   />
+      <field id="bot_sal_abs"            name="vosaline_bot_abs"  unit="psu"   />
+
+      <field id="sshnmasked"         name="sossheig"      unit="m"     /> 
+    </field_group>
+
     <field_group  id="1h_grid_U_tmb" grid_ref="grid_U_2D" operation="instant">
       <field id="top_u"           name="vozocrtx_top"  unit="m/s"  />
@@ -983,7 +1083,13 @@
     <!-- 25h diagnostic output -->
     <field_group id="25h_grid_T" grid_ref="grid_T_3D" operation="instant">
-      <field id="temper25h"         name="potential temperature 25h mean"    unit="degC" />
+      <!-- EOS80 -->
+      <field id="temper25h_pot"         name="potential temperature 25h mean"    unit="degC" />
       <field id="tempis25h"         name="insitu temperature 25h mean"    unit="degC" />
-      <field id="salin25h"          name="salinity 25h mean"                 unit="psu"  />
+      <field id="salin25h_pra"          name="practical salinity 25h mean"                 unit="psu"  />
+      <!-- TEOS10 -->
+      <field id="temper25h_con"         name="conservative temperature 25h mean"    unit="degC" />
+      <field id="tempis25h"         name="insitu temperature 25h mean"    unit="degC" />
+      <field id="salin25h_abs"          name="absolute salinity 25h mean"                 unit="psu"  />
+
       <field id="ssh25h"            name="sea surface height 25h mean"  grid_ref="grid_T_2D"      unit="m"    />
     </field_group>
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/SHARED/grid_def_nemo.xml
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/SHARED/grid_def_nemo.xml	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/SHARED/grid_def_nemo.xml	(revision 14078)
@@ -20,9 +20,4 @@
          <domain domain_ref="grid_T" />
          <axis axis_ref="deptht" />
-       </grid>
-        <!--  -->
-       <grid id="grid_T_3DS" >
-         <domain domain_ref="grid_T" />
-         <axis axis_ref="profsed" />
        </grid>
         <!--  -->
@@ -67,40 +62,4 @@
        </grid>
         <!--  -->
-
-
-       <grid id="grid_znl_T_2D">
-         <domain domain_ref="gznl" />
-         <axis axis_ref="basin" />
-       </grid>
-
-       <grid id="grid_znl_T_3D">
-         <domain domain_ref="gznl" />
-         <axis axis_ref="deptht"  />
-         <axis axis_ref="basin" />
-       </grid>
-
-       <grid id="grid_znl_W_3D">
-         <domain domain_ref="gznl" />
-         <axis axis_ref="depthw"  />
-         <axis axis_ref="basin" />
-       </grid>
-
-      <grid id="grid_ptr_T_2D">
-         <domain domain_ref="ptr" />
-         <axis axis_ref="basin" />
-       </grid>
-
-       <grid id="grid_ptr_T_3D">
-         <domain  domain_ref="ptr" />
-         <axis axis_ref="deptht"  />
-         <axis axis_ref="basin" />
-       </grid>
-
-       <grid id="grid_ptr_W_3D">
-         <domain  domain_ref="ptr" />
-         <axis axis_ref="depthw"  />
-         <axis axis_ref="basin" />
-       </grid>
-
        <grid id="grid_ptr_W_GLO">
          <domain  domain_ref="ptr" />
@@ -155,25 +114,4 @@
        </grid>
 
-       <!-- for ORCA2 grid  -->
-       <grid id="cumul_U">
-         <axis axis_ref="cumul_U" n_glo="182" >
-           <reduce_domain local="true" operation="sum" direction="jDir" />
-           <reduce_axis operation="sum" />
-         </axis>
-         <axis axis_ref="depthu" />
-       </grid>
-
-       <!-- for eORCA1 grid
-
-       <grid id="cumul_U">
-         <axis axis_ref="cumul_U" n_glo="362" >
-           <reduce_domain local="true" operation="sum" direction="jDir" />
-           <reduce_axis operation="sum" />
-         </axis>
-         <axis axis_ref="depthu" />
-       </grid>
-
-      -->
-
 
        <grid id="grid_T_zoom_300">
@@ -192,77 +130,51 @@
        </grid>
  
-       <grid id="grid_U_4strait">
-         <domain domain_ref="grid_U" />
-         <axis axis_ref="section">
-           <duplicate_scalar/>
-         </axis>
-       </grid>
- 
-       <grid id="grid_V_4strait">
-         <domain domain_ref="grid_V" />
-         <axis axis_ref="section">
-           <duplicate_scalar/>
-         </axis>
-       </grid>
- 
-       <grid id="grid_U_4strait_hsum">
-         <scalar >
-           <reduce_domain operation="sum" local="true"/>
-           <reduce_scalar operation="sum" />
-         </scalar>
-         <axis axis_ref="section"/>
-       </grid>
- 
-       <grid id="grid_V_4strait_hsum">
-         <scalar >
-           <reduce_domain operation="sum" local="true"/>
-           <reduce_scalar operation="sum" />
-         </scalar>
-         <axis axis_ref="section"/>
-       </grid>
- 
-       <grid id="grid_4strait">
-         <axis axis_ref="section"/>
-       </grid>
-
-      <grid id="grid_U_4strait_ice">
-        <domain domain_ref="grid_U" />
-        <axis axis_ref="section_ice">
-          <duplicate_scalar/>
-        </axis>
-      </grid>
-
-      <grid id="grid_V_4strait_ice">
-        <domain domain_ref="grid_V" />
-        <axis axis_ref="section_ice">
-         <duplicate_scalar/>
-        </axis>
-      </grid>
-
-      <grid id="grid_U_4strait_ice_hsum">
-        <scalar >
-         <reduce_domain operation="sum" local="true"/>
-         <reduce_scalar operation="sum" />
-        </scalar>
-        <axis axis_ref="section_ice"/>
-      </grid>
-
-     <grid id="grid_V_4strait_ice_hsum">
-        <scalar >
-         <reduce_domain operation="sum" local="true"/>
-         <reduce_scalar operation="sum" />
-        </scalar>
-        <axis axis_ref="section_ice"/>
-     </grid>
-
-     <grid id="grid_4strait_ice">
-       <axis axis_ref="section_ice"/>
-     </grid>
- 
       <!-- scalars -->
       <grid id="grid_scalar" >
         <scalar/>
       </grid>
- 
-    </grid_definition>   
- 
+        <!--  -->
+       <grid id="grid_EqT" >
+         <domain id="EqT" />
+       </grid>
+        <!--  -->
+       <grid id="gznl_T_2D">
+         <domain id="ptr" />
+       </grid>
+        <!--  -->
+       <grid id="gznl_T_3D">
+         <domain id="ptr" />
+         <axis axis_ref="deptht" />
+       </grid>
+        <!--  -->
+       <grid id="gznl_W_2D">
+         <domain id="ptr" />
+       </grid>
+        <!--  -->
+       <grid id="gznl_W_3D">
+         <domain id="ptr" />
+         <axis axis_ref="depthw" />
+       </grid>
+       <grid id="vert_sum">
+         <domain id="grid_T"/>
+         <scalar>
+            <reduce_axis operation="sum" />
+         </scalar>
+       </grid>
+       <grid id="zoom_300">
+         <domain id="grid_T" />
+         <axis axis_ref="deptht300"/>
+       </grid>
+       <grid id="zoom_300_sum">
+         <domain id="grid_T" />
+         <scalar>
+            <reduce_axis operation="sum" />
+         </scalar>
+       </grid>
+       <grid id="grid_T_surface_extract">
+         <domain id="grid_T" />
+         <axis   axis_ref="deptht_surface" />
+       </grid>
+
+    </grid_definition>
+    
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/SHARED/namelist_ref
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/SHARED/namelist_ref	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/SHARED/namelist_ref	(revision 14078)
@@ -67,4 +67,5 @@
    ln_xios_read = .FALSE.  !  use XIOS to read restart file (only for a single file restart)
    nn_wxios = 0      !  use XIOS to write restart file 0 - no, 1 - single file output, 2 - multiple file output
+   ln_rst_eos = .TRUE.     ! check if the equation of state used to produce the restart is consistent with model
 /
 !-----------------------------------------------------------------------
@@ -745,5 +746,5 @@
 &nameos        !   ocean Equation Of Seawater                           (default: NO selection)
 !-----------------------------------------------------------------------
-   ln_teos10   = .false.         !  = Use TEOS-10
+   ln_teos10   = .true.         !  = Use TEOS-10
    ln_eos80    = .false.         !  = Use EOS80
    ln_seos     = .false.         !  = Use S-EOS (simplified Eq.)
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/ICE/icerst.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/ICE/icerst.F90	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/ICE/icerst.F90	(revision 14078)
@@ -27,4 +27,5 @@
    USE in_out_manager ! I/O manager
    USE iom            ! I/O manager library
+   USE ioipsl, ONLY : ju2ymds    ! for calendar
    USE lib_mpp        ! MPP library
    USE lib_fortran    ! fortran utilities (glob_sum + no signed zero)
@@ -52,4 +53,7 @@
       INTEGER, INTENT(in) ::   kt       ! number of iteration
       !
+      INTEGER             ::   iyear, imonth, iday
+      REAL (wp)           ::   zsec
+      REAL (wp)           ::   zfjulday
       CHARACTER(len=20)   ::   clkt     ! ocean time-step define as a character
       CHARACTER(len=50)   ::   clname   ! ice output restart file name
@@ -67,6 +71,13 @@
          IF( nitrst <= nitend .AND. nitrst > 0 ) THEN
             ! beware of the format used to write kt (default is i8.8, that should be large enough...)
-            IF( nitrst > 99999999 ) THEN   ;   WRITE(clkt, *       ) nitrst
-            ELSE                           ;   WRITE(clkt, '(i8.8)') nitrst
+            IF ( ln_rstdate ) THEN
+               zfjulday = fjulday + (2*nn_fsbc+1)*rdt / rday
+               IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday )   zfjulday = REAL(NINT(zfjulday),wp)   ! avoid truncation error
+               CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec )           
+               WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday
+            ELSE
+               IF( nitrst > 99999999 ) THEN   ;   WRITE(clkt, *       ) nitrst
+               ELSE                           ;   WRITE(clkt, '(i8.8)') nitrst
+               ENDIF
             ENDIF
             ! create the file
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/ICE/icewri.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/ICE/icewri.F90	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/ICE/icewri.F90	(revision 14078)
@@ -104,5 +104,5 @@
       IF( iom_use('snwthic' ) )   CALL iom_put( 'snwthic', hm_s        * zmsk00 )                                           ! snw thickness
       IF( iom_use('icebrv'  ) )   CALL iom_put( 'icebrv' , bvm_i* 100. * zmsk00 )                                           ! brine volume
-      IF( iom_use('iceage'  ) )   CALL iom_put( 'iceage' , om_i / rday * zmsk15 + zmiss_val * ( 1._wp - zmsk15 ) )          ! ice age
+      IF( iom_use('iceage'  ) )   CALL iom_put( 'iceage' , om_i / rday * zmsk15 )                                           ! ice age
       IF( iom_use('icehnew' ) )   CALL iom_put( 'icehnew', ht_i_new             )                                           ! new ice thickness formed in the leads
       IF( iom_use('snwvolu' ) )   CALL iom_put( 'snwvolu', vt_s        * zmsksn )                                           ! snow volume
@@ -119,12 +119,12 @@
       IF( iom_use('icevlid' ) )   CALL iom_put( 'icevlid', vt_il  * zmsk00      )                                           ! melt pond lid total volume per unit area
       ! salt
-      IF( iom_use('icesalt' ) )   CALL iom_put( 'icesalt', sm_i                 * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) ) ! mean ice salinity
+      IF( iom_use('icesalt' ) )   CALL iom_put( 'icesalt', sm_i                 * zmsk00 )                                  ! mean ice salinity
       IF( iom_use('icesalm' ) )   CALL iom_put( 'icesalm', st_i * rhoi * 1.0e-3 * zmsk00 )                                  ! Mass of salt in sea ice per cell area
       ! heat
-      IF( iom_use('icetemp' ) )   CALL iom_put( 'icetemp', ( tm_i  - rt0 ) * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) )      ! ice mean temperature
-      IF( iom_use('snwtemp' ) )   CALL iom_put( 'snwtemp', ( tm_s  - rt0 ) * zmsksn + zmiss_val * ( 1._wp - zmsksn ) )      ! snw mean temperature
-      IF( iom_use('icettop' ) )   CALL iom_put( 'icettop', ( tm_su - rt0 ) * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) )      ! temperature at the ice surface
-      IF( iom_use('icetbot' ) )   CALL iom_put( 'icetbot', ( t_bo  - rt0 ) * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) )      ! temperature at the ice bottom
-      IF( iom_use('icetsni' ) )   CALL iom_put( 'icetsni', ( tm_si - rt0 ) * zmsk00 + zmiss_val * ( 1._wp - zmsk00 ) )      ! temperature at the snow-ice interface
+      IF( iom_use('icetemp' ) )   CALL iom_put( 'icetemp', ( tm_i  - rt0 ) * zmsk00  )                                      ! ice mean temperature
+      IF( iom_use('snwtemp' ) )   CALL iom_put( 'snwtemp', ( tm_s  - rt0 ) * zmsksn  )                                      ! snw mean temperature
+      IF( iom_use('icettop' ) )   CALL iom_put( 'icettop', ( tm_su - rt0 ) * zmsk00  )                                      ! temperature at the ice surface
+      IF( iom_use('icetbot' ) )   CALL iom_put( 'icetbot', ( t_bo  - rt0 ) * zmsk00  )                                      ! temperature at the ice bottom
+      IF( iom_use('icetsni' ) )   CALL iom_put( 'icetsni', ( tm_si - rt0 ) * zmsk00  )                                      ! temperature at the snow-ice interface
       IF( iom_use('icehc'   ) )   CALL iom_put( 'icehc'  ,  -et_i          * zmsk00 )                                       ! ice heat content
       IF( iom_use('snwhc'   ) )   CALL iom_put( 'snwhc'  ,  -et_s          * zmsksn )                                       ! snow heat content
@@ -153,14 +153,14 @@
       IF( iom_use('icemask_cat' ) )   CALL iom_put( 'icemask_cat' ,                  zmsk00l                                   ) ! ice mask 0%
       IF( iom_use('iceconc_cat' ) )   CALL iom_put( 'iceconc_cat' , a_i            * zmsk00l                                   ) ! area for categories
-      IF( iom_use('icethic_cat' ) )   CALL iom_put( 'icethic_cat' , h_i            * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! thickness for categories
-      IF( iom_use('snwthic_cat' ) )   CALL iom_put( 'snwthic_cat' , h_s            * zmsksnl + zmiss_val * ( 1._wp - zmsksnl ) ) ! snow depth for categories
-      IF( iom_use('icesalt_cat' ) )   CALL iom_put( 'icesalt_cat' , s_i            * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! salinity for categories
-      IF( iom_use('iceage_cat'  ) )   CALL iom_put( 'iceage_cat'  , o_i / rday     * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! ice age
+      IF( iom_use('icethic_cat' ) )   CALL iom_put( 'icethic_cat' , h_i            * zmsk00l                                   ) ! thickness for categories
+      IF( iom_use('snwthic_cat' ) )   CALL iom_put( 'snwthic_cat' , h_s            * zmsksnl                                   ) ! snow depth for categories
+      IF( iom_use('icesalt_cat' ) )   CALL iom_put( 'icesalt_cat' , s_i            * zmsk00l                                   ) ! salinity for categories
+      IF( iom_use('iceage_cat'  ) )   CALL iom_put( 'iceage_cat'  , o_i / rday     * zmsk00l                                   ) ! ice age
       IF( iom_use('icetemp_cat' ) )   CALL iom_put( 'icetemp_cat' , ( SUM( t_i, dim=3 ) * r1_nlay_i - rt0 ) &
-         &                                                                         * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! ice temperature
+         &                                                                         * zmsk00l                                   ) ! ice temperature
       IF( iom_use('snwtemp_cat' ) )   CALL iom_put( 'snwtemp_cat' , ( SUM( t_s, dim=3 ) * r1_nlay_s - rt0 ) &
-         &                                                                         * zmsksnl + zmiss_val * ( 1._wp - zmsksnl ) ) ! snow temperature
-      IF( iom_use('icettop_cat' ) )   CALL iom_put( 'icettop_cat' , ( t_su - rt0 ) * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! surface temperature
-      IF( iom_use('icebrv_cat'  ) )   CALL iom_put( 'icebrv_cat'  ,   bv_i * 100.  * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! brine volume
+         &                                                                         * zmsksnl                                   ) ! snow temperature
+      IF( iom_use('icettop_cat' ) )   CALL iom_put( 'icettop_cat' , ( t_su - rt0 ) * zmsk00l                                   ) ! surface temperature
+      IF( iom_use('icebrv_cat'  ) )   CALL iom_put( 'icebrv_cat'  ,   bv_i * 100.  * zmsk00l                                   ) ! brine volume
       IF( iom_use('iceapnd_cat' ) )   CALL iom_put( 'iceapnd_cat' ,   a_ip         * zmsk00l                                   ) ! melt pond frac for categories
       IF( iom_use('icehpnd_cat' ) )   CALL iom_put( 'icehpnd_cat' ,   h_ip         * zmsk00l + zmiss_val * ( 1._wp - zmsk00l ) ) ! melt pond thickness for categories
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/DIA/diaprod.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/DIA/diaprod.F90	(revision 14078)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/DIA/diaprod.F90	(revision 14078)
@@ -0,0 +1,270 @@
+MODULE diaprod
+! Requires key_iom_put
+# if defined key_iomput
+   !!======================================================================
+   !!                     ***  MODULE  diaprod  ***
+   !! Ocean diagnostics :  write ocean product diagnostics
+   !!=====================================================================
+   !! History :  3.4  ! 2012  (D. Storkey)  Original code
+   !!            4.0  ! 2019  (D. Storkey)
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !!   dia_prod      : calculate and write out product diagnostics
+   !!----------------------------------------------------------------------
+   USE oce             ! ocean dynamics and tracers 
+   USE dom_oce         ! ocean space and time domain
+   USE domvvl          ! for thickness weighted diagnostics if key_vvl
+   USE eosbn2          ! equation of state  (eos call)
+   USE phycst          ! physical constants
+   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
+   USE in_out_manager  ! I/O manager
+   USE iom
+   USE ioipsl
+   USE lib_mpp         ! MPP library
+   USE timing          ! preformance summary
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   dia_prod                 ! routines called by step.F90
+
+   !! * Substitutions
+#  include "vectopt_loop_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.4 , NEMO Consortium (2012)
+   !! $Id$
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+   SUBROUTINE dia_prod( kt )
+      !!---------------------------------------------------------------------
+      !!                  ***  ROUTINE dia_prod  ***
+      !!                   
+      !! ** Purpose :   Write out product diagnostics (uT, vS etc.)
+      !!
+      !! ** Method  :  use iom_put
+      !!               Product diagnostics are not thickness-weighted in this routine.
+      !!               They should be thickness-weighted using XIOS if key_vvl is set. 
+      !!----------------------------------------------------------------------
+      !!
+      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index
+      !!
+      INTEGER                      ::   ji, jj, jk              ! dummy loop indices
+      REAL(wp)                     ::   zztmp, zztmpx, zztmpy   ! 
+      !!
+      REAL(wp), POINTER, DIMENSION(:,:)   :: z2d      ! 2D workspace
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: z3d      ! 3D workspace
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zrhop    ! potential density
+      !!----------------------------------------------------------------------
+      ! 
+      IF( ln_timing )   CALL timing_start('dia_prod')
+      ! 
+      ALLOCATE( z2d(jpi,jpj), z3d(jpi,jpj,jpk), zrhop(jpi,jpj,jpk) )
+      !
+
+      IF( iom_use("urhop") .OR. iom_use("vrhop") .OR. iom_use("wrhop") &
+#if ! defined key_diaar5
+     &  .OR. iom_use("rhop") &
+#endif
+     & ) THEN
+         CALL eos( tsn, z3d, zrhop )                 ! now in situ and potential density
+         zrhop(:,:,:) = zrhop(:,:,:)-1000.e0         ! reference potential density to 1000 to avoid precision issues in rhop2 calculation
+         zrhop(:,:,jpk) = 0._wp
+#if ! defined key_diaar5
+         CALL iom_put( 'rhop', zrhop )
+#else
+         ! If key_diaar5 set then there is already an iom_put call to output rhop.
+         ! Really should be a standard diagnostics option?
+#endif
+      ENDIF
+
+      IF( iom_use("ut") ) THEN
+         z3d(:,:,:) = 0.e0 
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  z3d(ji,jj,jk) = un(ji,jj,jk) * 0.5 * ( tsn(ji,jj,jk,jp_tem) + tsn(ji+1,jj,jk,jp_tem) )
+               END DO
+            END DO
+         END DO
+         CALL iom_put( "ut", z3d )                  ! product of temperature and zonal velocity at U points
+      ENDIF
+
+      IF( iom_use("vt") ) THEN
+         z3d(:,:,:) = 0.e0 
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  z3d(ji,jj,jk) = vn(ji,jj,jk) * 0.5 * ( tsn(ji,jj,jk,jp_tem) + tsn(ji,jj+1,jk,jp_tem) )
+               END DO
+            END DO
+         END DO
+         CALL iom_put( "vt", z3d )                  ! product of temperature and meridional velocity at V points
+      ENDIF
+
+      IF( iom_use("wt") ) THEN
+         z3d(:,:,:) = 0.e0 
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               z3d(ji,jj,1) = wn(ji,jj,1) * tsn(ji,jj,1,jp_tem)
+            END DO
+         END DO
+         DO jk = 2, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  z3d(ji,jj,jk) = wn(ji,jj,jk) * 0.5 * ( tsn(ji,jj,jk-1,jp_tem) + tsn(ji,jj,jk,jp_tem) )
+               END DO
+            END DO
+         END DO
+         CALL iom_put( "wt", z3d )                  ! product of temperature and vertical velocity at W points
+      ENDIF
+
+      IF( iom_use("us") ) THEN
+         z3d(:,:,:) = 0.e0 
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  z3d(ji,jj,jk) = un(ji,jj,jk) * 0.5 * ( tsn(ji,jj,jk,jp_sal) + tsn(ji+1,jj,jk,jp_sal) )
+               END DO
+            END DO
+         END DO
+         CALL iom_put( "us", z3d )                  ! product of salinity and zonal velocity at U points
+      ENDIF
+
+      IF( iom_use("vs") ) THEN
+         z3d(:,:,:) = 0.e0 
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  z3d(ji,jj,jk) = vn(ji,jj,jk) * 0.5 * ( tsn(ji,jj,jk,jp_sal) + tsn(ji,jj+1,jk,jp_sal) )
+               END DO
+            END DO
+         END DO
+         CALL iom_put( "vs", z3d )                  ! product of salinity and meridional velocity at V points
+      ENDIF
+
+      IF( iom_use("ws") ) THEN
+         z3d(:,:,:) = 0.e0 
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               z3d(ji,jj,1) = wn(ji,jj,1) * tsn(ji,jj,1,jp_sal)
+            END DO
+         END DO
+         DO jk = 2, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  z3d(ji,jj,jk) = wn(ji,jj,jk) * 0.5 * ( tsn(ji,jj,jk-1,jp_sal) + tsn(ji,jj,jk,jp_sal) )
+               END DO
+            END DO
+         END DO
+         CALL iom_put( "ws", z3d )                  ! product of salinity and vertical velocity at W points
+      ENDIF
+
+      IF( iom_use("uv") ) THEN
+         z3d(:,:,:) = 0.e0 
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  z3d(ji,jj,jk) = 0.25 * ( un(ji-1,jj,jk) + un(ji,jj,jk) ) * ( vn(ji,jj-1,jk) + vn(ji,jj,jk) ) 
+               END DO
+            END DO
+         END DO
+         CALL iom_put( "uv", z3d )                  ! product of zonal velocity and meridional velocity at T points
+      ENDIF
+
+      IF( iom_use("uw") ) THEN
+         z3d(:,:,:) = 0.e0 
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               z3d(ji,jj,1) = 0.5 * ( wn(ji,jj,1) + wn(ji+1,jj,1) ) * un(ji,jj,1) 
+            END DO
+         END DO
+         DO jk = 2, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  z3d(ji,jj,jk) = 0.25 * ( wn(ji,jj,jk) + wn(ji+1,jj,jk) ) * ( un(ji,jj,jk-1) + un(ji,jj,jk) ) 
+               END DO
+            END DO
+         END DO
+         CALL iom_put( "uw", z3d )                  ! product of zonal velocity and vertical velocity at UW points
+      ENDIF
+
+      IF( iom_use("vw") ) THEN
+         z3d(:,:,:) = 0.e0 
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               z3d(ji,jj,1) = 0.5 * ( wn(ji,jj,1) + wn(ji,jj+1,1) ) * vn(ji,jj,1) 
+            END DO
+         END DO
+         DO jk = 2, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  z3d(ji,jj,jk) = 0.25 * ( wn(ji,jj,jk) + wn(ji,jj+1,jk) ) * ( vn(ji,jj,jk-1) + vn(ji,jj,jk) ) 
+               END DO
+            END DO
+         END DO
+         CALL iom_put( "vw", z3d )                  ! product of meriodional velocity and vertical velocity at VW points
+      ENDIF
+
+      IF( iom_use("urhop") ) THEN
+         z3d(:,:,:) = 0.e0 
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  z3d(ji,jj,jk) = un(ji,jj,jk) * 0.5 * ( zrhop(ji,jj,jk) + zrhop(ji+1,jj,jk) )
+               END DO
+            END DO
+         END DO
+         CALL iom_put( "urhop", z3d )                  ! product of density and zonal velocity at U points
+      ENDIF
+
+      IF( iom_use("vrhop") ) THEN
+         z3d(:,:,:) = 0.e0 
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  z3d(ji,jj,jk) = vn(ji,jj,jk) * 0.5 * ( zrhop(ji,jj,jk) + zrhop(ji,jj+1,jk) )
+               END DO
+            END DO
+         END DO
+         CALL iom_put( "vrhop", z3d )                  ! product of density and meridional velocity at V points
+      ENDIF
+
+      IF( iom_use("wrhop") ) THEN
+         z3d(:,:,:) = 0.e0 
+         DO jj = 2, jpjm1
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               z3d(ji,jj,1) = wn(ji,jj,1) * zrhop(ji,jj,1)
+            END DO
+         END DO
+         DO jk = 2, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  z3d(ji,jj,jk) = wn(ji,jj,jk) * 0.5 * ( zrhop(ji,jj,jk-1) + zrhop(ji,jj,jk) )
+               END DO
+            END DO
+         END DO
+         CALL iom_put( "wrhop", z3d )                  ! product of density and vertical velocity at W points
+      ENDIF
+
+      !
+      DEALLOCATE( z2d, z3d, zrhop )
+      !
+      IF( ln_timing )   CALL timing_stop('dia_prod')
+      !
+   END SUBROUTINE dia_prod
+#else
+   !!----------------------------------------------------------------------
+   !!   Default option :                                         NO diaprod
+   !!----------------------------------------------------------------------
+   LOGICAL, PUBLIC, PARAMETER :: lk_diaprod = .FALSE.   ! coupled flag
+CONTAINS
+   SUBROUTINE dia_prod( kt )   ! Empty routine
+      INTEGER ::   kt
+      WRITE(*,*) 'dia_prod: You should not have seen this print! error?', kt
+   END SUBROUTINE dia_prod
+#endif
+   !!======================================================================
+END MODULE diaprod
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/DIA/diawri.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/DIA/diawri.F90	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/DIA/diawri.F90	(revision 14078)
@@ -49,5 +49,5 @@
    USE iom            ! 
    USE ioipsl         ! 
-
+   USE eosbn2
 #if defined key_si3
    USE ice 
@@ -113,6 +113,29 @@
       REAL(wp), DIMENSION(jpi,jpj)     ::   z2d   ! 2D workspace
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   z3d   ! 3D workspace
+      CHARACTER(len=4),SAVE :: ttype , stype           ! temperature and salinity type
       !!----------------------------------------------------------------------
       ! 
+      IF( kt == nit000 ) THEN
+         IF( ln_TEOS10 ) THEN
+            IF ( iom_use("toce_pot") .OR. iom_use("soce_pra") .OR. iom_use("sst_pot") .OR. iom_use("sss_pra") &
+                  & .OR. iom_use("sbt_pot") .OR. iom_use("sbs_pra") .OR. iom_use("sstgrad_pot") .OR. iom_use("sstgrad2_pot") &
+                  & .OR. iom_use("tosmint_pot") .OR. iom_use("somint_pra"))  THEN 
+               CALL ctl_stop( 'diawri: potential temperature and practical salinity not available with ln_TEOS10' )
+            ELSE
+               ttype='con' ; stype='abs'   ! teos-10 using conservative temperature and absolute salinity
+            ENDIF 
+         ELSE IF( ln_EOS80  ) THEN
+            IF ( iom_use("toce_con") .OR. iom_use("soce_abs") .OR. iom_use("sst_con") .OR. iom_use("sss_abs") &
+                  & .OR. iom_use("sbt_con") .OR. iom_use("sbs_abs") .OR. iom_use("sstgrad_con") .OR. iom_use("sstgrad2_con") &
+                  & .OR. iom_use("tosmint_con") .OR. iom_use("somint_abs"))  THEN 
+               CALL ctl_stop( 'diawri: conservative temperature and absolute salinity not available with ln_EOS80' )
+            ELSE
+               ttype='pot' ; stype='pra'   ! eos-80 using potential temperature and practical salinity
+            ENDIF
+         ELSE IF ( ln_SEOS) THEN
+            ttype='seos' ; stype='seos' ! seos using Simplified Equation of state
+         ENDIF
+      ENDIF
+
       IF( ln_timing )   CALL timing_start('dia_wri')
       ! 
@@ -144,7 +167,7 @@
          CALL iom_put( "wetdep" , ht_0(:,:) + sshn(:,:) )
       
-      CALL iom_put( "toce", tsn(:,:,:,jp_tem) )    ! 3D temperature
-      CALL iom_put(  "sst", tsn(:,:,1,jp_tem) )    ! surface temperature
-      IF ( iom_use("sbt") ) THEN
+      CALL iom_put( "toce_"//ttype, tsn(:,:,:,jp_tem) )    ! 3D temperature
+      CALL iom_put(  "sst_"//ttype, tsn(:,:,1,jp_tem) )    ! surface temperature
+      IF ( iom_use("sbt_"//ttype) ) THEN
          DO jj = 1, jpj
             DO ji = 1, jpi
@@ -153,10 +176,10 @@
             END DO
          END DO
-         CALL iom_put( "sbt", z2d )                ! bottom temperature
+         CALL iom_put( "sbt_"//ttype, z2d )                ! bottom temperature
       ENDIF
       
-      CALL iom_put( "soce", tsn(:,:,:,jp_sal) )    ! 3D salinity
-      CALL iom_put(  "sss", tsn(:,:,1,jp_sal) )    ! surface salinity
-      IF ( iom_use("sbs") ) THEN
+      CALL iom_put( "soce_"//stype, tsn(:,:,:,jp_sal) )    ! 3D salinity
+      CALL iom_put(  "sss_"//stype, tsn(:,:,1,jp_sal) )    ! surface salinity
+      IF ( iom_use("sbs_"//stype) ) THEN
          DO jj = 1, jpj
             DO ji = 1, jpi
@@ -165,5 +188,5 @@
             END DO
          END DO
-         CALL iom_put( "sbs", z2d )                ! bottom salinity
+         CALL iom_put( "sbs_"//stype, z2d )                ! bottom salinity
       ENDIF
 
@@ -233,5 +256,5 @@
       IF( iom_use('logavs') )   CALL iom_put( "logavs", LOG( MAX( 1.e-20_wp, avs(:,:,:) ) ) )
 
-      IF ( iom_use("sstgrad") .OR. iom_use("sstgrad2") ) THEN
+      IF ( iom_use("sstgrad_"//ttype) .OR. iom_use("sstgrad2_"//ttype) ) THEN
          DO jj = 2, jpjm1                                    ! sst gradient
             DO ji = fs_2, fs_jpim1   ! vector opt.
@@ -244,7 +267,7 @@
          END DO
          CALL lbc_lnk( 'diawri', z2d, 'T', 1. )
-         CALL iom_put( "sstgrad2",  z2d )          ! square of module of sst gradient
+         CALL iom_put( "sstgrad2_"//ttype,  z2d )          ! square of module of sst gradient
          z2d(:,:) = SQRT( z2d(:,:) )
-         CALL iom_put( "sstgrad" ,  z2d )          ! module of sst gradient
+         CALL iom_put( "sstgrad_"//ttype ,  z2d )          ! module of sst gradient
       ENDIF
          
@@ -365,5 +388,5 @@
       ENDIF
 
-      IF( iom_use("tosmint") ) THEN
+      IF( iom_use("tosmint_"//ttype) ) THEN
          z2d(:,:) = 0._wp
          DO jk = 1, jpkm1
@@ -375,7 +398,7 @@
          END DO
          CALL lbc_lnk( 'diawri', z2d, 'T', -1. )
-         CALL iom_put( "tosmint", rau0 * z2d )        ! Vertical integral of temperature
-      ENDIF
-      IF( iom_use("somint") ) THEN
+         CALL iom_put( "tosmint_"//ttype, rau0 * z2d )        ! Vertical integral of temperature
+      ENDIF
+      IF( iom_use("somint_"//stype) ) THEN
          z2d(:,:)=0._wp
          DO jk = 1, jpkm1
@@ -387,5 +410,5 @@
          END DO
          CALL lbc_lnk( 'diawri', z2d, 'T', -1. )
-         CALL iom_put( "somint", rau0 * z2d )         ! Vertical integral of salinity
+         CALL iom_put( "somint_"//stype, rau0 * z2d )         ! Vertical integral of salinity
       ENDIF
 
@@ -930,5 +953,4 @@
          CALL iom_rstput( 0, 0, inum, 'sdvecrtz', wsd            )    ! now StokesDrift k-velocity
       ENDIF
- 
 #if defined key_si3
       IF( nn_ice == 2 ) THEN   ! condition needed in case agrif + ice-model but no-ice in child grid
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/DOM/domain.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/DOM/domain.F90	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/DOM/domain.F90	(revision 14078)
@@ -292,5 +292,6 @@
          &             nn_it000, nn_itend , nn_date0    , nn_time0     , nn_leapy  , nn_istate ,     &
          &             nn_stock, nn_write , ln_mskland  , ln_clobber   , nn_chunksz, nn_euler  ,     &
-         &             ln_cfmeta, ln_iscpl, ln_xios_read, nn_wxios
+         &             ln_cfmeta, ln_iscpl, ln_xios_read, nn_wxios, ln_rstdate, ln_rst_eos
+
       NAMELIST/namdom/ ln_linssh, rn_isfhmin, rn_rdt, rn_atfp, ln_crs, ln_meshmask
 #if defined key_netcdf4
@@ -340,8 +341,11 @@
 #endif
          WRITE(numout,*) '      mask land points                ln_mskland      = ', ln_mskland
+         WRITE(numout,*) '      date-stamp restart files        ln_rstdate = ', ln_rstdate
          WRITE(numout,*) '      additional CF standard metadata ln_cfmeta       = ', ln_cfmeta
          WRITE(numout,*) '      overwrite an existing file      ln_clobber      = ', ln_clobber
          WRITE(numout,*) '      NetCDF chunksize (bytes)        nn_chunksz      = ', nn_chunksz
          WRITE(numout,*) '      IS coupling at the restart step ln_iscpl        = ', ln_iscpl
+         WRITE(numout,*) '      check restart equation of state ln_rst_eos      = ', ln_rst_eos
+
          IF( TRIM(Agrif_CFixed()) == '0' ) THEN
             WRITE(numout,*) '      READ restart for a single file using XIOS ln_xios_read =', ln_xios_read
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/DOM/dommsk.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/DOM/dommsk.F90	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/DOM/dommsk.F90	(revision 14078)
@@ -32,4 +32,6 @@
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp        ! Massively Parallel Processing library
+   USE iom             ! For shlat2d
+   USE fldread         ! for sn_shlat2d
 
    IMPLICIT NONE
@@ -93,5 +95,10 @@
       INTEGER  ::   ios, inum
       !!
-      NAMELIST/namlbc/ rn_shlat, ln_vorlat
+      REAL(wp) :: zshlat           !: locally modified shlat for some strait
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zshlat2d
+      LOGICAL                         :: ln_shlat2d
+      CHARACTER(len = 256)            :: cn_shlat2d_file, cn_shlat2d_var  
+      !!
+      NAMELIST/namlbc/ rn_shlat, ln_vorlat, ln_shlat2d, cn_shlat2d_file, cn_shlat2d_var
       NAMELIST/nambdy/ ln_bdy ,nb_bdy, ln_coords_file, cn_coords_file,         &
          &             ln_mask_file, cn_mask_file, cn_dyn2d, nn_dyn2d_dta,     &
@@ -120,10 +127,19 @@
       !
       IF(lwp) WRITE(numout,*)
-      IF     (      rn_shlat == 0.               ) THEN   ;   IF(lwp) WRITE(numout,*) '   ==>>>   ocean lateral  free-slip'
-      ELSEIF (      rn_shlat == 2.               ) THEN   ;   IF(lwp) WRITE(numout,*) '   ==>>>   ocean lateral  no-slip'
-      ELSEIF ( 0. < rn_shlat .AND. rn_shlat < 2. ) THEN   ;   IF(lwp) WRITE(numout,*) '   ==>>>   ocean lateral  partial-slip'
-      ELSEIF ( 2. < rn_shlat                     ) THEN   ;   IF(lwp) WRITE(numout,*) '   ==>>>   ocean lateral  strong-slip'
+
+      IF ( ln_shlat2d ) THEN
+         IF(lwp) WRITE(numout,*) '         READ shlat as a 2D coefficient in a file '
+         ALLOCATE( zshlat2d(jpi,jpj) )
+         CALL iom_open(TRIM(cn_shlat2d_file), inum)
+         CALL iom_get (inum, jpdom_data, TRIM(cn_shlat2d_var), zshlat2d, 1) !
+         CALL iom_close(inum)
       ELSE
-         CALL ctl_stop( 'dom_msk: wrong value for rn_shlat (i.e. a negalive value). We stop.' )
+         IF     (      rn_shlat == 0.               ) THEN   ;   IF(lwp) WRITE(numout,*) '   ==>>>   ocean lateral  free-slip'
+         ELSEIF (      rn_shlat == 2.               ) THEN   ;   IF(lwp) WRITE(numout,*) '   ==>>>   ocean lateral  no-slip'
+         ELSEIF ( 0. < rn_shlat .AND. rn_shlat < 2. ) THEN   ;   IF(lwp) WRITE(numout,*) '   ==>>>   ocean lateral  partial-slip'
+         ELSEIF ( 2. < rn_shlat                     ) THEN   ;   IF(lwp) WRITE(numout,*) '   ==>>>   ocean lateral  strong-slip'
+         ELSE
+            CALL ctl_stop( 'dom_msk: wrong value for rn_shlat (i.e. a negalive value). We stop.' )
+         ENDIF
       ENDIF
 
@@ -240,15 +256,26 @@
       ! Lateral boundary conditions on velocity (modify fmask)
       ! ---------------------------------------  
-      IF( rn_shlat /= 0 ) THEN      ! Not free-slip lateral boundary condition
+      IF( rn_shlat /= 0 .or. ln_shlat2d ) THEN      ! Not free-slip lateral boundary condition everywhere
          !
          DO jk = 1, jpk
-            DO jj = 2, jpjm1
-               DO ji = fs_2, fs_jpim1   ! vector opt.
-                  IF( fmask(ji,jj,jk) == 0._wp ) THEN
-                     fmask(ji,jj,jk) = rn_shlat * MIN( 1._wp , MAX( umask(ji,jj,jk), umask(ji,jj+1,jk), &
-                        &                                           vmask(ji,jj,jk), vmask(ji+1,jj,jk) ) )
-                  ENDIF
+            IF (  ln_shlat2d ) THEN
+               DO jj = 2, jpjm1
+                  DO ji = fs_2, fs_jpim1   ! vector opt.
+                     IF( fmask(ji,jj,jk) == 0._wp ) THEN
+                        fmask(ji,jj,jk) = zshlat2d(ji,jj) * MIN( 1._wp , MAX( umask(ji,jj,jk), umask(ji,jj+1,jk),   &
+                           &                                                  vmask(ji,jj,jk), vmask(ji+1,jj,jk)  )  )
+                     ENDIF
+                  END DO
                END DO
-            END DO
+            ELSE
+               DO jj = 2, jpjm1
+                  DO ji = fs_2, fs_jpim1   ! vector opt.
+                     IF( fmask(ji,jj,jk) == 0._wp ) THEN
+                        fmask(ji,jj,jk) = rn_shlat * MIN( 1._wp , MAX( umask(ji,jj,jk), umask(ji,jj+1,jk),   &
+                           &                                           vmask(ji,jj,jk), vmask(ji+1,jj,jk)   )  )
+                     ENDIF
+                  END DO
+               END DO
+            ENDIF
             DO jj = 2, jpjm1
                IF( fmask(1,jj,jk) == 0._wp ) THEN
@@ -277,4 +304,6 @@
          END DO
          !
+         IF( ln_shlat2d ) DEALLOCATE( zshlat2d )
+         !
          CALL lbc_lnk( 'dommsk', fmask, 'F', 1._wp )      ! Lateral boundary conditions on fmask
          !
@@ -284,7 +313,10 @@
       
       ! User defined alteration of fmask (use to reduce ocean transport in specified straits)
+      ! Only call if we are not using the shlat2d option.
       ! -------------------------------- 
       !
-      CALL usr_def_fmask( cn_cfg, nn_cfg, fmask )
+      IF ( .not. ln_shlat2d ) THEN      
+         CALL usr_def_fmask( cn_cfg, nn_cfg, fmask )
+      ENDIF
       !
    END SUBROUTINE dom_msk
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/ICB/icbrst.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/ICB/icbrst.F90	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/ICB/icbrst.F90	(revision 14078)
@@ -25,4 +25,5 @@
    USE netcdf         ! netcdf routines for IO
    USE iom
+   USE ioipsl, ONLY : ju2ymds    ! for calendar
    USE icb_oce        ! define iceberg arrays
    USE icbutl         ! iceberg utility routines
@@ -191,7 +192,10 @@
       INTEGER ::   idg  ! number of digits
       INTEGER ::   ix_dim, iy_dim, ik_dim, in_dim
-      CHARACTER(len=256)     :: cl_path
-      CHARACTER(len=256)     :: cl_filename
-      CHARACTER(len=8  )     :: cl_kt
+      INTEGER             ::   iyear, imonth, iday
+      REAL (wp)           ::   zsec
+      REAL (wp)           ::   zfjulday
+      CHARACTER(len=256)  :: cl_path
+      CHARACTER(len=256)  :: cl_filename
+      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character
       CHARACTER(LEN=12 )     :: clfmt            ! writing format
       TYPE(iceberg), POINTER :: this
@@ -209,6 +213,15 @@
          cl_path = TRIM(cn_ocerst_outdir)
          IF( cl_path(LEN_TRIM(cl_path):) /= '/' ) cl_path = TRIM(cl_path) // '/'
-         WRITE(cl_kt, '(i8.8)') kt
-         cl_filename = TRIM(cexper)//"_icebergs_"//cl_kt//"_restart"
+         IF ( ln_rstdate ) THEN
+            zfjulday = fjulday + rdt / rday
+            IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday )   zfjulday = REAL(NINT(zfjulday),wp)   ! avoid truncation error
+            CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec )           
+            WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday
+         ELSE
+            IF( kt > 999999999 ) THEN   ;   WRITE(clkt, *       ) kt
+            ELSE                        ;   WRITE(clkt, '(i8.8)') kt
+            ENDIF
+         ENDIF
+         cl_filename = TRIM(cexper)//"_icebergs_"//TRIM(ADJUSTL(clkt))//"_restart"
          IF( lk_mpp ) THEN
             idg = MAX( INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1, 4 )          ! how many digits to we need to write? min=4, max=9
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/IOM/in_out_manager.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/IOM/in_out_manager.F90	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/IOM/in_out_manager.F90	(revision 14078)
@@ -28,4 +28,5 @@
    LOGICAL       ::   ln_rstart        !: start from (F) rest or (T) a restart file
    LOGICAL       ::   ln_rst_list      !: output restarts at list of times (T) or by frequency (F)
+   LOGICAL       ::   ln_rst_eos       !: check equation of state used for the restart is consistent with model
    INTEGER       ::   nn_rstctl        !: control of the time step (0, 1 or 2)
    INTEGER       ::   nn_rstssh   = 0  !: hand made initilization of ssh or not (1/0)
@@ -40,4 +41,5 @@
    INTEGER, DIMENSION(10) :: nn_stocklist  !: restart dump times
    LOGICAL       ::   ln_mskland       !: mask land points in NetCDF outputs (costly: + ~15%)
+   LOGICAL       ::   ln_rstdate       !: T=> stamp output restart files with date instead of timestep
    LOGICAL       ::   ln_cfmeta        !: output additional data to netCDF files required for compliance with the CF metadata standard
    LOGICAL       ::   ln_clobber       !: clobber (overwrite) an existing file
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/IOM/iom.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/IOM/iom.F90	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/IOM/iom.F90	(revision 14078)
@@ -368,4 +368,6 @@
 !from restart.F90
    CALL iom_set_rstw_var_active("rdt")
+   CALL iom_set_rstw_var_active("neos")
+
    IF ( .NOT. ln_diurnal_only ) THEN
         CALL iom_set_rstw_var_active('ub'  )
@@ -417,4 +419,5 @@
         i = 0
         i = i + 1; fields(i)%vname="rdt";            fields(i)%grid="grid_scalar"
+        i = i + 1; fields(i)%vname="neos";           fields(i)%grid="grid_scalar"
         i = i + 1; fields(i)%vname="un";             fields(i)%grid="grid_N_3D"
         i = i + 1; fields(i)%vname="ub";             fields(i)%grid="grid_N_3D"
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/IOM/restart.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/IOM/restart.F90	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/IOM/restart.F90	(revision 14078)
@@ -27,4 +27,5 @@
    USE in_out_manager  ! I/O manager
    USE iom             ! I/O module
+   USE ioipsl, ONLY : ju2ymds    ! for calendar
    USE diurnal_bulk
    USE lib_mpp         ! distribued memory computing library
@@ -59,4 +60,7 @@
       INTEGER, INTENT(in) ::   kt     ! ocean time-step
       !!
+      INTEGER             ::   iyear, imonth, iday
+      REAL (wp)           ::   zsec
+      REAL (wp)           ::   zfjulday
       CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character
       CHARACTER(LEN=50)   ::   clname   ! ocean output restart file name
@@ -90,6 +94,13 @@
          IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 
             ! beware of the format used to write kt (default is i8.8, that should be large enough...)
-            IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst
-            ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst
+            IF ( ln_rstdate ) THEN
+               zfjulday = fjulday + rdt / rday
+               IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday )   zfjulday = REAL(NINT(zfjulday),wp)   ! avoid truncation error
+               CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec )           
+               WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday
+            ELSE
+               IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst
+               ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst
+               ENDIF
             ENDIF
             ! create the file
@@ -173,4 +184,7 @@
                   END IF
       ENDIF
+                     CALL iom_rstput( kt, nitrst, numrow, 'neos'    , REAL(neos)      , ldxios = lwxios)   ! equation of state
+                     !CALL iom_rstput( kt, nitrst, numrow, 'neos'    , neos      , ktype = jp_i1, ldxios = lwxios)   ! equation of state
+
       
       IF (ln_diurnal) CALL iom_rstput( kt, nitrst, numrow, 'Dsst', x_dsst, ldxios = lwxios )  
@@ -249,4 +263,5 @@
       !!----------------------------------------------------------------------
       REAL(wp) ::   zrdt
+      REAL(wp) ::   zeos
       INTEGER  ::   jk
       REAL(wp), DIMENSION(jpi, jpj, jpk) :: w3d
@@ -255,6 +270,16 @@
       CALL rst_read_open           ! open restart for reading (if not already opened)
 
+      IF ( ln_rst_eos ) THEN
+         ! Check equation of state used is consistent with the restart
+         IF( iom_varid( numror, 'neos') == -1) THEN
+            CALL ctl_stop( 'restart, rst_read: variable neos not found. STOP check that the equations of state in the restart file and in the namelist nameos are consistent and use ln_rst_eos=F')
+         ELSE
+            CALL iom_get( numror, 'neos', zeos, ldxios = lrxios )
+            IF ( INT(zeos) /= neos ) CALL ctl_stop( 'restart, rst_read: equation of state used in restart file differs from namelist nameos')
+         ENDIF
+      ENDIF
+
       ! Check dynamics and tracer time-step consistency and force Euler restart if changed
-      IF( iom_varid( numror, 'rdt', ldstop = .FALSE. ) > 0 )   THEN
+      IF( iom_varid( numror, 'rdt', ldstop = .FALSE. ) > 0 )   THEN 
          CALL iom_get( numror, 'rdt', zrdt, ldxios = lrxios )
          IF( zrdt /= rdt )   neuler = 0
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/SBC/sbcssm.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/SBC/sbcssm.F90	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/SBC/sbcssm.F90	(revision 14078)
@@ -57,5 +57,15 @@
       REAL(wp) ::   zcoef, zf_sbc       ! local scalar
       REAL(wp), DIMENSION(jpi,jpj,jpts) :: zts
+      CHARACTER(len=4),SAVE :: stype
       !!---------------------------------------------------------------------
+      IF( kt == nit000 ) THEN
+         IF( ln_TEOS10 ) THEN
+            stype='abs'   ! teos-10: using absolute salinity (sst is converted to potential temperature for the surface module)
+         ELSE IF( ln_EOS80  ) THEN
+            stype='pra'   ! eos-80: using practical salinity
+         ELSE IF ( ln_SEOS) THEN
+            stype='seos' ! seos using Simplified Equation of state (sst is converted to potential temperature for the surface module)
+         ENDIF
+      ENDIF
       !
       !                                        !* surface T-, U-, V- ocean level variables (T, S, depth, velocity)
@@ -174,6 +184,6 @@
          CALL iom_put( 'ssu_m', ssu_m )
          CALL iom_put( 'ssv_m', ssv_m )
-         CALL iom_put( 'sst_m', sst_m )
-         CALL iom_put( 'sss_m', sss_m )
+         CALL iom_put( 'sst_m_pot', sst_m )
+         CALL iom_put( 'sss_m_'//stype, sss_m )
          CALL iom_put( 'ssh_m', ssh_m )
          CALL iom_put( 'e3t_m', e3t_m )
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/ZDF/zdfmxl.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/ZDF/zdfmxl.F90	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/ZDF/zdfmxl.F90	(revision 14078)
@@ -15,4 +15,5 @@
    USE trc_oce  , ONLY: l_offline         ! ocean space and time domain variables
    USE zdf_oce        ! ocean vertical physics
+   USE eosbn2         ! for zdf_mxl_zint
    !
    USE in_out_manager ! I/O manager
@@ -31,7 +32,18 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hmlp    !: mixed layer depth  (rho=rho0+zdcrit) [m]   (used by LDF)
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hmlpt   !: depth of the last T-point inside the mixed layer [m] (used by LDF)
+   REAL(wp), PUBLIC, ALLOCATABLE,       DIMENSION(:,:) ::   hmld_zint  !: vertically-interpolated mixed layer depth   [m]
+   REAL(wp), PUBLIC, ALLOCATABLE,       DIMENSION(:,:) ::   htc_mld    ! Heat content of hmld_zint
+   LOGICAL, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)    :: ll_found   ! Is T_b to be found by interpolation ?
+   LOGICAL, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)  :: ll_belowml ! Flag points below mixed layer when ll_found=F
 
    REAL(wp), PUBLIC ::   rho_c = 0.01_wp    !: density criterion for mixed layer depth
    REAL(wp), PUBLIC ::   avt_c = 5.e-4_wp   ! Kz criterion for the turbocline depth
+
+   TYPE, PUBLIC :: MXL_ZINT   !: Structure for MLD defs
+      INTEGER   :: mld_type   ! mixed layer type     
+      REAL(wp)  :: zref       ! depth of initial T_ref
+      REAL(wp)  :: dT_crit    ! Critical temp diff
+      REAL(wp)  :: iso_frac   ! Fraction of rn_dT_crit 
+   END TYPE MXL_ZINT
 
    !!----------------------------------------------------------------------
@@ -48,5 +60,6 @@
       zdf_mxl_alloc = 0      ! set to zero if no array to be allocated
       IF( .NOT. ALLOCATED( nmln ) ) THEN
-         ALLOCATE( nmln(jpi,jpj), hmld(jpi,jpj), hmlp(jpi,jpj), hmlpt(jpi,jpj), STAT= zdf_mxl_alloc )
+         ALLOCATE( nmln(jpi,jpj), hmld(jpi,jpj), hmlp(jpi,jpj), hmlpt(jpi,jpj), hmld_zint(jpi,jpj),     &
+ 	&          htc_mld(jpi,jpj), ll_found(jpi,jpj), ll_belowml(jpi,jpj,jpk), STAT= zdf_mxl_alloc )         
          !
          CALL mpp_sum ( 'zdfmxl', zdf_mxl_alloc )
@@ -137,7 +150,342 @@
       ENDIF
       !
+      ! Vertically-interpolated mixed-layer depth diagnostic
+      CALL zdf_mxl_zint( kt )
+      !
       IF(ln_ctl)   CALL prt_ctl( tab2d_1=REAL(nmln,wp), clinfo1=' nmln : ', tab2d_2=hmlp, clinfo2=' hmlp : ' )
       !
    END SUBROUTINE zdf_mxl
+
+   SUBROUTINE zdf_mxl_zint_mld( sf ) 
+      !!---------------------------------------------------------------------------------- 
+      !!                    ***  ROUTINE zdf_mxl_zint_mld  *** 
+      !                                                                        
+      !   Calculate vertically-interpolated mixed layer depth diagnostic. 
+      !            
+      !   This routine can calculate the mixed layer depth diagnostic suggested by
+      !   Kara et al, 2000, JGR, 105, 16803, but is more general and can calculate
+      !   vertically-interpolated mixed-layer depth diagnostics with other parameter
+      !   settings set in the namzdf_mldzint namelist.  
+      ! 
+      !   If mld_type=1 the mixed layer depth is calculated as the depth at which the  
+      !   density has increased by an amount equivalent to a temperature difference of  
+      !   0.8C at the surface. 
+      ! 
+      !   For other values of mld_type the mixed layer is calculated as the depth at  
+      !   which the temperature differs by 0.8C from the surface temperature.  
+      !                                                                        
+      !   David Acreman, Daley Calvert                                      
+      ! 
+      !!----------------------------------------------------------------------------------- 
+
+      TYPE(MXL_ZINT), INTENT(in)  :: sf
+
+      ! Diagnostic criteria
+      INTEGER   :: nn_mld_type   ! mixed layer type     
+      REAL(wp)  :: rn_zref       ! depth of initial T_ref
+      REAL(wp)  :: rn_dT_crit    ! Critical temp diff
+      REAL(wp)  :: rn_iso_frac   ! Fraction of rn_dT_crit used
+
+      ! Local variables
+      REAL(wp), PARAMETER :: zepsilon = 1.e-30          ! local small value
+      INTEGER, DIMENSION(jpi,jpj) :: ikmt          ! number of active tracer levels 
+      INTEGER, DIMENSION(jpi,jpj) :: ik_ref        ! index of reference level 
+      INTEGER, DIMENSION(jpi,jpj) :: ik_iso        ! index of last uniform temp level 
+      REAL, DIMENSION(jpi,jpj,jpk)  :: zT            ! Temperature or density 
+      REAL, DIMENSION(jpi,jpj)    :: ppzdep        ! depth for use in calculating d(rho) 
+      REAL, DIMENSION(jpi,jpj)    :: zT_ref        ! reference temperature 
+      REAL    :: zT_b                                   ! base temperature 
+      REAL, DIMENSION(jpi,jpj,jpk)  :: zdTdz         ! gradient of zT 
+      REAL, DIMENSION(jpi,jpj,jpk)  :: zmoddT        ! Absolute temperature difference 
+      REAL    :: zdz                                    ! depth difference 
+      REAL    :: zdT                                    ! temperature difference 
+      REAL, DIMENSION(jpi,jpj)    :: zdelta_T      ! difference critereon 
+      REAL, DIMENSION(jpi,jpj)    :: zRHO1, zRHO2  ! Densities 
+      INTEGER :: ji, jj, jk                             ! loop counter 
+
+      !!------------------------------------------------------------------------------------- 
+      !  
+      ! Unpack structure
+      nn_mld_type = sf%mld_type
+      rn_zref     = sf%zref
+      rn_dT_crit  = sf%dT_crit
+      rn_iso_frac = sf%iso_frac
+
+      ! Set the mixed layer depth criterion at each grid point 
+      IF( nn_mld_type == 0 ) THEN
+         zdelta_T(:,:) = rn_dT_crit
+         zT(:,:,:) = rhop(:,:,:)
+      ELSE IF( nn_mld_type == 1 ) THEN
+         ppzdep(:,:)=0.0 
+         call eos ( tsn(:,:,1,:), ppzdep(:,:), zRHO1(:,:) ) 
+! Use zT temporarily as a copy of tsn with rn_dT_crit added to SST 
+! [assumes number of tracers less than number of vertical levels] 
+         zT(:,:,1:jpts)=tsn(:,:,1,1:jpts) 
+         zT(:,:,jp_tem)=zT(:,:,1)+rn_dT_crit 
+         CALL eos( zT(:,:,1:jpts), ppzdep(:,:), zRHO2(:,:) ) 
+         zdelta_T(:,:) = abs( zRHO1(:,:) - zRHO2(:,:) ) * rau0 
+         ! RHO from eos (2d version) doesn't calculate north or east halo: 
+         CALL lbc_lnk( 'zdfmxl', zdelta_T, 'T', 1. ) 
+         zT(:,:,:) = rhop(:,:,:) 
+      ELSE 
+         zdelta_T(:,:) = rn_dT_crit                      
+         zT(:,:,:) = tsn(:,:,:,jp_tem)                           
+      END IF 
+
+      ! Calculate the gradient of zT and absolute difference for use later 
+      DO jk = 1 ,jpk-2 
+         zdTdz(:,:,jk)  =    ( zT(:,:,jk+1) - zT(:,:,jk) ) / e3w_n(:,:,jk+1) 
+         zmoddT(:,:,jk) = abs( zT(:,:,jk+1) - zT(:,:,jk) ) 
+      END DO 
+
+      ! Find density/temperature at the reference level (Kara et al use 10m).          
+      ! ik_ref is the index of the box centre immediately above or at the reference level 
+      ! Find rn_zref in the array of model level depths and find the ref    
+      ! density/temperature by linear interpolation.                                   
+      DO jk = jpkm1, 2, -1 
+         WHERE ( gdept_n(:,:,jk) > rn_zref ) 
+           ik_ref(:,:) = jk - 1 
+           zT_ref(:,:) = zT(:,:,jk-1) + zdTdz(:,:,jk-1) * ( rn_zref - gdept_n(:,:,jk-1) ) 
+         END WHERE 
+      END DO 
+
+      ! If the first grid box centre is below the reference level then use the 
+      ! top model level to get zT_ref 
+      WHERE ( gdept_n(:,:,1) > rn_zref )  
+         zT_ref = zT(:,:,1) 
+         ik_ref = 1 
+      END WHERE 
+
+      ! The number of active tracer levels is 1 less than the number of active w levels 
+      ikmt(:,:) = mbkt(:,:) - 1 
+
+      ! Initialize / reset
+      ll_found(:,:) = .false.
+
+      IF ( rn_iso_frac - zepsilon > 0. ) THEN
+         ! Search for a uniform density/temperature region where adjacent levels          
+         ! differ by less than rn_iso_frac * deltaT.                                      
+         ! ik_iso is the index of the last level in the uniform layer  
+         ! ll_found indicates whether the mixed layer depth can be found by interpolation 
+         ik_iso(:,:)   = ik_ref(:,:) 
+         DO jj = 1, nlcj 
+            DO ji = 1, nlci 
+!CDIR NOVECTOR 
+               DO jk = ik_ref(ji,jj), ikmt(ji,jj)-1 
+                  IF ( zmoddT(ji,jj,jk) > ( rn_iso_frac * zdelta_T(ji,jj) ) ) THEN 
+                     ik_iso(ji,jj)   = jk 
+                     ll_found(ji,jj) = ( zmoddT(ji,jj,jk) > zdelta_T(ji,jj) ) 
+                     EXIT 
+                  END IF 
+               END DO 
+            END DO 
+         END DO 
+
+         ! Use linear interpolation to find depth of mixed layer base where possible 
+         hmld_zint(:,:) = rn_zref 
+         DO jj = 1, jpj 
+            DO ji = 1, jpi 
+               IF (ll_found(ji,jj) .and. tmask(ji,jj,1) == 1.0) THEN 
+                  zdz =  abs( zdelta_T(ji,jj) / zdTdz(ji,jj,ik_iso(ji,jj)) ) 
+                  hmld_zint(ji,jj) = gdept_n(ji,jj,ik_iso(ji,jj)) + zdz 
+               END IF 
+            END DO 
+         END DO 
+      END IF
+
+      ! If ll_found = .false. then calculate MLD using difference of zdelta_T    
+      ! from the reference density/temperature 
+ 
+! Prevent this section from working on land points 
+      WHERE ( tmask(:,:,1) /= 1.0 ) 
+         ll_found = .true. 
+      END WHERE 
+ 
+      DO jk=1, jpk 
+         ll_belowml(:,:,jk) = abs( zT(:,:,jk) - zT_ref(:,:) ) >= zdelta_T(:,:)  
+      END DO 
+ 
+! Set default value where interpolation cannot be used (ll_found=false)  
+      DO jj = 1, jpj 
+         DO ji = 1, jpi 
+            IF ( .not. ll_found(ji,jj) )  hmld_zint(ji,jj) = gdept_n(ji,jj,ikmt(ji,jj)) 
+         END DO 
+      END DO 
+
+      DO jj = 1, jpj 
+         DO ji = 1, jpi 
+!CDIR NOVECTOR 
+            DO jk = ik_ref(ji,jj)+1, ikmt(ji,jj) 
+               IF ( ll_found(ji,jj) ) EXIT 
+               IF ( ll_belowml(ji,jj,jk) ) THEN                
+                  zT_b = zT_ref(ji,jj) + zdelta_T(ji,jj) * SIGN(1.0, zdTdz(ji,jj,jk-1) ) 
+                  zdT  = zT_b - zT(ji,jj,jk-1)                                      
+                  zdz  = zdT / zdTdz(ji,jj,jk-1)                                       
+                  hmld_zint(ji,jj) = gdept_n(ji,jj,jk-1) + zdz 
+                  EXIT                                                   
+               END IF 
+            END DO 
+         END DO 
+      END DO 
+
+      hmld_zint(:,:) = hmld_zint(:,:)*tmask(:,:,1) 
+      !  
+   END SUBROUTINE zdf_mxl_zint_mld
+
+   SUBROUTINE zdf_mxl_zint_htc( kt )
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE zdf_mxl_zint_htc  ***
+      !! 
+      !! ** Purpose :   
+      !!
+      !! ** Method  :   
+      !!----------------------------------------------------------------------
+
+      INTEGER, INTENT(in) ::   kt   ! ocean time-step index
+
+      INTEGER :: ji, jj, jk
+      INTEGER :: ikmax
+      REAL(wp) :: zc, zcoef
+      !
+      INTEGER,  ALLOCATABLE, DIMENSION(:,:) ::   ilevel
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   zthick_0, zthick
+
+      !!----------------------------------------------------------------------
+
+      IF( .NOT. ALLOCATED(ilevel) ) THEN
+         ALLOCATE( ilevel(jpi,jpj), zthick_0(jpi,jpj), &
+         &         zthick(jpi,jpj), STAT=ji )
+         IF( lk_mpp  )   CALL mpp_sum( 'zdfmxl', ji )
+         IF( ji /= 0 )   CALL ctl_stop( 'STOP', 'zdf_mxl_zint_htc : unable to allocate arrays' )
+      ENDIF
+
+      ! Find last whole model T level above the MLD
+      ilevel(:,:)   = 0
+      zthick_0(:,:) = 0._wp
+
+      DO jk = 1, jpkm1  
+         DO jj = 1, jpj
+            DO ji = 1, jpi                    
+               zthick_0(ji,jj) = zthick_0(ji,jj) + e3t_n(ji,jj,jk)
+               IF( zthick_0(ji,jj) < hmld_zint(ji,jj) )   ilevel(ji,jj) = jk
+            END DO
+         END DO
+         WRITE(numout,*) 'zthick_0(jk =',jk,') =',zthick_0(2,2)
+         WRITE(numout,*) 'gdepw_n(jk+1 =',jk+1,') =',gdepw_n(2,2,jk+1)
+      END DO
+
+      ! Surface boundary condition
+      IF( ln_linssh ) THEN  ;   zthick(:,:) = sshn(:,:)   ;   htc_mld(:,:) = tsn(:,:,1,jp_tem) * sshn(:,:) * tmask(:,:,1)   
+      ELSE                  ;   zthick(:,:) = 0._wp       ;   htc_mld(:,:) = 0._wp                                   
+      ENDIF
+
+      ! Deepest whole T level above the MLD
+      ikmax = MIN( MAXVAL( ilevel(:,:) ), jpkm1 )
+
+      ! Integration down to last whole model T level
+      DO jk = 1, ikmax
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               zc = e3t_n(ji,jj,jk) * REAL( MIN( MAX( 0, ilevel(ji,jj) - jk + 1 ) , 1  )  )    ! 0 below ilevel
+               zthick(ji,jj) = zthick(ji,jj) + zc
+               htc_mld(ji,jj) = htc_mld(ji,jj) + zc * tsn(ji,jj,jk,jp_tem) * tmask(ji,jj,jk)
+            END DO
+         END DO
+      END DO
+
+      ! Subsequent partial T level
+      zthick(:,:) = hmld_zint(:,:) - zthick(:,:)   !   remaining thickness to reach MLD
+
+      DO jj = 1, jpj
+         DO ji = 1, jpi
+            htc_mld(ji,jj) = htc_mld(ji,jj) + tsn(ji,jj,ilevel(ji,jj)+1,jp_tem)  & 
+      &                      * MIN( e3t_n(ji,jj,ilevel(ji,jj)+1), zthick(ji,jj) ) * tmask(ji,jj,ilevel(ji,jj)+1)
+         END DO
+      END DO
+
+      WRITE(numout,*) 'htc_mld(after) =',htc_mld(2,2)
+
+      ! Convert to heat content
+      zcoef = rau0 * rcp
+      htc_mld(:,:) = zcoef * htc_mld(:,:)
+
+   END SUBROUTINE zdf_mxl_zint_htc
+
+   SUBROUTINE zdf_mxl_zint( kt )
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE zdf_mxl_zint  ***
+      !! 
+      !! ** Purpose :   
+      !!
+      !! ** Method  :   
+      !!----------------------------------------------------------------------
+
+      INTEGER, INTENT(in) ::   kt   ! ocean time-step index
+
+      INTEGER :: ios
+      INTEGER :: jn
+
+      INTEGER :: nn_mld_diag = 0    ! number of diagnostics
+
+      CHARACTER(len=1) :: cmld
+
+      TYPE(MXL_ZINT) :: sn_mld1, sn_mld2, sn_mld3, sn_mld4, sn_mld5
+      TYPE(MXL_ZINT), SAVE, DIMENSION(5) ::   mld_diags
+
+      NAMELIST/namzdf_mldzint/ nn_mld_diag, sn_mld1, sn_mld2, sn_mld3, sn_mld4, sn_mld5
+
+      !!----------------------------------------------------------------------
+      
+      IF( kt == nit000 ) THEN
+         REWIND( numnam_ref )              ! Namelist namzdf_mldzint in reference namelist 
+         READ  ( numnam_ref, namzdf_mldzint, IOSTAT = ios, ERR = 901)
+901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_mldzint in reference namelist' )
+
+         REWIND( numnam_cfg )              ! Namelist namzdf_mldzint in configuration namelist 
+         READ  ( numnam_cfg, namzdf_mldzint, IOSTAT = ios, ERR = 902 )
+902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_mldzint in configuration namelist' )
+         IF(lwm) WRITE ( numond, namzdf_mldzint )
+
+         IF( nn_mld_diag > 5 )   CALL ctl_stop( 'STOP', 'zdf_mxl_ini: Specify no more than 5 MLD definitions' )
+
+         mld_diags(1) = sn_mld1
+         mld_diags(2) = sn_mld2
+         mld_diags(3) = sn_mld3
+         mld_diags(4) = sn_mld4
+         mld_diags(5) = sn_mld5
+
+         IF( lwp .AND. (nn_mld_diag > 0) ) THEN
+            WRITE(numout,*) '=============== Vertically-interpolated mixed layer ================'
+            WRITE(numout,*) '(Diagnostic number, nn_mld_type, rn_zref, rn_dT_crit, rn_iso_frac)'
+            DO jn = 1, nn_mld_diag
+               WRITE(numout,*) 'MLD criterion',jn,':'
+               WRITE(numout,*) '    nn_mld_type =', mld_diags(jn)%mld_type
+               WRITE(numout,*) '    rn_zref ='    , mld_diags(jn)%zref
+               WRITE(numout,*) '    rn_dT_crit =' , mld_diags(jn)%dT_crit
+               WRITE(numout,*) '    rn_iso_frac =', mld_diags(jn)%iso_frac
+            END DO
+            WRITE(numout,*) '===================================================================='
+         ENDIF
+      ENDIF
+
+      IF( nn_mld_diag > 0 ) THEN
+         DO jn = 1, nn_mld_diag
+            WRITE(cmld,'(I1)') jn
+            IF( iom_use( "mldzint_"//cmld ) .OR. iom_use( "mldhtc_"//cmld ) ) THEN
+               CALL zdf_mxl_zint_mld( mld_diags(jn) )
+
+               IF( iom_use( "mldzint_"//cmld ) ) THEN
+                  CALL iom_put( "mldzint_"//cmld, hmld_zint(:,:) )
+               ENDIF
+
+               IF( iom_use( "mldhtc_"//cmld ) )  THEN
+                  CALL zdf_mxl_zint_htc( kt )
+                  CALL iom_put( "mldhtc_"//cmld , htc_mld(:,:)   )
+               ENDIF
+            ENDIF
+         END DO
+      ENDIF
+
+   END SUBROUTINE zdf_mxl_zint
 
    !!======================================================================
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/step.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/step.F90	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/step.F90	(revision 14078)
@@ -207,4 +207,5 @@
       IF( ln_diaptr  )   CALL dia_ptr                 ! Poleward adv/ldf TRansports diagnostics
       IF( ln_diaharm )   CALL dia_harm( kstp )        ! Tidal harmonic analysis
+                         CALL dia_prod( kstp )        ! ocean model: product diagnostics
                          CALL dia_wri ( kstp )        ! ocean model: outputs
       !
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/step_oce.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/step_oce.F90	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/step_oce.F90	(revision 14078)
@@ -80,4 +80,5 @@
    USE diahsb          ! heat, salt and volume budgets    (dia_hsb routine)
    USE diaharm
+   USE diaprod
    USE diacfl
    USE diaobs          ! Observation operator
Index: /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/SAS/sbcssm.F90
===================================================================
--- /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/SAS/sbcssm.F90	(revision 14077)
+++ /NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/SAS/sbcssm.F90	(revision 14078)
@@ -77,5 +77,15 @@
       REAL(wp) ::   ztinta     ! ratio applied to after  records when doing time interpolation
       REAL(wp) ::   ztintb     ! ratio applied to before records when doing time interpolation
-      !!----------------------------------------------------------------------
+      CHARACTER(len=4),SAVE :: stype
+      !!---------------------------------------------------------------------
+      IF( kt == nit000 ) THEN
+         IF( ln_TEOS10 ) THEN
+            stype='abs'   ! teos-10: using absolute salinity (sst is converted to potential temperature for the surface module)
+         ELSE IF( ln_EOS80  ) THEN
+            stype='pra'   ! eos-80: using practical salinity
+         ELSE IF ( ln_SEOS) THEN
+            stype='seos' ! seos using Simplified Equation of state (sst is converted to potential temperature for the surface module)
+         ENDIF
+      ENDIF
       !
       IF( ln_timing )   CALL timing_start( 'sbc_ssm')
@@ -144,6 +154,6 @@
          CALL iom_put( 'ssu_m', ssu_m )
          CALL iom_put( 'ssv_m', ssv_m )
-         CALL iom_put( 'sst_m', sst_m )
-         CALL iom_put( 'sss_m', sss_m )
+         CALL iom_put( 'sst_m_pot', sst_m )
+         CALL iom_put( 'sss_m_'//stype, sss_m )
          CALL iom_put( 'ssh_m', ssh_m )
          IF( .NOT.ln_linssh )   CALL iom_put( 'e3t_m', e3t_m )
