Index: branches/2017/dev_r8183_ICEMODEL/NEMOGCM/CONFIG/SHARED/field_def_nemo-lim.xml
===================================================================
--- branches/2017/dev_r8183_ICEMODEL/NEMOGCM/CONFIG/SHARED/field_def_nemo-lim.xml	(revision 8239)
+++ branches/2017/dev_r8183_ICEMODEL/NEMOGCM/CONFIG/SHARED/field_def_nemo-lim.xml	(revision 8266)
@@ -27,33 +27,33 @@
 
          <!-- SIMIP LIM fields -->
-         <field id="icethic"      long_name="Sea-ice thickness"                                    standard_name="sea_ice_thickness"                          unit="m"            />
-         <field id="icevel"       long_name="Sea-ice speed"                                        standard_name="sea_ice_speed"                              unit="m/s"          />
-
+         <field id="icethic"      long_name="Sea-ice thickness"                                    standard_name="sea_ice_thickness"                          unit="m"   />
+         <field id="uice_mv"      long_name="X-component of sea ice velocity"                      standard_name="sea_ice_x_velocity"                         unit="m/s" /> 
+         <field id="vice_mv"      long_name="Y-component of sea ice velocity"                      standard_name="sea_ice_y_velocity"                         unit="m/s" />      
+         <field id="icevel_mv"    long_name="Sea-ice speed"                                        standard_name="sea_ice_speed"                              unit="m/s" />
          <field id="icepres"      long_name="Fraction of time steps with sea ice"                  standard_name="sea_ice_time_fraction"                      unit=""             />
          <field id="iceconc"      long_name="Sea-ice area fraction"                                standard_name="sea_ice_area_fraction"                      unit=""             />
          <field id="iceconc_pct"  long_name="Sea-ice area fraction in percent"                     standard_name="sea_ice_area_fraction_in_percent"           unit="%"             > iceconc * 100. </field >
          <field id="icemass"      long_name="Sea-ice mass per area"                                standard_name="sea_ice_amount"                             unit="kg/m2"        />
-         <field id="icevolu"      long_name="Sea-ice volume per area"                              standard_name="sea_ice_volume"                             unit="m"            />
+         <field id="icevolu"      long_name="Sea-ice volume per area"                              standard_name="sea_ice_thickness"                          unit="m"            />
          <field id="snomass"      long_name="Snow mass per area"                                   standard_name="liquid_water_content_of_surface_snow"       unit="kg/m2"        />
-         <field id="snowthic"     long_name="Snow thickness"                                       standard_name="surface_snow_thickness"                     unit="m"            />
-
-         <field id="iceconc_cat"  long_name="Sea-ice area fractions in thickness categories"       standard_name="sea_ice_area_fraction_over_categories"      unit=""   grid_ref="grid_T_3D_ncatice" />
-         <field id="icethic_cat"  long_name="Sea-ice thickness in thickness categories"            standard_name="sea_ice_thickness_over_categories"          unit="m"  grid_ref="grid_T_3D_ncatice" />
-         <field id="snowthic_cat" long_name="Snow thickness in thickness categories"               standard_name="snow_thickness_over_categories"             unit="m"  grid_ref="grid_T_3D_ncatice" />
-
-         <field id="icestK"       long_name="ice surface temperature"                              standard_name="sea_ice_surface_temperature        "        unit="C"     > icest + 273.15  </field >
-         <field id="icesntK"      long_name="Temperature at snow-ice interface"                    standard_name="sea_ice_snow_interface_temperature"         unit="degC"  > icesnt + 273.15 </field >
-         <field id="icebotK"      long_name="Temperature at ice-ocean interface"                   standard_name="sea_ice_bottom_temperature"                 unit="degC"  > icebot + 273.15 </field >
-         <field id="icebotK"      long_name="Temperature at ice-ocean interface"                   standard_name="sea_ice_bottom_temperature"                 unit="degC"  > icebot + 273.15 </field >
-
-         <field id="miceage"      long_name="Age of sea ice"                                       standard_name="age_of_sea_ice"                             unit="s"            />
-         <field id="alb_ice"      long_name="Sea-ice or snow albedo"                               standard_name="sea_ice_albedo"                             unit=""             />
+         <field id="snothic"      long_name="Snow thickness"                                       standard_name="surface_snow_thickness"                     unit="m"            />
+
+         <field id="iceconc_cat_mv"     long_name="Sea-ice area fractions in thickness categories" standard_name="sea_ice_area_fraction_over_categories"      unit=""   grid_ref="grid_T_3D_ncatice" />
+         <field id="iceconc_cat_pct_mv" long_name="Sea-ice area fractions in thickness categories" standard_name="sea_ice_area_fraction_over_categories"      unit="%"  grid_ref="grid_T_3D_ncatice"  > iceconc_cat_mv * 100. </field >
+         <field id="icethic_cat_mv"     long_name="Sea-ice thickness in thickness categories"      standard_name="sea_ice_thickness_over_categories"          unit="m"  grid_ref="grid_T_3D_ncatice" />
+         <field id="snowthic_cat_mv"    long_name="Snow thickness in thickness categories"         standard_name="snow_thickness_over_categories"             unit="m"  grid_ref="grid_T_3D_ncatice" />
+
+         <field id="icestK"       long_name="Surface temperature of sea ice"                       standard_name="sea_ice_surface_temperature"                unit="K"            /> 
+         <field id="icesntK"      long_name="Temperature at snow-ice interface"                    standard_name="sea_ice_snow_interface_temperature"         unit="K"            />
+         <field id="icebotK"      long_name="Temperature at ice-ocean interface"                   standard_name="sea_ice_bottom_temperature"                 unit="K"            />
+
+         <field id="iceage"       long_name="Age of sea ice"                                       standard_name="age_of_sea_ice"                             unit="s"            />
+         <field id="icealb"       long_name="Sea-ice or snow albedo"                               standard_name="sea_ice_albedo"                             unit=""             />
          <field id="icesmass"     long_name="Mass of salt in sea ice per area"                     standard_name="sea_ice_salt_mass"                          unit="kg/m2"        />
