Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90	(revision 4967)
@@ -36,5 +36,4 @@
    USE wrk_nemo         ! work arrays
    USE in_out_manager   ! I/O manager
-   USE diaar5, ONLY :   lk_diaar5
    USE iom              ! I/O library
    USE prtctl           ! Print control
@@ -242,13 +241,11 @@
       ENDIF
 
-      CALL iom_put( 'hflx_ice_cea', - fdtcn(:,:) )      
-      CALL iom_put( 'qns_io_cea', qns(:,:) - zqnsoce(:,:) * pfrld(:,:) )      
-      CALL iom_put( 'qsr_io_cea', fstric(:,:) * (1.e0 - pfrld(:,:)) )
-
-      IF( lk_diaar5 ) THEN       ! AR5 diagnostics
-         CALL iom_put( 'isnwmlt_cea'  ,                 rdm_snw(:,:) * r1_rdtice )
-         CALL iom_put( 'fsal_virt_cea',   soce_0(:,:) * rdm_ice(:,:) * r1_rdtice )
-         CALL iom_put( 'fsal_real_cea', - sice_0(:,:) * rdm_ice(:,:) * r1_rdtice )
-      ENDIF
+      IF( iom_use('hflx_ice_cea' ) )   CALL iom_put( 'hflx_ice_cea', - fdtcn(:,:) )      
+      IF( iom_use('qns_io_cea'   ) )   CALL iom_put( 'qns_io_cea', qns(:,:) - zqnsoce(:,:) * pfrld(:,:) )      
+      IF( iom_use('qsr_io_cea'   ) )   CALL iom_put( 'qsr_io_cea', fstric(:,:) * (1.e0 - pfrld(:,:)) )
+
+      IF( iom_use('isnwmlt_cea'  ) )   CALL iom_put( 'isnwmlt_cea'  ,                 rdm_snw(:,:) * r1_rdtice )
+      IF( iom_use('fsal_virt_cea') )   CALL iom_put( 'fsal_virt_cea',   soce_0(:,:) * rdm_ice(:,:) * r1_rdtice )
+      IF( iom_use('fsal_real_cea') )   CALL iom_put( 'fsal_real_cea', - sice_0(:,:) * rdm_ice(:,:) * r1_rdtice )
 
       !-----------------------------------------------!
@@ -264,5 +261,5 @@
          CALL albedo_ice( tn_ice, ht_i, ht_s, zalbp, zalb )
          alb_ice(:,:,1) =  0.5 * ( zalbp(:,:,1) + zalb (:,:,1) )   ! Ice albedo (mean clear and overcast skys)
-         CALL iom_put( "icealb_cea", alb_ice(:,:,1) * fr_i(:,:) )  ! ice albedo
+         IF( iom_use('icealb_cea' ) )   CALL iom_put( 'icealb_cea', alb_ice(:,:,1) * fr_i(:,:) )  ! ice albedo
       ENDIF
 
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90	(revision 4967)
@@ -33,5 +33,4 @@
    USE limtab_2
    USE prtctl           ! Print control
-   USE diaar5    , ONLY :   lk_diaar5
    USE lib_fortran      ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)  
    
@@ -439,43 +438,55 @@
       !--------------------------------------------------------------------------------
       ztmp(:,:) = 1. - pfrld(:,:)                                ! fraction of ice after the dynamic, before the thermodynamic
-      CALL iom_put( 'ist_cea', (sist(:,:) - rt0) * ztmp(:,:) )   ! Ice surface temperature                [Celius]
-      CALL iom_put( 'qsr_ai_cea', qsr_ice(:,:,1) * ztmp(:,:) )   ! Solar flux over the ice                [W/m2]
-      CALL iom_put( 'qns_ai_cea', qns_ice(:,:,1) * ztmp(:,:) )   ! Non-solar flux over the ice            [W/m2]
-      IF( .NOT. lk_cpl )   CALL iom_put( 'qla_ai_cea', qla_ice(:,:,1) * ztmp(:,:) )     ! Latent flux over the ice  [W/m2]
+      IF( iom_use('ist_cea'    ) )   CALL iom_put( 'ist_cea', (sist(:,:) - rt0) * ztmp(:,:) )   ! Ice surface temperature   [Celius]
+      IF( iom_use('qsr_ai_cea' ) )   CALL iom_put( 'qsr_ai_cea', qsr_ice(:,:,1) * ztmp(:,:) )   ! Solar flux over the ice     [W/m2]
+      IF( iom_use('qns_ai_cea' ) )   CALL iom_put( 'qns_ai_cea', qns_ice(:,:,1) * ztmp(:,:) )   ! Non-solar flux over the ice [W/m2]
+      IF( iom_use('qla_ai_cea' ) .AND. .NOT. lk_cpl ) &
+         &                           CALL iom_put( 'qla_ai_cea', qla_ice(:,:,1) * ztmp(:,:) )   ! Latent flux over the ice [W/m2]
       !
-      CALL iom_put( 'snowthic_cea', hsnif  (:,:) * fr_i(:,:) )   ! Snow thickness             [m]
-      CALL iom_put( 'icethic_cea' , hicif  (:,:) * fr_i(:,:) )   ! Ice thickness              [m]
+      IF( iom_use('snowthic_cea'))   CALL iom_put( 'snowthic_cea', hsnif  (:,:) * fr_i(:,:) )   ! Snow thickness           [m]
+      IF( iom_use('icethic_cea' ))   CALL iom_put( 'icethic_cea' , hicif  (:,:) * fr_i(:,:) )   ! Ice thickness            [m]
       zztmp = 1.0 / rdt_ice
-      CALL iom_put( 'iceprod_cea' , hicifp (:,:) * zztmp     )   ! Ice produced               [m/s]
-      CALL iom_put( 'iiceconc'    , fr_i(:,:)                )   ! Ice concentration          [-]
-      IF( lk_diaar5 ) THEN
-         CALL iom_put( 'snowmel_cea' , rdm_snw(:,:) * zztmp     )   ! Snow melt                  [kg/m2/s]
-         zztmp = rhoic / rdt_ice
-         CALL iom_put( 'sntoice_cea' , zdvonif(:,:) * zztmp     )   ! Snow to Ice transformation [kg/m2/s]
-         CALL iom_put( 'ticemel_cea' , zdvosif(:,:) * zztmp     )   ! Melt at Sea Ice top        [kg/m2/s]
-         CALL iom_put( 'bicemel_cea' , zdvomif(:,:) * zztmp     )   ! Melt at Sea Ice bottom     [kg/m2/s]
+      IF( iom_use('iceprod_cea') )   CALL iom_put( 'iceprod_cea' , hicifp (:,:) * zztmp     )   ! Ice produced             [m/s]
+      IF( iom_use('iiceconc'   ) )   CALL iom_put( 'iiceconc'    , fr_i(:,:)                )   ! Ice concentration        [-]
+      IF( iom_use('snowmel_cea') )   CALL iom_put( 'snowmel_cea' , rdm_snw(:,:) * zztmp     )   ! Snow melt                [kg/m2/s]
+      zztmp = rhoic / rdt_ice
+      IF( iom_use('sntoice_cea') )   CALL iom_put( 'sntoice_cea' , zdvonif(:,:) * zztmp     ) ! Snow to Ice transformation [kg/m2/s]
+      IF( iom_use('ticemel_cea') )   CALL iom_put( 'ticemel_cea' , zdvosif(:,:) * zztmp     )   ! Melt at Sea Ice top      [kg/m2/s]
+      IF( iom_use('bicemel_cea') )   CALL iom_put( 'bicemel_cea' , zdvomif(:,:) * zztmp     )   ! Melt at Sea Ice bottom   [kg/m2/s]
+      IF( iom_use('licepro_cea') ) THEN
          zlicegr(:,:) = MAX( 0.e0, rdm_ice(:,:)-zlicegr(:,:) )
-         CALL iom_put( 'licepro_cea' , zlicegr(:,:) * zztmp     )   ! Lateral sea ice growth     [kg/m2/s]
+                                     CALL iom_put( 'licepro_cea' , zlicegr(:,:) * zztmp     )   ! Lateral sea ice growth   [kg/m2/s]
       ENDIF
       !
       ! Compute the Eastward & Northward sea-ice transport
