Index: /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/OPA_SRC/DIA/diaprod.F90
===================================================================
--- /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/OPA_SRC/DIA/diaprod.F90	(revision 9501)
+++ /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/OPA_SRC/DIA/diaprod.F90	(revision 9502)
@@ -96,4 +96,5 @@
             END DO
          END DO
+         CALL lbc_lnk( z3d(:,:,:), 'U', -1.)
          CALL iom_put( "ut", z3d )                  ! product of temperature and zonal velocity at U points
       ENDIF
@@ -108,4 +109,5 @@
             END DO
          END DO
+         CALL lbc_lnk( z3d(:,:,:), 'V', -1.)
          CALL iom_put( "vt", z3d )                  ! product of temperature and meridional velocity at V points
          DO jk = 1, jpkm1
@@ -133,4 +135,5 @@
             END DO
          END DO
+         CALL lbc_lnk( z3d(:,:,:), 'W', 1.)
          CALL iom_put( "wt", z3d )                  ! product of temperature and vertical velocity at W points
       ENDIF
@@ -145,4 +148,5 @@
             END DO
          END DO
+         CALL lbc_lnk( z3d(:,:,:), 'U', -1.)
          CALL iom_put( "us", z3d )                  ! product of salinity and zonal velocity at U points
       ENDIF
@@ -157,4 +161,5 @@
             END DO
          END DO
+         CALL lbc_lnk( z3d(:,:,:), 'V', -1.)
          CALL iom_put( "vs", z3d )                  ! product of salinity and meridional velocity at V points
          DO jk = 1, jpkm1
@@ -182,4 +187,5 @@
             END DO
          END DO
+         CALL lbc_lnk( z3d(:,:,:), 'W', 1.)
          CALL iom_put( "ws", z3d )                  ! product of salinity and vertical velocity at W points
       ENDIF
@@ -194,4 +200,5 @@
             END DO
          END DO
+         CALL lbc_lnk( z3d(:,:,:), 'U', -1.)
          CALL iom_put( "urhop", z3d )                  ! product of density and zonal velocity at U points
       ENDIF
@@ -206,4 +213,5 @@
             END DO
          END DO
+         CALL lbc_lnk( z3d(:,:,:), 'V', -1.)
          CALL iom_put( "vrhop", z3d )                  ! product of density and meridional velocity at V points
       ENDIF
@@ -223,4 +231,5 @@
             END DO
          END DO
+         CALL lbc_lnk( z3d(:,:,:), 'W', 1.)
          CALL iom_put( "wrhop", z3d )                  ! product of density and vertical velocity at W points
       ENDIF
Index: /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 9501)
+++ /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 9502)
@@ -246,4 +246,5 @@
             z3d(:,:,jk) = wn(:,:,jk) * z2d(:,:)
          END DO
+         CALL lbc_lnk( z3d(:,:,:), 'W', 1. )
          CALL iom_put( "w_masstr" , z3d )  
          IF( iom_use('w_masstr2') )   CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) )
@@ -334,5 +335,7 @@
             z2d(:,:) = z2d(:,:) + z3d(:,:,jk)
          END DO
+         CALL lbc_lnk( z3d(:,:,:), 'U', -1. )
          CALL iom_put( "u_masstr", z3d )                  ! mass transport in i-direction
+         CALL lbc_lnk( z2d(:,:), 'U', -1. )
          CALL iom_put( "u_masstr_vint", z2d )             ! mass transport in i-direction vertical sum
       ENDIF
@@ -370,4 +373,5 @@
             z3d(:,:,jk) = rau0 * vn(:,:,jk) * e1v(:,:) * fse3v(:,:,jk) * vmask(:,:,jk)
          END DO
+         CALL lbc_lnk( z3d(:,:,:), 'V', -1. )
          CALL iom_put( "v_masstr", z3d )                  ! mass transport in j-direction
       ENDIF
Index: /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_eiv.F90
===================================================================
--- /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_eiv.F90	(revision 9501)
+++ /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_eiv.F90	(revision 9502)
@@ -162,14 +162,11 @@
 # if defined key_diaeiv 
       IF( cdtype == 'TRA') THEN
+         CALL lbc_lnk( u_eiv, 'U', -1. )
          CALL iom_put( "uoce_eiv", u_eiv )    ! i-eiv current
+         CALL lbc_lnk( v_eiv, 'V', -1. )
          CALL iom_put( "voce_eiv", v_eiv )    ! j-eiv current
+         CALL lbc_lnk( w_eiv, 'W', 1. )
          CALL iom_put( "woce_eiv", w_eiv )    ! vert. eiv current
-         IF( iom_use('weiv_masstr') ) THEN   ! vertical mass transport & its square value
-           z2d(:,:) = rau0 * e12t(:,:)
-           DO jk = 1, jpk
-              z3d(:,:,jk) = w_eiv(:,:,jk) * z2d(:,:)
-           END DO
-           CALL iom_put( "weiv_masstr" , z3d )  
-         ENDIF
+
          IF( iom_use("ueiv_masstr") .OR. iom_use("ueiv_heattr") .OR. iom_use('ueiv_heattr3d')        &
                                     .OR. iom_use("ueiv_salttr") .OR. iom_use('ueiv_salttr3d') ) THEN
@@ -180,4 +177,5 @@
                z2d(:,:) = z2d(:,:) + z3d(:,:,jk)
             END DO
+            CALL lbc_lnk( z3d_T, 'U', -1. )
             CALL iom_put( "ueiv_masstr", z3d )                  ! mass transport in i-direction
          ENDIF
@@ -233,4 +231,5 @@
                z3d(:,:,jk) = rau0 * v_eiv(:,:,jk) * e1v(:,:) * fse3v(:,:,jk) * vmask(:,:,jk)
             END DO
+            CALL lbc_lnk( z3d, 'V', -1. )
             CALL iom_put( "veiv_masstr", z3d )                  ! mass transport in j-direction
          ENDIF
@@ -285,4 +284,5 @@
               z3d(:,:,jk) = w_eiv(:,:,jk) * z2d(:,:)
            END DO
+           CALL lbc_lnk( z3d, 'W', 1. )
            CALL iom_put( "weiv_masstr" , z3d )                  ! mass transport in k-direction
          ENDIF
Index: /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/TOP_SRC/IDTRA/trcsms_idtra.F90
===================================================================
--- /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/TOP_SRC/IDTRA/trcsms_idtra.F90	(revision 9501)
+++ /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/TOP_SRC/IDTRA/trcsms_idtra.F90	(revision 9502)
@@ -21,4 +21,5 @@
    USE trdtrc
    USE iom
+   USE lbclnk,      ONLY: lbc_lnk
 
    IMPLICIT NONE
@@ -165,6 +166,9 @@
       !ENDIF
       !
+         CALL lbc_lnk( qtr_idtra (:,:,1) , 'T', 1. )
          CALL iom_put( "qtrIDTRA"  , qtr_idtra (:,:,1) )
+         CALL lbc_lnk( qint_idtra (:,:,1) , 'T', 1. )
          CALL iom_put( "qintIDTRA" , qint_idtra(:,:,1) )
+         CALL lbc_lnk( inv_idtra (:,:,1) , 'T', 1. )
          CALL iom_put( "invIDTRA" , inv_idtra(:,:,1) )
       !
Index: /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_diag_slice.F90
===================================================================
--- /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_diag_slice.F90	(revision 9501)
+++ /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_diag_slice.F90	(revision 9502)
@@ -66,23 +66,30 @@
       IF (jk.eq.1) THEN
          IF( med_diag%MED_QSR%dgsave ) THEN
+            CALL lbc_lnk( qsr(:,:),'T',1.)
             CALL iom_put( "MED_QSR"  , qsr ) !
          ENDIF
          IF( med_diag%MED_XPAR%dgsave ) THEN
+            CALL lbc_lnk( xpar(:,:),'T',1.)
             CALL iom_put( "MED_XPAR"  , xpar(:,:,jk) ) !
          ENDIF       
          IF( med_diag%OCAL_CCD%dgsave ) THEN
+            CALL lbc_lnk( ocal_ccd(:,:),'T',1.)
             CALL iom_put( "OCAL_CCD"  , ocal_ccd ) !
          ENDIF
          IF( med_diag%FE_0000%dgsave ) THEN
+            CALL lbc_lnk( xFree(:,:),'T',1.)
             CALL iom_put( "FE_0000"  , xFree ) !
          ENDIF                     
          IF( med_diag%MED_XZE%dgsave ) THEN
+            CALL lbc_lnk( xze(:,:),'T',1.)
             CALL iom_put( "MED_XZE"  , xze ) !
          ENDIF 
 # if defined key_roam                     
          IF( med_diag%WIND%dgsave ) THEN
+            CALL lbc_lnk( wndm(:,:),'T',1.)
             CALL iom_put( "WIND"  , wndm )
          ENDIF
          IF( med_diag%ATM_PCO2%dgsave ) THEN
+            CALL lbc_lnk( f_pco2a2d(:,:),'T',1.)
             CALL iom_put( "ATM_PCO2"  , f_pco2a2d )
             DEALLOCATE( f_pco2a2d )
@@ -90,7 +97,9 @@
          IF( med_diag%OCN_PH%dgsave ) THEN
             zw2d(:,:) = f3_pH(:,:,jk)
