Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 4327)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 4328)
@@ -19,5 +19,4 @@
    USE lib_mpp         ! distributed memory computing library
    USE trabbc          ! bottom boundary condition
-   USE obc_par         ! (for lk_obc)
    USE bdy_par         ! (for lk_bdy)
    USE timing          ! preformance summary
@@ -263,5 +262,5 @@
          ! ----------------------------------------------- !
          IF(lwp) WRITE(numout,*) "dia_hsb: heat salt volume budgets activated"
-         IF( lk_obc .or. lk_bdy ) THEN
+         IF( lk_bdy ) THEN
             CALL ctl_warn( 'dia_hsb does not take open boundary fluxes into account' )         
          ENDIF
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 4327)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 4328)
@@ -115,5 +115,5 @@
       !!      even IF nperio is not zero.
       !!
-      !!      In case of open boundaries (lk_obc=T):
+      !!      In case of open boundaries (lk_bdy=T):
       !!        - tmask is set to 1 on the points to be computed bay the open
       !!          boundaries routines.
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90	(revision 4327)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90	(revision 4328)
@@ -24,5 +24,4 @@
    USE oce              ! ocean dynamics and tracers
    USE dom_oce          ! ocean space and time domain
-   USE obc_oce          ! ocean lateral open boundary condition
    USE in_out_manager   ! I/O manager
    USE lib_mpp          ! distributed memory computing
@@ -419,14 +418,4 @@
          END DO
 
-#if defined key_obc
-         IF( Agrif_Root() ) THEN
-            ! open boundaries (div must be zero behind the open boundary)
-            !  mpp remark: The zeroing of zhdivnep can probably be extended to 1->jpi/jpj for the correct row/column
-            IF( lp_obc_east  )  zhdivnep(nie0p1:nie1p1,nje0  :nje1  ,jk) = 0.0_wp      ! east
-            IF( lp_obc_west  )  zhdivnep(niw0  :niw1  ,njw0  :njw1  ,jk) = 0.0_wp      ! west
-            IF( lp_obc_north )  zhdivnep(nin0  :nin1  ,njn0p1:njn1p1,jk) = 0.0_wp      ! north
-            IF( lp_obc_south )  zhdivnep(nis0  :nis1  ,njs0  :njs1  ,jk) = 0.0_wp      ! south
-         ENDIF
-#endif
          IF( .NOT. AGRIF_Root() ) THEN
             IF ((nbondi ==  1).OR.(nbondi == 2))  zhdivnep(nlci-1 , :     ,jk) = 0.0_wp   ! east
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 4327)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 4328)
@@ -30,8 +30,4 @@
    USE dynadv          ! dynamics: vector invariant versus flux form
    USE domvvl          ! variable volume
-   USE obc_oce         ! ocean open boundary conditions
-   USE obcdyn          ! open boundary condition for momentum (obc_dyn routine)
-   USE obcdyn_bt       ! 2D open boundary condition for momentum (obc_dyn_bt routine)
-   USE obcvol          ! ocean open boundary condition (obc_vol routines)
    USE bdy_oce         ! ocean open boundary conditions
    USE bdydta          ! ocean open boundary conditions
@@ -83,5 +79,5 @@
       !!              * Apply lateral boundary conditions on after velocity 
       !!             at the local domain boundaries through lbc_lnk call,
-      !!             at the one-way open boundaries (lk_obc=T),
+      !!             at the one-way open boundaries (lk_bdy=T),
       !!             at the AGRIF zoom     boundaries (lk_agrif=T)
       !!
@@ -204,24 +200,5 @@
       CALL lbc_lnk( va, 'V', -1. ) 
       !
-# if defined key_obc
-      !                                !* OBC open boundaries
-      IF( lk_obc ) CALL obc_dyn( kt )
-      !
-      IF( .NOT. lk_dynspg_flt ) THEN
-         ! Flather boundary condition : - Update sea surface height on each open boundary
-         !                                       sshn   (= after ssh   ) for explicit case (lk_dynspg_exp=T)
-         !                                       sshn_b (= after ssha_b) for time-splitting case (lk_dynspg_ts=T)
-         !                              - Correct the barotropic velocities
-         IF( lk_obc ) CALL obc_dyn_bt( kt )
-         !
-!!gm ERROR - potential BUG: sshn should not be modified at this stage !!   ssh_nxt not alrady called
-         CALL lbc_lnk( sshn, 'T', 1. )         ! Boundary conditions on sshn
-         !
-         IF( lk_obc .AND. ln_vol_cst )   CALL obc_vol( kt )
-         !
-         IF(ln_ctl)   CALL prt_ctl( tab2d_1=sshn, clinfo1=' ssh      : ', mask1=tmask )
-      ENDIF
-      !
-# elif defined key_bdy
+# if defined key_bdy
       !                                !* BDY open boundaries
       IF( lk_bdy .AND. lk_dynspg_exp ) CALL bdy_dyn( kt )
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 4327)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 4328)
@@ -18,8 +18,5 @@
    USE dom_oce         ! ocean space and time domain 
    USE sbc_oce         ! surface boundary condition: ocean
-   USE obc_oce         ! Lateral open boundary condition
    USE phycst          ! physical constants
-   USE obc_par         ! open boundary condition parameters
-   USE obcdta          ! open boundary condition data     (bdy_dta_bt routine)
    USE in_out_manager  ! I/O manager
    USE lib_mpp         ! distributed memory computing library
@@ -79,9 +76,4 @@
       ENDIF
 
-
-!!gm bug ??  Rachid we have to discuss of the call below. I don't understand why it is here and not in ssh_wzv
-      IF( lk_obc )   CALL obc_dta_bt( kt, 0 )      ! OBC: read or estimate ssh and vertically integrated velocities
-!!gm
-
       IF( .NOT. lk_vvl ) THEN          !* fixed volume : add the surface pressure gradient trend
          !
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 4327)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 4328)
@@ -25,5 +25,4 @@
    USE zdf_oce         ! ocean vertical physics
    USE sbc_oce         ! surface boundary condition: ocean
-   USE obc_oce         ! Lateral open boundary condition
    USE bdy_oce         ! Lateral open boundary condition
    USE sol_oce         ! ocean elliptic solver
@@ -34,6 +33,4 @@
    USE solpcg          ! preconditionned conjugate gradient solver
    USE solsor          ! Successive Over-relaxation solver
-   USE obcdyn          ! ocean open boundary condition on dynamics
-   USE obcvol          ! ocean open boundary condition (obc_vol routine)
    USE bdydyn          ! ocean open boundary condition on dynamics
    USE bdyvol          ! ocean open boundary condition (bdy_vol routine)
@@ -184,8 +181,4 @@
       ENDIF
 
-#if defined key_obc
-      IF( lk_obc ) CALL obc_dyn( kt )   ! Update velocities on each open boundary with the radiation algorithm
-      IF( lk_obc ) CALL obc_vol( kt )   ! Correction of the barotropic componant velocity to control the volume of the system
-#endif
 #if defined key_bdy
       IF( lk_bdy ) CALL bdy_dyn( kt )   ! Update velocities on each open boundary
@@ -304,16 +297,5 @@
             ztdgv = z2dtg * (gcx(ji  ,jj+1) - gcx(ji,jj) ) / e2v(ji,jj)
             ! multiplied by z2dt
-#if defined key_obc
-            IF(lk_obc) THEN
-            ! caution : grad D = 0 along open boundaries
-            ! Remark: The filtering force could be reduced here in the FRS zone
-            !         by multiplying spgu/spgv by (1-alpha) ??  
-               spgu(ji,jj) = z2dt * ztdgu * obcumask(ji,jj)
-               spgv(ji,jj) = z2dt * ztdgv * obcvmask(ji,jj)
-            ELSE
-               spgu(ji,jj) = z2dt * ztdgu
-               spgv(ji,jj) = z2dt * ztdgv
-            ENDIF
-#elif defined key_bdy
+#if defined key_bdy
             IF(lk_bdy) THEN
             ! caution : grad D = 0 along open boundaries
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 4327)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 4328)
@@ -28,6 +28,4 @@
    USE lbclnk          ! ocean lateral boundary condition (or mpp link)
    USE lib_mpp         ! MPP library
-   USE obc_par         ! open boundary cond. parameter
-   USE obc_oce
    USE bdy_oce
    USE bdy_par         
@@ -120,10 +118,4 @@
       CALL agrif_ssh( kt )
 #endif