-      zztmp = 0.25 * rhoic
-      DO jj = 1, jpjm1 
-         DO ji = 1, jpim1   ! NO vector opt.
-            ! Ice velocities, volume & transport at U & V-points
-            zuice_m = u_ice(ji+1,jj+1) + u_ice(ji+1,jj )
-            zvice_m = v_ice(ji+1,jj+1) + v_ice(ji ,jj+1)
-            zhice_u = hicif(ji,jj)*e2t(ji,jj)*fr_i(ji,jj) + hicif(ji+1,jj  )*e2t(ji+1,jj  )*fr_i(ji+1,jj  )
-            zhice_v = hicif(ji,jj)*e1t(ji,jj)*fr_i(ji,jj) + hicif(ji  ,jj+1)*e1t(ji  ,jj+1)*fr_i(ji  ,jj+1)
-            zu_imasstr(ji,jj) = zztmp * zhice_u * zuice_m 
-            zv_imasstr(ji,jj) = zztmp * zhice_v * zvice_m 
-         END DO
-      END DO
-      CALL lbc_lnk( zu_imasstr, 'U', -1. )   ;   CALL lbc_lnk( zv_imasstr, 'V', -1. )
-      CALL iom_put( 'u_imasstr',  zu_imasstr(:,:) )   ! Ice transport along i-axis at U-point [kg/s] 
-      CALL iom_put( 'v_imasstr',  zv_imasstr(:,:) )   ! Ice transport along j-axis at V-point [kg/s] 
+      IF( iom_use('u_imasstr') ) THEN
+         zztmp = 0.25 * rhoic
+         DO jj = 1, jpjm1 
+            DO ji = 1, jpim1   ! NO vector opt.
+               ! Ice velocities, volume & transport at U-points
+               zuice_m = u_ice(ji+1,jj+1) + u_ice(ji+1,jj )
+               zhice_u = hicif(ji,jj)*e2t(ji,jj)*fr_i(ji,jj) + hicif(ji+1,jj  )*e2t(ji+1,jj  )*fr_i(ji+1,jj  )
+               zu_imasstr(ji,jj) = zztmp * zhice_u * zuice_m 
+            END DO
+         END DO
+         CALL lbc_lnk( zu_imasstr, 'U', -1. )
+         CALL iom_put( 'u_imasstr',  zu_imasstr(:,:) )   ! Ice transport along i-axis at U-point [kg/s] 
+      ENDIF
+      IF( iom_use('v_imasstr') ) THEN
+         zztmp = 0.25 * rhoic
+         DO jj = 1, jpjm1 
+            DO ji = 1, jpim1   ! NO vector opt.
+               ! Ice velocities, volume & transport at V-points
+               zvice_m = v_ice(ji+1,jj+1) + v_ice(ji ,jj+1)
+               zhice_v = hicif(ji,jj)*e1t(ji,jj)*fr_i(ji,jj) + hicif(ji  ,jj+1)*e1t(ji  ,jj+1)*fr_i(ji  ,jj+1)
+               zv_imasstr(ji,jj) = zztmp * zhice_v * zvice_m 
+            END DO
+         END DO
+         CALL lbc_lnk( zv_imasstr, 'V', -1. )
+         CALL iom_put( 'v_imasstr',  zv_imasstr(:,:) )   ! Ice transport along j-axis at V-point [kg/s]
+      ENDIF
 
       !! Fram Strait sea-ice transport (sea-ice + snow)  (in ORCA2 = 5 points)
