Index: trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obc_oce.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obc_oce.F90	(revision 22)
+++ trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obc_oce.F90	(revision 23)
@@ -73,4 +73,10 @@
 
    REAL(wp), PUBLIC ::   obcsurftot       !: Total lateral surface of open boundaries
+!     Add computation of E/W/N/S lateral surface of open boundaries
+   REAL(wp), PUBLIC ::    &  !:
+      obcsurfeast     ,   &  !: East  lateral surface of open boundaries
+      obcsurfwest     ,   &  !: West  lateral surface of open boundaries
+      obcsurfnorth    ,   &  !: North lateral surface of open boundaries
+      obcsurfsouth           !: South lateral surface of open boundaries
    
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: &  !:
Index: trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obc_par.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obc_par.F90	(revision 22)
+++ trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obc_par.F90	(revision 23)
@@ -113,4 +113,11 @@
       jpisfm1 =  jpisf-1        !: last  ocean point         "                 "
    
+   !! * CHOSE WHERE YOU WANT TO LOCATE THE BAROTROPIC CORRECTION VELOCITY
+   LOGICAL, PARAMETER ::     &  !:
+      lp_obc_east_barotp_corr  = .TRUE.,   & !:
+      lp_obc_west_barotp_corr  = .TRUE.,   & !:
+      lp_obc_north_barotp_corr = .TRUE.,   & !:
+      lp_obc_south_barotp_corr = .TRUE.      !:
+
    INTEGER, PARAMETER ::   jpnic = 2700   !: maximum number of isolated coastlines points 
 
Index: trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obc_par_EEL_R5.h90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obc_par_EEL_R5.h90	(revision 22)
+++ trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obc_par_EEL_R5.h90	(revision 23)
@@ -72,4 +72,11 @@
       jpisfm1 =  jpisf-1        !: last  ocean point         "                 "
    
+   !! * CHOSE WHERE YOU WANT TO LOCATE THE BAROTROPIC CORRECTION VELOCITY
+   LOGICAL, PARAMETER ::     &  !:
+      lp_obc_east_barotp_corr  = .TRUE.,   & !:
+      lp_obc_west_barotp_corr  = .TRUE.,   & !:
+      lp_obc_north_barotp_corr = .TRUE.,   & !:
+      lp_obc_south_barotp_corr = .TRUE.      !:
+
    INTEGER, PARAMETER ::     &  !:
       jpnic = 2700              !: maximum number of isolated coastlines points 
Index: trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obcini.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obcini.F90	(revision 22)
+++ trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obcini.F90	(revision 23)
@@ -423,36 +423,42 @@
       ! 3.1 Total lateral surface 
       ! -------------------------
+      obcsurfeast  = 0.e0       ;       obcsurfwest  = 0.e0   
+      obcsurfnorth = 0.e0       ;       obcsurfsouth = 0.e0   
       obcsurftot = 0.e0
 
-      IF( lp_obc_east ) THEN ! ... East open boundary lateral surface
+      IF( lp_obc_east .AND. lp_obc_east_barotp_corr ) THEN ! ... East open boundary lateral surface
          DO ji = nie0, nie1
             DO jj = 1, jpj 
-               obcsurftot = obcsurftot+hu(ji,jj)*e2u(ji,jj)*uemsk(jj,1) * MAX(obctmsk(ji,jj),obctmsk(ji+1,jj) )
+               obcsurfeast = obcsurfeast+hu(ji,jj)*e2u(ji,jj)*uemsk(jj,1) * MAX(obctmsk(ji,jj),obctmsk(ji+1,jj) )
             END DO
          END DO
-      END IF
-
-      IF( lp_obc_west ) THEN ! ... West open boundary lateral surface
+         obcsurftot = obcsurftot + obcsurfeast
+      END IF
+
+      IF( lp_obc_west .AND. lp_obc_west_barotp_corr ) THEN ! ... West open boundary lateral surface
          DO ji = niw0, niw1
             DO jj = 1, jpj 
