Index: trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obcvol.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OPA_SRC/OBC/obcvol.F90	(revision 3)
+++ 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
