Index: NEMO/trunk/src/OCE/SBC/cpl_oasis3.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/cpl_oasis3.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/cpl_oasis3.F90	(revision 10425)
@@ -456,5 +456,7 @@
          !--- Fill the overlap areas and extra hallows (mpp)
          !--- check periodicity conditions (all cases)
-         IF( .not. llfisrt )   CALL lbc_lnk( pdata(:,:,jc), srcv(kid)%clgrid, srcv(kid)%nsgn )   
+         IF( .not. llfisrt ) THEN
+            CALL lbc_lnk( 'cpl_oasis3', pdata(:,:,jc), srcv(kid)%clgrid, srcv(kid)%nsgn )   
+         ENDIF
  
       ENDDO
Index: NEMO/trunk/src/OCE/SBC/fldread.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/fldread.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/fldread.F90	(revision 10425)
@@ -669,8 +669,8 @@
                IF( sdjf%ln_tint ) THEN
                   CALL iom_get( sdjf%num, sdjf%clvar, sdjf%fdta(2,2,1,2), sdjf%nrec_a(1) )
-                  CALL lbc_lnk( sdjf%fdta(:,:,1,2),'Z',1. )
+                  CALL lbc_lnk( 'fldread', sdjf%fdta(:,:,1,2),'Z',1. )
                ELSE
                   CALL iom_get( sdjf%num, sdjf%clvar, sdjf%fnow(2,2,1  ), sdjf%nrec_a(1) )
-                  CALL lbc_lnk( sdjf%fnow(:,:,1  ),'Z',1. )
+                  CALL lbc_lnk( 'fldread', sdjf%fnow(:,:,1  ),'Z',1. )
                ENDIF
             ELSE
@@ -683,8 +683,8 @@
                IF( sdjf%ln_tint ) THEN
                   CALL iom_get( sdjf%num, jpdom_unknown, sdjf%clvar, sdjf%fdta(2,2,:,2), sdjf%nrec_a(1) )
-                  CALL lbc_lnk( sdjf%fdta(:,:,:,2),'Z',1. )
+                  CALL lbc_lnk( 'fldread', sdjf%fdta(:,:,:,2),'Z',1. )
                ELSE
                   CALL iom_get( sdjf%num, jpdom_unknown, sdjf%clvar, sdjf%fnow(2,2,:  ), sdjf%nrec_a(1) )
-                  CALL lbc_lnk( sdjf%fnow(:,:,:  ),'Z',1. )
+                  CALL lbc_lnk( 'fldread', sdjf%fnow(:,:,:  ),'Z',1. )
                ENDIF
             ELSE
Index: NEMO/trunk/src/OCE/SBC/geo2ocean.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/geo2ocean.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/geo2ocean.F90	(revision 10425)
@@ -152,5 +152,5 @@
          &      gsinv(jpi,jpj), gcosv(jpi,jpj),   &  
          &      gsinf(jpi,jpj), gcosf(jpi,jpj), STAT=ierr )
-      IF(lk_mpp)   CALL mpp_sum( ierr )
+      CALL mpp_sum( 'geo2ocean', ierr )
       IF( ierr /= 0 )   CALL ctl_stop( 'angle: unable to allocate arrays' )
       !
@@ -276,5 +276,5 @@
       ! =========================== !
       !           ! lateral boundary cond.: T-, U-, V-, F-pts, sgn