-#if defined key_obc
-      IF( Agrif_Root() ) THEN 
-         ssha(:,:) = ssha(:,:) * obctmsk(:,:)
-         CALL lbc_lnk( ssha, 'T', 1. )                 ! absolutly compulsory !! (jmm)
-      ENDIF
-#endif
 #if defined key_bdy
       ! bg jchanut tschanges
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/FLO/floblk.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/FLO/floblk.F90	(revision 4327)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/FLO/floblk.F90	(revision 4328)
@@ -14,5 +14,4 @@
    USE dom_oce         ! ocean space and time domain
    USE phycst          ! physical constants
-   USE obc_par         ! open boundary condition parameters
    USE in_out_manager  ! I/O manager
    USE lib_mpp         ! distribued memory computing library
@@ -345,41 +344,4 @@
       IF( lk_mpp )   CALL mpp_sum( ijl   , jpnfl )
       
-      ! in the case of open boundaries we need to test if the floats don't
-      ! go out of the domain. If it goes out, the float is put at the 
-      ! middle of the mesh in the domain but the trajectory isn't compute 
-      ! more time.      
-# if defined key_obc
-      DO jfl = 1, jpnfl
-         IF( lp_obc_east ) THEN
-            IF( jped <=  zgjfl(jfl) .AND. zgjfl(jfl) <= jpef .AND. nieob-1 <=  zgifl(jfl) ) THEN
-               zgifl (jfl) = INT(zgifl(jfl)) + 0.5
-               zgjfl (jfl) = INT(zgjfl(jfl)) + 0.5
-               zagefl(jfl) = rdt
-            END IF
-         END IF
-         IF( lp_obc_west ) THEN
-            IF( jpwd <= zgjfl(jfl) .AND. zgjfl(jfl) <= jpwf .AND. niwob >=  zgifl(jfl) ) THEN
-               zgifl (jfl) = INT(zgifl(jfl)) + 0.5
-               zgjfl (jfl) = INT(zgjfl(jfl)) + 0.5
-               zagefl(jfl) = rdt
-            END IF
-         END IF
-         IF( lp_obc_north ) THEN
-            IF( jpnd <=  zgifl(jfl) .AND. zgifl(jfl) <= jpnf .AND. njnob-1 >=  zgjfl(jfl) ) THEN
-               zgifl (jfl) = INT(zgifl(jfl)) + 0.5
-               zgjfl (jfl) = INT(zgjfl(jfl)) + 0.5
-               zagefl(jfl) = rdt
-            END IF
-         END IF
-         IF( lp_obc_south ) THEN
-            IF( jpsd <=  zgifl(jfl) .AND. zgifl(jfl) <= jpsf .AND.  njsob >= zgjfl(jfl) ) THEN
-               zgifl (jfl) = INT(zgifl(jfl)) + 0.5
-               zgjfl (jfl) = INT(zgjfl(jfl)) + 0.5
-               zagefl(jfl) = rdt
-            END IF
-         END IF
-      END DO
-#endif
-
       ! Test to know if a  float hasn't integrated enought time
       IF( ln_argo ) THEN
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/LBC/lbclnk.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/LBC/lbclnk.F90	(revision 4327)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/LBC/lbclnk.F90	(revision 4328)
@@ -19,5 +19,4 @@
    !!   lbc_lnk_e    : generic interface for mpp_lnk_2d_e routine defined in lib_mpp
    !!   lbc_bdy_lnk  : generic interface for mpp_lnk_bdy_2d and mpp_lnk_bdy_3d routines defined in lib_mpp
-   !!   lbc_obc_lnk  : generic interface for mpp_lnk_obc_2d and mpp_lnk_obc_3d routines defined in lib_mpp
    !!----------------------------------------------------------------------
    USE lib_mpp          ! distributed memory computing library
@@ -29,7 +28,4 @@
    INTERFACE lbc_bdy_lnk
       MODULE PROCEDURE mpp_lnk_bdy_2d, mpp_lnk_bdy_3d
-   END INTERFACE
-   INTERFACE lbc_obc_lnk
-      MODULE PROCEDURE mpp_lnk_obc_2d, mpp_lnk_obc_3d
    END INTERFACE
 
@@ -41,5 +37,4 @@
    PUBLIC lbc_lnk_e
    PUBLIC lbc_bdy_lnk   ! ocean lateral BDY boundary conditions
-   PUBLIC lbc_obc_lnk   ! ocean lateral BDY boundary conditions
 
    !!----------------------------------------------------------------------
@@ -57,5 +52,4 @@
    !!   lbc_lnk_2d   : set the lateral boundary condition on a 2D variable on ocean mesh
    !!   lbc_bdy_lnk  : set the lateral BDY boundary condition
-   !!   lbc_obc_lnk  : set the lateral OBC boundary condition
    !!----------------------------------------------------------------------
    USE oce             ! ocean dynamics and tracers   
@@ -78,12 +72,8 @@
       MODULE PROCEDURE lbc_bdy_lnk_2d, lbc_bdy_lnk_3d
    END INTERFACE
-   INTERFACE lbc_obc_lnk
-      MODULE PROCEDURE lbc_lnk_2d, lbc_lnk_3d
-   END INTERFACE
 
    PUBLIC   lbc_lnk       ! ocean/ice  lateral boundary conditions
    PUBLIC   lbc_lnk_e 
    PUBLIC   lbc_bdy_lnk   ! ocean lateral BDY boundary conditions
-   PUBLIC   lbc_obc_lnk   ! ocean lateral OBC boundary conditions
    
    !!----------------------------------------------------------------------
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90	(revision 4327)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90	(revision 4328)
@@ -53,5 +53,4 @@
    !!   mppsync       :
    !!   mppstop       :
-   !!   mppobc        : variant of mpp_lnk for open boundary condition
    !!   mpp_ini_north : initialisation of north fold
    !!   mpp_lbc_north : north fold processors gathering
@@ -71,9 +70,8 @@
    PUBLIC   mpp_lnk_3d, mpp_lnk_3d_gather, mpp_lnk_2d, mpp_lnk_2d_e
    PUBLIC   mppscatter, mppgather
-   PUBLIC   mppobc, mpp_ini_ice, mpp_ini_znl
+   PUBLIC   mpp_ini_ice, mpp_ini_znl
    PUBLIC   mppsize
    PUBLIC   mppsend, mpprecv                          ! needed by TAM and ICB routines
    PUBLIC   mpp_lnk_bdy_2d, mpp_lnk_bdy_3d
-   PUBLIC   mpp_lnk_obc_2d, mpp_lnk_obc_3d
 
    !! * Interfaces
@@ -300,11 +298,11 @@
    END FUNCTION mynode
 
-   SUBROUTINE mpp_lnk_obc_3d( ptab, cd_type, psgn )
-      !!----------------------------------------------------------------------
-      !!                  ***  routine mpp_lnk_obc_3d  ***
+   SUBROUTINE mpp_lnk_3d( ptab, cd_type, psgn, cd_mpp, pval )
+      !!----------------------------------------------------------------------
+      !!                  ***  routine mpp_lnk_3d  ***
       !!
       !! ** Purpose :   Message passing manadgement
       !!
-      !! ** Method  :   Use mppsend and mpprecv function for passing OBC boundaries 
+      !! ** Method  :   Use mppsend and mpprecv function for passing mask
       !!      between processors following neighboring subdomains.
       !!            domain parameters
@@ -313,5 +311,5 @@
       !!                    nbondi : mark for "east-west local boundary"
       !!                    nbondj : mark for "north-south local boundary"
-      !!                    noea   : number for local neighboring processors 
+      !!                    noea   : number for local neighboring processors
       !!                    nowe   : number for local neighboring processors
       !!                    noso   : number for local neighboring processors
@@ -326,4 +324,6 @@
       REAL(wp)                        , INTENT(in   ) ::   psgn     ! =-1 the sign change across the north fold boundary
       !                                                             ! =  1. , the sign is kept
+      CHARACTER(len=3), OPTIONAL      , INTENT(in   ) ::   cd_mpp   ! fill the overlap area only
+      REAL(wp)        , OPTIONAL      , INTENT(in   ) ::   pval     ! background value (used at closed boundaries)
       !!
       INTEGER  ::   ji, jj, jk, jl             ! dummy loop indices
@@ -337,37 +337,52 @@
 
       !!----------------------------------------------------------------------
-
+      
       ALLOCATE( zt3ns(jpi,jprecj,jpk,2), zt3sn(jpi,jprecj,jpk,2),   &
          &      zt3ew(jpj,jpreci,jpk,2), zt3we(jpj,jpreci,jpk,2)  )
 
-      zland = 0.e0      ! zero by default
+      !
+      IF( PRESENT( pval ) ) THEN   ;   zland = pval      ! set land value
+      ELSE                         ;   zland = 0.e0      ! zero by default
+      ENDIF
 
       ! 1. standard boundary treatment
       ! ------------------------------