+            CALL lbc_lnk( zw2d(:,:),'T',1.)
             CALL iom_put( "OCN_PH"  , zw2d )
          ENDIF
          IF( med_diag%OCN_PCO2%dgsave ) THEN
+            CALL lbc_lnk( f_pco2w2d(:,:),'T',1.)
             CALL iom_put( "OCN_PCO2"  , f_pco2w2d )
             DEALLOCATE( f_pco2w2d )
@@ -98,15 +107,19 @@
          IF( med_diag%OCNH2CO3%dgsave ) THEN
             zw2d(:,:) = f3_h2co3(:,:,jk)
+            CALL lbc_lnk( zw2d(:,:),'T',1.)
             CALL iom_put( "OCNH2CO3"  , zw2d )
          ENDIF
          IF( med_diag%OCN_HCO3%dgsave ) THEN
             zw2d(:,:) = f3_hco3(:,:,jk)
+            CALL lbc_lnk( zw2d(:,:),'T',1.)
             CALL iom_put( "OCN_HCO3"  , zw2d )
          ENDIF
          IF( med_diag%OCN_CO3%dgsave ) THEN
             zw2d(:,:) = f3_co3(:,:,jk)
+            CALL lbc_lnk( zw2d(:,:),'T',1.)
             CALL iom_put( "OCN_CO3"  , zw2d )
          ENDIF
          IF( med_diag%CO2FLUX%dgsave ) THEN
+            CALL lbc_lnk( f_co2flux2d(:,:),'T',1.)
             CALL iom_put( "CO2FLUX"  , f_co2flux2d )
             DEALLOCATE( f_co2flux2d )
@@ -120,4 +133,5 @@
          CALL lbc_lnk( fgco2(:,:),'T',1. )
          IF( med_diag%FGCO2%dgsave ) THEN
+            CALL lbc_lnk( fgco2(:,:),'T',1.)
             CALL iom_put( "FGCO2"  , fgco2 )
          ENDIF
@@ -132,37 +146,47 @@
          !! ---
          IF( med_diag%OM_CAL%dgsave ) THEN
+            CALL lbc_lnk( f_omcal(:,:),'T',1.)
             CALL iom_put( "OM_CAL"  , f_omcal )
          ENDIF
          IF( med_diag%OM_ARG%dgsave ) THEN
+            CALL lbc_lnk( f_omarg(:,:),'T',1.)
             CALL iom_put( "OM_ARG"  , f_omarg )
          ENDIF
          IF( med_diag%TCO2%dgsave ) THEN
+            CALL lbc_lnk( f_TDIC2d(:,:),'T',1.)
             CALL iom_put( "TCO2"  , f_TDIC2d )
             DEALLOCATE( f_TDIC2d )
          ENDIF
          IF( med_diag%TALK%dgsave ) THEN
+            CALL lbc_lnk( f_TALK2d(:,:),'T',1.)
             CALL iom_put( "TALK"  , f_TALK2d )
             DEALLOCATE( f_TALK2d )
          ENDIF
          IF( med_diag%KW660%dgsave ) THEN
+            CALL lbc_lnk( f_kw6602d(:,:),'T',1.)
             CALL iom_put( "KW660"  , f_kw6602d )
             DEALLOCATE( f_kw6602d )
          ENDIF
          IF( med_diag%ATM_PP0%dgsave ) THEN
+            CALL lbc_lnk( f_pp02d(:,:),'T',1.)
             CALL iom_put( "ATM_PP0"  , f_pp02d )
             DEALLOCATE( f_pp02d )
          ENDIF
          IF( med_diag%O2FLUX%dgsave ) THEN
+            CALL lbc_lnk( f_o2flux2d(:,:),'T',1.)
             CALL iom_put( "O2FLUX"  , f_o2flux2d )
             DEALLOCATE( f_o2flux2d )
          ENDIF
          IF( med_diag%O2SAT%dgsave ) THEN
+            CALL lbc_lnk( f_o2sat2d(:,:),'T',1.)
             CALL iom_put( "O2SAT"  , f_o2sat2d )
             DEALLOCATE( f_o2sat2d )
          ENDIF
          IF( med_diag%CAL_CCD%dgsave ) THEN
+            CALL lbc_lnk( f2_ccd_cal(:,:),'T',1.)
             CALL iom_put( "CAL_CCD"  , f2_ccd_cal )
          ENDIF
          IF( med_diag%ARG_CCD%dgsave ) THEN
+            CALL lbc_lnk( f2_ccd_arg(:,:),'T',1.)
             CALL iom_put( "ARG_CCD"  , f2_ccd_arg )
          ENDIF
@@ -170,4 +194,5 @@
             IF( med_diag%DMS_SURF%dgsave ) THEN
                CALL lbc_lnk(dms_surf2d(:,:),'T',1. )
+               CALL lbc_lnk( dms_surf2d(:,:),'T',1.)
                CALL iom_put( "DMS_SURF"  , dms_surf2d )
                zb_dms_srf = zn_dms_srf
@@ -179,20 +204,25 @@
             ENDIF
             IF( med_diag%DMS_ANDR%dgsave ) THEN
+               CALL lbc_lnk( dms_andr2d(:,:),'T',1.)
                CALL iom_put( "DMS_ANDR"  , dms_andr2d )
                DEALLOCATE( dms_andr2d )
             ENDIF
             IF( med_diag%DMS_SIMO%dgsave ) THEN
+               CALL lbc_lnk( dms_simo2d(:,:),'T',1.)
                CALL iom_put( "DMS_SIMO"  , dms_simo2d )
                DEALLOCATE( dms_simo2d )
             ENDIF
             IF( med_diag%DMS_ARAN%dgsave ) THEN
+               CALL lbc_lnk( dms_aran2d(:,:),'T',1.)
                CALL iom_put( "DMS_ARAN"  , dms_aran2d )
                DEALLOCATE( dms_aran2d )
             ENDIF
             IF( med_diag%DMS_HALL%dgsave ) THEN
+               CALL lbc_lnk( dms_hall2d(:,:),'T',1.)
                CALL iom_put( "DMS_HALL"  , dms_hall2d )
                DEALLOCATE( dms_hall2d )
             ENDIF
             IF( med_diag%DMS_ANDM%dgsave ) THEN
+               CALL lbc_lnk( dms_andm2d(:,:),'T',1.)
                CALL iom_put( "DMS_ANDM"  , dms_andm2d )
                DEALLOCATE( dms_andm2d )
@@ -201,36 +231,45 @@
          !! AXY (24/11/16): extra MOCSY diagnostics
          IF( med_diag%ATM_XCO2%dgsave ) THEN
+            CALL lbc_lnk( f_xco2a_2d(:,:),'T',1.)
             CALL iom_put( "ATM_XCO2"  ,   f_xco2a_2d      )
             DEALLOCATE( f_xco2a_2d )
          ENDIF
          IF( med_diag%OCN_FCO2%dgsave ) THEN
+            CALL lbc_lnk( f_fco2w_2d(:,:),'T',1.)
             CALL iom_put( "OCN_FCO2"  ,   f_fco2w_2d      )
             DEALLOCATE( f_fco2w_2d )
          ENDIF
          IF( med_diag%ATM_FCO2%dgsave ) THEN
+            CALL lbc_lnk( f_fco2a_2d(:,:),'T',1.)
             CALL iom_put( "ATM_FCO2"  ,   f_fco2a_2d      )
             DEALLOCATE( f_fco2a_2d )
          ENDIF
          IF( med_diag%OCN_RHOSW%dgsave ) THEN
+            CALL lbc_lnk( f_ocnrhosw_2d(:,:),'T',1.)
             CALL iom_put( "OCN_RHOSW"  ,  f_ocnrhosw_2d   )
             DEALLOCATE( f_ocnrhosw_2d )
          ENDIF
          IF( med_diag%OCN_SCHCO2%dgsave ) THEN
+            CALL lbc_lnk( f_ocnschco2_2d(:,:),'T',1.)
             CALL iom_put( "OCN_SCHCO2"  , f_ocnschco2_2d  )
             DEALLOCATE( f_ocnschco2_2d )
          ENDIF
          IF( med_diag%OCN_KWCO2%dgsave ) THEN
+            CALL lbc_lnk( f_ocnkwco2_2d(:,:),'T',1.)
             CALL iom_put( "OCN_KWCO2"  ,  f_ocnkwco2_2d   )
             DEALLOCATE( f_ocnkwco2_2d )
          ENDIF
          IF( med_diag%OCN_K0%dgsave ) THEN
+            CALL lbc_lnk( f_ocnk0_2d(:,:),'T',1.)
             CALL iom_put( "OCN_K0"  ,     f_ocnk0_2d      )
             DEALLOCATE( f_ocnk0_2d )
          ENDIF
          IF( med_diag%CO2STARAIR%dgsave ) THEN
+            CALL lbc_lnk( f_co2starair_2d(:,:),'T',1.)
             CALL iom_put( "CO2STARAIR"  , f_co2starair_2d )
             DEALLOCATE( f_co2starair_2d )
          ENDIF
          IF( med_diag%OCN_DPCO2%dgsave ) THEN
+            CALL lbc_lnk( f_ocndpco2_2d(:,:),'T',1.)
             CALL iom_put( "OCN_DPCO2"  ,  f_ocndpco2_2d   )
             DEALLOCATE( f_ocndpco2_2d )