-      CALL lbc_lnk_multi( gcost, 'T', -1., gsint, 'T', -1., gcosu, 'U', -1., gsinu, 'U', -1., & 
+      CALL lbc_lnk_multi( 'geo2ocean', gcost, 'T', -1., gsint, 'T', -1., gcosu, 'U', -1., gsinu, 'U', -1., & 
                       &   gcosv, 'V', -1., gsinv, 'V', -1., gcosf, 'F', -1., gsinf, 'F', -1.  )
       !
@@ -304,5 +304,5 @@
          ALLOCATE( gsinlon(jpi,jpj,4) , gcoslon(jpi,jpj,4) ,   &
             &      gsinlat(jpi,jpj,4) , gcoslat(jpi,jpj,4) , STAT=ierr )
-         IF( lk_mpp    )   CALL mpp_sum( ierr )
+         CALL mpp_sum( 'geo2ocean', ierr )
          IF( ierr /= 0 )   CALL ctl_stop('geo2oce: unable to allocate arrays' )
       ENDIF
@@ -381,5 +381,5 @@
          ALLOCATE( gsinlon(jpi,jpj,4) , gcoslon(jpi,jpj,4) ,   &
             &      gsinlat(jpi,jpj,4) , gcoslat(jpi,jpj,4) , STAT=ierr )
-         IF( lk_mpp    )   CALL mpp_sum( ierr )
+         CALL mpp_sum( 'geo2ocean', ierr )
          IF( ierr /= 0 )   CALL ctl_stop('oce2geo: unable to allocate arrays' )
       ENDIF
Index: NEMO/trunk/src/OCE/SBC/sbc_ice.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbc_ice.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/sbc_ice.F90	(revision 10425)
@@ -150,5 +150,5 @@
 
       sbc_ice_alloc = MAXVAL( ierr )
-      IF( lk_mpp            )   CALL mpp_sum ( sbc_ice_alloc )
+      CALL mpp_sum ( 'sbc_ice', sbc_ice_alloc )
       IF( sbc_ice_alloc > 0 )   CALL ctl_warn('sbc_ice_alloc: allocation of arrays failed')
    END FUNCTION sbc_ice_alloc
@@ -197,5 +197,5 @@
       ALLOCATE( snwice_mass(jpi,jpj) , snwice_mass_b(jpi,jpj), snwice_fmass(jpi,jpj) , STAT=ierr(1) )
       sbc_ice_alloc = MAXVAL( ierr )
-      IF( lk_mpp            )   CALL mpp_sum ( sbc_ice_alloc )
+      CALL mpp_sum ( 'sbc_ice', sbc_ice_alloc )
       IF( sbc_ice_alloc > 0 )   CALL ctl_warn('sbc_ice_alloc: allocation of arrays failed')
    END FUNCTION sbc_ice_alloc
Index: NEMO/trunk/src/OCE/SBC/sbc_oce.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbc_oce.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/sbc_oce.F90	(revision 10425)
@@ -186,5 +186,5 @@
          !
       sbc_oce_alloc = MAXVAL( ierr )
-      IF( lk_mpp            )   CALL mpp_sum ( sbc_oce_alloc )
+      CALL mpp_sum ( 'sbc_oce', sbc_oce_alloc )
       IF( sbc_oce_alloc > 0 )   CALL ctl_warn('sbc_oce_alloc: allocation of arrays failed')
       !
@@ -216,5 +216,5 @@
          END DO
       END DO
-      CALL lbc_lnk( wndm(:,:) , 'T', 1. )
+      CALL lbc_lnk( 'sbc_oce', wndm(:,:) , 'T', 1. )
       !
    END SUBROUTINE sbc_tau2wnd
Index: NEMO/trunk/src/OCE/SBC/sbcapr.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbcapr.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/sbcapr.F90	(revision 10425)
@@ -94,5 +94,5 @@
       !
       IF( ln_ref_apr ) THEN                        !* Compute whole inner domain mean masked ocean surface
-         tarea = glob_sum( e1e2t(:,:) )
+         tarea = glob_sum( 'sbcapr', e1e2t(:,:) )
          IF(lwp) WRITE(numout,*) '         Variable ref. Patm computed over a ocean surface of ', tarea*1e-6, 'km2'
       ELSE
@@ -141,5 +141,5 @@
          !
          !                                                  !* update the reference atmospheric pressure (if necessary)
-         IF( ln_ref_apr )   rn_pref = glob_sum( sf_apr(1)%fnow(:,:,1) * e1e2t(:,:) ) / tarea
+         IF( ln_ref_apr )   rn_pref = glob_sum( 'sbcapr', sf_apr(1)%fnow(:,:,1) * e1e2t(:,:) ) / tarea
          !
          !                                                  !* Patm related forcing at kt
Index: NEMO/trunk/src/OCE/SBC/sbcblk.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbcblk.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/sbcblk.F90	(revision 10425)
@@ -147,6 +147,6 @@
          &      cdn_oce(jpi,jpj), chn_oce(jpi,jpj), cen_oce(jpi,jpj), STAT=sbc_blk_alloc )
       !