-      IF( nbondi == 2) THEN
-        IF (nperio == 1 .OR. nperio == 4 .OR. nperio == 6) THEN
-          ptab( 1 ,:,:) = ptab(jpim1,:,:)
-          ptab(jpi,:,:) = ptab(  2  ,:,:)
-        ELSE
-          IF( .NOT. cd_type == 'F' )   ptab(     1       :jpreci,:,:) = zland    ! south except F-point
-          ptab(nlci-jpreci+1:jpi   ,:,:) = zland    ! north
-        ENDIF
-      ELSEIF(nbondi == -1) THEN
-        IF( .NOT. cd_type == 'F' )   ptab(     1       :jpreci,:,:) = zland    ! south except F-point
-      ELSEIF(nbondi == 1) THEN
-        ptab(nlci-jpreci+1:jpi   ,:,:) = zland    ! north
-      ENDIF                                     !* closed
-
-      IF (nbondj == 2 .OR. nbondj == -1) THEN
-        IF( .NOT. cd_type == 'F' )   ptab(:,     1       :jprecj,:) = zland       ! south except F-point
-      ELSEIF (nbondj == 2 .OR. nbondj == 1) THEN
-        ptab(:,nlcj-jprecj+1:jpj   ,:) = zland       ! north
+      IF( PRESENT( cd_mpp ) ) THEN      ! only fill added line/raw with existing values
+         !
+         ! WARNING ptab is defined only between nld and nle
+         DO jk = 1, jpk
+            DO jj = nlcj+1, jpj                 ! added line(s)   (inner only)
+               ptab(nldi  :nlei  , jj          ,jk) = ptab(nldi:nlei,     nlej,jk)
+               ptab(1     :nldi-1, jj          ,jk) = ptab(nldi     ,     nlej,jk)
+               ptab(nlei+1:nlci  , jj          ,jk) = ptab(     nlei,     nlej,jk)
+            END DO
+            DO ji = nlci+1, jpi                 ! added column(s) (full)
+               ptab(ji           ,nldj  :nlej  ,jk) = ptab(     nlei,nldj:nlej,jk)
+               ptab(ji           ,1     :nldj-1,jk) = ptab(     nlei,nldj     ,jk)
+               ptab(ji           ,nlej+1:jpj   ,jk) = ptab(     nlei,     nlej,jk)
+            END DO
+         END DO
+         !
+      ELSE                              ! standard close or cyclic treatment
+         !
+         !                                   ! East-West boundaries
+         !                                        !* Cyclic east-west
+         IF( nbondi == 2 .AND. (nperio == 1 .OR. nperio == 4 .OR. nperio == 6) ) THEN
+            ptab( 1 ,:,:) = ptab(jpim1,:,:)
+            ptab(jpi,:,:) = ptab(  2  ,:,:)
+         ELSE                                     !* closed
+            IF( .NOT. cd_type == 'F' )   ptab(     1       :jpreci,:,:) = zland    ! south except F-point
+                                         ptab(nlci-jpreci+1:jpi   ,:,:) = zland    ! north
+         ENDIF
+         !                                   ! North-South boundaries (always closed)
+         IF( .NOT. cd_type == 'F' )   ptab(:,     1       :jprecj,:) = zland       ! south except F-point
+                                      ptab(:,nlcj-jprecj+1:jpj   ,:) = zland       ! north
+         !
       ENDIF
 
       ! 2. East and west directions exchange
       ! ------------------------------------
-      ! we play with the neigbours AND the row number because of the periodicity 
-      !
-      IF(nbondj .ne. 0) THEN
+      ! we play with the neigbours AND the row number because of the periodicity
+      !
       SELECT CASE ( nbondi )      ! Read Dirichlet lateral conditions
       CASE ( -1, 0, 1 )                ! all exept 2 (i.e. close case)
@@ -377,10 +392,10 @@
             zt3we(:,jl,:,1) = ptab(iihom +jl,:,:)
          END DO
-      END SELECT  
+      END SELECT
       !
       !                           ! Migrations
       imigr = jpreci * jpj * jpk
       !
-      SELECT CASE ( nbondi ) 
+      SELECT CASE ( nbondi )
       CASE ( -1 )
          CALL mppsend( 2, zt3we(1,1,1,1), imigr, noea, ml_req1 )
@@ -418,5 +433,4 @@
          END DO
       END SELECT
-      ENDIF
 
 
@@ -425,5 +439,4 @@
       ! always closed : we play only with the neigbours
       !
-      IF(nbondi .ne. 0) THEN
       IF( nbondj /= 2 ) THEN      ! Read Dirichlet lateral conditions
          ijhom = nlcj-nrecj
@@ -437,5 +450,5 @@
       imigr = jprecj * jpi * jpk
       !
-      SELECT CASE ( nbondj )     
+      SELECT CASE ( nbondj )
       CASE ( -1 )
          CALL mppsend( 4, zt3sn(1,1,1,1), imigr, nono, ml_req1 )
@@ -449,5 +462,5 @@
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
          IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err)
-      CASE ( 1 ) 
+      CASE ( 1 )
          CALL mppsend( 3, zt3ns(1,1,1,1), imigr, noso, ml_req1 )
          CALL mpprecv( 4, zt3sn(1,1,1,2), imigr, noso )
@@ -473,5 +486,4 @@
          END DO
       END SELECT
-      ENDIF
 
 
@@ -479,5 +491,5 @@
       ! -----------------------
       !
-      IF( npolj /= 0 ) THEN
+      IF( npolj /= 0 .AND. .NOT. PRESENT(cd_mpp) ) THEN
          !
          SELECT CASE ( jpni )
@@ -490,14 +502,14 @@
       DEALLOCATE( zt3ns, zt3sn, zt3ew, zt3we )
       !
-   END SUBROUTINE mpp_lnk_obc_3d
-
-
-   SUBROUTINE mpp_lnk_obc_2d( pt2d, cd_type, psgn )
-      !!----------------------------------------------------------------------
-      !!                  ***  routine mpp_lnk_obc_2d  ***
-      !!                  
+   END SUBROUTINE mpp_lnk_3d
+
+
+   SUBROUTINE mpp_lnk_2d( pt2d, cd_type, psgn, cd_mpp, pval )
+      !!----------------------------------------------------------------------
+      !!                  ***  routine mpp_lnk_2d  ***
+      !!
       !! ** Purpose :   Message passing manadgement for 2d array
       !!
-      !! ** Method  :   Use mppsend and mpprecv function for passing OBC boundaries 
+      !! ** Method  :   Use mppsend and mpprecv function for passing mask
       !!      between processors following neighboring subdomains.
       !!            domain parameters
@@ -506,5 +518,5 @@
       !!                    nbondi : mark for "east-west local boundary"
       !!                    nbondj : mark for "north-south local boundary"
-      !!                    noea   : number for local neighboring processors 
+      !!                    noea   : number for local neighboring processors
       !!                    nowe   : number for local neighboring processors
       !!                    noso   : number for local neighboring processors
@@ -517,4 +529,6 @@
       REAL(wp)                    , INTENT(in   ) ::   psgn     ! =-1 the sign change across the north fold boundary
       !                                                         ! =  1. , the sign is kept
+      CHARACTER(len=3), OPTIONAL  , INTENT(in   ) ::   cd_mpp   ! fill the overlap area only
+      REAL(wp)        , OPTIONAL  , INTENT(in   ) ::   pval     ! background value (used at closed boundaries)
       !!
       INTEGER  ::   ji, jj, jl   ! dummy loop indices
@@ -532,32 +546,46 @@
          &      zt2ew(jpj,jpreci,2), zt2we(jpj,jpreci,2)   )
 
-      zland = 0.e0      ! zero by default
+      !
+      IF( PRESENT( pval ) ) THEN   ;   zland = pval      ! set land value
+      ELSE                         ;   zland = 0.e0      ! zero by default
+      ENDIF
 
       ! 1. standard boundary treatment
       ! ------------------------------
       !