-               obcsurftot = obcsurftot+hu(ji,jj)*e2u(ji,jj)*uwmsk(jj,1) * MAX(obctmsk(ji,jj),obctmsk(ji+1,jj) )
+               obcsurfwest = obcsurfwest+hu(ji,jj)*e2u(ji,jj)*uwmsk(jj,1) * MAX(obctmsk(ji,jj),obctmsk(ji+1,jj) )
             END DO
          END DO
-      END IF
-
-      IF( lp_obc_north ) THEN ! ... North open boundary lateral surface
+         obcsurftot = obcsurftot + obcsurfwest
+      END IF
+
+      IF( lp_obc_north .AND. lp_obc_north_barotp_corr ) THEN ! ... North open boundary lateral surface
          DO jj = njn0, njn1
             DO ji = 1, jpi
-               obcsurftot = obcsurftot+hv(ji,jj)*e1v(ji,jj)*vnmsk(ji,1) * MAX(obctmsk(ji,jj),obctmsk(ji,jj+1) )
+               obcsurfnorth = obcsurfnorth+hv(ji,jj)*e1v(ji,jj)*vnmsk(ji,1) * MAX(obctmsk(ji,jj),obctmsk(ji,jj+1) )
             END DO
          END DO
-      END IF
-
-      IF( lp_obc_south ) THEN ! ... South open boundary lateral surface
+         obcsurftot = obcsurftot + obcsurfnorth
+      END IF
+
+      IF( lp_obc_south .AND. lp_obc_south_barotp_corr ) THEN ! ... South open boundary lateral surface
          DO jj = njs0, njs1
             DO ji = 1, jpi
-               obcsurftot = obcsurftot+hv(ji,jj)*e1v(ji,jj)*vsmsk(ji,1) * MAX(obctmsk(ji,jj),obctmsk(ji,jj+1) )
+               obcsurfsouth = obcsurfsouth+hv(ji,jj)*e1v(ji,jj)*vsmsk(ji,1) * MAX(obctmsk(ji,jj),obctmsk(ji,jj+1) )
             END DO
          END DO
+         obcsurftot = obcsurftot + obcsurfsouth
       END IF
 
Index: trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obcvol.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obcvol.F90	(revision 22)
+++ trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obcvol.F90	(revision 23)
@@ -83,4 +83,5 @@
       INTEGER ::   ji, jj, jk
       REAL(wp) ::   zubtpecor
+      REAL(wp) ::   zubtpecorE,zubtpecorW,zubtpecorS,zubtpecorN
       REAL(wp) ::   zCflxemp
       REAL(wp) ::   ztransw, ztranse, ztransn, ztranss, ztranst
@@ -105,4 +106,8 @@
 
       zubtpecor = 0.e0
+      zubtpecorE = 0.e0
+      zubtpecorW = 0.e0
+      zubtpecorS = 0.e0
+      zubtpecorN = 0.e0
 
       ! ... East open boundary
@@ -111,5 +116,5 @@
             DO jk = 1, jpkm1
                DO jj = 1, jpj
-                  zubtpecor = zubtpecor - ua(ji,jj,jk)*e2u(ji,jj)*fse3u(ji,jj,jk) * &
+                  zubtpecorE = zubtpecorE - ua(ji,jj,jk)*e2u(ji,jj)*fse3u(ji,jj,jk) * &
              &     uemsk(jj,jk)*MAX(obctmsk(ji,jj),obctmsk(ji+1,jj) )
                END DO
@@ -123,5 +128,5 @@
             DO jk = 1, jpkm1
                DO jj = 1, jpj
-                  zubtpecor = zubtpecor + ua(ji,jj,jk)*e2u(ji,jj)*fse3u(ji,jj,jk) * &
+                  zubtpecorW = zubtpecorW + ua(ji,jj,jk)*e2u(ji,jj)*fse3u(ji,jj,jk) * &
              &    uwmsk(jj,jk) *MAX(obctmsk(ji,jj),obctmsk(ji+1,jj) )
                END DO