-      IF( lk_mpp             )   CALL mpp_sum ( sbc_blk_alloc )
-      IF( sbc_blk_alloc /= 0 )   CALL ctl_warn('sbc_blk_alloc: failed to allocate arrays')
+      CALL mpp_sum ( 'sbcblk', sbc_blk_alloc )
+      IF( sbc_blk_alloc /= 0 )   CALL ctl_stop( 'STOP', 'sbc_blk_alloc: failed to allocate arrays' )
    END FUNCTION sbc_blk_alloc
 
@@ -236,5 +236,5 @@
       !Activated wave module but neither drag nor stokes drift activated
          IF ( .NOT.(ln_cdgw .OR. ln_sdw .OR. ln_tauwoc .OR. ln_stcor ) )   THEN
-            CALL ctl_warn( 'Ask for wave coupling but ln_cdgw=F, ln_sdw=F, ln_tauwoc=F, ln_stcor=F')
+            CALL ctl_stop( 'STOP',  'Ask for wave coupling but ln_cdgw=F, ln_sdw=F, ln_tauwoc=F, ln_stcor=F' )
       !drag coefficient read from wave model definable only with mfs bulk formulae and core 
          ELSEIF (ln_cdgw .AND. .NOT. ln_NCAR )       THEN       
@@ -407,5 +407,5 @@
          END DO
       END DO
