Index: /branches/DEV_R1821_Rivers/NEMO/OPA_SRC/DYN/divcur.F90
===================================================================
--- /branches/DEV_R1821_Rivers/NEMO/OPA_SRC/DYN/divcur.F90	(revision 2117)
+++ /branches/DEV_R1821_Rivers/NEMO/OPA_SRC/DYN/divcur.F90	(revision 2118)
@@ -16,4 +16,7 @@
    USE bdy_oce	       ! Unstructured open boundaries variables
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
+   USE sbcrnf, ONLY  : rnf_dep, rnf_mod_dep  ! River runoff
+   USE phycst,  ONLY : rau0                  ! physical constant
+   USE sbc_oce, ONLY : ln_rnf, rnf           ! surface boundary condition: ocean
 
    IMPLICIT NONE
@@ -89,4 +92,5 @@
       REAL(wp), DIMENSION(   jpi  ,1:jpj+2) ::   zwu   ! workspace
       REAL(wp), DIMENSION(-1:jpi+2,  jpj  ) ::   zwv   ! workspace
+      REAL(wp) ::  zraur,  zdep   ! temporary scalar
       !!----------------------------------------------------------------------
 
@@ -244,4 +248,16 @@
       END DO                                           !   End of slab
       !                                                ! ===============
+
+      IF ( ln_rnf ) THEN
+      zraur = 1. / rau0
+        DO ji=1,jpi
+          DO jj=1,jpj
+            zdep = 1. / rnf_dep(ji,jj)
+            DO jk=1,rnf_mod_dep(ji,jj)
+              hdivn(ji,jj,jk) = hdivn(ji,jj,jk) - rnf(ji,jj)*zraur*zdep
+            ENDDO
+          ENDDO
+        ENDDO
+      ENDIF
       
       ! 4. Lateral boundary conditions on hdivn and rotn
@@ -301,4 +317,5 @@
       !! * Local declarations
       INTEGER  ::   ji, jj, jk          ! dummy loop indices
+      REAL(wp) ::  zraur,  zdep   ! temporary scalar
       !!----------------------------------------------------------------------
 
@@ -372,5 +389,17 @@
       END DO                                           !   End of slab
       !                                                ! ===============
-      
+
+      IF ( ln_rnf ) THEN
+      zraur = 1. / rau0
+        DO ji=1,jpi
+          DO jj=1,jpj
+            zdep = 1. / rnf_dep(ji,jj)
+            DO jk=1,rnf_mod_dep(ji,jj)
+              hdivn(ji,jj,jk) = hdivn(ji,jj,jk) - rnf(ji,jj)*zraur*zdep
+            ENDDO
+          ENDDO
+        ENDDO
+      ENDIF
+
       ! 4. Lateral boundary conditions on hdivn and rotn
       ! ---------------------------------=======---======
Index: /branches/DEV_R1821_Rivers/NEMO/OPA_SRC/DYN/sshwzv.F90
===================================================================
--- /branches/DEV_R1821_Rivers/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 2117)
+++ /branches/DEV_R1821_Rivers/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 2118)
@@ -164,5 +164,5 @@
 
       !                                                ! Sea surface elevation time stepping
-      ssha(:,:) = (  sshb(:,:) - z2dt * ( zraur * ( emp(:,:)-rnf(:,:) ) + zhdiv(:,:) )  ) * tmask(:,:,1) 
+      ssha(:,:) = (  sshb(:,:) - z2dt * ( zraur * emp(:,:) + zhdiv(:,:) )  ) * tmask(:,:,1)
 
 #if defined key_obc
Index: /branches/DEV_R1821_Rivers/NEMO/OPA_SRC/SBC/sbcrnf.F90
===================================================================
--- /branches/DEV_R1821_Rivers/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 2117)
+++ /branches/DEV_R1821_Rivers/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 2118)
@@ -50,8 +50,8 @@
    TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_tmp_rnf    !: structure of input river runoff temperature (file information, fields read)  
  
-   REAL,    PUBLIC, DIMENSION(jpi,jpj) ::  rnf_dep         !: depth of runoff in m  
-   INTEGER, PUBLIC, DIMENSION(jpi,jpj) ::  rnf_mod_dep     !: depth of runoff in model levels  
-   REAL,    PUBLIC, DIMENSION(jpi,jpj) ::  rnf_sal         !: salinity of river runoff  
-   REAL,    PUBLIC, DIMENSION(jpi,jpj) ::  rnf_tmp         !: temperature of river runoff  
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::  rnf_dep         !: depth of runoff in m
+   INTEGER,  PUBLIC, DIMENSION(jpi,jpj) ::  rnf_mod_dep     !: depth of runoff in model levels
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::  rnf_sal         !: salinity of river runoff
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::  rnf_tmp         !: temperature of river runoff
   
    INTEGER  ::  ji, jj ,jk    ! dummy loop indices  