@@ -240,44 +279,57 @@
          IF( med_diag%SDT__100%dgsave ) THEN
             zw2d(:,:) = fslownflux(:,:) * tmask(:,:,jk)
+            CALL lbc_lnk( zw2d(:,:),'T',1.)
             CALL iom_put( "SDT__100"  , zw2d )
          ENDIF
          IF( med_diag%REG__100%dgsave ) THEN
+            CALL lbc_lnk( fregen2d(:,:),'T',1.)
             CALL iom_put( "REG__100"  , fregen2d )
          ENDIF
          IF( med_diag%FDT__100%dgsave ) THEN
+            CALL lbc_lnk( ffastn(:,:),'T',1.)
             CALL iom_put( "FDT__100"  , ffastn )
          ENDIF           
          IF( med_diag%RG__100F%dgsave ) THEN
+            CALL lbc_lnk( fregenfast(:,:),'T',1.)
             CALL iom_put( "RG__100F"  , fregenfast )
          ENDIF
          IF( med_diag%FDS__100%dgsave ) THEN
+            CALL lbc_lnk( ffastsi(:,:),'T',1.)
             CALL iom_put( "FDS__100"  , ffastsi )
          ENDIF         
          IF( med_diag%RGS_100F%dgsave ) THEN
+            CALL lbc_lnk( fregenfastsi(:,:),'T',1.)
             CALL iom_put( "RGS_100F"  , fregenfastsi )
          ENDIF
          IF( med_diag%FE_0100%dgsave ) THEN
+            CALL lbc_lnk( xFree(:,:),'T',1.)
             CALL iom_put( "FE_0100"  , xFree )
          ENDIF
 # if defined key_roam                     
          IF( med_diag%RR_0100%dgsave ) THEN
+            CALL lbc_lnk( ffastca2d(:,:),'T',1.)
             CALL iom_put( "RR_0100"  , ffastca2d )
          ENDIF                     
          IF( med_diag%SDC__100%dgsave ) THEN
             zw2d(:,:) = fslowcflux(:,:) * tmask(:,:,jk)
+            CALL lbc_lnk( zw2d(:,:),'T',1.)
             CALL iom_put( "SDC__100"  , zw2d )
          ENDIF                  
          IF( med_diag%epC100%dgsave    ) THEN
             zw2d(:,:) = (fslowcflux + ffastc) * tmask(:,:,jk)
+            CALL lbc_lnk( zw2d(:,:),'T',1.)
             CALL iom_put( "epC100"    , zw2d )
          ENDIF		     
          IF( med_diag%epCALC100%dgsave ) THEN
+            CALL lbc_lnk( ffastca(:,:),'T',1.)
             CALL iom_put( "epCALC100" , ffastca )
          ENDIF		     
          IF( med_diag%epN100%dgsave    ) THEN
             zw2d(:,:) = (fslownflux + ffastn) * tmask(:,:,jk)
+            CALL lbc_lnk( zw2d(:,:),'T',1.)
             CALL iom_put( "epN100"    , zw2d )
          ENDIF		     
          IF( med_diag%epSI100%dgsave   ) THEN
+            CALL lbc_lnk( ffastsi(:,:),'T',1.)
             CALL iom_put( "epSI100"   , ffastsi )
          ENDIF		     
@@ -286,22 +338,29 @@
          IF( med_diag%SDT__200%dgsave ) THEN
             zw2d(:,:) = fslownflux(:,:) * tmask(:,:,jk)
+            CALL lbc_lnk( zw2d(:,:),'T',1.)
             CALL iom_put( "SDT__200"  , zw2d )
          ENDIF
          IF( med_diag%REG__200%dgsave ) THEN
+            CALL lbc_lnk( fregen2d(:,:),'T',1.)
             CALL iom_put( "REG__200"  , fregen2d )
          ENDIF
          IF( med_diag%FDT__200%dgsave ) THEN
+            CALL lbc_lnk( ffastn(:,:),'T',1.)
             CALL iom_put( "FDT__200"  , ffastn )
          ENDIF
          IF( med_diag%RG__200F%dgsave ) THEN
+            CALL lbc_lnk( fregenfast(:,:),'T',1.)
             CALL iom_put( "RG__200F"  , fregenfast )
          ENDIF
          IF( med_diag%FDS__200%dgsave ) THEN
+            CALL lbc_lnk( ffastsi(:,:),'T',1.)
             CALL iom_put( "FDS__200"  , ffastsi )
          ENDIF
          IF( med_diag%RGS_200F%dgsave ) THEN
+            CALL lbc_lnk( fregenfastsi(:,:),'T',1.)
             CALL iom_put( "RGS_200F"  , fregenfastsi )
          ENDIF
          IF( med_diag%FE_0200%dgsave ) THEN
+            CALL lbc_lnk( xFree(:,:),'T',1.)
             CALL iom_put( "FE_0200"   , xFree )
          ENDIF
@@ -309,4 +368,5 @@
          IF( med_diag%SDC__200%dgsave ) THEN
             zw2d(:,:) = fslowcflux(:,:) * tmask(:,:,jk)
+            CALL lbc_lnk( zw2d(:,:),'T',1.)
             CALL iom_put( "SDC__200"  , zw2d )
          ENDIF
@@ -315,30 +375,39 @@
          IF( med_diag%SDT__500%dgsave ) THEN
             zw2d(:,:) = fslownflux(:,:) * tmask(:,:,jk)
+            CALL lbc_lnk( zw2d(:,:),'T',1.)
             CALL iom_put( "SDT__500"  , zw2d )
          ENDIF
          IF( med_diag%REG__500%dgsave ) THEN
+            CALL lbc_lnk( fregen2d(:,:),'T',1.)
             CALL iom_put( "REG__500"  , fregen2d )
          ENDIF      
          IF( med_diag%FDT__500%dgsave ) THEN
+            CALL lbc_lnk( ffastn(:,:),'T',1.)
             CALL iom_put( "FDT__500"  , ffastn )
          ENDIF
          IF( med_diag%RG__500F%dgsave ) THEN
+            CALL lbc_lnk( fregenfast(:,:),'T',1.)
             CALL iom_put( "RG__500F"  , fregenfast )
          ENDIF
          IF( med_diag%FDS__500%dgsave ) THEN
+            CALL lbc_lnk( ffastsi(:,:),'T',1.)
             CALL iom_put( "FDS__500"  , ffastsi )
          ENDIF
          IF( med_diag%RGS_500F%dgsave ) THEN
+            CALL lbc_lnk( fregenfastsi(:,:),'T',1.)
             CALL iom_put( "RGS_500F"  , fregenfastsi )
          ENDIF
          IF( med_diag%FE_0500%dgsave ) THEN
+            CALL lbc_lnk( xFree(:,:),'T',1.)
             CALL iom_put( "FE_0500"  , xFree )
          ENDIF
 # if defined key_roam                     
          IF( med_diag%RR_0500%dgsave ) THEN
+            CALL lbc_lnk( ffastca2d(:,:),'T',1.)
             CALL iom_put( "RR_0500"  , ffastca2d )
          ENDIF
          IF( med_diag%SDC__500%dgsave ) THEN
             zw2d(:,:) = fslowcflux(:,:) * tmask(:,:,jk)
+            CALL lbc_lnk( zw2d(:,:),'T',1.)
             CALL iom_put( "SDC__500"  , zw2d )
          ENDIF  
@@ -347,26 +416,34 @@
          IF( med_diag%SDT_1000%dgsave ) THEN
             zw2d(:,:) = fslownflux(:,:) * tmask(:,:,jk)
+            CALL lbc_lnk( zw2d(:,:),'T',1.)
             CALL iom_put( "SDT_1000"  , zw2d )
          ENDIF
          IF( med_diag%REG_1000%dgsave ) THEN
+            CALL lbc_lnk( fregen2d(:,:),'T',1.)
             CALL iom_put( "REG_1000"  , fregen2d )
          ENDIF  
          IF( med_diag%FDT_1000%dgsave ) THEN
+            CALL lbc_lnk( ffastn(:,:),'T',1.)
             CALL iom_put( "FDT_1000"  , ffastn )
          ENDIF
          IF( med_diag%RG_1000F%dgsave ) THEN
+            CALL lbc_lnk( fregenfast(:,:),'T',1.)
             CALL iom_put( "RG_1000F"  , fregenfast )
          ENDIF
          IF( med_diag%FDS_1000%dgsave ) THEN
+            CALL lbc_lnk( ffastsi(:,:),'T',1.)
             CALL iom_put( "FDS_1000"  , ffastsi )
          ENDIF
          IF( med_diag%RGS1000F%dgsave ) THEN
+            CALL lbc_lnk( fregenfastsi(:,:),'T',1.)
             CALL iom_put( "RGS1000F"  , fregenfastsi )
          ENDIF
          IF( med_diag%FE_1000%dgsave ) THEN
+            CALL lbc_lnk( xFree(:,:),'T',1.)
             CALL iom_put( "FE_1000"  , xFree )
          ENDIF
 # if defined key_roam                     
          IF( med_diag%RR_1000%dgsave ) THEN
+            CALL lbc_lnk( ffastca2d(:,:),'T',1.)
             CALL iom_put( "RR_1000"  , ffastca2d )
             DEALLOCATE( ffastca2d )