-      CALL lbc_lnk_multi( zwnd_i, 'T', -1., zwnd_j, 'T', -1. )
+      CALL lbc_lnk_multi( 'sbcblk', zwnd_i, 'T', -1., zwnd_j, 'T', -1. )
       ! ... scalar wind ( = | U10m - U_oce | ) at T-point (masked)
       wndm(:,:) = SQRT(  zwnd_i(:,:) * zwnd_i(:,:)   &
@@ -485,5 +485,5 @@
          END DO
       END DO
-      CALL lbc_lnk_multi( utau, 'U', -1., vtau, 'V', -1. )
+      CALL lbc_lnk_multi( 'sbcblk', utau, 'U', -1., vtau, 'V', -1. )
 
       !  Turbulent fluxes over ocean
@@ -727,5 +727,5 @@
          END DO
       END DO
-      CALL lbc_lnk( wndm_ice, 'T',  1. )
+      CALL lbc_lnk( 'sbcblk', wndm_ice, 'T',  1. )
       !
       ! Make ice-atm. drag dependent on ice concentration
@@ -761,5 +761,5 @@
          END DO
       END DO
-      CALL lbc_lnk_multi( utau_ice, 'U', -1., vtau_ice, 'V', -1. )
+      CALL lbc_lnk_multi( 'sbcblk', utau_ice, 'U', -1., vtau_ice, 'V', -1. )
       !
       !
@@ -1186,5 +1186,5 @@
          END DO
       END DO
-      CALL lbc_lnk_multi( Cd, 'T',  1., Ch, 'T', 1. )
+      CALL lbc_lnk_multi( 'sbcblk', Cd, 'T',  1., Ch, 'T', 1. )
       !
    END SUBROUTINE Cdn10_Lupkes2015
Index: NEMO/trunk/src/OCE/SBC/sbccpl.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbccpl.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/sbccpl.F90	(revision 10425)
@@ -224,5 +224,5 @@
 
       sbc_cpl_alloc = MAXVAL( ierr )
-      IF( lk_mpp            )   CALL mpp_sum ( sbc_cpl_alloc )
+      CALL mpp_sum ( 'sbccpl', sbc_cpl_alloc )
       IF( sbc_cpl_alloc > 0 )   CALL ctl_warn('sbc_cpl_alloc: allocation of arrays failed')
       !
@@ -1162,5 +1162,5 @@
                   END DO
                END DO
-               CALL lbc_lnk_multi( frcv(jpr_otx1)%z3(:,:,1), 'U',  -1., frcv(jpr_oty1)%z3(:,:,1), 'V',  -1. )
+               CALL lbc_lnk_multi( 'sbccpl', frcv(jpr_otx1)%z3(:,:,1), 'U',  -1., frcv(jpr_oty1)%z3(:,:,1), 'V',  -1. )
             ENDIF
             llnewtx = .TRUE.
@@ -1189,5 +1189,5 @@
                END DO
             END DO
-            CALL lbc_lnk( frcv(jpr_taum)%z3(:,:,1), 'T', 1. )
+            CALL lbc_lnk( 'sbccpl', frcv(jpr_taum)%z3(:,:,1), 'T', 1. )
             llnewtau = .TRUE.
          ELSE
@@ -1570,5 +1570,5 @@
          END SELECT
          IF( srcv(jpr_itx1)%clgrid /= 'U' ) THEN 
-            CALL lbc_lnk_multi( p_taui, 'U',  -1., p_tauj, 'V',  -1. )
+            CALL lbc_lnk_multi( 'sbccpl', p_taui, 'U',  -1., p_tauj, 'V',  -1. )
          ENDIF
          
@@ -2335,5 +2335,5 @@
                   END DO
                END DO
-               CALL lbc_lnk_multi( zitx1, 'T', -1., zity1, 'T', -1. )
+               CALL lbc_lnk_multi( 'sbccpl', zitx1, 'T', -1., zity1, 'T', -1. )
             CASE( 'mixed oce-ice'        )      ! Ocean and Ice on C-grid ==> T
                DO jj = 2, jpjm1
@@ -2346,5 +2346,5 @@
                END DO
             END SELECT
-            CALL lbc_lnk_multi( zotx1, ssnd(jps_ocx1)%clgrid, -1.,  zoty1, ssnd(jps_ocy1)%clgrid, -1. )
+            CALL lbc_lnk_multi( 'sbccpl', zotx1, ssnd(jps_ocx1)%clgrid, -1.,  zoty1, ssnd(jps_ocy1)%clgrid, -1. )
             !
          ENDIF
@@ -2418,5 +2418,5 @@
                 END DO
              END DO
-             CALL lbc_lnk_multi( zitx1, 'T', -1.,  zity1, 'T', -1. ) 
+             CALL lbc_lnk_multi( 'sbccpl', zitx1, 'T', -1.,  zity1, 'T', -1. ) 
           CASE( 'mixed oce-ice'        )      ! Ocean and Ice on C-grid ==> T  
              DO jj = 2, jpjm1 
@@ -2429,5 +2429,5 @@
              END DO
           END SELECT
-         CALL lbc_lnk_multi( zotx1, ssnd(jps_ocxw)%clgrid, -1., zoty1, ssnd(jps_ocyw)%clgrid, -1. ) 
+         CALL lbc_lnk_multi( 'sbccpl', zotx1, ssnd(jps_ocxw)%clgrid, -1., zoty1, ssnd(jps_ocyw)%clgrid, -1. ) 
          ! 
          ! 
Index: NEMO/trunk/src/OCE/SBC/sbcdcy.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbcdcy.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/sbcdcy.F90	(revision 10425)
@@ -44,6 +44,6 @@
             &      rtmd(jpi,jpj) , rdawn(jpi,jpj) , rdusk(jpi,jpj) , rscal(jpi,jpj) , STAT=sbc_dcy_alloc )
             !
-         IF( lk_mpp             )   CALL mpp_sum ( sbc_dcy_alloc )
-         IF( sbc_dcy_alloc /= 0 )   CALL ctl_warn('sbc_dcy_alloc: failed to allocate arrays')
+         CALL mpp_sum ( 'sbcdcy', sbc_dcy_alloc )
+         IF( sbc_dcy_alloc /= 0 )   CALL ctl_stop( 'STOP', 'sbc_dcy_alloc: failed to allocate arrays' )
       END FUNCTION sbc_dcy_alloc
 
Index: NEMO/trunk/src/OCE/SBC/sbcflx.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbcflx.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/sbcflx.F90	(revision 10425)
@@ -157,5 +157,5 @@
          END DO
          taum(:,:) = taum(:,:) * tmask(:,:,1) ; wndm(:,:) = wndm(:,:) * tmask(:,:,1)
-         CALL lbc_lnk( taum(:,:), 'T', 1. )   ;   CALL lbc_lnk( wndm(:,:), 'T', 1. )
+         CALL lbc_lnk( 'sbcflx', taum(:,:), 'T', 1. )   ;   CALL lbc_lnk( 'sbcflx', wndm(:,:), 'T', 1. )
 
          IF( nitend-nit000 <= 100 .AND. lwp ) THEN                ! control print (if less than 100 time-step asked)