-
-         <field id="micesalt"     long_name="Sea ice salinity"                                     standard_name="sea_ice_salinity"                           unit="g/kg"         />
+         <field id="icesal"       long_name="Sea ice salinity"                                     standard_name="sea_ice_salinity"                           unit="g/kg"         />
          <field id="icefb"        long_name="Sea-ice freeboard"                                    standard_name="sea_ice_freeboard"                          unit="m"            />
 
          <field id="icehcneg"     long_name="Sea-ice heat content per unit area"  standard_name="integral_of_sea_ice_temperature_wrt_depth_expressed_as_heat_content" unit="J/m2" > (-1.0)*icehc </field>
-         <field id="isnhcneg"     long_name="Snow-heat content per unit area"     standard_name="thermal_energy_content_of_surface_snow"                              unit="J/m2" > (-1.0)*isnowhc      </field>
+         <field id="isnhcneg"     long_name="Snow-heat content per unit area"     standard_name="thermal_energy_content_of_surface_snow"                              unit="J/m2" > </field>
 
          <field id="wfxsum"       long_name="Freshwater flux from sea-ice surface"               standard_name="freshwater_flux_from_ice_surface"                   unit="kg/m2/s"      />
@@ -78,9 +78,9 @@
          <field id="dmsssi"       long_name="snow mass change through snow-to-ice conversion"    standard_name="tendency_of_snow_mass_due_to_snow_to_ice_conversion"             unit="kg/m2/s" />
 
-         <field id="hfxturneg"    long_name="Net sensible heat flux under sea ice"               standard_name="ice_ocean_heat_flux"                          unit="W/m2" > (-1.0)*hfxtur </field>
+         <field id="hfxsenso"     long_name="Net sensible heat flux under sea ice"               standard_name="ice_ocean_heat_flux"                          unit="W/m2" />
          <field id="hfxconsu"     long_name="Net conductive heat flux in ice at the surface"     standard_name="conductive_heat_flux_at_sea_ice_surface"      unit="W/m2" /> 
          <field id="hfxconbo"     long_name="Net conductive heat fluxes in ice at the bottom"    standard_name="conductive_heat_flux_at_sea_ice_bottom"       unit="W/m2" />
 
-         <field id="msfx"         long_name="Salt flux from sea ice"                             standard_name="salt_flux_from_ice"                           unit="kg/m2/s" > sfx/86400000. </field>
+         <field id="sfx_mv"       long_name="Salt flux from sea ice"                             standard_name="salt_flux_from_ice"                           unit="kg/m2/s" />
          <field id="wfxtot"       long_name="Freshwater flux from sea ice"                       standard_name="freshwater_flux_from_ice"                     unit="kg/m2/s" /> 
 
@@ -129,4 +129,5 @@
          <field id="uice_ipa"     long_name="X-component of sea ice velocity"                              standard_name="sea_ice_x_velocity"                                 unit="m/s"          /> 
          <field id="vice_ipa"     long_name="Y-component of sea ice velocity"                              standard_name="sea_ice_y_velocity"                                 unit="m/s"          />      
+         <field id="icevel"       long_name="Sea-ice speed"                                                standard_name="sea_ice_speed"                                      unit="m/s"          />
        	 <field id="isst"         long_name="sea surface temperature"                                      standard_name="sea_surface_temperature"                            unit="degC"         />
          <field id="isss"         long_name="sea surface salinity"                                         standard_name="sea_surface_salinity"                               unit="1e-3"         /> 
