Index: branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90
===================================================================
--- branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90	(revision 7535)
+++ branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90	(revision 7536)
@@ -233,52 +233,52 @@
       zrho1 = ( rau0 - rhoic ) / rau0; zrho2 = rhosn / rau0
 
-      CALL iom_put( "icethic"     , htm_i * zswi               )          ! ice thickness                  (SIMIP 2016)
-      CALL iom_put( "icepres"     , zswi                       )          ! ice presence (1 or 0)          (SIMIP 2016)
-      CALL iom_put( "snowthic"    , htm_s * zswi               )          ! snow thickness                 (SIMIP 2016)
-      CALL iom_put( "icemass"     , rhoic * vt_i(:,:) * zswi   )          ! ice mass per cell area         (SIMIP 2016)
-      CALL iom_put( "snomass"     , rhosn * vt_s(:,:) * zswi   )          ! snow mass per cell area        (SIMIP 2016)
-      CALL iom_put( "icesnt"      , ( tm_si - rt0 ) * zswi     )          ! snow-ice interface temperature (SIMIP 2016)
-      CALL iom_put( "icebot"      , ( t_bo  - rt0 ) * zswi     )          ! ice bottom temperature         (SIMIP 2016)
-      CALL iom_put( "icesmass"    , smt_i * vt_i * rhoic / 1000. * zswi ) ! mass of salt in sea ice per cell area (SIMIP 2016)
-      CALL iom_put( "icefb"       , ( zrho1 * htm_i(:,:) - zrho2 * htm_s(:,:) ) * zswi ) ! mass of salt in sea ice per cell area (SIMIP 2016)
-
-      CALL iom_put( "wfxsum"      ,   wfx_sum                  )          ! Freshwater flux from sea-ice surface
-      CALL iom_put( "dmithd"      , - wfx_bog - wfx_bom - wfx_sum   &     ! Sea-ice mass change from thermodynamics
+      IF  ( iom_use( "icethic"  ) ) CALL iom_put( "icethic"     , htm_i * zswi               )          ! ice thickness 
+      IF  ( iom_use( "icepres"  ) ) CALL iom_put( "icepres"     , zswi                       )          ! ice presence (1 or 0) 
+      IF  ( iom_use( "snowthic" ) ) CALL iom_put( "snowthic"    , htm_s * zswi               )          ! snow thickness       
+      IF  ( iom_use( "icemass"  ) ) CALL iom_put( "icemass"     , rhoic * vt_i(:,:) * zswi   )          ! ice mass per cell area 
+      IF  ( iom_use( "snomass"  ) ) CALL iom_put( "snomass"     , rhosn * vt_s(:,:) * zswi   )          ! snow mass per cell area
+      IF  ( iom_use( "icesnt"   ) ) CALL iom_put( "icesnt"      , ( tm_si - rt0 ) * zswi     )          ! snow-ice interface temperature
+      IF  ( iom_use( "icebot"   ) ) CALL iom_put( "icebot"      , ( t_bo  - rt0 ) * zswi     )          ! ice bottom temperature
+      IF  ( iom_use( "icesmass" ) ) CALL iom_put( "icesmass"    , smt_i * vt_i * rhoic / 1000. * zswi ) ! mass of salt in sea ice per cell area
+      IF  ( iom_use( "icefb"    ) ) CALL iom_put( "icefb"       , ( zrho1 * htm_i(:,:) - zrho2 * htm_s(:,:) ) * zswi ) ! mass of salt in sea ice per cell area
+
+      IF  ( iom_use( "wfxsum"   ) ) CALL iom_put( "wfxsum"      ,   wfx_sum                  )          ! Freshwater flux from sea-ice surface
+      IF  ( iom_use( "dmithd"   ) ) CALL iom_put( "dmithd"      , - wfx_bog - wfx_bom - wfx_sum   &     ! Sea-ice mass change from thermodynamics
               &                     - wfx_sni - wfx_opw - wfx_res )
-      CALL iom_put( "dmidyn"      ,   diag_dmi_dyn             )          ! Sea-ice mass change from dynamics
-      CALL iom_put( "dmiopw"      , - wfx_opw                  )          ! Sea-ice mass change through growth in open water
-      CALL iom_put( "dmibog"      , - wfx_bog                  )          ! Sea-ice mass change through basal growth
-      CALL iom_put( "dmisni"      , - wfx_sni                  )          ! Sea-ice mass change through snow-to-ice conversion
-      CALL iom_put( "dmisum"      , - wfx_sum                  )          ! Sea-ice mass change through surface melting
-      CALL iom_put( "dmibom"      , - wfx_bom                  )          ! Sea-ice mass change through bottom melting
-      CALL iom_put( "dmtsub"      , - wfx_sub                  )          ! Sea-ice mass change through evaporation and sublimation
-      CALL iom_put( "dmsspr"      , - wfx_spr                  )          ! snow mass change through snow fall
-      CALL iom_put( "dmsssi"      ,   wfx_sni*rhosn/rhoic      )          ! snow mass change through snow-to-ice conversion
-
-      CALL iom_put( "dmsmel"      ,   diag_dms_mel             )          ! snow mass change through melt
-      CALL iom_put( "dmsdyn"      ,   diag_dms_dyn             )          ! snow mass change through dynamics
-
-      CALL iom_put( "hfxconbo"    ,   diag_fc_bo               )          ! bottom conduction flux
-      CALL iom_put( "hfxconsu"    ,   diag_fc_su               )          ! surface conduction flux
-
-      CALL iom_put( "wfxtot"      ,   -wfx_ice                 )          ! total freshwater flux from sea ice
-
-      CALL iom_put( "dmtxdyn"     ,   diag_dmtx_dyn            )          ! X-component of sea-ice mass transport
-      CALL iom_put( "dmtydyn"     ,   diag_dmty_dyn            )          ! Y-component of sea-ice mass transport
-
-      CALL iom_put( "utau_oce"    ,   diag_utau_oi*zswi        )          ! X-component of ocean stress on sea ice
-      CALL iom_put( "vtau_oce"    ,   diag_vtau_oi*zswi        )          ! Y-component of ocean stress on sea ice
-
-      CALL iom_put( "dssh_dx"     ,   diag_dssh_dx*zswi        )          ! Sea-surface tilt term in force balance (x-component)
-      CALL iom_put( "dssh_dy"     ,   diag_dssh_dy*zswi        )          ! Sea-surface tilt term in force balance (y-component)
-
-      CALL iom_put( "corstrx"     ,   diag_corstrx*zswi        )          ! Coriolis force term in force balance (x-component)
-      CALL iom_put( "corstry"     ,   diag_corstry*zswi        )          ! Coriolis force term in force balance (y-component)
-
-      CALL iom_put( "intstrx"     ,   diag_intstrx*zswi        )          ! Internal force term in force balance (x-component)
-      CALL iom_put( "intstry"     ,   diag_intstry*zswi        )          ! Internal force term in force balance (y-component)
-
-      CALL iom_put( "normstr"     ,   diag_sig1   *zswi        )          ! Normal stress
-      CALL iom_put( "sheastr"     ,   diag_sig2   *zswi        )          ! Shear stress
+      IF  ( iom_use( "dmidyn"   ) ) CALL iom_put( "dmidyn"      ,   diag_dmi_dyn             )          ! Sea-ice mass change from dynamics
+      IF  ( iom_use( "dmiopw"   ) ) CALL iom_put( "dmiopw"      , - wfx_opw                  )          ! Sea-ice mass change through growth in open water
+      IF  ( iom_use( "dmibog"   ) ) CALL iom_put( "dmibog"      , - wfx_bog                  )          ! Sea-ice mass change through basal growth
+      IF  ( iom_use( "dmisni"   ) ) CALL iom_put( "dmisni"      , - wfx_sni                  )          ! Sea-ice mass change through snow-to-ice conversion
+      IF  ( iom_use( "dmisum"   ) ) CALL iom_put( "dmisum"      , - wfx_sum                  )          ! Sea-ice mass change through surface melting
+      IF  ( iom_use( "dmibom"   ) ) CALL iom_put( "dmibom"      , - wfx_bom                  )          ! Sea-ice mass change through bottom melting
+      IF  ( iom_use( "dmtsub"   ) ) CALL iom_put( "dmtsub"      , - wfx_sub                  )          ! Sea-ice mass change through evaporation and sublimation
+      IF  ( iom_use( "dmsspr"   ) ) CALL iom_put( "dmsspr"      , - wfx_spr                  )          ! snow mass change through snow fall
+      IF  ( iom_use( "dmsssi"   ) ) CALL iom_put( "dmsssi"      ,   wfx_sni*rhosn/rhoic      )          ! snow mass change through snow-to-ice conversion
+
+      IF  ( iom_use( "dmsmel"   ) ) CALL iom_put( "dmsmel"      ,   diag_dms_mel             )          ! snow mass change through melt
+      IF  ( iom_use( "dmsdyn"   ) ) CALL iom_put( "dmsdyn"      ,   diag_dms_dyn             )          ! snow mass change through dynamics
+
+      IF  ( iom_use( "hfxconbo" ) ) CALL iom_put( "hfxconbo"    ,   diag_fc_bo               )          ! bottom conduction flux
+      IF  ( iom_use( "hfxconsu" ) ) CALL iom_put( "hfxconsu"    ,   diag_fc_su               )          ! surface conduction flux
+
+      IF  ( iom_use( "wfxtot"   ) ) CALL iom_put( "wfxtot"      ,   -wfx_ice                 )          ! total freshwater flux from sea ice
+
+      IF  ( iom_use( "dmtxdyn"  ) ) CALL iom_put( "dmtxdyn"     ,   diag_dmtx_dyn            )          ! X-component of sea-ice mass transport
+      IF  ( iom_use( "dmtydyn"  ) ) CALL iom_put( "dmtydyn"     ,   diag_dmty_dyn            )          ! Y-component of sea-ice mass transport
+
+      IF  ( iom_use( "utau_oce" ) ) CALL iom_put( "utau_oce"    ,   diag_utau_oi*zswi        )          ! X-component of ocean stress on sea ice
+      IF  ( iom_use( "vtau_oce" ) ) CALL iom_put( "vtau_oce"    ,   diag_vtau_oi*zswi        )          ! Y-component of ocean stress on sea ice
+
+      IF  ( iom_use( "dssh_dx"  ) ) CALL iom_put( "dssh_dx"     ,   diag_dssh_dx*zswi        )          ! Sea-surface tilt term in force balance (x-component)
+      IF  ( iom_use( "dssh_dy"  ) ) CALL iom_put( "dssh_dy"     ,   diag_dssh_dy*zswi        )          ! Sea-surface tilt term in force balance (y-component)
+
+      IF  ( iom_use( "corstrx"  ) ) CALL iom_put( "corstrx"     ,   diag_corstrx*zswi        )          ! Coriolis force term in force balance (x-component)
+      IF  ( iom_use( "corstry"  ) ) CALL iom_put( "corstry"     ,   diag_corstry*zswi        )          ! Coriolis force term in force balance (y-component)
+
+      IF  ( iom_use( "intstrx"  ) ) CALL iom_put( "intstrx"     ,   diag_intstrx*zswi        )          ! Internal force term in force balance (x-component)
+      IF  ( iom_use( "intstry"  ) ) CALL iom_put( "intstry"     ,   diag_intstry*zswi        )          ! Internal force term in force balance (y-component)
+
+      IF  ( iom_use( "normstr"  ) ) CALL iom_put( "normstr"     ,   diag_sig1   *zswi        )          ! Normal stress
+      IF  ( iom_use( "sheastr"  ) ) CALL iom_put( "sheastr"     ,   diag_sig2   *zswi        )          ! Shear stress
 
       !--------------------------------