-      IF( nbondi == 2) THEN
-        IF (nperio == 1 .OR. nperio == 4 .OR. nperio == 6) THEN
-          pt2d( 1 ,:) = pt2d(jpim1,:)
-          pt2d(jpi,:) = pt2d(  2  ,:)
-        ELSE
-          IF( .NOT. cd_type == 'F' )   pt2d(     1       :jpreci,:) = zland    ! south except F-point
-          pt2d(nlci-jpreci+1:jpi   ,:) = zland    ! north
-        ENDIF
-      ELSEIF(nbondi == -1) THEN
-        IF( .NOT. cd_type == 'F' )   pt2d(     1       :jpreci,:) = zland    ! south except F-point
-      ELSEIF(nbondi == 1) THEN
-        pt2d(nlci-jpreci+1:jpi   ,:) = zland    ! north
-      ENDIF                                     !* closed
-
-      IF (nbondj == 2 .OR. nbondj == -1) THEN
-        IF( .NOT. cd_type == 'F' )   pt2d(:,     1       :jprecj) = zland       ! south except F-point
-      ELSEIF (nbondj == 2 .OR. nbondj == 1) THEN
-        pt2d(:,nlcj-jprecj+1:jpj) = zland       ! north
+      IF( PRESENT( cd_mpp ) ) THEN      ! only fill added line/raw with existing values
+         !
+         ! WARNING pt2d is defined only between nld and nle
+         DO jj = nlcj+1, jpj                 ! added line(s)   (inner only)
+            pt2d(nldi  :nlei  , jj          ) = pt2d(nldi:nlei,     nlej)
+            pt2d(1     :nldi-1, jj          ) = pt2d(nldi     ,     nlej)
+            pt2d(nlei+1:nlci  , jj          ) = pt2d(     nlei,     nlej)
+         END DO
+         DO ji = nlci+1, jpi                 ! added column(s) (full)
+            pt2d(ji           ,nldj  :nlej  ) = pt2d(     nlei,nldj:nlej)
+            pt2d(ji           ,1     :nldj-1) = pt2d(     nlei,nldj     )
+            pt2d(ji           ,nlej+1:jpj   ) = pt2d(     nlei,     nlej)
+         END DO
+         !
+      ELSE                              ! standard close or cyclic treatment
+         !
+         !                                   ! East-West boundaries
+         IF( nbondi == 2 .AND.   &                ! Cyclic east-west
+            &    (nperio == 1 .OR. nperio == 4 .OR. nperio == 6) ) THEN
+            pt2d( 1 ,:) = pt2d(jpim1,:)                                    ! west
+            pt2d(jpi,:) = pt2d(  2  ,:)                                    ! east
+         ELSE                                     ! closed
+            IF( .NOT. cd_type == 'F' )   pt2d(     1       :jpreci,:) = zland    ! south except F-point
+                                         pt2d(nlci-jpreci+1:jpi   ,:) = zland    ! north
+         ENDIF
+         !                                   ! North-South boundaries (always closed)
+            IF( .NOT. cd_type == 'F' )   pt2d(:,     1       :jprecj) = zland    !south except F-point
+                                         pt2d(:,nlcj-jprecj+1:jpj   ) = zland    ! north
+         !
       ENDIF
 
       ! 2. East and west directions exchange
       ! ------------------------------------
-      ! we play with the neigbours AND the row number because of the periodicity 
+      ! we play with the neigbours AND the row number because of the periodicity
       !
       SELECT CASE ( nbondi )      ! Read Dirichlet lateral conditions
@@ -657,414 +685,4 @@
             pt2d(:,ijhom+jl) = zt2ns(:,jl,2)
          END DO