@@ -144,4 +145,7 @@
          <field id="icevmp"       long_name="melt pond volume"                                             standard_name="sea_ice_meltpond_volume"                            unit="m"            /> 
 
+         <field id="iceconc_cat"  long_name="Sea-ice area fractions in thickness categories"               unit=""   grid_ref="grid_T_3D_ncatice" />
+         <field id="icethic_cat"  long_name="Sea-ice thickness in thickness categories"                    unit="m"  grid_ref="grid_T_3D_ncatice" />
+         <field id="snowthic_cat" long_name="Snow thickness in thickness categories"                       unit="m"  grid_ref="grid_T_3D_ncatice" />
          <field id="iceage_cat"   long_name="Ice age for categories"                                       unit="days"   grid_ref="grid_T_3D_ncatice" />
          <field id="salinity_cat" long_name="Sea-Ice Bulk salinity for categories"                         unit="g/kg"   grid_ref="grid_T_3D_ncatice" />
@@ -153,9 +157,9 @@
 
          <field id="micet"        long_name="Mean ice temperature"                                         unit="degC"     />
+         <field id="miceage"      long_name="Age of sea ice"                                               unit="s"        />
+         <field id="micesalt"     long_name="Sea ice salinity"                                             unit="g/kg"     />
          <field id="icehc"        long_name="ice total heat content"                                       unit="J/m2"     /> 
          <field id="isnowhc"      long_name="snow total heat content"                                      unit="J/m2"     />
          <field id="icest"        long_name="ice surface temperature"                                      unit="degC"     />
-         <field id="icesnt"       long_name="Temperature at snow-ice interface"                            unit="degC"     />
-         <field id="icebot"       long_name="Temperature at ice-ocean interface"                           unit="degC"     />
          <field id="ibrinv"       long_name="brine volume"                                                 unit="%"        />
          <field id="icecolf"      long_name="frazil ice collection thickness"                              unit="m"        />
@@ -319,14 +323,13 @@
       </field_group>
 
-      <!-- SIMIP daily fields -->
-      <field_group id="SIday_fields">
-          <field field_ref="iceconc_pct"      name="siconc"       />
-          <field field_ref="snowthic"         name="sisnthick"    />
-          <field field_ref="icevel"           name="sispeed" />
-          <field field_ref="icestK"           name="sitemptop"    />
-          <field field_ref="icethic"          name="sithick"      />
-          <field field_ref="icepres"          name="sitimefrac"   />
-          <field field_ref="uice_ipa"         name="siu"              />
-          <field field_ref="vice_ipa"         name="siv"              />
+      <!-- SIMIP daily fields --> <field_group id="SIday_fields"> 
+          <field field_ref="icepres"          name="sitimefrac"   /> 
+          <field field_ref="iceconc_pct"      name="siconc"       /> 
+          <field field_ref="icethic"          name="sithick"      default_value="-1.0e20" detect_missing_value="true" operation="average" /> 
+          <field field_ref="snothic"          name="sisnthick"    default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="icestK"           name="sitemptop"    default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="uice_mv"          name="siu"          default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="vice_mv"          name="siv"          default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="icevel_mv"        name="sispeed"      default_value="-1.0e20" detect_missing_value="true" operation="average" />
       </field_group>
 
@@ -337,30 +340,28 @@
           <field field_ref="iceconc_pct"      name="siconc"       />
           <field field_ref="icemass"          name="simass"       />
+          <field field_ref="icethic"          name="sithick"      default_value="-1.0e20" detect_missing_value="true" operation="average" />
           <field field_ref="icevolu"          name="sivol"        />
-          <field field_ref="snomass"          name="sisnmass"     />
-          <field field_ref="snowthic"         name="sisnthick"    />
-          <field field_ref="icethic"          name="sithick"      />
-          <field field_ref="icevel"           name="sispeed" />
-
+          <field field_ref="snomass"          name="sisnmass"     default_value="-1.0e20" detect_missing_value="true" operation="average" /> 
+          <field field_ref="snothic"          name="sisnthick"    default_value="-1.0e20" detect_missing_value="true" operation="average" />
+   
           <!-- category-dependent fields -->
-          <field field_ref="iceconc_cat"      name="siitdconc"    />
-          <field field_ref="icethic_cat"      name="siitdthick"   />
-          <field field_ref="snowthic_cat"     name="siitdsnthick" />
+          <field field_ref="iceconc_cat_pct_mv"  name="siitdconc"    default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="icethic_cat_mv"      name="siitdthick"   default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="snowthic_cat_mv"     name="siitdsnthick" default_value="-1.0e20" detect_missing_value="true" operation="average"/>
 
           <!-- additional state variables-->