@@ -374,4 +451,5 @@
          IF( med_diag%SDC_1000%dgsave ) THEN
             zw2d(:,:) = fslowcflux(:,:) * tmask(:,:,jk)
+            CALL lbc_lnk( zw2d(:,:),'T',1.)
             CALL iom_put( "SDC_1000"  , zw2d )
          ENDIF 
@@ -382,4 +460,5 @@
          !! detrital flux
          detflux3d(:,:,jk) = (fslownflux(:,:) + ffastn(:,:)) * tmask(:,:,jk)
+         !CALL lbc_lnk( ftot_n(:,:),'T',1.)
          !CALL iom_put( "DETFLUX3"  , ftot_n )
       ENDIF
Index: /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_fin.F90
===================================================================
--- /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_fin.F90	(revision 9501)
+++ /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_fin.F90	(revision 9502)
@@ -264,138 +264,180 @@
 #   endif
          IF ( med_diag%INVTN%dgsave ) THEN
+            CALL lbc_lnk( ftot_n(:,:),'T',1.)
             CALL iom_put( "INVTN"  , ftot_n )
          ENDIF
          IF ( med_diag%INVTSI%dgsave ) THEN
+            CALL lbc_lnk( ftot_si(:,:),'T',1.)
             CALL iom_put( "INVTSI"  , ftot_si )
          ENDIF
          IF ( med_diag%INVTFE%dgsave ) THEN
+            CALL lbc_lnk( ftot_fe(:,:),'T',1.)
             CALL iom_put( "INVTFE"  , ftot_fe )
          ENDIF                           
          IF ( med_diag%ML_PRN%dgsave ) THEN
+            CALL lbc_lnk( fprn_ml(:,:),'T',1.)
             CALL iom_put( "ML_PRN"  , fprn_ml )
          ENDIF
          IF ( med_diag%ML_PRD%dgsave ) THEN
+            CALL lbc_lnk( fprd_ml(:,:),'T',1.)
             CALL iom_put( "ML_PRD"  , fprd_ml )
          ENDIF
          IF ( med_diag%OCAL_LVL%dgsave ) THEN
+            CALL lbc_lnk( fccd(:,:),'T',1.)
             CALL iom_put( "OCAL_LVL"  , fccd )
          ENDIF
          IF ( med_diag%CHL_MLD%dgsave ) THEN
+            CALL lbc_lnk( fchl_ml(:,:),'T',1.)
             CALL iom_put( "CHL_MLD"  , fchl_ml )
          ENDIF
          IF (lk_oasis) THEN
             IF ( med_diag%CHL_CPL%dgsave ) THEN
+               CALL lbc_lnk( chloro_out_cpl(:,:),'T',1.)
                CALL iom_put( "CHL_CPL"  , chloro_out_cpl )
             ENDIF
          ENDIF
          IF ( med_diag%PN_JLIM%dgsave ) THEN
+            CALL lbc_lnk( fjln2d(:,:),'T',1.)
             CALL iom_put( "PN_JLIM"  , fjln2d )
             DEALLOCATE( fjln2d )
          ENDIF
          IF ( med_diag%PN_NLIM%dgsave ) THEN
+            CALL lbc_lnk( fnln2d(:,:),'T',1.)
             CALL iom_put( "PN_NLIM"  , fnln2d )
             DEALLOCATE( fnln2d )
          ENDIF
          IF ( med_diag%PN_FELIM%dgsave ) THEN
+            CALL lbc_lnk( ffln2d(:,:),'T',1.)
             CALL iom_put( "PN_FELIM"  , ffln2d )
             DEALLOCATE( ffln2d )
          ENDIF
          IF ( med_diag%PD_JLIM%dgsave ) THEN
+            CALL lbc_lnk( fjld2d(:,:),'T',1.)
             CALL iom_put( "PD_JLIM"  , fjld2d )
             DEALLOCATE( fjld2d )
          ENDIF
          IF ( med_diag%PD_NLIM%dgsave ) THEN
+            CALL lbc_lnk( fnld2d(:,:),'T',1.)
             CALL iom_put( "PD_NLIM"  , fnld2d )
             DEALLOCATE( fnld2d )
          ENDIF
          IF ( med_diag%PD_FELIM%dgsave ) THEN
+            CALL lbc_lnk( ffld2d(:,:),'T',1.)
             CALL iom_put( "PD_FELIM"  , ffld2d )
             DEALLOCATE( ffld2d )
          ENDIF
          IF ( med_diag%PD_SILIM%dgsave ) THEN
+            CALL lbc_lnk( fsld2d2(:,:),'T',1.)
             CALL iom_put( "PD_SILIM"  , fsld2d2 )
             DEALLOCATE( fsld2d2 )
          ENDIF
          IF ( med_diag%PDSILIM2%dgsave ) THEN
+            CALL lbc_lnk( fsld2d(:,:),'T',1.)
             CALL iom_put( "PDSILIM2"  , fsld2d )
             DEALLOCATE( fsld2d )
          ENDIF
          IF ( med_diag%INTFLX_N%dgsave ) THEN
+            CALL lbc_lnk( fflx_n(:,:),'T',1.)
             CALL iom_put( "INTFLX_N"  , fflx_n )
          ENDIF
          IF ( med_diag%INTFLX_SI%dgsave ) THEN
+            CALL lbc_lnk( fflx_si(:,:),'T',1.)
             CALL iom_put( "INTFLX_SI"  , fflx_si )
          ENDIF
          IF ( med_diag%INTFLX_FE%dgsave ) THEN
+            CALL lbc_lnk( fflx_fe(:,:),'T',1.)
             CALL iom_put( "INTFLX_FE"  , fflx_fe )
          ENDIF        
          IF ( med_diag%INT_PN%dgsave ) THEN
+            CALL lbc_lnk( ftot_pn(:,:),'T',1.)
             CALL iom_put( "INT_PN"  , ftot_pn )
          ENDIF
          IF ( med_diag%INT_PD%dgsave ) THEN
+            CALL lbc_lnk( ftot_pd(:,:),'T',1.)
             CALL iom_put( "INT_PD"  , ftot_pd )
          ENDIF         
          IF ( med_diag%INT_ZMI%dgsave ) THEN
+            CALL lbc_lnk( ftot_zmi(:,:),'T',1.)
             CALL iom_put( "INT_ZMI"  , ftot_zmi )
          ENDIF
          IF ( med_diag%INT_ZME%dgsave ) THEN
+            CALL lbc_lnk( ftot_zme(:,:),'T',1.)
             CALL iom_put( "INT_ZME"  , ftot_zme )
          ENDIF
          IF ( med_diag%INT_DET%dgsave ) THEN
+            CALL lbc_lnk( ftot_det(:,:),'T',1.)
             CALL iom_put( "INT_DET"  , ftot_det )
          ENDIF
          IF ( med_diag%INT_DTC%dgsave ) THEN
+            CALL lbc_lnk( ftot_dtc(:,:),'T',1.)
             CALL iom_put( "INT_DTC"  , ftot_dtc )
          ENDIF
          IF ( med_diag%BEN_N%dgsave ) THEN
+            CALL lbc_lnk( za_sed_n(:,:),'T',1.)
             CALL iom_put( "BEN_N"  , za_sed_n )
          ENDIF
          IF ( med_diag%BEN_FE%dgsave ) THEN
+            CALL lbc_lnk( za_sed_fe(:,:),'T',1.)
             CALL iom_put( "BEN_FE"  , za_sed_fe )
          ENDIF
          IF ( med_diag%BEN_C%dgsave ) THEN
+            CALL lbc_lnk( za_sed_c(:,:),'T',1.)
             CALL iom_put( "BEN_C"  , za_sed_c )
          ENDIF
          IF ( med_diag%BEN_SI%dgsave ) THEN
+            CALL lbc_lnk( za_sed_si(:,:),'T',1.)
             CALL iom_put( "BEN_SI"  , za_sed_si )
          ENDIF
          IF ( med_diag%BEN_CA%dgsave ) THEN
+            CALL lbc_lnk( za_sed_ca(:,:),'T',1.)
             CALL iom_put( "BEN_CA"  , za_sed_ca )
          ENDIF
          IF ( med_diag%RUNOFF%dgsave ) THEN
+            CALL lbc_lnk( f_runoff(:,:),'T',1.)
             CALL iom_put( "RUNOFF"  , f_runoff )
          ENDIF 
 # if defined key_roam        
          IF ( med_diag%N_PROD%dgsave ) THEN
+            CALL lbc_lnk( fnit_prod(:,:),'T',1.)
             CALL iom_put( "N_PROD"  , fnit_prod )
          ENDIF
          IF ( med_diag%N_CONS%dgsave ) THEN
+            CALL lbc_lnk( fnit_cons(:,:),'T',1.)
             CALL iom_put( "N_CONS"  , fnit_cons )
          ENDIF
          IF ( med_diag%C_PROD%dgsave ) THEN
+            CALL lbc_lnk( fcar_prod(:,:),'T',1.)
             CALL iom_put( "C_PROD"  , fcar_prod )
          ENDIF
          IF ( med_diag%C_CONS%dgsave ) THEN
+            CALL lbc_lnk( fcar_cons(:,:),'T',1.)
             CALL iom_put( "C_CONS"  , fcar_cons )
          ENDIF
          IF ( med_diag%O2_PROD%dgsave ) THEN