@@ -135,5 +140,5 @@
             DO jk = 1, jpkm1
                DO ji = 1, jpi
-                  zubtpecor = zubtpecor - va(ji,jj,jk)*e1v(ji,jj)*fse3v(ji,jj,jk) * &
+                  zubtpecorN = zubtpecorN - va(ji,jj,jk)*e1v(ji,jj)*fse3v(ji,jj,jk) * &
              &    vnmsk(ji,jk) * MAX(obctmsk(ji,jj),obctmsk(ji,jj+1) )
                END DO
@@ -147,5 +152,5 @@
             DO jk = 1, jpkm1
                DO ji = 1, jpi
-                  zubtpecor = zubtpecor + va(ji,jj,jk)*e1v(ji,jj)*fse3v(ji,jj,jk) * &
+                  zubtpecorS = zubtpecorS + va(ji,jj,jk)*e1v(ji,jj)*fse3v(ji,jj,jk) * &
              &    vsmsk(ji,jk) * MAX(obctmsk(ji,jj),obctmsk(ji,jj+1) )
                END DO
@@ -154,6 +159,9 @@
        ENDIF
 
-      IF( lk_mpp )   CALL mpp_sum( zubtpecor )   ! sum over the global domain
-
+      IF( lk_mpp )   CALL mpp_sum( zubtpecorN )   ! sum over the global domain
+      IF( lk_mpp )   CALL mpp_sum( zubtpecorS )   ! sum over the global domain
+      IF( lk_mpp )   CALL mpp_sum( zubtpecorW )   ! sum over the global domain
+      IF( lk_mpp )   CALL mpp_sum( zubtpecorE )   ! sum over the global domain
+      zubtpecor = zubtpecorE +  zubtpecorW + zubtpecorN + zubtpecorS
 
       ! 3. The normal velocity correction
@@ -165,4 +173,8 @@
          IF(lwp) WRITE(numout,*)'          cumulate flux EMP :', zCflxemp,' (m3/s)'
          IF(lwp) WRITE(numout,*)'          lateral transport :',zubtpecor,'(m3/s)'
+         IF(lwp) WRITE(numout,*)'          East  lateral transport (before corr.):',zubtpecorE,'(m3/s)'
+         IF(lwp) WRITE(numout,*)'          West  lateral transport (before corr.):',zubtpecorW,'(m3/s)'
+         IF(lwp) WRITE(numout,*)'          North lateral transport (before corr.):',zubtpecorN,'(m3/s)'
+         IF(lwp) WRITE(numout,*)'          South lateral transport (before corr.):',zubtpecorS,'(m3/s)'
          IF(lwp) WRITE(numout,*)'          net inflow        :',zubtpecor-zCflxemp,'(m3/s)'
       ENDIF
@@ -183,5 +195,5 @@
       ztranst = 0.e0  ! total
 
-      IF( lp_obc_west ) THEN
+      IF( lp_obc_west .AND. lp_obc_west_barotp_corr ) THEN
          ! ... correction of the west velocity
          DO ji = fs_niw0, fs_niw1 ! Vector opt.
@@ -200,5 +212,5 @@
       END IF 
 
-      IF( lp_obc_east ) THEN
+      IF( lp_obc_east .AND. lp_obc_east_barotp_corr ) THEN
 
          ! ... correction of the east velocity
@@ -221,5 +233,5 @@
       END IF 
 
-      IF( lp_obc_north ) THEN
+      IF( lp_obc_north .AND. lp_obc_north_barotp_corr ) THEN
 
          ! ... correction of the north velocity
@@ -241,5 +253,5 @@
       END IF 
 
-      IF( lp_obc_south ) THEN
+      IF( lp_obc_south .AND. lp_obc_south_barotp_corr ) THEN
 
          ! ... correction of the south velocity