-          <field field_ref="icestK"           name="sitemptop"    />
-          <field field_ref="icesntK"          name="sitempsnic"   />
-          <field field_ref="icebotK"          name="sitempbot"    />
-          <field field_ref="miceage"          name="siage"        />
-          <field field_ref="alb_ice"          name="sialb"        />
+          <field field_ref="icestK"           name="sitemptop"    default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="icesntK"          name="sitempsnic"   default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="icebotK"          name="sitempbot"    default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="iceage"           name="siage"        default_value="-1.0e20" detect_missing_value="true" operation="average" />
           <field field_ref="icesmass"         name="sisaltmass"   />
-          <field field_ref="micesalt"         name="sisali"       />
-          <field field_ref="icefb"            name="sifb"         />
+          <field field_ref="icesal"           name="sisali"       default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="icefb"            name="sifb"         default_value="-1.0e20" detect_missing_value="true" operation="average" />
           <field field_ref="icehcneg"         name="sihc"         />
-          <field field_ref="isnhcneg"         name="sisnhc"       />
+          <field field_ref="isnhcneg"         name="sisnhc"       default_value="-1.0e20" detect_missing_value="true" operation="average" />
 
           <!-- freshwater fluxes -->
           <field field_ref="wfxtot"           name="siflfwbot"    />
-          <field field_ref="wfxsum"           name="siflfwdrain"  />
+          <field field_ref="wfxsum"           name="siflfwdrain"  default_value="-1.0e20" detect_missing_value="true" operation="average" />
 
           <!-- area balance -->
@@ -384,31 +385,32 @@
 
           <!-- heat balance -->
-          <field field_ref="hfxturneg"        name="siflsensupbot"    />
-          <field field_ref="hfxconsu"         name="siflcondtop"      />
-          <field field_ref="hfxconbo"         name="siflcondbot"      />
+          <field field_ref="hfxsenso"         name="siflsensupbot"    default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="hfxconsu"         name="siflcondtop"      default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="hfxconbo"         name="siflcondbot"      default_value="-1.0e20" detect_missing_value="true" operation="average" />
 
           <!-- salt balance -->
-          <field field_ref="msfx"             name="siflsaltbot"      />
+          <field field_ref="sfx_mv"           name="siflsaltbot"      default_value="-1.0e20" detect_missing_value="true" operation="average" />
 
           <!-- sea-ice dynamics -->
-          <field field_ref="uice_ipa"         name="siu"              />
-          <field field_ref="vice_ipa"         name="siv"              />
-
-          <field field_ref="utau_ice"         name="sistrxdtop"       />
-          <field field_ref="vtau_ice"         name="sistrydtop"       />
-
-          <field field_ref="utau_oi"          name="sistrxubot"       />
-          <field field_ref="vtau_oi"          name="sistryubot"       />
-
-          <field field_ref="icestr"           name="sicompstren"      />
-
-          <field field_ref="dssh_dx"          name="siforcetiltx"     />
-          <field field_ref="dssh_dy"          name="siforcetilty"     />
-
-          <field field_ref="corstrx"          name="siforcecoriolx"   />
-          <field field_ref="corstry"          name="siforcecorioly"   />
-
-          <field field_ref="intstrx"          name="siforceintstrx"   />
-          <field field_ref="intstry"          name="siforceintstry"   />
+          <field field_ref="uice_mv"          name="siu"              default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="vice_mv"          name="siv"              default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="icevel_mv"        name="sispeed"          default_value="-1.0e20" detect_missing_value="true" operation="average" />
+
+          <field field_ref="utau_ice"         name="sistrxdtop"       default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="vtau_ice"         name="sistrydtop"       default_value="-1.0e20" detect_missing_value="true" operation="average" />
+
+          <field field_ref="utau_oi"          name="sistrxubot"       default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="vtau_oi"          name="sistryubot"       default_value="-1.0e20" detect_missing_value="true" operation="average" />
+
+          <field field_ref="icestr"           name="sicompstren"      default_value="-1.0e20" detect_missing_value="true" operation="average" />
+
+          <field field_ref="dssh_dx"          name="siforcetiltx"     default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="dssh_dy"          name="siforcetilty"     default_value="-1.0e20" detect_missing_value="true" operation="average" />
+
+          <field field_ref="corstrx"          name="siforcecoriolx"   default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="corstry"          name="siforcecorioly"   default_value="-1.0e20" detect_missing_value="true" operation="average" />
+
+          <field field_ref="intstrx"          name="siforceintstrx"   default_value="-1.0e20" detect_missing_value="true" operation="average" />
+          <field field_ref="intstry"          name="siforceintstry"   default_value="-1.0e20" detect_missing_value="true" operation="average" />
 
           <field field_ref="xmtrptot"         name="sidmasstranx"     />
@@ -431,4 +433,3 @@
       </field_group>
 
-     
    </field_definition>