Index: NEMO/trunk/src/OCE/SBC/sbcfwb.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbcfwb.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/sbcfwb.F90	(revision 10425)
@@ -71,4 +71,6 @@
       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   ztmsk_neg, ztmsk_pos, z_wgt ! 2D workspaces
       REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   ztmsk_tospread, zerp_cor    !   -      -
+      REAL(wp)   ,DIMENSION(1) ::   z_fwfprv  
+      COMPLEX(wp),DIMENSION(1) ::   y_fwfnow  
       !!----------------------------------------------------------------------
       !
@@ -86,5 +88,5 @@
          IF( kn_fwb == 3 .AND. ln_isfcav    )   CALL ctl_stop( 'sbc_fwb: nn_fwb = 3 with ln_isfcav = .TRUE. not working, we stop ' )
          !
-         area = glob_sum( e1e2t(:,:) * tmask(:,:,1))           ! interior global domain surface
+         area = glob_sum( 'sbcfwb', e1e2t(:,:) * tmask(:,:,1))           ! interior global domain surface
          ! isf cavities are excluded because it can feedback to the melting with generation of inhibition of plumes
          ! and in case of no melt, it can generate HSSW.
@@ -102,7 +104,9 @@
          !
          IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN
-            z_fwf = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf(:,:) - snwice_fmass(:,:) ) ) / area   ! sum over the global domain
-            zcoef = z_fwf * rcp
-            emp(:,:) = emp(:,:) - z_fwf              * tmask(:,:,1)
+            y_fwfnow(1) = local_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf(:,:) - snwice_fmass(:,:) ) )
+            CALL mpp_delay_sum( 'sbcfwb', 'fwb', y_fwfnow(:), z_fwfprv(:), kt == nitend - nn_fsbc + 1 )
+            z_fwfprv(1) = z_fwfprv(1) / area
+            zcoef = z_fwfprv(1) * rcp
+            emp(:,:) = emp(:,:) - z_fwfprv(1)        * tmask(:,:,1)
             qns(:,:) = qns(:,:) + zcoef * sst_m(:,:) * tmask(:,:,1) ! account for change to the heat budget due to fw correction
          ENDIF
@@ -127,5 +131,5 @@
             a_fwb_b = a_fwb                           ! mean sea level taking into account the ice+snow
                                                       ! sum over the global domain
-            a_fwb   = glob_sum( e1e2t(:,:) * ( sshn(:,:) + snwice_mass(:,:) * r1_rau0 ) )
+            a_fwb   = glob_sum( 'sbcfwb', e1e2t(:,:) * ( sshn(:,:) + snwice_mass(:,:) * r1_rau0 ) )
             a_fwb   = a_fwb * 1.e+3 / ( area * rday * 365. )     ! convert in Kg/m3/s = mm/s
 !!gm        !                                                      !!bug 365d year 
@@ -154,23 +158,22 @@
             WHERE( erp < 0._wp )   ztmsk_pos = 0._wp
             ztmsk_neg(:,:) = tmask_i(:,:) - ztmsk_pos(:,:)
-            !
-            zsurf_neg = glob_sum( e1e2t(:,:)*ztmsk_neg(:,:) )  ! Area filled by <0 and >0 erp 
-            zsurf_pos = glob_sum( e1e2t(:,:)*ztmsk_pos(:,:) )
             !                                                  ! fwf global mean (excluding ocean to ice/snow exchanges) 
-            z_fwf     = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf(:,:) - snwice_fmass(:,:) ) ) / area
+            z_fwf     = glob_sum( 'sbcfwb', e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf(:,:) - snwice_fmass(:,:) ) ) / area
             !            
             IF( z_fwf < 0._wp ) THEN         ! spread out over >0 erp area to increase evaporation
-                zsurf_tospread      = zsurf_pos
-                ztmsk_tospread(:,:) = ztmsk_pos(:,:)
+               zsurf_pos = glob_sum( 'sbcfwb', e1e2t(:,:)*ztmsk_pos(:,:) )
+               zsurf_tospread      = zsurf_pos
+               ztmsk_tospread(:,:) = ztmsk_pos(:,:)
             ELSE                             ! spread out over <0 erp area to increase precipitation