+            CALL lbc_lnk( foxy_prod(:,:),'T',1.)
             CALL iom_put( "O2_PROD"  , foxy_prod )
          ENDIF
          IF ( med_diag%O2_CONS%dgsave ) THEN
+            CALL lbc_lnk( foxy_cons(:,:),'T',1.)
             CALL iom_put( "O2_CONS"  , foxy_cons )
          ENDIF
          IF ( med_diag%O2_ANOX%dgsave ) THEN
+            CALL lbc_lnk( foxy_anox(:,:),'T',1.)
             CALL iom_put( "O2_ANOX"  , foxy_anox )
          ENDIF
          IF ( med_diag%INVTC%dgsave ) THEN
+            CALL lbc_lnk( ftot_c(:,:),'T',1.)
             CALL iom_put( "INVTC"  , ftot_c )
          ENDIF
          IF ( med_diag%INVTALK%dgsave ) THEN
+            CALL lbc_lnk( ftot_a(:,:),'T',1.)
             CALL iom_put( "INVTALK"  , ftot_a )
          ENDIF
          IF ( med_diag%INVTO2%dgsave ) THEN
+            CALL lbc_lnk( ftot_o2(:,:),'T',1.)
             CALL iom_put( "INVTO2"  , ftot_o2 )
          ENDIF
          IF ( med_diag%COM_RESP%dgsave ) THEN
+            CALL lbc_lnk( fcomm_resp(:,:),'T',1.)
             CALL iom_put( "COM_RESP"  , fcomm_resp )
          ENDIF         
@@ -405,82 +447,103 @@
          !!--------------------------------------------
          IF ( med_diag%PRN%dgsave ) THEN
+            CALL lbc_lnk( fprn2d(:,:),'T',1.)
             CALL iom_put( "PRN"  , fprn2d )
             DEALLOCATE( fprn2d )
          ENDIF
          IF ( med_diag%MPN%dgsave ) THEN
+            CALL lbc_lnk( fdpn2d(:,:),'T',1.)
             CALL iom_put( "MPN"  ,fdpn2d )
             DEALLOCATE( fdpn2d )
          ENDIF
          IF ( med_diag%PRD%dgsave ) THEN
+            CALL lbc_lnk( fprd2d(:,:),'T',1.)
             CALL iom_put( "PRD"  ,fprd2d )
             DEALLOCATE( fprd2d )
          ENDIF
          IF( med_diag%MPD%dgsave ) THEN
+            CALL lbc_lnk( fdpd2d(:,:),'T',1.)
             CALL iom_put( "MPD"  , fdpd2d )
             DEALLOCATE( fdpd2d )
          ENDIF
          !  IF( med_diag%DSED%dgsave ) THEN
+         !      CALL lbc_lnk( ftot_n(:,:),'T',1.)
          !      CALL iom_put( "DSED"  , ftot_n )
          !  ENDIF
          IF( med_diag%OPAL%dgsave ) THEN
+            CALL lbc_lnk( fprds2d(:,:),'T',1.)
             CALL iom_put( "OPAL"  , fprds2d )
             DEALLOCATE( fprds2d )
          ENDIF
          IF( med_diag%OPALDISS%dgsave ) THEN
+            CALL lbc_lnk( fsdiss2d(:,:),'T',1.)
             CALL iom_put( "OPALDISS"  , fsdiss2d )
             DEALLOCATE( fsdiss2d )
          ENDIF
          IF( med_diag%GMIPn%dgsave ) THEN
+            CALL lbc_lnk( fgmipn2d(:,:),'T',1.)
             CALL iom_put( "GMIPn"  , fgmipn2d )
             DEALLOCATE( fgmipn2d )
          ENDIF
          IF( med_diag%GMID%dgsave ) THEN
+            CALL lbc_lnk( fgmid2d(:,:),'T',1.)
             CALL iom_put( "GMID"  , fgmid2d )
             DEALLOCATE( fgmid2d )
          ENDIF
          IF( med_diag%MZMI%dgsave ) THEN
+            CALL lbc_lnk( fdzmi2d(:,:),'T',1.)
             CALL iom_put( "MZMI"  , fdzmi2d )
             DEALLOCATE( fdzmi2d )
          ENDIF
          IF( med_diag%GMEPN%dgsave ) THEN
+            CALL lbc_lnk( fgmepn2d(:,:),'T',1.)
             CALL iom_put( "GMEPN"  , fgmepn2d )
             DEALLOCATE( fgmepn2d )
          ENDIF
          IF( med_diag%GMEPD%dgsave ) THEN
+            CALL lbc_lnk( fgmepd2d(:,:),'T',1.)
             CALL iom_put( "GMEPD"  , fgmepd2d )
             DEALLOCATE( fgmepd2d )
          ENDIF
          IF( med_diag%GMEZMI%dgsave ) THEN
+            CALL lbc_lnk( fgmezmi2d(:,:),'T',1.)
             CALL iom_put( "GMEZMI"  , fgmezmi2d )
             DEALLOCATE( fgmezmi2d )
          ENDIF
          IF( med_diag%GMED%dgsave ) THEN
+            CALL lbc_lnk( fgmed2d(:,:),'T',1.)
             CALL iom_put( "GMED"  , fgmed2d )
             DEALLOCATE( fgmed2d )
          ENDIF
          IF( med_diag%MZME%dgsave ) THEN
+            CALL lbc_lnk( fdzme2d(:,:),'T',1.)
             CALL iom_put( "MZME"  , fdzme2d )
             DEALLOCATE( fdzme2d )
          ENDIF
          !  IF( med_diag%DEXP%dgsave ) THEN
+         !      CALL lbc_lnk( ftot_n(:,:),'T',1.)
          !      CALL iom_put( "DEXP"  , ftot_n )
          !  ENDIF
          IF( med_diag%DETN%dgsave ) THEN
+            CALL lbc_lnk( fslown2d(:,:),'T',1.)
             CALL iom_put( "DETN"  , fslown2d )
             DEALLOCATE( fslown2d )
          ENDIF
          IF( med_diag%MDET%dgsave ) THEN
+            CALL lbc_lnk( fdd2d(:,:),'T',1.)
             CALL iom_put( "MDET"  , fdd2d )
             DEALLOCATE( fdd2d )
          ENDIF
          IF( med_diag%AEOLIAN%dgsave ) THEN
+            CALL lbc_lnk( ffetop2d(:,:),'T',1.)
             CALL iom_put( "AEOLIAN"  , ffetop2d )
             DEALLOCATE( ffetop2d )
          ENDIF
          IF( med_diag%BENTHIC%dgsave ) THEN
+            CALL lbc_lnk( ffebot2d(:,:),'T',1.)
             CALL iom_put( "BENTHIC"  , ffebot2d )
             DEALLOCATE( ffebot2d )
          ENDIF
          IF( med_diag%SCAVENGE%dgsave ) THEN
+            CALL lbc_lnk( ffescav2d(:,:),'T',1.)
             CALL iom_put( "SCAVENGE"  , ffescav2d )
             DEALLOCATE( ffescav2d )
@@ -488,8 +551,10 @@
          !! 
          IF( med_diag%TOTREG_N%dgsave ) THEN
+            CALL lbc_lnk( fregen2d(:,:),'T',1.)
             CALL iom_put( "TOTREG_N"  , fregen2d )
             DEALLOCATE( fregen2d )
          ENDIF
          IF( med_diag%TOTRG_SI%dgsave ) THEN
+            CALL lbc_lnk( fregensi2d(:,:),'T',1.)
             CALL iom_put( "TOTRG_SI"  , fregensi2d )
             DEALLOCATE( fregensi2d )
@@ -497,20 +562,25 @@
          !! 
          IF( med_diag%FASTN%dgsave ) THEN
+            CALL lbc_lnk( ftempn2d(:,:),'T',1.)
             CALL iom_put( "FASTN"  , ftempn2d )
             DEALLOCATE( ftempn2d )
          ENDIF
          IF( med_diag%FASTSI%dgsave ) THEN
+            CALL lbc_lnk( ftempsi2d(:,:),'T',1.)
             CALL iom_put( "FASTSI"  , ftempsi2d )
             DEALLOCATE( ftempsi2d )
          ENDIF
          IF( med_diag%FASTFE%dgsave ) THEN
+            CALL lbc_lnk( ftempfe2d(:,:),'T',1.)
             CALL iom_put( "FASTFE"  , ftempfe2d )
             DEALLOCATE( ftempfe2d )
          ENDIF
          IF( med_diag%FASTC%dgsave ) THEN
+            CALL lbc_lnk( ftempc2d(:,:),'T',1.)
             CALL iom_put( "FASTC"  , ftempc2d )
             DEALLOCATE( ftempc2d )
          ENDIF
          IF( med_diag%FASTCA%dgsave ) THEN
+            CALL lbc_lnk( ftempca2d(:,:),'T',1.)
             CALL iom_put( "FASTCA"  , ftempca2d )
             DEALLOCATE( ftempca2d )
@@ -518,36 +588,46 @@
          !! 
          IF( med_diag%REMINN%dgsave ) THEN
+            CALL lbc_lnk( freminn2d(:,:),'T',1.)
             CALL iom_put( "REMINN"  , freminn2d )
             DEALLOCATE( freminn2d )
          ENDIF
          IF( med_diag%REMINSI%dgsave ) THEN