-      IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN    ! ORCA R2 configuration
+      IF( iom_use('fram_trans') .and. cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN    ! ORCA R2 configuration
          DO jj = mj0(137), mj1(137) ! B grid
             IF( mj0(jj-1) >= nldj ) THEN
@@ -491,17 +502,19 @@
       ENDIF
 
+      IF( iom_use('ice_pres') .OR. iom_use('ist_ipa') .OR. iom_use('uice_ipa') .OR. iom_use('vice_ipa') ) THEN
 !! ce     ztmp(:,:) = 1. - AINT( frld(:,:), wp )                        ! return 1 as soon as there is ice
 !! ce     A big warning because the model crashes on IDRIS/IBM SP6 with xlf 13.1.0.3, see ticket #761
-!! ce     We Unroll the loop and everything works fine 
-      DO jj = 1, jpj
-         DO ji = 1, jpi
-            ztmp(ji,jj) = 1. - AINT( frld(ji,jj), wp )                ! return 1 as soon as there is ice
-         END DO
-      END DO
-      !
-      CALL iom_put( 'ice_pres'  , ztmp                            )   ! Ice presence                          [-]
-      CALL iom_put( 'ist_ipa'   , ( sist(:,:) - rt0 ) * ztmp(:,:) )   ! Ice surface temperature               [Celius]
-      CALL iom_put( 'uice_ipa'  ,  u_ice(:,:)         * ztmp(:,:) )   ! Ice velocity along i-axis at I-point  [m/s] 
-      CALL iom_put( 'vice_ipa'  ,  v_ice(:,:)         * ztmp(:,:) )   ! Ice velocity along j-axis at I-point  [m/s]
+!! ce     We Unroll the loop and everything works fine      
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               ztmp(ji,jj) = 1. - AINT( frld(ji,jj), wp )                ! return 1 as soon as there is ice
+            END DO
+         END DO
+         !
+         IF( iom_use('ice_pres') ) CALL iom_put( 'ice_pres', ztmp                            )   ! Ice presence                 [-]
+         IF( iom_use('ist_ipa' ) ) CALL iom_put( 'ist_ipa' , ( sist(:,:) - rt0 ) * ztmp(:,:) )   ! Ice surface temperature [Celius]
+         IF( iom_use('uice_ipa') ) CALL iom_put( 'uice_ipa', u_ice(:,:) * ztmp(:,:) ) ! Ice velocity along i-axis at I-point  [m/s] 
+         IF( iom_use('vice_ipa') ) CALL iom_put( 'vice_ipa', v_ice(:,:) * ztmp(:,:) ) ! Ice velocity along j-axis at I-point  [m/s]
+      ENDIF
 
       IF(ln_ctl) THEN
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/LIM_SRC_3/limdiahsb.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/LIM_SRC_3/limdiahsb.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/LIM_SRC_3/limdiahsb.F90	(revision 4967)
@@ -35,6 +35,6 @@
    !!PUBLIC   lim_diahsb_rst   ! routine called by ice_init.F90
 
-   REAL(dp) ::   frc_sal, frc_vol   ! global forcing trends
-   REAL(dp) ::   bg_grme            ! global ice growth+melt trends
+   real(wp) ::   frc_sal, frc_vol   ! global forcing trends
+   real(wp) ::   bg_grme            ! global ice growth+melt trends
    REAL(wp) ::   epsi06 = 1.e-6_wp  ! small number
 
@@ -58,15 +58,16 @@
       !!---------------------------------------------------------------------------
       !!
-      REAL(dp)   ::   zbg_ivo, zbg_svo, zbg_are, zbg_sal ,zbg_tem ,zbg_ihc ,zbg_shc
-      REAL(dp)   ::   zbg_sfx, zbg_sfx_bri, zbg_sfx_bog, zbg_sfx_bom, zbg_sfx_sum, zbg_sfx_sni,   &
+      real(wp)   ::   zbg_ivo, zbg_svo, zbg_are, zbg_sal ,zbg_tem ,zbg_ihc ,zbg_shc
+      real(wp)   ::   zbg_sfx, zbg_sfx_bri, zbg_sfx_bog, zbg_sfx_bom, zbg_sfx_sum, zbg_sfx_sni,   &
       &               zbg_sfx_opw, zbg_sfx_res, zbg_sfx_dyn 
-      REAL(dp)   ::   zbg_vfx, zbg_vfx_bog, zbg_vfx_opw, zbg_vfx_sni, zbg_vfx_dyn
-      REAL(dp)   ::   zbg_vfx_bom, zbg_vfx_sum, zbg_vfx_res, zbg_vfx_spr, zbg_vfx_snw, zbg_vfx_sub  
-      REAL(dp)   ::   zbg_hfx_dhc, zbg_hfx_spr
-      REAL(dp)   ::   zbg_hfx_res, zbg_hfx_sub, zbg_hfx_dyn, zbg_hfx_thd, zbg_hfx_snw, zbg_hfx_out, zbg_hfx_in   
-      REAL(dp)   ::   zbg_hfx_sum, zbg_hfx_bom, zbg_hfx_bog, zbg_hfx_dif, zbg_hfx_opw
-      REAL(dp)   ::   z_frc_vol, z_frc_sal, z_bg_grme 
-      REAL(dp)   ::   z1_area                     !    -     -
-      REAL(dp)   ::   zinda, zindb
+      real(wp)   ::   zbg_vfx, zbg_vfx_bog, zbg_vfx_opw, zbg_vfx_sni, zbg_vfx_dyn
+      real(wp)   ::   zbg_vfx_bom, zbg_vfx_sum, zbg_vfx_res, zbg_vfx_spr, zbg_vfx_snw, zbg_vfx_sub  
+      real(wp)   ::   zbg_hfx_dhc, zbg_hfx_spr
+      real(wp)   ::   zbg_hfx_res, zbg_hfx_sub, zbg_hfx_dyn, zbg_hfx_thd, zbg_hfx_snw, zbg_hfx_out, zbg_hfx_in   
+      real(wp)   ::   zbg_hfx_sum, zbg_hfx_bom, zbg_hfx_bog, zbg_hfx_dif, zbg_hfx_opw
+      real(wp)   ::   z_frc_vol, z_frc_sal, z_bg_grme 
+      real(wp)   ::   z1_area                     !    -     -
+      real(wp)   ::   zinda, zindb
+      REAL(wp)   ::   ztmp
       !!---------------------------------------------------------------------------
       IF( nn_timing == 1 )   CALL timing_start('lim_diahsb')
@@ -91,27 +92,28 @@
 
       ! Volume
-      zbg_vfx     = zinda * glob_sum(      emp(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_vfx_bog = zinda * glob_sum( wfx_bog(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_vfx_opw = zinda * glob_sum( wfx_opw(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_vfx_sni = zinda * glob_sum( wfx_sni(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_vfx_dyn = zinda * glob_sum( wfx_dyn(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_vfx_bom = zinda * glob_sum( wfx_bom(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_vfx_sum = zinda * glob_sum( wfx_sum(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_vfx_res = zinda * glob_sum( wfx_res(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_vfx_spr = zinda * glob_sum( wfx_spr(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_vfx_snw = zinda * glob_sum( wfx_snw(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_vfx_sub = zinda * glob_sum( wfx_sub(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
+      ztmp = zinda * z1_area * r1_rau0 * rday
+      zbg_vfx     = ztmp * glob_sum(     emp(:,:) * area(:,:) * tms(:,:) )
+      zbg_vfx_bog = ztmp * glob_sum( wfx_bog(:,:) * area(:,:) * tms(:,:) )
+      zbg_vfx_opw = ztmp * glob_sum( wfx_opw(:,:) * area(:,:) * tms(:,:) )
+      zbg_vfx_sni = ztmp * glob_sum( wfx_sni(:,:) * area(:,:) * tms(:,:) )
+      zbg_vfx_dyn = ztmp * glob_sum( wfx_dyn(:,:) * area(:,:) * tms(:,:) )
+      zbg_vfx_bom = ztmp * glob_sum( wfx_bom(:,:) * area(:,:) * tms(:,:) )
+      zbg_vfx_sum = ztmp * glob_sum( wfx_sum(:,:) * area(:,:) * tms(:,:) )
+      zbg_vfx_res = ztmp * glob_sum( wfx_res(:,:) * area(:,:) * tms(:,:) )
+      zbg_vfx_spr = ztmp * glob_sum( wfx_spr(:,:) * area(:,:) * tms(:,:) )
+      zbg_vfx_snw = ztmp * glob_sum( wfx_snw(:,:) * area(:,:) * tms(:,:) )
+      zbg_vfx_sub = ztmp * glob_sum( wfx_sub(:,:) * area(:,:) * tms(:,:) )
 
       ! Salt
-      zbg_sfx     = zinda * glob_sum(     sfx(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_sfx_bri = zinda * glob_sum( sfx_bri(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_sfx_res = zinda * glob_sum( sfx_res(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_sfx_dyn = zinda * glob_sum( sfx_dyn(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-
-      zbg_sfx_bog = zinda * glob_sum( sfx_bog(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_sfx_opw = zinda * glob_sum( sfx_opw(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_sfx_sni = zinda * glob_sum( sfx_sni(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_sfx_bom = zinda * glob_sum( sfx_bom(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
-      zbg_sfx_sum = zinda * glob_sum( sfx_sum(:,:) * area(:,:) * tms(:,:) ) * z1_area * r1_rau0 * rday
+      zbg_sfx     = ztmp * glob_sum(     sfx(:,:) * area(:,:) * tms(:,:) )
+      zbg_sfx_bri = ztmp * glob_sum( sfx_bri(:,:) * area(:,:) * tms(:,:) )
+      zbg_sfx_res = ztmp * glob_sum( sfx_res(:,:) * area(:,:) * tms(:,:) )
+      zbg_sfx_dyn = ztmp * glob_sum( sfx_dyn(:,:) * area(:,:) * tms(:,:) )
+
+      zbg_sfx_bog = ztmp * glob_sum( sfx_bog(:,:) * area(:,:) * tms(:,:) )
+      zbg_sfx_opw = ztmp * glob_sum( sfx_opw(:,:) * area(:,:) * tms(:,:) )
+      zbg_sfx_sni = ztmp * glob_sum( sfx_sni(:,:) * area(:,:) * tms(:,:) )
+      zbg_sfx_bom = ztmp * glob_sum( sfx_bom(:,:) * area(:,:) * tms(:,:) )
+      zbg_sfx_sum = ztmp * glob_sum( sfx_sum(:,:) * area(:,:) * tms(:,:) )
 
       ! Heat budget
@@ -155,11 +157,17 @@
       zindb = MAX( 0._wp , SIGN( 1._wp , zbg_ivo - epsi06 ) )
       !
+      IF( iom_use('ibgvoltot') )   &
       CALL iom_put( 'ibgvoltot' , zbg_ivo * rhoic * r1_rau0 * 1.e-9        )   ! ice volume (km3 equivalent liquid)         
+      IF( iom_use('sbgvoltot') )   &
       CALL iom_put( 'sbgvoltot' , zbg_svo * rhosn * r1_rau0 * 1.e-9        )   ! snw volume (km3 equivalent liquid)       
+      IF( iom_use('ibgarea') )   &
       CALL iom_put( 'ibgarea'   , zbg_are * 1.e-6                          )   ! ice area   (km2)
+      IF( iom_use('ibgsaline') )   &
       CALL iom_put( 'ibgsaline' , zindb * zbg_sal / MAX( zbg_ivo, epsi06 ) )   ! ice saline (psu)
+      IF( iom_use('ibgtemper') )   &
       CALL iom_put( 'ibgtemper' , zindb * zbg_tem / MAX( zbg_ivo, epsi06 ) )   ! ice temper (C)
       CALL iom_put( 'ibgheatco' , zbg_ihc                                  )   ! ice heat content (1.e20 J)        
       CALL iom_put( 'sbgheatco' , zbg_shc                                  )   ! snw heat content (1.e20 J)
+      IF( iom_use('ibgsaltco') )   &
       CALL iom_put( 'ibgsaltco' , zbg_sal * rhoic * r1_rau0 * 1.e-9        )   ! ice salt content (psu*km3 equivalent liquid)        
 
@@ -204,4 +212,5 @@
       CALL iom_put( 'ibgfrcvol' , frc_vol * 1.e-9                          )   ! vol - forcing     (km3 equivalent liquid) 
       CALL iom_put( 'ibgfrcsfx' , frc_sal * 1.e-9                          )   ! sal - forcing     (psu*km3 equivalent liquid)   
+      IF( iom_use('ibgvolgrm') )   &
       CALL iom_put( 'ibgvolgrm' , bg_grme * r1_rau0 * 1.e-9                )   ! vol growth + melt (km3 equivalent liquid)         
 
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90	(revision 4967)
@@ -116,11 +116,11 @@
 
       ! make calls for heat fluxes before it is modified
-      CALL iom_put( "qsr_oce" , qsr(:,:) * pfrld(:,:) )   !     solar flux at ocean surface
-      CALL iom_put( "qns_oce" , qns(:,:) * pfrld(:,:) )   ! non-solar flux at ocean surface
-      CALL iom_put( "qsr_ice" , SUM( qsr_ice(:,:,:) * a_i_b(:,:,:), dim=3 ) )  !     solar flux at ice surface
-      CALL iom_put( "qns_ice" , SUM( qns_ice(:,:,:) * a_i_b(:,:,:), dim=3 ) )  ! non-solar flux at ice surface
-      CALL iom_put( "qtr_ice" , SUM( ftr_ice(:,:,:) * a_i_b(:,:,:), dim=3 ) )  !     solar flux transmitted thru ice
-      CALL iom_put( "qt_oce"  , ( qsr(:,:) + qns(:,:) ) * pfrld(:,:) )  
-      CALL iom_put( "qt_ice"  , SUM( ( qns_ice(:,:,:) + qsr_ice(:,:,:) ) * a_i_b(:,:,:), dim=3 ) )
+      IF( iom_use('qsr_oce') )   CALL iom_put( "qsr_oce" , qsr(:,:) * pfrld(:,:) )   !     solar flux at ocean surface
+      IF( iom_use('qns_oce') )   CALL iom_put( "qns_oce" , qns(:,:) * pfrld(:,:) )   ! non-solar flux at ocean surface
+      IF( iom_use('qsr_ice') )   CALL iom_put( "qsr_ice" , SUM( qsr_ice(:,:,:) * a_i_b(:,:,:), dim=3 ) ) !     solar flux at ice surface
+      IF( iom_use('qns_ice') )   CALL iom_put( "qns_ice" , SUM( qns_ice(:,:,:) * a_i_b(:,:,:), dim=3 ) ) ! non-solar flux at ice surface
+      IF( iom_use('qtr_ice') )   CALL iom_put( "qtr_ice" , SUM( ftr_ice(:,:,:) * a_i_b(:,:,:), dim=3 ) ) !     solar flux transmitted thru ice
+      IF( iom_use('qt_oce' ) )   CALL iom_put( "qt_oce"  , ( qsr(:,:) + qns(:,:) ) * pfrld(:,:) )  
+      IF( iom_use('qt_ice' ) )   CALL iom_put( "qt_ice"  , SUM( ( qns_ice(:,:,:) + qsr_ice(:,:,:) ) * a_i_b(:,:,:), dim=3 ) )
 
       ! pfrld is the lead fraction at the previous time step (actually between TRP and THD)
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90	(revision 4967)
@@ -61,4 +61,5 @@
       INTEGER ::  ji, jj, jk, jl  ! dummy loop indices
       REAL(wp) ::  zinda, zindb, z1_365
+      REAL(wp) ::  ztmp
       REAL(wp), POINTER, DIMENSION(:,:,:) ::   zoi, zei
       REAL(wp), POINTER, DIMENSION(:,:)   :: z2d, z2da, z2db, zind    ! 2D workspace
@@ -199,15 +200,16 @@
       CALL iom_put( "sfx"         , sfx     * rday      )        ! total salt flux
 
-      CALL iom_put( "vfxres"     , wfx_res * rday / rhoic  )        ! daily prod./melting due to limupdate 
-      CALL iom_put( "vfxopw"     , wfx_opw * rday / rhoic  )        ! daily lateral thermodynamic ice production
-      CALL iom_put( "vfxsni"     , wfx_sni * rday / rhoic  )        ! daily snowice ice production
-      CALL iom_put( "vfxbog"     , wfx_bog * rday / rhoic  )       ! daily bottom thermodynamic ice production
-      CALL iom_put( "vfxdyn"     , wfx_dyn * rday / rhoic  )       ! daily dynamic ice production (rid/raft)
-      CALL iom_put( "vfxsum"     , wfx_sum * rday / rhoic  )        ! surface melt 
-      CALL iom_put( "vfxbom"     , wfx_bom * rday / rhoic  )        ! bottom melt 
-      CALL iom_put( "vfxice"     , wfx_ice * rday / rhoic  )        ! total ice growth/melt 
-      CALL iom_put( "vfxsnw"     , wfx_snw * rday / rhoic  )        ! total snw growth/melt 
-      CALL iom_put( "vfxsub"     , wfx_sub * rday / rhoic  )        ! sublimation (snow) 
-      CALL iom_put( "vfxspr"     , wfx_spr * rday / rhoic  )        ! precip (snow) 
+      ztmp = rday / rhoic
+      CALL iom_put( "vfxres"     , wfx_res * ztmp  )             ! daily prod./melting due to limupdate 
+      CALL iom_put( "vfxopw"     , wfx_opw * ztmp  )             ! daily lateral thermodynamic ice production
+      CALL iom_put( "vfxsni"     , wfx_sni * ztmp  )             ! daily snowice ice production
+      CALL iom_put( "vfxbog"     , wfx_bog * ztmp  )             ! daily bottom thermodynamic ice production
+      CALL iom_put( "vfxdyn"     , wfx_dyn * ztmp  )             ! daily dynamic ice production (rid/raft)
+      CALL iom_put( "vfxsum"     , wfx_sum * ztmp  )             ! surface melt 
+      CALL iom_put( "vfxbom"     , wfx_bom * ztmp  )             ! bottom melt 
+      CALL iom_put( "vfxice"     , wfx_ice * ztmp  )             ! total ice growth/melt 
+      CALL iom_put( "vfxsnw"     , wfx_snw * ztmp  )             ! total snw growth/melt 
+      CALL iom_put( "vfxsub"     , wfx_sub * ztmp  )             ! sublimation (snow) 
+      CALL iom_put( "vfxspr"     , wfx_spr * ztmp  )             ! precip (snow) 
 
       CALL iom_put ('hfxthd', hfx_thd(:,:) )   !  
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 4967)
@@ -37,10 +37,10 @@
    LOGICAL, PUBLIC ::   ln_diahsb   !: check the heat and salt budgets
 
-   REAL(dp)                                ::   surf_tot                !
-   REAL(dp)                                ::   frc_t      , frc_s     , frc_v   ! global forcing trends
-   REAL(dp)                                ::   frc_wn_t      , frc_wn_s ! global forcing trends
-   REAL(dp), DIMENSION(:,:)  , ALLOCATABLE ::   surf      , ssh_ini              !
-   REAL(dp), DIMENSION(:,:,:), ALLOCATABLE ::   hc_loc_ini, sc_loc_ini, e3t_ini  !
-   REAL(dp), DIMENSION(:,:)  , ALLOCATABLE ::   ssh_hc_loc_ini, ssh_sc_loc_ini
+   real(wp)                                ::   surf_tot                !
+   real(wp)                                ::   frc_t      , frc_s     , frc_v   ! global forcing trends
+   real(wp)                                ::   frc_wn_t      , frc_wn_s ! global forcing trends
+   real(wp), DIMENSION(:,:)  , ALLOCATABLE ::   surf      , ssh_ini              !
+   real(wp), DIMENSION(:,:,:), ALLOCATABLE ::   hc_loc_ini, sc_loc_ini, e3t_ini  !
+   real(wp), DIMENSION(:,:)  , ALLOCATABLE ::   ssh_hc_loc_ini, ssh_sc_loc_ini
 
    !! * Substitutions
@@ -70,14 +70,14 @@
       !!
       INTEGER    ::   jk, ji, jj                          ! dummy loop indice
-      REAL(dp)   ::   zdiff_hc    , zdiff_sc      ! heat and salt content variations
-      REAL(dp)   ::   zdiff_hc1   , zdiff_sc1     ! -   -   -   -   -   -   -   - 
-      REAL(dp)   ::   zdiff_v1    , zdiff_v2      ! volume variation
-      REAL(dp)   ::   zerr_hc1    , zerr_sc1       ! heat and salt content misfit
-      REAL(dp)   ::   zvol_tot                    ! volume
-      REAL(dp)   ::   z_frc_trd_t , z_frc_trd_s   !    -     -
-      REAL(dp)   ::   z_frc_trd_v                 !    -     -
-      REAL(dp)   ::   z_wn_trd_t , z_wn_trd_s   !    -     -
-      REAL(dp)   ::   z_ssh_hc , z_ssh_sc   !    -     -
-      REAL(dp), DIMENSION(:,:), POINTER       ::   z2d0, z2d1
+      real(wp)   ::   zdiff_hc    , zdiff_sc      ! heat and salt content variations
+      real(wp)   ::   zdiff_hc1   , zdiff_sc1     ! -   -   -   -   -   -   -   - 
+      real(wp)   ::   zdiff_v1    , zdiff_v2      ! volume variation
+      real(wp)   ::   zerr_hc1    , zerr_sc1       ! heat and salt content misfit
+      real(wp)   ::   zvol_tot                    ! volume
+      real(wp)   ::   z_frc_trd_t , z_frc_trd_s   !    -     -
+      real(wp)   ::   z_frc_trd_v                 !    -     -
+      real(wp)   ::   z_wn_trd_t , z_wn_trd_s   !    -     -
+      real(wp)   ::   z_ssh_hc , z_ssh_sc   !    -     -
+      real(wp), DIMENSION(:,:), POINTER       ::   z2d0, z2d1
       !!---------------------------------------------------------------------------
       IF( nn_timing == 1 )   CALL timing_start('dia_hsb')      
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 4967)
@@ -44,5 +44,4 @@
    USE in_out_manager  ! I/O manager
    USE diadimg         ! dimg direct access file format output
-   USE diaar5, ONLY :   lk_diaar5
    USE iom
    USE ioipsl
@@ -129,5 +128,4 @@
       !!
       REAL(wp), POINTER, DIMENSION(:,:)   :: z2d      ! 2D workspace
-      REAL(wp), POINTER, DIMENSION(:,:)   :: z2ds     ! 2D workspace
       REAL(wp), POINTER, DIMENSION(:,:,:) :: z3d      ! 3D workspace
       !!----------------------------------------------------------------------
@@ -135,5 +133,5 @@
       IF( nn_timing == 1 )   CALL timing_start('dia_wri')
       ! 
-      CALL wrk_alloc( jpi , jpj      , z2d , z2ds )
+      CALL wrk_alloc( jpi , jpj      , z2d )
       CALL wrk_alloc( jpi , jpj, jpk , z3d )
       !
@@ -175,18 +173,22 @@
       ELSE
          CALL iom_put( "toce" , tsn(:,:,:,jp_tem)        )   ! temperature
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               z2d(ji,jj) = tsn(ji,jj,mikt(ji,jj),jp_tem)
-            END DO
-         END DO         
-         CALL iom_put( "sst"  , z2d(:,:)            ) ! sea surface temperature
-         CALL iom_put( "sst2" , z2d(:,:) * z2d(:,:) ) ! square of sea surface temperature
+         IF ( iom_use("sst") ) THEN
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  z2d(ji,jj) = tsn(ji,jj,mikt(ji,jj),jp_tem)
+               END DO
+            END DO
+            CALL iom_put( "sst"  , z2d(:,:)            ) ! sea surface temperature
+         ENDIF
+         IF ( iom_use("sst2") )   CALL iom_put( "sst2" , z2d(:,:) * z2d(:,:) ) ! square of sea surface temperature
          CALL iom_put( "soce" , tsn(:,:,:,jp_sal)          )   ! salinity
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               z2d(ji,jj) = tsn(ji,jj,mikt(ji,jj),jp_sal)
-            END DO
-         END DO
-         CALL iom_put( "sss"  , z2d(:,:)            ) ! sea surface salinity
+         IF ( iom_use("sss") ) THEN
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  z2d(ji,jj) = tsn(ji,jj,mikt(ji,jj),jp_sal)
+               END DO
+            END DO
+            CALL iom_put( "sss"  , z2d(:,:)            ) ! sea surface salinity
+         ENDIF
          CALL iom_put( "sss2" , z2d(:,:) * z2d(:,:) ) ! square of sea surface salinity
       END IF
@@ -197,17 +199,21 @@
          CALL iom_put( "uoce" , umask(:,:,:) * un(:,:,:)                  )    ! i-current
          CALL iom_put( "voce" , vmask(:,:,:) * vn(:,:,:)                  )    ! j-current
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               z2d(ji,jj) = un(ji,jj,miku(ji,jj))
-            END DO
-         END DO
-         CALL iom_put( "ssu"   , z2d                                    )    ! i-current
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               z2d(ji,jj) = vn(ji,jj,mikv(ji,jj))
-            END DO
-         END DO
-         CALL iom_put( "ssv"   , z2d                                    )    ! j-current
-      END IF
+         IF ( iom_use("ssu") ) THEN
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  z2d(ji,jj) = un(ji,jj,miku(ji,jj))
+               END DO
+            END DO
+            CALL iom_put( "ssu"   , z2d                                    )    ! i-current
+         ENDIF
+         IF ( iom_use("ssv") ) THEN
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  z2d(ji,jj) = vn(ji,jj,mikv(ji,jj))
+               END DO
+            END DO
+            CALL iom_put( "ssv"   , z2d                                    )    ! j-current
+         ENDIF
+      ENDIF
       CALL iom_put(    "avt"  , avt                        )    ! T vert. eddy diff. coef.
       CALL iom_put(    "avm"  , avmu                       )    ! T vert. eddy visc. coef.
@@ -216,58 +222,72 @@
       ENDIF
 
-      DO jj = 2, jpjm1                                    ! sst gradient
-         DO ji = fs_2, fs_jpim1   ! vector opt.
-            zztmp      = tsn(ji,jj,1,jp_tem)
-            zztmpx     = ( tsn(ji+1,jj  ,1,jp_tem) - zztmp ) / e1u(ji,jj) + ( zztmp - tsn(ji-1,jj  ,1,jp_tem) ) / e1u(ji-1,jj  )
-            zztmpy     = ( tsn(ji  ,jj+1,1,jp_tem) - zztmp ) / e2v(ji,jj) + ( zztmp - tsn(ji  ,jj-1,1,jp_tem) ) / e2v(ji  ,jj-1)
-            z2d(ji,jj) = 0.25 * ( zztmpx * zztmpx + zztmpy * zztmpy )   &
-               &              * umask(ji,jj,1) * umask(ji-1,jj,1) * vmask(ji,jj,1) * umask(ji,jj-1,1)
-         END DO
-      END DO
-      CALL lbc_lnk( z2d, 'T', 1. )
-      CALL iom_put( "sstgrad2",  z2d               )    ! square of module of sst gradient
-!CDIR NOVERRCHK
-      z2d(:,:) = SQRT( z2d(:,:) )
-      CALL iom_put( "sstgrad" ,  z2d               )    ! module of sst gradient
-
+      IF ( iom_use("sstgrad2") .OR. iom_use("sstgrad2") ) THEN
+         DO jj = 2, jpjm1                                    ! sst gradient
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               zztmp      = tsn(ji,jj,1,jp_tem)
+               zztmpx     = ( tsn(ji+1,jj  ,1,jp_tem) - zztmp ) / e1u(ji,jj) + ( zztmp - tsn(ji-1,jj  ,1,jp_tem) ) / e1u(ji-1,jj  )
+               zztmpy     = ( tsn(ji  ,jj+1,1,jp_tem) - zztmp ) / e2v(ji,jj) + ( zztmp - tsn(ji  ,jj-1,1,jp_tem) ) / e2v(ji  ,jj-1)
+               z2d(ji,jj) = 0.25 * ( zztmpx * zztmpx + zztmpy * zztmpy )   &
+                  &              * umask(ji,jj,1) * umask(ji-1,jj,1) * vmask(ji,jj,1) * umask(ji,jj-1,1)
+            END DO
+         END DO
+         CALL lbc_lnk( z2d, 'T', 1. )
+         CALL iom_put( "sstgrad2",  z2d               )    ! square of module of sst gradient
+         !CDIR NOVERRCHK<
+         z2d(:,:) = SQRT( z2d(:,:) )
+         CALL iom_put( "sstgrad" ,  z2d               )    ! module of sst gradient
+      ENDIF
+         
       ! clem: heat and salt content
-      z2d(:,:)  = 0._wp 
-      z2ds(:,:) = 0._wp 
-      DO jk = 1, jpkm1
-         DO jj = 2, jpjm1
-            DO ji = fs_2, fs_jpim1   ! vector opt.
-               z2d(ji,jj) = z2d(ji,jj) + rau0 * rcp * fse3t(ji,jj,jk) * tsn(ji,jj,jk,jp_tem) * tmask(ji,jj,jk)
-               z2ds(ji,jj) = z2ds(ji,jj) + rau0 * fse3t(ji,jj,jk) * tsn(ji,jj,jk,jp_sal) * tmask(ji,jj,jk)
-            END DO
-         END DO
-      END DO
-      CALL lbc_lnk( z2d, 'T', 1. )
-      CALL lbc_lnk( z2ds, 'T', 1. )
-      CALL iom_put( "heatc", z2d )    ! vertically integrated heat content (J/m2)
-      CALL iom_put( "saltc", z2ds )   ! vertically integrated salt content (PSU*kg/m2)
-  
-      !
-      rke(:,:,jk) = 0._wp                               !      kinetic energy 
-      DO jk = 1, jpkm1
-         DO jj = 2, jpjm1
-            DO ji = fs_2, fs_jpim1   ! vector opt.
-               zztmp   = 1._wp / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
-               zztmpx  = 0.5 * (  un(ji-1,jj,jk) * un(ji-1,jj,jk) * e2u(ji-1,jj) * fse3u(ji-1,jj,jk)    &
-                  &             + un(ji  ,jj,jk) * un(ji  ,jj,jk) * e2u(ji  ,jj) * fse3u(ji  ,jj,jk) )  &
-                  &          *  zztmp 
-               !
-               zztmpy  = 0.5 * (  vn(ji,jj-1,jk) * vn(ji,jj-1,jk) * e1v(ji,jj-1) * fse3v(ji,jj-1,jk)    &
-                  &             + vn(ji,jj  ,jk) * vn(ji,jj  ,jk) * e1v(ji,jj  ) * fse3v(ji,jj  ,jk) )  &
-                  &          *  zztmp 
-               !
-               rke(ji,jj,jk) = 0.5_wp * ( zztmpx + zztmpy )
-               !
+      IF( iom_use("heatc") ) THEN
+         z2d(:,:)  = 0._wp 
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  z2d(ji,jj) = z2d(ji,jj) + fse3t(ji,jj,jk) * tsn(ji,jj,jk,jp_tem) * tmask(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         CALL lbc_lnk( z2d, 'T', 1. )
+         CALL iom_put( "heatc", (rau0 * rcp) * z2d )    ! vertically integrated heat content (J/m2)
+      ENDIF
+
+      IF( iom_use("saltc") ) THEN
+         z2d(:,:)  = 0._wp 
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  z2d(ji,jj) = z2d(ji,jj) + fse3t(ji,jj,jk) * tsn(ji,jj,jk,jp_sal) * tmask(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         CALL lbc_lnk( z2d, 'T', 1. )
+         CALL iom_put( "saltc", rau0 * z2d )   ! vertically integrated salt content (PSU*kg/m2)
+      ENDIF
+      !
+      IF ( iom_use("eken") ) THEN
+         rke(:,:,jk) = 0._wp                               !      kinetic energy 
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zztmp   = 1._wp / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  zztmpx  = 0.5 * (  un(ji-1,jj,jk) * un(ji-1,jj,jk) * e2u(ji-1,jj) * fse3u(ji-1,jj,jk)    &
+                     &             + un(ji  ,jj,jk) * un(ji  ,jj,jk) * e2u(ji  ,jj) * fse3u(ji  ,jj,jk) )  &
+                     &          *  zztmp 
+                  !
+                  zztmpy  = 0.5 * (  vn(ji,jj-1,jk) * vn(ji,jj-1,jk) * e1v(ji,jj-1) * fse3v(ji,jj-1,jk)    &
+                     &             + vn(ji,jj  ,jk) * vn(ji,jj  ,jk) * e1v(ji,jj  ) * fse3v(ji,jj  ,jk) )  &
+                     &          *  zztmp 
+                  !
+                  rke(ji,jj,jk) = 0.5_wp * ( zztmpx + zztmpy )
+                  !
+               ENDDO
             ENDDO
          ENDDO
-      ENDDO
-      CALL lbc_lnk( rke, 'T', 1. )
-      CALL iom_put( "eken", rke )           
-
-      IF( lk_diaar5 ) THEN
+         CALL lbc_lnk( rke, 'T', 1. )
+         CALL iom_put( "eken", rke )           
+      ENDIF
+         
+      IF( iom_use("u_masstr") .OR. iom_use("u_heattr") .OR. iom_use("u_salttr") ) THEN
          z3d(:,:,jpk) = 0.e0
          DO jk = 1, jpkm1
@@ -275,21 +295,34 @@
          END DO
          CALL iom_put( "u_masstr", z3d )                  ! mass transport in i-direction
-
-         zztmp = 0.5 * rcp
+      ENDIF
+      
+      IF( iom_use("u_heattr") ) THEN
          z2d(:,:) = 0.e0 
-         z2ds(:,:) = 0.e0 
          DO jk = 1, jpkm1
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * zztmp * ( tsn(ji,jj,jk,jp_tem) + tsn(ji+1,jj,jk,jp_tem) )
-                  z2ds(ji,jj) = z2ds(ji,jj) + z3d(ji,jj,jk) * 0.5_wp * ( tsn(ji,jj,jk,jp_sal) + tsn(ji+1,jj,jk,jp_sal) )
+                  z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * ( tsn(ji,jj,jk,jp_tem) + tsn(ji+1,jj,jk,jp_tem) )
                END DO
             END DO
          END DO
          CALL lbc_lnk( z2d, 'U', -1. )
-         CALL lbc_lnk( z2ds, 'U', -1. )
-         CALL iom_put( "u_heattr", z2d )                  ! heat transport in i-direction
-         CALL iom_put( "u_salttr", z2ds )                 ! salt transport in i-direction
-
+         CALL iom_put( "u_heattr", (0.5 * rcp) * z2d )    ! heat transport in i-direction
+      ENDIF
+
+      IF( iom_use("u_salttr") ) THEN
+         z2d(:,:) = 0.e0 
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * ( tsn(ji,jj,jk,jp_sal) + tsn(ji+1,jj,jk,jp_sal) )
+               END DO
+            END DO
+         END DO
+         CALL lbc_lnk( z2d, 'U', -1. )
+         CALL iom_put( "u_salttr", 0.5 * z2d )            ! heat transport in i-direction
+      ENDIF
+
+      
+      IF( iom_use("v_masstr") .OR. iom_use("v_heattr") .OR. iom_use("v_salttr") ) THEN
          z3d(:,:,jpk) = 0.e0
          DO jk = 1, jpkm1
@@ -297,22 +330,33 @@
          END DO
          CALL iom_put( "v_masstr", z3d )                  ! mass transport in j-direction
-
+      ENDIF
+      
+      IF( iom_use("v_heattr") ) THEN
          z2d(:,:) = 0.e0 
-         z2ds(:,:) = 0.e0 
          DO jk = 1, jpkm1
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * zztmp * ( tsn(ji,jj,jk,jp_tem) + tsn(ji,jj+1,jk,jp_tem) )
-                  z2ds(ji,jj) = z2ds(ji,jj) + z3d(ji,jj,jk) * 0.5_wp * ( tsn(ji,jj,jk,jp_sal) + tsn(ji,jj+1,jk,jp_sal) )
+                  z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * ( tsn(ji,jj,jk,jp_tem) + tsn(ji,jj+1,jk,jp_tem) )
                END DO
             END DO
          END DO
          CALL lbc_lnk( z2d, 'V', -1. )
-         CALL lbc_lnk( z2ds, 'V', -1. )
-         CALL iom_put( "v_heattr", z2d )                  !  heat transport in j-direction
-         CALL iom_put( "v_salttr", z2ds )                 !  salt transport in j-direction
-      ENDIF
-      !
-      CALL wrk_dealloc( jpi , jpj      , z2d , z2ds )
+         CALL iom_put( "v_heattr", (0.5 * rcp) * z2d )    !  heat transport in j-direction
+      ENDIF
+
+      IF( iom_use("v_salttr") ) THEN
+         z2d(:,:) = 0.e0 
+         DO jk = 1, jpkm1
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  z2d(ji,jj) = z2d(ji,jj) + z3d(ji,jj,jk) * ( tsn(ji,jj,jk,jp_sal) + tsn(ji,jj+1,jk,jp_sal) )
+               END DO
+            END DO
+         END DO
+         CALL lbc_lnk( z2d, 'V', -1. )
+         CALL iom_put( "v_salttr", 0.5 * z2d )            !  heat transport in j-direction
+      ENDIF
+      !
+      CALL wrk_dealloc( jpi , jpj      , z2d )
       CALL wrk_dealloc( jpi , jpj, jpk , z3d )
       !
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 4967)
@@ -31,5 +31,4 @@
    USE bdy_par         
    USE bdydyn2d        ! bdy_ssh routine
-   USE diaar5, ONLY:   lk_diaar5
    USE iom
 #if defined key_agrif
@@ -138,6 +137,6 @@
       !                                           !           outputs            !
       !                                           !------------------------------!
-      CALL iom_put( "ssh" , sshn                  )   ! sea surface height
-      CALL iom_put( "ssh2", sshn(:,:) * sshn(:,:) )   ! square of sea surface height
+      CALL iom_put( "ssh" , sshn )   ! sea surface height
+      if( iom_use('ssh2') )   CALL iom_put( "ssh2", sshn(:,:) * sshn(:,:) )   ! square of sea surface height
       !
       IF(ln_ctl)   CALL prt_ctl( tab2d_1=ssha, clinfo1=' ssha  - : ', mask1=tmask, ovlap=1 )
@@ -233,5 +232,5 @@
       !                                           !------------------------------!
       CALL iom_put( "woce", wn )   ! vertical velocity
-      IF( lk_diaar5 ) THEN                            ! vertical mass transport & its square value
+      IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN   ! vertical mass transport & its square value
          CALL wrk_alloc( jpi, jpj, z2d ) 
          CALL wrk_alloc( jpi, jpj, jpk, z3d ) 
@@ -241,6 +240,6 @@
             z3d(:,:,jk) = wn(:,:,jk) * z2d(:,:)
          END DO
-         CALL iom_put( "w_masstr" , z3d                     )  
-         CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) )
+         CALL iom_put( "w_masstr" , z3d )  
+         IF( iom_use('w_masstr2') )   CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) )
          CALL wrk_dealloc( jpi, jpj, z2d  ) 
          CALL wrk_dealloc( jpi, jpj, jpk, z3d ) 
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/ddatetoymdhms.h90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/ddatetoymdhms.h90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/ddatetoymdhms.h90	(revision 4967)
@@ -21,5 +21,5 @@
 
       !! * Arguments
-      REAL(dp), INTENT(IN) :: ddate
+      real(wp), INTENT(IN) :: ddate
       INTEGER, INTENT(OUT) :: kyea
       INTEGER, INTENT(OUT) :: kmon
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_prof.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_prof.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_prof.F90	(revision 4967)
@@ -128,10 +128,10 @@
          & zphi, &
          & zlam
-      REAL(dp), DIMENSION(:), ALLOCATABLE :: &
+      real(wp), DIMENSION(:), ALLOCATABLE :: &
          & zdat
       LOGICAL :: llvalprof
       TYPE(obfbdata), POINTER, DIMENSION(:) :: &
          & inpfiles
-      REAL(dp), DIMENSION(knumfiles) :: &
+      real(wp), DIMENSION(knumfiles) :: &
          & djulini, &
          & djulend
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_seaice.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_seaice.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_seaice.F90	(revision 4967)
@@ -110,10 +110,10 @@
          & zphi, &
          & zlam
-      REAL(dp), DIMENSION(:), ALLOCATABLE :: &
+      real(wp), DIMENSION(:), ALLOCATABLE :: &
          & zdat
       LOGICAL :: llvalprof
       TYPE(obfbdata), POINTER, DIMENSION(:) :: &
          & inpfiles
-      REAL(dp), DIMENSION(knumfiles) :: &
+      real(wp), DIMENSION(knumfiles) :: &
          & djulini, &
          & djulend
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_sla.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_sla.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_sla.F90	(revision 4967)
@@ -111,5 +111,5 @@
          & zphi, &
          & zlam
-      REAL(dp), DIMENSION(:), ALLOCATABLE :: &
+      real(wp), DIMENSION(:), ALLOCATABLE :: &
          & zdat
       LOGICAL :: llvalprof
@@ -117,5 +117,5 @@
       TYPE(obfbdata), POINTER, DIMENSION(:) :: &
          & inpfiles
-      REAL(dp), DIMENSION(knumfiles) :: &
+      real(wp), DIMENSION(knumfiles) :: &
          & djulini, &
          & djulend
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_sst.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_sst.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_sst.F90	(revision 4967)
@@ -110,10 +110,10 @@
          & zphi, &
          & zlam
-      REAL(dp), DIMENSION(:), ALLOCATABLE :: &
+      real(wp), DIMENSION(:), ALLOCATABLE :: &
          & zdat
       LOGICAL :: llvalprof
       TYPE(obfbdata), POINTER, DIMENSION(:) :: &
          & inpfiles
-      REAL(dp), DIMENSION(knumfiles) :: &
+      real(wp), DIMENSION(knumfiles) :: &
          & djulini, &
          & djulend
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_vel.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_vel.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/OBS/obs_read_vel.F90	(revision 4967)
@@ -118,5 +118,5 @@
          & zphi, &
          & zlam
-      REAL(dp), DIMENSION(:), ALLOCATABLE :: &
+      real(wp), DIMENSION(:), ALLOCATABLE :: &
          & zdat
       LOGICAL :: &
@@ -124,5 +124,5 @@
       TYPE(obfbdata), POINTER, DIMENSION(:) :: &
          & inpfiles
-      REAL(dp), DIMENSION(knumfiles) :: &
+      real(wp), DIMENSION(knumfiles) :: &
          & djulini, &
          & djulend
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 4967)
@@ -44,5 +44,4 @@
    USE p4zflx, ONLY : oce_co2
 #endif
-   USE diaar5, ONLY :   lk_diaar5
 #if defined key_cice
    USE ice_domain_size, only: ncat
@@ -1127,9 +1126,13 @@
          emp_tot(:,:) = frcv(jpr_tevp)%z3(:,:,1) - tprecip(:,:)
          emp_ice(:,:) = frcv(jpr_ievp)%z3(:,:,1) - frcv(jpr_snow)%z3(:,:,1)
-                           CALL iom_put( 'rain'         , frcv(jpr_rain)%z3(:,:,1)              )   ! liquid precipitation 
-         IF( lk_diaar5 )   CALL iom_put( 'hflx_rain_cea', frcv(jpr_rain)%z3(:,:,1) * zcptn(:,:) )   ! heat flux from liq. precip. 
-         ztmp(:,:) = frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:)
-                           CALL iom_put( 'evap_ao_cea'  , ztmp                            )   ! ice-free oce evap (cell average)
-         IF( lk_diaar5 )   CALL iom_put( 'hflx_evap_cea', ztmp(:,:         ) * zcptn(:,:) )   ! heat flux from from evap (cell ave)
+            CALL iom_put( 'rain'         , frcv(jpr_rain)%z3(:,:,1)              )   ! liquid precipitation 
+         IF( iom_use('hflx_rain_cea') )   &
+            CALL iom_put( 'hflx_rain_cea', frcv(jpr_rain)%z3(:,:,1) * zcptn(:,:) )   ! heat flux from liq. precip. 
+         IF( iom_use('evap_ao_cea') .OR. iom_use('hflx_evap_cea') )   &
+            ztmp(:,:) = frcv(jpr_tevp)%z3(:,:,1) - frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:)
+         IF( iom_use('evap_ao_cea'  ) )   &
+            CALL iom_put( 'evap_ao_cea'  , ztmp                   )   ! ice-free oce evap (cell average)
+         IF( iom_use('hflx_evap_cea') )   &
+            CALL iom_put( 'hflx_evap_cea', ztmp(:,:) * zcptn(:,:) )   ! heat flux from from evap (cell average)
       CASE( 'oce and ice'   )   ! received fields: jpr_sbpr, jpr_semp, jpr_oemp, jpr_ievp
          emp_tot(:,:) = p_frld(:,:) * frcv(jpr_oemp)%z3(:,:,1) + zicefr(:,:) * frcv(jpr_sbpr)%z3(:,:,1)
@@ -1138,14 +1141,18 @@
       END SELECT
 
-      CALL iom_put( 'snowpre'    , sprecip                                )   ! Snow
-      CALL iom_put( 'snow_ao_cea', sprecip(:,:         ) * p_frld(:,:)    )   ! Snow        over ice-free ocean  (cell average)
-      CALL iom_put( 'snow_ai_cea', sprecip(:,:         ) * zicefr(:,:)    )   ! Snow        over sea-ice         (cell average)
-      CALL iom_put( 'subl_ai_cea', frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) )   ! Sublimation over sea-ice         (cell average)
+         CALL iom_put( 'snowpre'    , sprecip                                )   ! Snow
+      IF( iom_use('snow_ao_cea') )   &
+         CALL iom_put( 'snow_ao_cea', sprecip(:,:) * p_frld(:,:)             )   ! Snow        over ice-free ocean  (cell average)
+      IF( iom_use('snow_ai_cea') )   &
+         CALL iom_put( 'snow_ai_cea', sprecip(:,:) * zicefr(:,:)             )   ! Snow        over sea-ice         (cell average)
+      IF( iom_use('subl_ai_cea') )   &
+         CALL iom_put( 'subl_ai_cea', frcv(jpr_ievp)%z3(:,:,1) * zicefr(:,:) )   ! Sublimation over sea-ice         (cell average)
       !   
       !                                                           ! runoffs and calving (put in emp_tot)
       IF( srcv(jpr_rnf)%laction ) THEN 
          emp_tot(:,:) = emp_tot(:,:) - frcv(jpr_rnf)%z3(:,:,1)
-                           CALL iom_put( 'runoffs'      , frcv(jpr_rnf)%z3(:,:,1)              )   ! rivers
-         IF( lk_diaar5 )   CALL iom_put( 'hflx_rnf_cea' , frcv(jpr_rnf)%z3(:,:,1) * zcptn(:,:) )   ! heat flux from rivers
+            CALL iom_put( 'runoffs'      , frcv(jpr_rnf)%z3(:,:,1)              )   ! rivers
+         IF( iom_use('hflx_rnf_cea') )   &
+            CALL iom_put( 'hflx_rnf_cea' , frcv(jpr_rnf)%z3(:,:,1) * zcptn(:,:) )   ! heat flux from rivers
       ENDIF
       IF( srcv(jpr_cal)%laction ) THEN 
@@ -1209,5 +1216,6 @@
          &          - (  emp_tot(:,:)                     &            ! remove the heat content of mass flux (assumed to be at SST)
          &             - emp_ice(:,:) * zicefr(:,:)  ) * zcptn(:,:) 
-      IF( lk_diaar5 )   CALL iom_put( 'hflx_snow_cea', ztmp + sprecip(:,:) * zcptn(:,:) )   ! heat flux from snow (cell average)
+      IF( iom_use('hflx_snow_cea') )   &
+         CALL iom_put( 'hflx_snow_cea', ztmp + sprecip(:,:) * zcptn(:,:) )   ! heat flux from snow (cell average)
 !!gm
 !!    currently it is taken into account in leads budget but not in the qns_tot, and thus not in 
@@ -1221,5 +1229,6 @@
          ztmp(:,:) = frcv(jpr_cal)%z3(:,:,1) * lfus               ! add the latent heat of iceberg melting 
          qns_tot(:,:) = qns_tot(:,:) - ztmp(:,:)
-         IF( lk_diaar5 )   CALL iom_put( 'hflx_cal_cea', ztmp + frcv(jpr_cal)%z3(:,:,1) * zcptn(:,:) )   ! heat flux from calving
+         IF( iom_use('hflx_cal_cea') )   &
+            CALL iom_put( 'hflx_cal_cea', ztmp + frcv(jpr_cal)%z3(:,:,1) * zcptn(:,:) )   ! heat flux from calving
       ENDIF
 
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 4967)
@@ -17,5 +17,5 @@
    USE phycst, only : rcp, rau0, r1_rau0, rhosn, rhoic
    USE in_out_manager  ! I/O manager
-   USE iom, only : iom_put              ! I/O manager library !!Joakim edit
+   USE iom, ONLY : iom_put,iom_use              ! I/O manager library !!Joakim edit
    USE lib_mpp         ! distributed memory computing library
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
@@ -430,10 +430,10 @@
 ! Snowfall
 ! Ensure fsnow is positive (as in CICE routine prepare_forcing)
-      CALL iom_put('snowpre',MAX( (1.0-fr_i(:,:))*sprecip(:,:) ,0.0)) !!Joakim edit  
+      IF( iom_use('snowpre') )   CALL iom_put('snowpre',MAX( (1.0-fr_i(:,:))*sprecip(:,:) ,0.0)) !!Joakim edit  
       ztmp(:,:)=MAX(fr_i(:,:)*sprecip(:,:),0.0)  
       CALL nemo2cice(ztmp,fsnow,'T', 1. ) 
 
 ! Rainfall
-      CALL iom_put('precip', (1.0-fr_i(:,:))*(tprecip(:,:)-sprecip(:,:)) ) !!Joakim edit
+      IF( iom_use('precip') )   CALL iom_put('precip', (1.0-fr_i(:,:))*(tprecip(:,:)-sprecip(:,:)) ) !!Joakim edit
       ztmp(:,:)=fr_i(:,:)*(tprecip(:,:)-sprecip(:,:))
       CALL nemo2cice(ztmp,frain,'T', 1. ) 
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90	(revision 4967)
@@ -298,5 +298,5 @@
          ! output
          CALL iom_put('qisf'  , qisf)
-         CALL iom_put('fwfisf', fwfisf * stbl(:,:) / soce )
+         IF( iom_use('fwfisf') )   CALL iom_put('fwfisf', fwfisf * stbl(:,:) / soce )
       END IF
   
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_eiv.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_eiv.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_eiv.F90	(revision 4967)
@@ -25,5 +25,4 @@
    USE phycst          ! physical constants
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
-   USE diaar5, ONLY:   lk_diaar5
 # endif  
    USE wrk_nemo        ! Memory Allocation
@@ -161,5 +160,5 @@
          CALL iom_put( "voce_eiv", v_eiv )    ! j-eiv current
          CALL iom_put( "woce_eiv", w_eiv )    ! vert. eiv current
-         IF( lk_diaar5 ) THEN
+         IF( iom_use('ueiv_heattr') ) THEN
             zztmp = 0.5 * rau0 * rcp 
             z2d(:,:) = 0.e0 
@@ -167,5 +166,5 @@
                DO jj = 2, jpjm1
                   DO ji = fs_2, fs_jpim1   ! vector opt.
-                     z2d(ji,jj) = z2d(ji,jj) + zztmp * u_eiv(ji,jj,jk) &
+                     z2d(ji,jj) = z2d(ji,jj) + u_eiv(ji,jj,jk) &
                        &         * (tsn(ji,jj,jk,jp_tem)+tsn(ji+1,jj,jk,jp_tem)) * e2u(ji,jj) * fse3u(ji,jj,jk) 
                   END DO
@@ -173,10 +172,14 @@
             END DO
             CALL lbc_lnk( z2d, 'U', -1. )
-            CALL iom_put( "ueiv_heattr", z2d )                  ! heat transport in i-direction
+            CALL iom_put( "ueiv_heattr", zztmp * z2d )                  ! heat transport in i-direction
+         ENDIF
+            
+         IF( iom_use('veiv_heattr') ) THEN
+            zztmp = 0.5 * rau0 * rcp 
             z2d(:,:) = 0.e0 
             DO jk = 1, jpkm1
                DO jj = 2, jpjm1
                   DO ji = fs_2, fs_jpim1   ! vector opt.
-                     z2d(ji,jj) = z2d(ji,jj) + zztmp * v_eiv(ji,jj,jk) &
+                     z2d(ji,jj) = z2d(ji,jj) + v_eiv(ji,jj,jk) &
                      &           * (tsn(ji,jj,jk,jp_tem)+tsn(ji,jj+1,jk,jp_tem)) * e1v(ji,jj) * fse3v(ji,jj,jk) 
                   END DO
@@ -184,5 +187,5 @@
             END DO
             CALL lbc_lnk( z2d, 'V', -1. )
-            CALL iom_put( "veiv_heattr", z2d )                  !  heat transport in i-direction
+            CALL iom_put( "veiv_heattr", zztmp * z2d )                  !  heat transport in i-direction
          ENDIF
     END IF
Index: branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90
===================================================================
--- branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 4964)
+++ branches/2014/dev_MERGE_2014/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 4967)
@@ -191,6 +191,6 @@
             END DO
          END DO
-         CALL iom_put( "emp_x_sst", emp (:,:) * tsn(:,:,1,jp_tem) )                          ! c/d term on sst
-         CALL iom_put( "emp_x_sss", emp (:,:) * tsn(:,:,1,jp_sal) )                          ! c/d term on sss
+         IF( iom_use('emp_x_sst') )   CALL iom_put( "emp_x_sst", emp (:,:) * tsn(:,:,1,jp_tem) )   ! c/d term on sst
+         IF( iom_use('emp_x_sss') )   CALL iom_put( "emp_x_sss", emp (:,:) * tsn(:,:,1,jp_sal) )   ! c/d term on sss
       ENDIF
       ! Concentration dilution effect on (t,s) due to evapouration, precipitation and qns, but not river runoff  
