Index: branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90
===================================================================
--- branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90	(revision 3605)
+++ branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/DOM/closea.F90	(revision 3625)
@@ -18,4 +18,5 @@
    USE oce             ! dynamics and tracers
    USE dom_oce         ! ocean space and time domain
+   USE phycst
    USE in_out_manager  ! I/O manager
    USE sbc_oce         ! ocean surface boundary conditions
@@ -173,10 +174,10 @@
       !!      put as run-off in open ocean.
       !!
-      !! ** Action  :   emp, emps   updated surface freshwater fluxes at kt
+      !! ** Action  :   emp   updated surface freshwater flux at kt
       !!----------------------------------------------------------------------
       INTEGER, INTENT(in) ::   kt   ! ocean model time step
       !
       INTEGER                     ::   ji, jj, jc, jn   ! dummy loop indices
-      REAL(wp)                    ::   zze2
+      REAL(wp)                    ::   zze2, zcoef, zcoef1
       REAL(wp), DIMENSION (jpncs) ::   zfwf 
       !!----------------------------------------------------------------------
@@ -214,5 +215,5 @@
       ENDIF
       !                                                   !--------------------!
-      !                                                   !  update emp, emps  !
+      !                                                   !  update emp        !
       zfwf = 0.e0                                         !--------------------!
       DO jc = 1, jpncs
@@ -235,6 +236,8 @@
          IF( ncstt(jc) == 0 ) THEN 
             ! water/evap excess is shared by all open ocean
-            emp (:,:) = emp (:,:) + zfwf(jc) / surf(jpncs+1)
-            emps(:,:) = emps(:,:) + zfwf(jc) / surf(jpncs+1)
+            zcoef  = zfwf(jc) / surf(jpncs+1)
+            zcoef1 = rcp * zcoef
+            emp(:,:) = emp(:,:) + zcoef
+            qns(:,:) = qns(:,:) - zcoef1 * sst_m(:,:)
          ELSEIF( ncstt(jc) == 1 ) THEN 
             ! Excess water in open sea, at outflow location, excess evap shared
@@ -245,13 +248,15 @@
                   IF (      ji > 1 .AND. ji < jpi   &
                       .AND. jj > 1 .AND. jj < jpj ) THEN 
-                      emp (ji,jj) = emp (ji,jj) + zfwf(jc) /   &
-                         (FLOAT(ncsnr(jc)) * e1t(ji,jj) * e2t(ji,jj))
-                      emps(ji,jj) = emps(ji,jj) + zfwf(jc) /   &
-                          (FLOAT(ncsnr(jc)) * e1t(ji,jj) * e2t(ji,jj))
+                      zcoef  = zfwf(jc) / ( REAL(ncsnr(jc), wp) * e1t(ji,jj) * e2t(ji,jj) )
+                      zcoef1 = rcp * zcoef
+                      emp(ji,jj) = emp(ji,jj) + zcoef
+                      qns(ji,jj) = qns(ji,jj) - zcoef1 * sst_m(ji,jj)
                   END IF 
                 END DO 
             ELSE 
-                emp (:,:) = emp (:,:) + zfwf(jc) / surf(jpncs+1)
-                emps(:,:) = emps(:,:) + zfwf(jc) / surf(jpncs+1)
+                zcoef  = zfwf(jc) / surf(jpncs+1)
+                zcoef1 = rcp * zcoef
+                emp(:,:) = emp(:,:) + zcoef
+                qns(:,:) = qns(:,:) - zcoef1 * sst_m(:,:)
             ENDIF
          ELSEIF( ncstt(jc) == 2 ) THEN 
@@ -262,8 +267,8 @@
                   ji = mi0(ncsir(jc,jn))
                   jj = mj0(ncsjr(jc,jn)) ! Location of outflow in open ocean
-                  emp (ji,jj) = emp (ji,jj) + zfwf(jc)   &
-                      / (FLOAT(ncsnr(jc)) *  e1t(ji,jj) * e2t(ji,jj) )
-                  emps(ji,jj) = emps(ji,jj) + zfwf(jc)   &
-                      / (FLOAT(ncsnr(jc)) *  e1t(ji,jj) * e2t(ji,jj) )
+                  zcoef  = zfwf(jc) / ( REAL(ncsnr(jc), wp) * e1t(ji,jj) * e2t(ji,jj) )
+                  zcoef1 = rcp * zcoef
+                  emp(ji,jj) = emp(ji,jj) + zcoef
+                  qns(ji,jj) = qns(ji,jj) - zcoef1 * sst_m(ji,jj)
                 END DO 
             ENDIF 
@@ -272,6 +277,8 @@
          DO jj = ncsj1(jc), ncsj2(jc)
             DO ji = ncsi1(jc), ncsi2(jc)
-               emp (ji,jj) = emp (ji,jj) - zfwf(jc) / surf(jc)
-               emps(ji,jj) = emps(ji,jj) - zfwf(jc) / surf(jc)
+               zcoef  = zfwf(jc) / surf(jc)
+               zcoef1 = rcp * zcoef
+               emp(ji,jj) = emp(ji,jj) - zcoef
+               qns(ji,jj) = qns(ji,jj) + zcoef1 * sst_m(ji,jj)
             END DO  
          END DO 
@@ -280,5 +287,4 @@
       !
       CALL lbc_lnk( emp , 'T', 1. )
-      CALL lbc_lnk( emps, 'T', 1. )
       !
    END SUBROUTINE sbc_clo