+            CALL lbc_lnk( freminsi2d(:,:),'T',1.)
             CALL iom_put( "REMINSI"  , freminsi2d )
             DEALLOCATE( freminsi2d )
          ENDIF
          IF( med_diag%REMINFE%dgsave ) THEN
+            CALL lbc_lnk( freminfe2d(:,:),'T',1.)
             CALL iom_put( "REMINFE"  , freminfe2d )
             DEALLOCATE( freminfe2d )
          ENDIF
          IF( med_diag%REMINC%dgsave ) THEN
+            CALL lbc_lnk( freminc2d(:,:),'T',1.)
             CALL iom_put( "REMINC"  , freminc2d )
             DEALLOCATE( freminc2d )
          ENDIF
          IF( med_diag%REMINCA%dgsave ) THEN
+            CALL lbc_lnk( freminca2d(:,:),'T',1.)
             CALL iom_put( "REMINCA"  , freminca2d )
             DEALLOCATE( freminca2d )
          ENDIF
          IF( med_diag%SEAFLRN%dgsave ) THEN
+            CALL lbc_lnk( fsedn(:,:),'T',1.)
             CALL iom_put( "SEAFLRN"  , fsedn )
          ENDIF
          IF( med_diag%SEAFLRSI%dgsave ) THEN
+            CALL lbc_lnk( fsedsi(:,:),'T',1.)
             CALL iom_put( "SEAFLRSI"  , fsedsi )
          ENDIF
          IF( med_diag%SEAFLRFE%dgsave ) THEN
+            CALL lbc_lnk( fsedfe(:,:),'T',1.)
             CALL iom_put( "SEAFLRFE"  , fsedfe )
          ENDIF
          IF( med_diag%SEAFLRC%dgsave ) THEN
+            CALL lbc_lnk( fsedc(:,:),'T',1.)
             CALL iom_put( "SEAFLRC"  , fsedc )
          ENDIF
          IF( med_diag%SEAFLRCA%dgsave ) THEN
+            CALL lbc_lnk( fsedca(:,:),'T',1.)
             CALL iom_put( "SEAFLRCA"  , fsedca )
          ENDIF
@@ -556,20 +636,25 @@
          !!
          IF( med_diag%RIV_N%dgsave ) THEN
+            CALL lbc_lnk( rivn2d(:,:),'T',1.)
             CALL iom_put( "RIV_N"  , rivn2d )
             DEALLOCATE( rivn2d )
          ENDIF
          IF( med_diag%RIV_SI%dgsave ) THEN
+            CALL lbc_lnk( rivsi2d(:,:),'T',1.)
             CALL iom_put( "RIV_SI"  , rivsi2d )
             DEALLOCATE( rivsi2d )
          ENDIF
          IF( med_diag%RIV_C%dgsave ) THEN
+            CALL lbc_lnk( rivc2d(:,:),'T',1.)
             CALL iom_put( "RIV_C"  , rivc2d )
             DEALLOCATE( rivc2d )
          ENDIF
          IF( med_diag%RIV_ALK%dgsave ) THEN
+            CALL lbc_lnk( rivalk2d(:,:),'T',1.)
             CALL iom_put( "RIV_ALK"  , rivalk2d )
             DEALLOCATE( rivalk2d )
          ENDIF
          IF( med_diag%DETC%dgsave ) THEN
+            CALL lbc_lnk( fslowc2d(:,:),'T',1.)
             CALL iom_put( "DETC"  , fslowc2d )
             DEALLOCATE( fslowc2d )
@@ -577,136 +662,170 @@
          !!
          IF( med_diag%PN_LLOSS%dgsave ) THEN
+            CALL lbc_lnk( fdpn22d(:,:),'T',1.)
             CALL iom_put( "PN_LLOSS"  , fdpn22d )
             DEALLOCATE( fdpn22d )
          ENDIF
          IF( med_diag%PD_LLOSS%dgsave ) THEN
+            CALL lbc_lnk( fdpd22d(:,:),'T',1.)
             CALL iom_put( "PD_LLOSS"  , fdpd22d )
             DEALLOCATE( fdpd22d )
          ENDIF
          IF( med_diag%ZI_LLOSS%dgsave ) THEN
+            CALL lbc_lnk( fdzmi22d(:,:),'T',1.)
             CALL iom_put( "ZI_LLOSS"  , fdzmi22d )
              DEALLOCATE( fdzmi22d )
           ENDIF
           IF( med_diag%ZE_LLOSS%dgsave ) THEN
+             CALL lbc_lnk( fdzme22d(:,:),'T',1.)
              CALL iom_put( "ZE_LLOSS"  , fdzme22d )
              DEALLOCATE( fdzme22d )
           ENDIF
           IF( med_diag%ZI_MES_N%dgsave ) THEN
+             CALL lbc_lnk( zimesn2d(:,:),'T',1.)
              CALL iom_put( "ZI_MES_N"  , zimesn2d )
              DEALLOCATE( zimesn2d )
           ENDIF
           IF( med_diag%ZI_MES_D%dgsave ) THEN
+             CALL lbc_lnk( zimesd2d(:,:),'T',1.)
              CALL iom_put( "ZI_MES_D"  , zimesd2d )
              DEALLOCATE( zimesd2d )
           ENDIF
           IF( med_diag%ZI_MES_C%dgsave ) THEN
+             CALL lbc_lnk( zimesc2d(:,:),'T',1.)
              CALL iom_put( "ZI_MES_C"  , zimesc2d )
              DEALLOCATE( zimesc2d )
           ENDIF
           IF( med_diag%ZI_MESDC%dgsave ) THEN
+             CALL lbc_lnk( zimesdc2d(:,:),'T',1.)
              CALL iom_put( "ZI_MESDC"  ,zimesdc2d )
              DEALLOCATE( zimesdc2d )
           ENDIF
           IF( med_diag%ZI_EXCR%dgsave ) THEN
+             CALL lbc_lnk( ziexcr2d(:,:),'T',1.)
              CALL iom_put( "ZI_EXCR"  , ziexcr2d )
              DEALLOCATE( ziexcr2d )
           ENDIF
           IF( med_diag%ZI_RESP%dgsave ) THEN
+             CALL lbc_lnk( ziresp2d(:,:),'T',1.)
              CALL iom_put( "ZI_RESP"  , ziresp2d )
              DEALLOCATE( ziresp2d )
           ENDIF
           IF( med_diag%ZI_GROW%dgsave ) THEN
+             CALL lbc_lnk( zigrow2d(:,:),'T',1.)
              CALL iom_put( "ZI_GROW"  , zigrow2d )
              DEALLOCATE( zigrow2d )
           ENDIF
           IF( med_diag%ZE_MES_N%dgsave ) THEN
+             CALL lbc_lnk( zemesn2d(:,:),'T',1.)
              CALL iom_put( "ZE_MES_N"  , zemesn2d )
              DEALLOCATE( zemesn2d )
           ENDIF
           IF( med_diag%ZE_MES_D%dgsave ) THEN
+             CALL lbc_lnk( zemesd2d(:,:),'T',1.)
              CALL iom_put( "ZE_MES_D"  , zemesd2d )
              DEALLOCATE( zemesd2d )
           ENDIF
           IF( med_diag%ZE_MES_C%dgsave ) THEN
+             CALL lbc_lnk( zemesc2d(:,:),'T',1.)
              CALL iom_put( "ZE_MES_C"  , zemesc2d )
              DEALLOCATE( zemesc2d )
           ENDIF
           IF( med_diag%ZE_MESDC%dgsave ) THEN
+             CALL lbc_lnk( zemesdc2d(:,:),'T',1.)
              CALL iom_put( "ZE_MESDC"  , zemesdc2d )
              DEALLOCATE( zemesdc2d )
           ENDIF
           IF( med_diag%ZE_EXCR%dgsave ) THEN
+             CALL lbc_lnk( zeexcr2d(:,:),'T',1.)
              CALL iom_put( "ZE_EXCR"  , zeexcr2d )
              DEALLOCATE( zeexcr2d )
           ENDIF
           IF( med_diag%ZE_RESP%dgsave ) THEN
+             CALL lbc_lnk( zeresp2d(:,:),'T',1.)
              CALL iom_put( "ZE_RESP"  , zeresp2d )
              DEALLOCATE( zeresp2d )
           ENDIF
           IF( med_diag%ZE_GROW%dgsave ) THEN
+             CALL lbc_lnk( zegrow2d(:,:),'T',1.)
              CALL iom_put( "ZE_GROW"  , zegrow2d )
              DEALLOCATE( zegrow2d )
           ENDIF
           IF( med_diag%MDETC%dgsave ) THEN
+             CALL lbc_lnk( mdetc2d(:,:),'T',1.)
              CALL iom_put( "MDETC"  , mdetc2d )
              DEALLOCATE( mdetc2d )
           ENDIF
           IF( med_diag%GMIDC%dgsave ) THEN
+             CALL lbc_lnk( gmidc2d(:,:),'T',1.)
              CALL iom_put( "GMIDC"  , gmidc2d )
              DEALLOCATE( gmidc2d )
           ENDIF
           IF( med_diag%GMEDC%dgsave ) THEN
+             CALL lbc_lnk( gmedc2d(:,:),'T',1.)
              CALL iom_put( "GMEDC"  , gmedc2d )
              DEALLOCATE( gmedc2d )
           ENDIF
           IF( med_diag%IBEN_N%dgsave ) THEN