-      CASE ( 1 ) 
-         DO jl = 1, jprecj
-            pt2d(:,jl      ) = zt2sn(:,jl,2)
-         END DO
-      END SELECT
-
-
-      ! 4. north fold treatment
-      ! -----------------------
-      !
-      IF( npolj /= 0 ) THEN
-         !
-         SELECT CASE ( jpni )
-         CASE ( 1 )     ;   CALL lbc_nfd      ( pt2d, cd_type, psgn )   ! only 1 northern proc, no mpp
-         CASE DEFAULT   ;   CALL mpp_lbc_north( pt2d, cd_type, psgn )   ! for all northern procs.
-         END SELECT
-         !
-      ENDIF
-      !
-      DEALLOCATE( zt2ns, zt2sn, zt2ew, zt2we )
-      !
-   END SUBROUTINE mpp_lnk_obc_2d
-
-   SUBROUTINE mpp_lnk_3d( ptab, cd_type, psgn, cd_mpp, pval )
-      !!----------------------------------------------------------------------
-      !!                  ***  routine mpp_lnk_3d  ***
-      !!
-      !! ** Purpose :   Message passing manadgement
-      !!
-      !! ** Method  :   Use mppsend and mpprecv function for passing mask
-      !!      between processors following neighboring subdomains.
-      !!            domain parameters
-      !!                    nlci   : first dimension of the local subdomain
-      !!                    nlcj   : second dimension of the local subdomain
-      !!                    nbondi : mark for "east-west local boundary"
-      !!                    nbondj : mark for "north-south local boundary"
-      !!                    noea   : number for local neighboring processors
-      !!                    nowe   : number for local neighboring processors
-      !!                    noso   : number for local neighboring processors
-      !!                    nono   : number for local neighboring processors
-      !!
-      !! ** Action  :   ptab with update value at its periphery
-      !!
-      !!----------------------------------------------------------------------
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) ::   ptab     ! 3D array on which the boundary condition is applied
-      CHARACTER(len=1)                , INTENT(in   ) ::   cd_type  ! define the nature of ptab array grid-points
-      !                                                             ! = T , U , V , F , W points
-      REAL(wp)                        , INTENT(in   ) ::   psgn     ! =-1 the sign change across the north fold boundary
-      !                                                             ! =  1. , the sign is kept
-      CHARACTER(len=3), OPTIONAL      , INTENT(in   ) ::   cd_mpp   ! fill the overlap area only
-      REAL(wp)        , OPTIONAL      , INTENT(in   ) ::   pval     ! background value (used at closed boundaries)
-      !!
-      INTEGER  ::   ji, jj, jk, jl             ! dummy loop indices
-      INTEGER  ::   imigr, iihom, ijhom        ! temporary integers
-      INTEGER  ::   ml_req1, ml_req2, ml_err   ! for key_mpi_isend
-      REAL(wp) ::   zland
-      INTEGER, DIMENSION(MPI_STATUS_SIZE) ::   ml_stat   ! for key_mpi_isend
-      !
-      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::   zt3ns, zt3sn   ! 3d for north-south & south-north
-      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::   zt3ew, zt3we   ! 3d for east-west & west-east
-
-      !!----------------------------------------------------------------------
-      
-      ALLOCATE( zt3ns(jpi,jprecj,jpk,2), zt3sn(jpi,jprecj,jpk,2),   &
-         &      zt3ew(jpj,jpreci,jpk,2), zt3we(jpj,jpreci,jpk,2)  )
-
-      !
-      IF( PRESENT( pval ) ) THEN   ;   zland = pval      ! set land value
-      ELSE                         ;   zland = 0.e0      ! zero by default
-      ENDIF
-
-      ! 1. standard boundary treatment
-      ! ------------------------------
-      IF( PRESENT( cd_mpp ) ) THEN      ! only fill added line/raw with existing values
-         !
-         ! WARNING ptab is defined only between nld and nle
-         DO jk = 1, jpk
-            DO jj = nlcj+1, jpj                 ! added line(s)   (inner only)
-               ptab(nldi  :nlei  , jj          ,jk) = ptab(nldi:nlei,     nlej,jk)
-               ptab(1     :nldi-1, jj          ,jk) = ptab(nldi     ,     nlej,jk)
-               ptab(nlei+1:nlci  , jj          ,jk) = ptab(     nlei,     nlej,jk)
-            END DO
-            DO ji = nlci+1, jpi                 ! added column(s) (full)
-               ptab(ji           ,nldj  :nlej  ,jk) = ptab(     nlei,nldj:nlej,jk)
-               ptab(ji           ,1     :nldj-1,jk) = ptab(     nlei,nldj     ,jk)
-               ptab(ji           ,nlej+1:jpj   ,jk) = ptab(     nlei,     nlej,jk)
-            END DO
-         END DO
-         !
-      ELSE                              ! standard close or cyclic treatment
-         !
-         !                                   ! East-West boundaries
-         !                                        !* Cyclic east-west
-         IF( nbondi == 2 .AND. (nperio == 1 .OR. nperio == 4 .OR. nperio == 6) ) THEN
-            ptab( 1 ,:,:) = ptab(jpim1,:,:)
-            ptab(jpi,:,:) = ptab(  2  ,:,:)
-         ELSE                                     !* closed
-            IF( .NOT. cd_type == 'F' )   ptab(     1       :jpreci,:,:) = zland    ! south except F-point
-                                         ptab(nlci-jpreci+1:jpi   ,:,:) = zland    ! north
-         ENDIF
-         !                                   ! North-South boundaries (always closed)
-         IF( .NOT. cd_type == 'F' )   ptab(:,     1       :jprecj,:) = zland       ! south except F-point
-                                      ptab(:,nlcj-jprecj+1:jpj   ,:) = zland       ! north
-         !
-      ENDIF
-
-      ! 2. East and west directions exchange
-      ! ------------------------------------
-      ! we play with the neigbours AND the row number because of the periodicity
-      !
-      SELECT CASE ( nbondi )      ! Read Dirichlet lateral conditions
-      CASE ( -1, 0, 1 )                ! all exept 2 (i.e. close case)
-         iihom = nlci-nreci
-         DO jl = 1, jpreci
-            zt3ew(:,jl,:,1) = ptab(jpreci+jl,:,:)
-            zt3we(:,jl,:,1) = ptab(iihom +jl,:,:)
-         END DO
-      END SELECT
-      !
-      !                           ! Migrations
-      imigr = jpreci * jpj * jpk
-      !
-      SELECT CASE ( nbondi )
-      CASE ( -1 )
-         CALL mppsend( 2, zt3we(1,1,1,1), imigr, noea, ml_req1 )
-         CALL mpprecv( 1, zt3ew(1,1,1,2), imigr, noea )
-         IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
-      CASE ( 0 )
-         CALL mppsend( 1, zt3ew(1,1,1,1), imigr, nowe, ml_req1 )
-         CALL mppsend( 2, zt3we(1,1,1,1), imigr, noea, ml_req2 )
-         CALL mpprecv( 1, zt3ew(1,1,1,2), imigr, noea )
-         CALL mpprecv( 2, zt3we(1,1,1,2), imigr, nowe )
-         IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
-         IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err)
-      CASE ( 1 )
-         CALL mppsend( 1, zt3ew(1,1,1,1), imigr, nowe, ml_req1 )
-         CALL mpprecv( 2, zt3we(1,1,1,2), imigr, nowe )
-         IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
-      END SELECT
-      !
-      !                           ! Write Dirichlet lateral conditions
-      iihom = nlci-jpreci
-      !
-      SELECT CASE ( nbondi )
-      CASE ( -1 )
-         DO jl = 1, jpreci
-            ptab(iihom+jl,:,:) = zt3ew(:,jl,:,2)
-         END DO
-      CASE ( 0 )
-         DO jl = 1, jpreci
-            ptab(jl      ,:,:) = zt3we(:,jl,:,2)
-            ptab(iihom+jl,:,:) = zt3ew(:,jl,:,2)
-         END DO
-      CASE ( 1 )
-         DO jl = 1, jpreci
-            ptab(jl      ,:,:) = zt3we(:,jl,:,2)
-         END DO
-      END SELECT
-
-
-      ! 3. North and south directions
-      ! -----------------------------
-      ! always closed : we play only with the neigbours
-      !
-      IF( nbondj /= 2 ) THEN      ! Read Dirichlet lateral conditions
-         ijhom = nlcj-nrecj
-         DO jl = 1, jprecj
-            zt3sn(:,jl,:,1) = ptab(:,ijhom +jl,:)
-            zt3ns(:,jl,:,1) = ptab(:,jprecj+jl,:)
-         END DO
-      ENDIF
-      !
-      !                           ! Migrations
-      imigr = jprecj * jpi * jpk
-      !
-      SELECT CASE ( nbondj )
-      CASE ( -1 )
-         CALL mppsend( 4, zt3sn(1,1,1,1), imigr, nono, ml_req1 )
-         CALL mpprecv( 3, zt3ns(1,1,1,2), imigr, nono )
-         IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
-      CASE ( 0 )
-         CALL mppsend( 3, zt3ns(1,1,1,1), imigr, noso, ml_req1 )
-         CALL mppsend( 4, zt3sn(1,1,1,1), imigr, nono, ml_req2 )
-         CALL mpprecv( 3, zt3ns(1,1,1,2), imigr, nono )
-         CALL mpprecv( 4, zt3sn(1,1,1,2), imigr, noso )
-         IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
-         IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err)
-      CASE ( 1 )
-         CALL mppsend( 3, zt3ns(1,1,1,1), imigr, noso, ml_req1 )
-         CALL mpprecv( 4, zt3sn(1,1,1,2), imigr, noso )
-         IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
-      END SELECT
-      !
-      !                           ! Write Dirichlet lateral conditions
-      ijhom = nlcj-jprecj
-      !
-      SELECT CASE ( nbondj )
-      CASE ( -1 )
-         DO jl = 1, jprecj
-            ptab(:,ijhom+jl,:) = zt3ns(:,jl,:,2)
-         END DO
-      CASE ( 0 )
-         DO jl = 1, jprecj
-            ptab(:,jl      ,:) = zt3sn(:,jl,:,2)
-            ptab(:,ijhom+jl,:) = zt3ns(:,jl,:,2)
-         END DO
-      CASE ( 1 )
-         DO jl = 1, jprecj
-            ptab(:,jl,:) = zt3sn(:,jl,:,2)
-         END DO
-      END SELECT
-
-
-      ! 4. north fold treatment
-      ! -----------------------
-      !
-      IF( npolj /= 0 .AND. .NOT. PRESENT(cd_mpp) ) THEN
-         !
-         SELECT CASE ( jpni )
-         CASE ( 1 )     ;   CALL lbc_nfd      ( ptab, cd_type, psgn )   ! only 1 northern proc, no mpp
-         CASE DEFAULT   ;   CALL mpp_lbc_north( ptab, cd_type, psgn )   ! for all northern procs.
-         END SELECT
-         !
-      ENDIF
-      !
-      DEALLOCATE( zt3ns, zt3sn, zt3ew, zt3we )
-      !
-   END SUBROUTINE mpp_lnk_3d
-
-
-   SUBROUTINE mpp_lnk_2d( pt2d, cd_type, psgn, cd_mpp, pval )
-      !!----------------------------------------------------------------------
-      !!                  ***  routine mpp_lnk_2d  ***
-      !!
-      !! ** Purpose :   Message passing manadgement for 2d array
-      !!
-      !! ** Method  :   Use mppsend and mpprecv function for passing mask
-      !!      between processors following neighboring subdomains.
-      !!            domain parameters
-      !!                    nlci   : first dimension of the local subdomain
-      !!                    nlcj   : second dimension of the local subdomain
-      !!                    nbondi : mark for "east-west local boundary"
-      !!                    nbondj : mark for "north-south local boundary"
-      !!                    noea   : number for local neighboring processors
-      !!                    nowe   : number for local neighboring processors
-      !!                    noso   : number for local neighboring processors
-      !!                    nono   : number for local neighboring processors
-      !!
-      !!----------------------------------------------------------------------
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(inout) ::   pt2d     ! 2D array on which the boundary condition is applied
-      CHARACTER(len=1)            , INTENT(in   ) ::   cd_type  ! define the nature of ptab array grid-points
-      !                                                         ! = T , U , V , F , W and I points
-      REAL(wp)                    , INTENT(in   ) ::   psgn     ! =-1 the sign change across the north fold boundary
-      !                                                         ! =  1. , the sign is kept
-      CHARACTER(len=3), OPTIONAL  , INTENT(in   ) ::   cd_mpp   ! fill the overlap area only
-      REAL(wp)        , OPTIONAL  , INTENT(in   ) ::   pval     ! background value (used at closed boundaries)
-      !!
-      INTEGER  ::   ji, jj, jl   ! dummy loop indices
-      INTEGER  ::   imigr, iihom, ijhom        ! temporary integers
-      INTEGER  ::   ml_req1, ml_req2, ml_err   ! for key_mpi_isend
-      REAL(wp) ::   zland
-      INTEGER, DIMENSION(MPI_STATUS_SIZE) ::   ml_stat   ! for key_mpi_isend
-      !
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  zt2ns, zt2sn   ! 2d for north-south & south-north
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  zt2ew, zt2we   ! 2d for east-west & west-east
-
-      !!----------------------------------------------------------------------
-
-      ALLOCATE( zt2ns(jpi,jprecj,2), zt2sn(jpi,jprecj,2),  &
-         &      zt2ew(jpj,jpreci,2), zt2we(jpj,jpreci,2)   )
-
-      !
-      IF( PRESENT( pval ) ) THEN   ;   zland = pval      ! set land value
-      ELSE                         ;   zland = 0.e0      ! zero by default
-      ENDIF
-
-      ! 1. standard boundary treatment
-      ! ------------------------------
-      !
-      IF( PRESENT( cd_mpp ) ) THEN      ! only fill added line/raw with existing values
-         !
-         ! WARNING pt2d is defined only between nld and nle
-         DO jj = nlcj+1, jpj                 ! added line(s)   (inner only)
-            pt2d(nldi  :nlei  , jj          ) = pt2d(nldi:nlei,     nlej)
-            pt2d(1     :nldi-1, jj          ) = pt2d(nldi     ,     nlej)
-            pt2d(nlei+1:nlci  , jj          ) = pt2d(     nlei,     nlej)
-         END DO
-         DO ji = nlci+1, jpi                 ! added column(s) (full)
-            pt2d(ji           ,nldj  :nlej  ) = pt2d(     nlei,nldj:nlej)
-            pt2d(ji           ,1     :nldj-1) = pt2d(     nlei,nldj     )
-            pt2d(ji           ,nlej+1:jpj   ) = pt2d(     nlei,     nlej)
-         END DO
-         !
-      ELSE                              ! standard close or cyclic treatment
-         !
-         !                                   ! East-West boundaries
-         IF( nbondi == 2 .AND.   &                ! Cyclic east-west
-            &    (nperio == 1 .OR. nperio == 4 .OR. nperio == 6) ) THEN
-            pt2d( 1 ,:) = pt2d(jpim1,:)                                    ! west
-            pt2d(jpi,:) = pt2d(  2  ,:)                                    ! east
-         ELSE                                     ! closed
-            IF( .NOT. cd_type == 'F' )   pt2d(     1       :jpreci,:) = zland    ! south except F-point
-                                         pt2d(nlci-jpreci+1:jpi   ,:) = zland    ! north
-         ENDIF
-         !                                   ! North-South boundaries (always closed)
-            IF( .NOT. cd_type == 'F' )   pt2d(:,     1       :jprecj) = zland    !south except F-point
-                                         pt2d(:,nlcj-jprecj+1:jpj   ) = zland    ! north
-         !
-      ENDIF
-
-      ! 2. East and west directions exchange
-      ! ------------------------------------
-      ! we play with the neigbours AND the row number because of the periodicity
-      !
-      SELECT CASE ( nbondi )      ! Read Dirichlet lateral conditions
-      CASE ( -1, 0, 1 )                ! all exept 2 (i.e. close case)
-         iihom = nlci-nreci
-         DO jl = 1, jpreci
-            zt2ew(:,jl,1) = pt2d(jpreci+jl,:)
-            zt2we(:,jl,1) = pt2d(iihom +jl,:)
-         END DO
-      END SELECT
-      !
-      !                           ! Migrations
-      imigr = jpreci * jpj
-      !
-      SELECT CASE ( nbondi )
-      CASE ( -1 )
-         CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req1 )
-         CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea )
-         IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
-      CASE ( 0 )
-         CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 )
-         CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req2 )
-         CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea )
-         CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe )
-         IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
-         IF(l_isend) CALL mpi_wait(ml_req2,ml_stat,ml_err)
-      CASE ( 1 )
-         CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 )
-         CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe )
-         IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
-      END SELECT
-      !
-      !                           ! Write Dirichlet lateral conditions
-      iihom = nlci - jpreci
-      !
-      SELECT CASE ( nbondi )
-      CASE ( -1 )
-         DO jl = 1, jpreci
-            pt2d(iihom+jl,:) = zt2ew(:,jl,2)
-         END DO
-      CASE ( 0 )
-         DO jl = 1, jpreci
-            pt2d(jl      ,:) = zt2we(:,jl,2)
-            pt2d(iihom+jl,:) = zt2ew(:,jl,2)
-         END DO
-      CASE ( 1 )
-         DO jl = 1, jpreci
-            pt2d(jl      ,:) = zt2we(:,jl,2)
-         END DO
-      END SELECT
-
-
-      ! 3. North and south directions
-      ! -----------------------------
-      ! always closed : we play only with the neigbours
-      !
-      IF( nbondj /= 2 ) THEN      ! Read Dirichlet lateral conditions
-         ijhom = nlcj-nrecj
-         DO jl = 1, jprecj
-            zt2sn(:,jl,1) = pt2d(:,ijhom +jl)
-            zt2ns(:,jl,1) = pt2d(:,jprecj+jl)
-         END DO
-      ENDIF
-      !
-      !                           ! Migrations
-      imigr = jprecj * jpi
-      !
-      SELECT CASE ( nbondj )
-      CASE ( -1 )
-         CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req1 )
-         CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono )
-         IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
-      CASE ( 0 )
-         CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 )
-         CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req2 )
-         CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono )
-         CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso )
-         IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
-         IF(l_isend) CALL mpi_wait(ml_req2,ml_stat,ml_err)
-      CASE ( 1 )
-         CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 )
-         CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso )
-         IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
-      END SELECT
-      !
-      !                           ! Write Dirichlet lateral conditions
-      ijhom = nlcj - jprecj
-      !
-      SELECT CASE ( nbondj )
-      CASE ( -1 )
-         DO jl = 1, jprecj
-            pt2d(:,ijhom+jl) = zt2ns(:,jl,2)
-         END DO
-      CASE ( 0 )
-         DO jl = 1, jprecj
-            pt2d(:,jl      ) = zt2sn(:,jl,2)
-            pt2d(:,ijhom+jl) = zt2ns(:,jl,2)
-         END DO
       CASE ( 1 )
          DO jl = 1, jprecj