-                zsurf_tospread      = zsurf_neg
-                ztmsk_tospread(:,:) = ztmsk_neg(:,:)
+               zsurf_neg = glob_sum( 'sbcfwb', e1e2t(:,:)*ztmsk_neg(:,:) )  ! Area filled by <0 and >0 erp 
+               zsurf_tospread      = zsurf_neg
+               ztmsk_tospread(:,:) = ztmsk_neg(:,:)
             ENDIF
             !
-            zsum_fwf   = glob_sum( e1e2t(:,:) * z_fwf )         ! fwf global mean over <0 or >0 erp area
+            zsum_fwf   = glob_sum( 'sbcfwb', e1e2t(:,:) * z_fwf )         ! fwf global mean over <0 or >0 erp area
 !!gm :  zsum_fwf   = z_fwf * area   ???  it is right?  I think so....
             z_fwf_nsrf =  zsum_fwf / ( zsurf_tospread + rsmall )
             !                                                  ! weight to respect erp field 2D structure 
-            zsum_erp   = glob_sum( ztmsk_tospread(:,:) * erp(:,:) * e1e2t(:,:) )
+            zsum_erp   = glob_sum( 'sbcfwb', ztmsk_tospread(:,:) * erp(:,:) * e1e2t(:,:) )
             z_wgt(:,:) = ztmsk_tospread(:,:) * erp(:,:) / ( zsum_erp + rsmall )
             !                                                  ! final correction term to apply
@@ -178,5 +181,5 @@
             !
 !!gm   ===>>>>  lbc_lnk should be useless as all the computation is done over the whole domain !
-            CALL lbc_lnk( zerp_cor, 'T', 1. )
+            CALL lbc_lnk( 'sbcfwb', zerp_cor, 'T', 1. )
             !
             emp(:,:) = emp(:,:) + zerp_cor(:,:)
Index: NEMO/trunk/src/OCE/SBC/sbcice_cice.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbcice_cice.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/sbcice_cice.F90	(revision 10425)
@@ -100,5 +100,5 @@
       !!----------------------------------------------------------------------
       ALLOCATE( png(jpi,jpj,jpnij), STAT=sbc_ice_cice_alloc )
-      IF( lk_mpp                 )   CALL mpp_sum ( sbc_ice_cice_alloc )
+      CALL mpp_sum ( 'sbcice_cice', sbc_ice_cice_alloc )
       IF( sbc_ice_cice_alloc > 0 )   CALL ctl_warn('sbc_ice_cice_alloc: allocation of arrays failed.')
    END FUNCTION sbc_ice_cice_alloc
@@ -217,5 +217,5 @@
       ENDDO
 
-      CALL lbc_lnk_multi( fr_iu , 'U', 1.,  fr_iv , 'V', 1. )
+      CALL lbc_lnk_multi( 'sbcice_cice', fr_iu , 'U', 1.,  fr_iv , 'V', 1. )
 
       ! set the snow+ice mass
@@ -513,5 +513,5 @@
          ENDDO
       ENDDO
-      CALL lbc_lnk( ss_iou , 'U', -1. )
+      CALL lbc_lnk( 'sbcice_cice', ss_iou , 'U', -1. )
 
 ! y comp of ocean-ice stress 
@@ -525,5 +525,5 @@
          ENDDO
       ENDDO
-      CALL lbc_lnk( ss_iov , 'V', -1. )
+      CALL lbc_lnk( 'sbcice_cice', ss_iov , 'V', -1. )
 
 ! x and y comps of surface stress
@@ -578,5 +578,5 @@
       fmmflx(:,:) = ztmp1(:,:) !!Joakim edit
       
-      CALL lbc_lnk_multi( emp , 'T', 1., sfx , 'T', 1. )
+      CALL lbc_lnk_multi( 'sbcice_cice', emp , 'T', 1., sfx , 'T', 1. )
 
 ! Solar penetrative radiation and non solar surface heat flux
@@ -604,5 +604,5 @@
 #endif
       qsr(:,:)=qsr(:,:)+ztmp1(:,:)
-      CALL lbc_lnk( qsr , 'T', 1. )
+      CALL lbc_lnk( 'sbcice_cice', qsr , 'T', 1. )
 
       DO jj=1,jpj