+             CALL lbc_lnk( iben_n2d(:,:),'T',1.)
              CALL iom_put( "IBEN_N"  , iben_n2d )
              DEALLOCATE( iben_n2d )
           ENDIF
           IF( med_diag%IBEN_FE%dgsave ) THEN
+             CALL lbc_lnk( iben_fe2d(:,:),'T',1.)
              CALL iom_put( "IBEN_FE"  , iben_fe2d )
              DEALLOCATE( iben_fe2d )
           ENDIF
           IF( med_diag%IBEN_C%dgsave ) THEN
+             CALL lbc_lnk( iben_c2d(:,:),'T',1.)
              CALL iom_put( "IBEN_C"  , iben_c2d )
              DEALLOCATE( iben_c2d )
           ENDIF
           IF( med_diag%IBEN_SI%dgsave ) THEN
+             CALL lbc_lnk( iben_si2d(:,:),'T',1.)
              CALL iom_put( "IBEN_SI"  , iben_si2d )
              DEALLOCATE( iben_si2d )
           ENDIF
           IF( med_diag%IBEN_CA%dgsave ) THEN
+             CALL lbc_lnk( iben_ca2d(:,:),'T',1.)
              CALL iom_put( "IBEN_CA"  , iben_ca2d )
              DEALLOCATE( iben_ca2d )
           ENDIF
           IF( med_diag%OBEN_N%dgsave ) THEN
+             CALL lbc_lnk( oben_n2d(:,:),'T',1.)
              CALL iom_put( "OBEN_N"  , oben_n2d )
              DEALLOCATE( oben_n2d )
           ENDIF
           IF( med_diag%OBEN_FE%dgsave ) THEN
+             CALL lbc_lnk( oben_fe2d(:,:),'T',1.)
              CALL iom_put( "OBEN_FE"  , oben_fe2d )
              DEALLOCATE( oben_fe2d )
           ENDIF
           IF( med_diag%OBEN_C%dgsave ) THEN
+             CALL lbc_lnk( oben_c2d(:,:),'T',1.)
              CALL iom_put( "OBEN_C"  , oben_c2d )
              DEALLOCATE( oben_c2d )
           ENDIF
           IF( med_diag%OBEN_SI%dgsave ) THEN
+             CALL lbc_lnk( oben_si2d(:,:),'T',1.)
              CALL iom_put( "OBEN_SI"  , oben_si2d )
              DEALLOCATE( oben_si2d )
           ENDIF
           IF( med_diag%OBEN_CA%dgsave ) THEN
+             CALL lbc_lnk( oben_ca2d(:,:),'T',1.)
              CALL iom_put( "OBEN_CA"  , oben_ca2d )
              DEALLOCATE( oben_ca2d )
           ENDIF
           IF( med_diag%SFR_OCAL%dgsave ) THEN
+             CALL lbc_lnk( sfr_ocal2d(:,:),'T',1.)
              CALL iom_put( "SFR_OCAL"  , sfr_ocal2d )
              DEALLOCATE( sfr_ocal2d )
           ENDIF
           IF( med_diag%SFR_OARG%dgsave ) THEN
+             CALL lbc_lnk( sfr_oarg2d(:,:),'T',1.)
              CALL iom_put( "SFR_OARG"  , sfr_oarg2d )
              DEALLOCATE( sfr_oarg2d )
           ENDIF
           IF( med_diag%LYSO_CA%dgsave ) THEN
+             CALL lbc_lnk( lyso_ca2d(:,:),'T',1.)
              CALL iom_put( "LYSO_CA"  , lyso_ca2d )
              DEALLOCATE( lyso_ca2d )
@@ -716,12 +835,15 @@
           !! ** 3D diagnostics
           IF( med_diag%TPP3%dgsave ) THEN
+             CALL lbc_lnk( tpp3d(:,:,:),'T',1.)
              CALL iom_put( "TPP3"  , tpp3d )
              DEALLOCATE( tpp3d )
           ENDIF
           IF( med_diag%DETFLUX3%dgsave ) THEN
+             CALL lbc_lnk( detflux3d(:,:,:),'T',1.)
              CALL iom_put( "DETFLUX3"  , detflux3d )
              DEALLOCATE( detflux3d )
           ENDIF
           IF( med_diag%REMIN3N%dgsave ) THEN
+             CALL lbc_lnk( remin3dn(:,:,:),'T',1.)
              CALL iom_put( "REMIN3N"  , remin3dn )
              DEALLOCATE( remin3dn )
@@ -729,7 +851,9 @@
 # if defined key_roam          
           IF( med_diag%PH3%dgsave ) THEN
+             CALL lbc_lnk( f3_pH(:,:,:),'T',1.)
              CALL iom_put( "PH3"  , f3_pH )
           ENDIF
           IF( med_diag%OM_CAL3%dgsave ) THEN
+             CALL lbc_lnk( f3_omcal(:,:,:),'T',1.)
              CALL iom_put( "OM_CAL3"  , f3_omcal )
           ENDIF
@@ -737,44 +861,55 @@
           !! AXY (09/11/16): 2D CMIP6 diagnostics
           IF( med_diag%INTDISSIC%dgsave ) THEN
+             CALL lbc_lnk( intdissic(:,:),'T',1.)
              CALL iom_put( "INTDISSIC"  , intdissic )
              DEALLOCATE( intdissic )
           ENDIF          
           IF( med_diag%INTDISSIN%dgsave ) THEN
+             CALL lbc_lnk( intdissin(:,:),'T',1.)
              CALL iom_put( "INTDISSIN"  , intdissin )
              DEALLOCATE( intdissin )
           ENDIF          
           IF( med_diag%INTDISSISI%dgsave ) THEN
+             CALL lbc_lnk( intdissisi(:,:),'T',1.)
              CALL iom_put( "INTDISSISI"  , intdissisi )
              DEALLOCATE( intdissisi )
           ENDIF          
           IF( med_diag%INTTALK%dgsave ) THEN
+             CALL lbc_lnk( inttalk(:,:),'T',1.)
              CALL iom_put( "INTTALK"  , inttalk )
              DEALLOCATE( inttalk )
           ENDIF          
           IF( med_diag%O2min%dgsave ) THEN
+             CALL lbc_lnk( o2min(:,:),'T',1.)
              CALL iom_put( "O2min"  , o2min )
              DEALLOCATE( o2min )
           ENDIF          
           IF( med_diag%ZO2min%dgsave ) THEN
+             CALL lbc_lnk( zo2min(:,:),'T',1.)
              CALL iom_put( "ZO2min"  , zo2min )
              DEALLOCATE( zo2min )
           ENDIF          
           IF( med_diag%FBDDTALK%dgsave ) THEN
+             CALL lbc_lnk( fbddtalk(:,:),'T',1.)
              CALL iom_put( "FBDDTALK"  , fbddtalk )
              DEALLOCATE( fbddtalk )
           ENDIF          
           IF( med_diag%FBDDTDIC%dgsave ) THEN
+             CALL lbc_lnk( fbddtdic(:,:),'T',1.)
              CALL iom_put( "FBDDTDIC"  , fbddtdic )
              DEALLOCATE( fbddtdic )
           ENDIF          
           IF( med_diag%FBDDTDIFE%dgsave ) THEN
+             CALL lbc_lnk( fbddtdife(:,:),'T',1.)
              CALL iom_put( "FBDDTDIFE" , fbddtdife )
              DEALLOCATE( fbddtdife )
           ENDIF          
           IF( med_diag%FBDDTDIN%dgsave ) THEN
+             CALL lbc_lnk( fbddtdin(:,:),'T',1.)
              CALL iom_put( "FBDDTDIN"  , fbddtdin )
              DEALLOCATE( fbddtdin )
           ENDIF          
           IF( med_diag%FBDDTDISI%dgsave ) THEN
+             CALL lbc_lnk( fbddtdisi(:,:),'T',1.)
              CALL iom_put( "FBDDTDISI" , fbddtdisi )
              DEALLOCATE( fbddtdisi )
@@ -783,133 +918,167 @@
           !! AXY (09/11/16): 3D CMIP6 diagnostics
           IF( med_diag%TPPD3%dgsave ) THEN
+             CALL lbc_lnk( tppd3(:,:,:),'T',1.)
              CALL iom_put( "TPPD3"     , tppd3 )
              DEALLOCATE( tppd3 )
           ENDIF          
           IF( med_diag%BDDTALK3%dgsave ) THEN
+             CALL lbc_lnk( bddtalk3(:,:,:),'T',1.)
              CALL iom_put( "BDDTALK3"  , bddtalk3 )
              DEALLOCATE( bddtalk3 )
           ENDIF          
           IF( med_diag%BDDTDIC3%dgsave ) THEN
+             CALL lbc_lnk( bddtdic3(:,:,:),'T',1.)
              CALL iom_put( "BDDTDIC3"  , bddtdic3 )
              DEALLOCATE( bddtdic3 )
           ENDIF          
           IF( med_diag%BDDTDIFE3%dgsave ) THEN
+             CALL lbc_lnk( bddtdife3(:,:,:),'T',1.)
              CALL iom_put( "BDDTDIFE3" , bddtdife3 )
              DEALLOCATE( bddtdife3 )
           ENDIF          
           IF( med_diag%BDDTDIN3%dgsave ) THEN