@@ -2102,212 +1720,4 @@
       !
    END SUBROUTINE mppstop
-
-
-   SUBROUTINE mppobc( ptab, kd1, kd2, kl, kk, ktype, kij , kumout)
-      !!----------------------------------------------------------------------
-      !!                  ***  routine mppobc  ***
-      !!
-      !! ** Purpose :   Message passing manadgement for open boundary
-      !!     conditions array
-      !!
-      !! ** Method  :   Use mppsend and mpprecv function for passing mask
-      !!       between processors following neighboring subdomains.
-      !!       domain parameters
-      !!                    nlci   : first dimension of the local subdomain
-      !!                    nlcj   : second dimension of the local subdomain
-      !!                    nbondi : mark for "east-west local boundary"
-      !!                    nbondj : mark for "north-south local boundary"
-      !!                    noea   : number for local neighboring processors
-      !!                    nowe   : number for local neighboring processors
-      !!                    noso   : number for local neighboring processors
-      !!                    nono   : number for local neighboring processors
-      !!
-      !!----------------------------------------------------------------------
-      USE wrk_nemo        ! Memory allocation
-      !
-      INTEGER , INTENT(in   )                     ::   kd1, kd2   ! starting and ending indices
-      INTEGER , INTENT(in   )                     ::   kl         ! index of open boundary
-      INTEGER , INTENT(in   )                     ::   kk         ! vertical dimension
-      INTEGER , INTENT(in   )                     ::   ktype      ! define north/south or east/west cdt
-      !                                                           !  = 1  north/south  ;  = 2  east/west
-      INTEGER , INTENT(in   )                     ::   kij        ! horizontal dimension
-      INTEGER , INTENT(in   )                     ::   kumout     ! ocean.output logical unit
-      REAL(wp), INTENT(inout), DIMENSION(kij,kk)  ::   ptab       ! variable array
-      !
-      INTEGER ::   ji, jj, jk, jl        ! dummy loop indices
-      INTEGER ::   iipt0, iipt1, ilpt1   ! local integers
-      INTEGER ::   ijpt0, ijpt1          !   -       -
-      INTEGER ::   imigr, iihom, ijhom   !   -       -
-      INTEGER ::   ml_req1, ml_req2, ml_err    ! for key_mpi_isend
-      INTEGER ::   ml_stat(MPI_STATUS_SIZE)    ! for key_mpi_isend
-      REAL(wp), POINTER, DIMENSION(:,:) ::   ztab   ! temporary workspace
-      !
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  zt2ns, zt2sn   ! 2d for north-south & south-north
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  zt2ew, zt2we   ! 2d for east-west & west-east
-      LOGICAL :: lmigr ! is true for those processors that have to migrate the OB
-
-      !!----------------------------------------------------------------------
-
-      ALLOCATE( zt2ns(jpi,jprecj,2), zt2sn(jpi,jprecj,2),   &
-         &      zt2ew(jpj,jpreci,2), zt2we(jpj,jpreci,2)   )
-
-      CALL wrk_alloc( jpi,jpj, ztab )
-
-      ! boundary condition initialization
-      ! ---------------------------------
-      ztab(:,:) = 0.e0
-      !
-      IF( ktype==1 ) THEN                                  ! north/south boundaries
-         iipt0 = MAX( 1, MIN(kd1 - nimpp+1, nlci     ) )
-         iipt1 = MAX( 0, MIN(kd2 - nimpp+1, nlci - 1 ) )
-         ilpt1 = MAX( 1, MIN(kd2 - nimpp+1, nlci     ) )
-         ijpt0 = MAX( 1, MIN(kl  - njmpp+1, nlcj     ) )
-         ijpt1 = MAX( 0, MIN(kl  - njmpp+1, nlcj - 1 ) )
-      ELSEIF( ktype==2 ) THEN                              ! east/west boundaries
-         iipt0 = MAX( 1, MIN(kl  - nimpp+1, nlci     ) )
-         iipt1 = MAX( 0, MIN(kl  - nimpp+1, nlci - 1 ) )
-         ijpt0 = MAX( 1, MIN(kd1 - njmpp+1, nlcj     ) )
-         ijpt1 = MAX( 0, MIN(kd2 - njmpp+1, nlcj - 1 ) )
-         ilpt1 = MAX( 1, MIN(kd2 - njmpp+1, nlcj     ) )
-      ELSE
-         WRITE(kumout, cform_err)
-         WRITE(kumout,*) 'mppobc : bad ktype'
-         CALL mppstop
-      ENDIF
-
-      ! Communication level by level
-      ! ----------------------------
-!!gm Remark : this is very time consumming!!!
-      !                                         ! ------------------------ !
-        IF(((nbondi .ne. 0) .AND. (ktype .eq. 2)) .OR. ((nbondj .ne. 0) .AND. (ktype .eq. 1))) THEN
-            ! there is nothing to be migrated
-              lmigr = .TRUE.
-            ELSE
-              lmigr = .FALSE.
-            ENDIF
-
-      IF( lmigr ) THEN
-
-      DO jk = 1, kk                             !   Loop over the levels   !
-         !                                      ! ------------------------ !
-         !
-         IF( ktype == 1 ) THEN                               ! north/south boundaries
-            DO jj = ijpt0, ijpt1
-               DO ji = iipt0, iipt1
-                  ztab(ji,jj) = ptab(ji,jk)
-               END DO
-            END DO
-         ELSEIF( ktype == 2 ) THEN                           ! east/west boundaries
-            DO jj = ijpt0, ijpt1
-               DO ji = iipt0, iipt1
-                  ztab(ji,jj) = ptab(jj,jk)
-               END DO
-            END DO
-         ENDIF
-
-
-         ! 1. East and west directions
-         ! ---------------------------
-         !
-       IF( ktype == 1 ) THEN
-
-         IF( nbondi /= 2 ) THEN         ! Read Dirichlet lateral conditions
-            iihom = nlci-nreci
-            zt2ew(1:jpreci,1,1) = ztab(jpreci+1:nreci, ijpt0)
-            zt2we(1:jpreci,1,1) = ztab(iihom+1:iihom+jpreci, ijpt0)
-         ENDIF
-         !
-         !                              ! Migrations
-         imigr = jpreci
-         !
-         IF( nbondi == -1 ) THEN
-            CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req1 )
-            CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea )
-            IF(l_isend)   CALL mpi_wait( ml_req1, ml_stat, ml_err )
-         ELSEIF( nbondi == 0 ) THEN
-            CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 )
-            CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req2 )
-            CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea )
-            CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe )
-            IF(l_isend)   CALL mpi_wait( ml_req1, ml_stat, ml_err )
-            IF(l_isend)   CALL mpi_wait( ml_req2, ml_stat, ml_err )
-         ELSEIF( nbondi == 1 ) THEN
-            CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 )
-            CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe )
-            IF(l_isend) CALL mpi_wait( ml_req1, ml_stat, ml_err )
-         ENDIF
-         !
-         !                              ! Write Dirichlet lateral conditions
-         iihom = nlci-jpreci
-         !
-         IF( nbondi == 0 .OR. nbondi == 1 ) THEN
-            ztab(1:jpreci, ijpt0) = zt2we(1:jpreci,1,2)
-         ENDIF
-         IF( nbondi == -1 .OR. nbondi == 0 ) THEN
-            ztab(iihom+1:iihom+jpreci, ijpt0) = zt2ew(1:jpreci,1,2)
-         ENDIF
-       ENDIF  ! (ktype == 1)
-
-         ! 2. North and south directions
-         ! -----------------------------
-         !
-       IF(ktype == 2 ) THEN
-         IF( nbondj /= 2 ) THEN         ! Read Dirichlet lateral conditions
-            ijhom = nlcj-nrecj
-            zt2sn(1:jprecj,1,1) = ztab(iipt0, ijhom+1:ijhom+jprecj)
-            zt2ns(1:jprecj,1,1) = ztab(iipt0, jprecj+1:nrecj)
-         ENDIF
-         !
-         !                              ! Migrations
-         imigr = jprecj
-         !
-         IF( nbondj == -1 ) THEN
-            CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req1 )
-            CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono )
-            IF(l_isend) CALL mpi_wait( ml_req1, ml_stat, ml_err )
-         ELSEIF( nbondj == 0 ) THEN
-            CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 )
-            CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req2 )
-            CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono )
-            CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso )
-            IF( l_isend )   CALL mpi_wait( ml_req1, ml_stat, ml_err )
-            IF( l_isend )   CALL mpi_wait( ml_req2, ml_stat, ml_err )
-         ELSEIF( nbondj == 1 ) THEN
-            CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 )
-            CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso)
-            IF( l_isend )   CALL mpi_wait( ml_req1, ml_stat, ml_err )
-         ENDIF
-         !
-         !                              ! Write Dirichlet lateral conditions
-         ijhom = nlcj - jprecj
-         IF( nbondj == 0 .OR. nbondj == 1 ) THEN
-            ztab(iipt0,1:jprecj) = zt2sn(1:jprecj,1,2)
-         ENDIF
-         IF( nbondj == 0 .OR. nbondj == -1 ) THEN
-            ztab(iipt0, ijhom+1:ijhom+jprecj) = zt2ns(1:jprecj,1,2)
-         ENDIF
-         ENDIF    ! (ktype == 2)
-         IF( ktype==1 .AND. kd1 <= jpi+nimpp-1 .AND. nimpp <= kd2 ) THEN
-            DO jj = ijpt0, ijpt1            ! north/south boundaries
-               DO ji = iipt0,ilpt1
-                  ptab(ji,jk) = ztab(ji,jj)
-               END DO
-            END DO
-         ELSEIF( ktype==2 .AND. kd1 <= jpj+njmpp-1 .AND. njmpp <= kd2 ) THEN
-            DO jj = ijpt0, ilpt1            ! east/west boundaries
-               DO ji = iipt0,iipt1
-                  ptab(jj,jk) = ztab(ji,jj)
-               END DO
-            END DO
-         ENDIF
-         !
-      END DO
-      !
-      ENDIF ! ( lmigr )
-      !
-      DEALLOCATE( zt2ns, zt2sn, zt2ew, zt2we )
-      CALL wrk_dealloc( jpi,jpj, ztab )
-      !
-   END SUBROUTINE mppobc
 
 
@@ -3490,7 +2900,4 @@
       MODULE PROCEDURE mppmin_a_int, mppmin_int, mppmin_a_real, mppmin_real
    END INTERFACE