@@ -619,5 +619,5 @@
       qns(:,:)=qns(:,:)+nfrzmlt(:,:)+ztmp1(:,:)
 
-      CALL lbc_lnk( qns , 'T', 1. )
+      CALL lbc_lnk( 'sbcice_cice', qns , 'T', 1. )
 
 ! Prepare for the following CICE time-step
@@ -639,5 +639,5 @@
       ENDDO
 
-      CALL lbc_lnk_multi( fr_iu , 'U', 1., fr_iv , 'V', 1. )
+      CALL lbc_lnk_multi( 'sbcice_cice', fr_iu , 'U', 1., fr_iv , 'V', 1. )
 
       ! set the snow+ice mass
@@ -863,5 +863,5 @@
 !     A. Ensure all haloes are filled in NEMO field (pn)
 
-      CALL lbc_lnk( pn , cd_type, psgn )
+      CALL lbc_lnk( 'sbcice_cice', pn , cd_type, psgn )
 
 #if defined key_nemocice_decomp
@@ -1040,5 +1040,5 @@
 !     D. Ensure all haloes are filled in pn
 
-      CALL lbc_lnk( pn , cd_type, psgn )
+      CALL lbc_lnk( 'sbcice_cice', pn , cd_type, psgn )
 
    END SUBROUTINE cice2nemo
Index: NEMO/trunk/src/OCE/SBC/sbcisf.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbcisf.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/sbcisf.F90	(revision 10425)
@@ -157,5 +157,5 @@
 
          ! lbclnk
-         CALL lbc_lnk_multi( risf_tsc(:,:,jp_tem), 'T', 1., risf_tsc(:,:,jp_sal), 'T', 1., fwfisf,'T', 1., qisf, 'T', 1.)
+         CALL lbc_lnk_multi( 'sbcisf', risf_tsc(:,:,jp_tem), 'T', 1., risf_tsc(:,:,jp_sal), 'T', 1., fwfisf,'T', 1., qisf, 'T', 1.)
          ! output
          IF( iom_use('iceshelf_cea') )   CALL iom_put( 'iceshelf_cea', -fwfisf(:,:)                      )   ! isf mass flux
@@ -244,6 +244,6 @@
                &    STAT= sbc_isf_alloc )
          !
-         IF( lk_mpp             )   CALL mpp_sum ( sbc_isf_alloc )
-         IF( sbc_isf_alloc /= 0 )   CALL ctl_warn('sbc_isf_alloc: failed to allocate arrays.')
+         CALL mpp_sum ( 'sbcisf', sbc_isf_alloc )
+         IF( sbc_isf_alloc /= 0 )   CALL ctl_stop( 'STOP', 'sbc_isf_alloc: failed to allocate arrays.' )
          !
       ENDIF
@@ -721,5 +721,5 @@
             END DO
          END DO
-         CALL lbc_lnk_multi( pgt, 'T', 1., pgs, 'T', 1.)
+         CALL lbc_lnk_multi( 'sbcisf', pgt, 'T', 1., pgs, 'T', 1.)
       END SELECT
       !
@@ -778,5 +778,5 @@
             END DO
          END DO
-         CALL lbc_lnk(pvarout,'T',-1.)
+         CALL lbc_lnk('sbcisf', pvarout,'T',-1.)
       
       CASE ( 'V' ) ! compute V in the top boundary layer at T- point 
@@ -810,5 +810,5 @@
             END DO
          END DO
-         CALL lbc_lnk(pvarout,'T',-1.)
+         CALL lbc_lnk('sbcisf', pvarout,'T',-1.)
 
       CASE ( 'T' ) ! compute T in the top boundary layer at T- point 
Index: NEMO/trunk/src/OCE/SBC/sbcmod.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbcmod.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/sbcmod.F90	(revision 10425)
@@ -115,4 +115,7 @@
       IF(lwm) WRITE( numond, namsbc )
       !
+#if defined key_mpp_mpi
+      ncom_fsbc = nn_fsbc    ! make nn_fsbc available for lib_mpp
+#endif
       !                             !* overwrite namelist parameter using CPP key information
 #if defined key_agrif