+             CALL lbc_lnk( bddtdin3(:,:,:),'T',1.)
              CALL iom_put( "BDDTDIN3"  , bddtdin3 )
              DEALLOCATE( bddtdin3 )
           ENDIF          
           IF( med_diag%BDDTDISI3%dgsave ) THEN
+             CALL lbc_lnk( bddtdisi3(:,:,:),'T',1.)
              CALL iom_put( "BDDTDISI3" , bddtdisi3 )
              DEALLOCATE( bddtdisi3 )
           ENDIF    
           IF( med_diag%FD_NIT3%dgsave ) THEN
+             CALL lbc_lnk( fd_nit3(:,:,:),'T',1.)
              CALL iom_put( "FD_NIT3"  , fd_nit3 )
              DEALLOCATE( fd_nit3 )
           ENDIF
           IF( med_diag%FD_SIL3%dgsave ) THEN
+             CALL lbc_lnk( fd_sil3(:,:,:),'T',1.)
              CALL iom_put( "FD_SIL3"  , fd_sil3 )
              DEALLOCATE( fd_sil3 )
           ENDIF
           IF( med_diag%FD_CAL3%dgsave ) THEN
+             CALL lbc_lnk( fd_cal3(:,:,:),'T',1.)
              CALL iom_put( "FD_CAL3"  , fd_cal3 )
              DEALLOCATE( fd_cal3 )
           ENDIF
           IF( med_diag%FD_CAR3%dgsave ) THEN
+             CALL lbc_lnk( fd_car3(:,:,:),'T',1.)
              CALL iom_put( "FD_CAR3"  , fd_car3 )
              DEALLOCATE( fd_car3 )
           ENDIF
           IF( med_diag%CO33%dgsave ) THEN
+             CALL lbc_lnk( f3_co3(:,:,:),'T',1.)
              CALL iom_put( "CO33"  , f3_co3 )
           ENDIF          	        
           IF( med_diag%CO3SATARAG3%dgsave ) THEN
+             CALL lbc_lnk( f3_omarg(:,:,:),'T',1.)
              CALL iom_put( "CO3SATARAG3"  , f3_omarg )
           ENDIF          	        
           IF( med_diag%CO3SATCALC3%dgsave ) THEN
+             CALL lbc_lnk( f3_omcal(:,:,:),'T',1.)
              CALL iom_put( "CO3SATCALC3"  , f3_omcal )
           ENDIF          	        
           IF( med_diag%EXPC3%dgsave ) THEN
+             CALL lbc_lnk( expc3(:,:,:),'T',1.)
              CALL iom_put( "EXPC3"  , expc3 )
              DEALLOCATE( expc3 )
           ENDIF          	        
           IF( med_diag%EXPN3%dgsave ) THEN
+             CALL lbc_lnk( expn3(:,:,:),'T',1.)
              CALL iom_put( "EXPN3"  , expn3 )
              DEALLOCATE( expn3 )
           ENDIF          	        
           IF( med_diag%DCALC3%dgsave ) THEN
+             CALL lbc_lnk( dcalc3(:,:,:),'T',1.)
              CALL iom_put( "DCALC3"  , dcalc3 )
              DEALLOCATE( dcalc3 )
           ENDIF          	        
           IF( med_diag%FEDISS3%dgsave ) THEN
+             CALL lbc_lnk( fediss3(:,:,:),'T',1.)
              CALL iom_put( "FEDISS3"  , fediss3 )
              DEALLOCATE( fediss3 )
           ENDIF          	        
           IF( med_diag%FESCAV3%dgsave ) THEN
+             CALL lbc_lnk( fescav3(:,:,:),'T',1.)
              CALL iom_put( "FESCAV3"  , fescav3 )
              DEALLOCATE( fescav3 )
           ENDIF          	        
           IF( med_diag%MIGRAZP3%dgsave ) THEN
+             CALL lbc_lnk( migrazp3(:,:,:),'T',1.)
              CALL iom_put( "MIGRAZP3"  , migrazp3 )
              DEALLOCATE( migrazp3 )
           ENDIF          	        
           IF( med_diag%MIGRAZD3%dgsave ) THEN
+             CALL lbc_lnk( migrazd3(:,:,:),'T',1.)
              CALL iom_put( "MIGRAZD3"  , migrazd3 )
              DEALLOCATE( migrazd3 )
           ENDIF          	        
           IF( med_diag%MEGRAZP3%dgsave ) THEN
+             CALL lbc_lnk( megrazp3(:,:,:),'T',1.)
              CALL iom_put( "MEGRAZP3"  , megrazp3 )
              DEALLOCATE( megrazp3 )
           ENDIF          	        
           IF( med_diag%MEGRAZD3%dgsave ) THEN
+             CALL lbc_lnk( megrazd3(:,:,:),'T',1.)
              CALL iom_put( "MEGRAZD3"  , megrazd3 )
              DEALLOCATE( megrazd3 )
           ENDIF          	        
           IF( med_diag%MEGRAZZ3%dgsave ) THEN
+             CALL lbc_lnk( megrazz3(:,:,:),'T',1.)
              CALL iom_put( "MEGRAZZ3"  , megrazz3 )
              DEALLOCATE( megrazz3 )
           ENDIF          	        
           IF( med_diag%O2SAT3%dgsave ) THEN
+             CALL lbc_lnk( o2sat3(:,:,:),'T',1.)
              CALL iom_put( "O2SAT3"  , o2sat3 )
              DEALLOCATE( o2sat3 )
           ENDIF          	        
           IF( med_diag%PBSI3%dgsave ) THEN
+             CALL lbc_lnk( pbsi3(:,:,:),'T',1.)
              CALL iom_put( "PBSI3"  , pbsi3 )
              DEALLOCATE( pbsi3 )
           ENDIF          	        
           IF( med_diag%PCAL3%dgsave ) THEN
+             CALL lbc_lnk( pcal3(:,:,:),'T',1.)
              CALL iom_put( "PCAL3"  , pcal3 )
              DEALLOCATE( pcal3 )
           ENDIF          	        
           IF( med_diag%REMOC3%dgsave ) THEN
+             CALL lbc_lnk( remoc3(:,:,:),'T',1.)
              CALL iom_put( "REMOC3"  , remoc3 )
              DEALLOCATE( remoc3 )
           ENDIF          	        
           IF( med_diag%PNLIMJ3%dgsave ) THEN
+             CALL lbc_lnk( pnlimj3(:,:,:),'T',1.)
              CALL iom_put( "PNLIMJ3" , pnlimj3 )
              DEALLOCATE( pnlimj3 )
           ENDIF          	        
           IF( med_diag%PNLIMN3%dgsave ) THEN
+             CALL lbc_lnk( pnlimn3(:,:,:),'T',1.)
              CALL iom_put( "PNLIMN3" , pnlimn3 )
              DEALLOCATE( pnlimn3 )
           ENDIF          	        
           IF( med_diag%PNLIMFE3%dgsave ) THEN
+             CALL lbc_lnk( pnlimfe3(:,:,:),'T',1.)
              CALL iom_put( "PNLIMFE3" , pnlimfe3 )
              DEALLOCATE( pnlimfe3 )
           ENDIF          	        
           IF( med_diag%PDLIMJ3%dgsave ) THEN
+             CALL lbc_lnk( pdlimj3(:,:,:),'T',1.)
              CALL iom_put( "PDLIMJ3" , pdlimj3 )
              DEALLOCATE( pdlimj3 )
           ENDIF          	        
           IF( med_diag%PDLIMN3%dgsave ) THEN
+             CALL lbc_lnk( pdlimn3(:,:,:),'T',1.)
              CALL iom_put( "PDLIMN3" , pdlimn3 )
              DEALLOCATE( pdlimn3 )
           ENDIF          	        
           IF( med_diag%PDLIMFE3%dgsave ) THEN
+             CALL lbc_lnk( pdlimfe3(:,:,:),'T',1.)
              CALL iom_put( "PDLIMFE3" , pdlimfe3 )
              DEALLOCATE( pdlimfe3 )
           ENDIF          	        
           IF( med_diag%PDLIMSI3%dgsave ) THEN
+             CALL lbc_lnk( pdlimsi3(:,:,:),'T',1.)
              CALL iom_put( "PDLIMSI3" , pdlimsi3 )
              DEALLOCATE( pdlimsi3 )
Index: /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/TOP_SRC/TRP/trdtrc.F90
===================================================================
--- /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/TOP_SRC/TRP/trdtrc.F90	(revision 9501)
+++ /branches/UKMO/dev_r5518_fix_diag_bitcomp/NEMOGCM/NEMO/TOP_SRC/TRP/trdtrc.F90	(revision 9502)
@@ -19,4 +19,5 @@
    USE trdmxl_trc        ! Mixed layer trends diag.
    USE iom               ! I/O library
+   USE lbclnk,            ONLY: lbc_lnk
 # if defined key_debug_medusa
    USE trcstat,          ONLY: trc_rst_dia_stat     
@@ -192,4 +193,5 @@
          CALL trc_rst_dia_stat( ptrtrd(:,:,1), cltra)
 # endif
+         CALL lbc_lnk( ptrtrd(:,:,:), 'T', 1.0 )
          CALL iom_put( cltra,  ptrtrd(:,:,:) )
 # if defined key_debug_medusa