-   INTERFACE mppobc
-      MODULE PROCEDURE mppobc_1d, mppobc_2d, mppobc_3d, mppobc_4d
-   END INTERFACE
    INTERFACE mpp_minloc
       MODULE PROCEDURE mpp_minloc2d ,mpp_minloc3d
@@ -3619,28 +3026,4 @@
       WRITE(*,*) 'mppmin_int: You should not have seen this print! error?', kint, kcom
    END SUBROUTINE mppmin_int
-
-   SUBROUTINE mppobc_1d( parr, kd1, kd2, kl, kk, ktype, kij, knum )
-      INTEGER  ::   kd1, kd2, kl , kk, ktype, kij, knum
-      REAL, DIMENSION(:) ::   parr           ! variable array
-      WRITE(*,*) 'mppobc: You should not have seen this print! error?', parr(1), kd1, kd2, kl, kk, ktype, kij, knum
-   END SUBROUTINE mppobc_1d
-
-   SUBROUTINE mppobc_2d( parr, kd1, kd2, kl, kk, ktype, kij, knum )
-      INTEGER  ::   kd1, kd2, kl , kk, ktype, kij, knum
-      REAL, DIMENSION(:,:) ::   parr           ! variable array
-      WRITE(*,*) 'mppobc: You should not have seen this print! error?', parr(1,1), kd1, kd2, kl, kk, ktype, kij, knum
-   END SUBROUTINE mppobc_2d
-
-   SUBROUTINE mppobc_3d( parr, kd1, kd2, kl, kk, ktype, kij, knum )
-      INTEGER  ::   kd1, kd2, kl , kk, ktype, kij, knum
-      REAL, DIMENSION(:,:,:) ::   parr           ! variable array
-      WRITE(*,*) 'mppobc: You should not have seen this print! error?', parr(1,1,1), kd1, kd2, kl, kk, ktype, kij, knum
-   END SUBROUTINE mppobc_3d
-
-   SUBROUTINE mppobc_4d( parr, kd1, kd2, kl, kk, ktype, kij, knum )
-      INTEGER  ::   kd1, kd2, kl , kk, ktype, kij, knum
-      REAL, DIMENSION(:,:,:,:) ::   parr           ! variable array
-      WRITE(*,*) 'mppobc: You should not have seen this print! error?', parr(1,1,1,1), kd1, kd2, kl, kk, ktype, kij, knum
-   END SUBROUTINE mppobc_4d
 
    SUBROUTINE mpp_minloc2d( ptab, pmask, pmin, ki, kj )
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 4327)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 4328)
@@ -10,5 +10,4 @@
    !!   sbc_apr        : read atmospheric pressure in netcdf files 
    !!----------------------------------------------------------------------