@@ -440,5 +443,5 @@
          ! icebergs may advect into haloes during the icb step and alter emp.
          ! A lbc_lnk is necessary here to ensure restartability (#2113)
-         IF( .NOT. ln_passive_mode ) CALL lbc_lnk( emp, 'T', 1. ) ! ensure restartability with icebergs
+         IF( .NOT. ln_passive_mode ) CALL lbc_lnk( 'sbcmod', emp, 'T', 1. ) ! ensure restartability with icebergs
       ENDIF
 
@@ -457,5 +460,5 @@
 !!$!RBbug do not understand why see ticket 667
 !!$!clem: it looks like it is necessary for the north fold (in certain circumstances). Don't know why.
-!!$      CALL lbc_lnk( emp, 'T', 1. )
+!!$      CALL lbc_lnk( 'sbcmod', emp, 'T', 1. )
       !
       IF( kt == nit000 ) THEN                          !   set the forcing field at nit000 - 1    !
Index: NEMO/trunk/src/OCE/SBC/sbcrnf.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbcrnf.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/sbcrnf.F90	(revision 10425)
@@ -83,5 +83,5 @@
          &      rnf_tsc_b(jpi,jpj,jpts) , rnf_tsc (jpi,jpj,jpts) , STAT=sbc_rnf_alloc )
          !
-      IF( lk_mpp            )   CALL mpp_sum ( sbc_rnf_alloc )
+      CALL mpp_sum ( 'sbcrnf', sbc_rnf_alloc )
       IF( sbc_rnf_alloc > 0 )   CALL ctl_warn('sbc_rnf_alloc: allocation of arrays failed')
    END FUNCTION sbc_rnf_alloc
@@ -423,5 +423,5 @@
          IF( nn_rnf_depth_file == 1 ) THEN      !  save  output nb levels for runoff
             IF(lwp) WRITE(numout,*) '   ==>>>   create runoff depht file'
-            CALL iom_open  ( TRIM( sn_dep_rnf%clname ), inum, ldwrt = .TRUE., kiolib = jprstlib )
+            CALL iom_open  ( TRIM( sn_dep_rnf%clname ), inum, ldwrt = .TRUE. )
             CALL iom_rstput( 0, 0, inum, 'rodepth', h_rnf )
             CALL iom_close ( inum )
Index: NEMO/trunk/src/OCE/SBC/sbcssm.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbcssm.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/sbcssm.F90	(revision 10425)
@@ -18,4 +18,5 @@
    USE sbcapr         ! surface boundary condition: atmospheric pressure
    USE eosbn2         ! equation of state and related derivatives
+   USE traqsr, ONLY: ln_traqsr
    !
    USE in_out_manager ! I/O manager
@@ -253,4 +254,6 @@
       ENDIF
       !
+      IF( .NOT. ln_traqsr )   fraqsr_1lev(:,:) = 1._wp   ! default definition: qsr 100% in the fisrt level 
+      !
       IF( lwxios.AND.nn_fsbc > 1 ) THEN
          CALL iom_set_rstw_var_active('nn_fsbc')
Index: NEMO/trunk/src/OCE/SBC/sbcwave.F90
===================================================================
--- NEMO/trunk/src/OCE/SBC/sbcwave.F90	(revision 10404)
+++ NEMO/trunk/src/OCE/SBC/sbcwave.F90	(revision 10425)
@@ -215,5 +215,5 @@
       ENDIF
 
-      CALL lbc_lnk_multi( usd, 'U', -1., vsd, 'V', -1. )
+      CALL lbc_lnk_multi( 'sbcwave', usd, 'U', -1., vsd, 'V', -1. )
 
       !
@@ -240,5 +240,5 @@
 #endif
       !
-      CALL lbc_lnk( ze3divh, 'T', 1. )
+      CALL lbc_lnk( 'sbcwave', ze3divh, 'T', 1. )
       !
       IF( ln_linssh ) THEN   ;   ik = 1   ! none zero velocity through the sea surface
@@ -301,5 +301,5 @@
             END DO
          END DO
-         CALL lbc_lnk_multi( utau(:,:), 'U', -1. , vtau(:,:), 'V', -1. , taum(:,:) , 'T', -1. )
+         CALL lbc_lnk_multi( 'sbcwave', utau(:,:), 'U', -1. , vtau(:,:), 'V', -1. , taum(:,:) , 'T', -1. )
       ENDIF
       !