-   USE obc_par         ! open boundary condition parameters
    USE dom_oce         ! ocean space and time domain
    USE sbc_oce         ! surface boundary condition
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SOL/solmat.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SOL/solmat.F90	(revision 4327)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SOL/solmat.F90	(revision 4328)
@@ -26,5 +26,4 @@
    USE sol_oce         ! ocean solver
    USE phycst          ! physical constants
-   USE obc_oce         ! ocean open boundary conditions
    USE bdy_oce         ! unstructured open boundary conditions
    USE lbclnk          ! lateral boudary conditions
@@ -86,5 +85,4 @@
 
 #if defined key_dynspg_flt && ! defined key_bdy
-#   if ! defined key_obc
 
       DO jj = 2, jpjm1                      ! matrix of free surface elliptic system
@@ -103,64 +101,4 @@
          END DO
       END DO
-#   else
-    IF ( Agrif_Root() ) THEN
-      DO jj = 2, jpjm1                      ! matrix of free surface elliptic system with open boundaries
-         DO ji = 2, jpim1
-            zcoef = z2dt * z2dt * grav * bmask(ji,jj)
-            !                                    ! south coefficient
-            IF( lp_obc_south .AND. ( jj == njs0p1 ) ) THEN
-               zcoefs = -zcoef * hv(ji,jj-1) * e1v(ji,jj-1)/e2v(ji,jj-1)*(1.-vsmsk(ji,1))
-            ELSE
-               zcoefs = -zcoef * hv(ji,jj-1) * e1v(ji,jj-1)/e2v(ji,jj-1)
-            END IF
-            gcp(ji,jj,1) = zcoefs
-            !
-            !                                    ! west coefficient
-            IF( lp_obc_west  .AND. ( ji == niw0p1 ) ) THEN
-               zcoefw = -zcoef * hu(ji-1,jj) * e2u(ji-1,jj)/e1u(ji-1,jj)*(1.-uwmsk(jj,1))
-            ELSE
-               zcoefw = -zcoef * hu(ji-1,jj) * e2u(ji-1,jj)/e1u(ji-1,jj)
-            END IF
-            gcp(ji,jj,2) = zcoefw
-            !
-            !                                    ! east coefficient
-            IF( lp_obc_east  .AND. ( ji == nie0 ) ) THEN
-               zcoefe = -zcoef * hu(ji,jj) * e2u(ji,jj)/e1u(ji,jj)*(1.-uemsk(jj,1))
-            ELSE
-               zcoefe = -zcoef * hu(ji,jj) * e2u(ji,jj)/e1u(ji,jj)
-            END IF
-            gcp(ji,jj,3) = zcoefe
-            !
-            !                                    ! north coefficient
-            IF( lp_obc_north .AND. ( jj == njn0 ) ) THEN
-               zcoefn = -zcoef * hv(ji,jj) * e1v(ji,jj)/e2v(ji,jj)*(1.-vnmsk(ji,1))
-            ELSE
-               zcoefn = -zcoef * hv(ji,jj) * e1v(ji,jj)/e2v(ji,jj)
-            END IF
-            gcp(ji,jj,4) = zcoefn
-            !
-            !                                    ! diagonal coefficient
-            gcdmat(ji,jj) = e1t(ji,jj)*e2t(ji,jj)*bmask(ji,jj)   &
-               &            - zcoefs -zcoefw -zcoefe -zcoefn
-         END DO
-      END DO
-    ELSE
-      DO jj = 2, jpjm1                      ! matrix of free surface elliptic system
-         DO ji = 2, jpim1
-            zcoef = z2dt * z2dt * grav * bmask(ji,jj)
-            zcoefs = -zcoef * hv(ji  ,jj-1) * e1v(ji  ,jj-1) / e2v(ji  ,jj-1)    ! south coefficient
-            zcoefw = -zcoef * hu(ji-1,jj  ) * e2u(ji-1,jj  ) / e1u(ji-1,jj  )    ! west coefficient
-            zcoefe = -zcoef * hu(ji  ,jj  ) * e2u(ji  ,jj  ) / e1u(ji  ,jj  )    ! east coefficient
-            zcoefn = -zcoef * hv(ji  ,jj  ) * e1v(ji  ,jj  ) / e2v(ji  ,jj  )    ! north coefficient
-            gcp(ji,jj,1) = zcoefs
-            gcp(ji,jj,2) = zcoefw
-            gcp(ji,jj,3) = zcoefe
-            gcp(ji,jj,4) = zcoefn
-            gcdmat(ji,jj) = e1t(ji,jj) * e2t(ji,jj) * bmask(ji,jj)    &          ! diagonal coefficient
-               &          - zcoefs -zcoefw -zcoefe -zcoefn
-         END DO
-      END DO
-    ENDIF
-#   endif
 
 #  elif defined key_dynspg_flt && defined key_bdy 
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 4327)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 4328)
@@ -34,6 +34,4 @@
    USE trdtra          ! ocean active tracers trends 
    USE phycst
-   USE obc_oce
-   USE obctra          ! open boundary condition (obc_tra routine)
    USE bdy_oce
    USE bdytra          ! open boundary condition (bdy_tra routine)
@@ -81,5 +79,5 @@
       !!              - Apply lateral boundary conditions on (ta,sa) 
       !!             at the local domain   boundaries through lbc_lnk call, 
-      !!             at the one-way open boundaries (lk_obc=T), 
+      !!             at the one-way open boundaries (lk_bdy=T), 
       !!             at the AGRIF zoom     boundaries (lk_agrif=T)
       !!
@@ -112,7 +110,4 @@
       CALL lbc_lnk( tsa(:,:,:,jp_sal), 'T', 1._wp )
       !
-#if defined key_obc 
-      IF( lk_obc )   CALL obc_tra( kt )  ! OBC open boundaries
-#endif
 #if defined key_bdy 
       IF( lk_bdy )   CALL bdy_tra( kt )  ! BDY open boundaries
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 4327)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 4328)
@@ -51,5 +51,4 @@
 #endif
    USE tideini         ! tidal components initialization   (tide_ini routine)
-   USE obcini          ! open boundary cond. initialization (obc_ini routine)
    USE bdyini          ! open boundary cond. initialization (bdy_init routine)
    USE bdydta          ! open boundary cond. initialization (bdy_dta_init routine)
@@ -381,6 +380,4 @@
 
       IF( ln_ctl        )   CALL prt_ctl_init   ! Print control
-
-      IF( lk_obc        )   CALL     obc_init   ! Open boundaries
 
                             CALL  istate_init   ! ocean initial state (Dynamics and tracers)
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 4327)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 4328)
@@ -96,6 +96,4 @@
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
       IF( lk_tide    )   CALL sbc_tide( kstp )
-      IF( lk_obc     )   CALL obc_dta ( kstp )        ! update dynamic and tracer data at open boundaries
-      IF( lk_obc     )   CALL obc_rad ( kstp )        ! compute phase velocities at open boundaries
       IF( lk_bdy     )   CALL bdy_dta ( kstp, time_offset=+1 )   ! update dynamic & tracer data at open boundaries
 
@@ -315,5 +313,4 @@
       ENDIF
       IF( lrst_oce         )   CALL rst_write    ( kstp )   ! write output ocean restart file
-      IF( lk_obc           )   CALL obc_rst_write( kstp )   ! write open boundary restart file
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/step_oce.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 4327)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 4328)
@@ -53,9 +53,4 @@
 
    USE dynnxt           ! time-stepping                    (dyn_nxt routine)
-
-   USE obc_par          ! open boundary condition variables
-   USE obcdta           ! open boundary condition data     (obc_dta routine)
-   USE obcrst           ! open boundary cond. restart      (obc_rst routine)
-   USE obcrad           ! open boundary cond. radiation    (obc_rad routine)
 
    USE bdy_par          ! for lk_bdy
