Index: branches/devukmo2010/NEMO/OPA_SRC/TRA/trasbc.F90
===================================================================
--- branches/devukmo2010/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 2126)
+++ branches/devukmo2010/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 2128)
@@ -21,4 +21,6 @@
    USE in_out_manager  ! I/O manager
    USE prtctl          ! Print control
+   USE sbcrnf          ! River runoff  
+   USE sbcmod          ! ln_rnf  
 
    IMPLICIT NONE
@@ -103,6 +105,9 @@
       INTEGER, INTENT(in) ::   kt     ! ocean time-step index
       !!
-      INTEGER  ::   ji, jj                   ! dummy loop indices
-      REAL(wp) ::   zta, zsa, zsrau, zse3t   ! temporary scalars
+      INTEGER  ::   ji, jj, jk           ! dummy loop indices  
+      REAL(wp) ::   zta, zsa             ! temporary scalars, adjustment to temperature and salinity  
+      REAL(wp) ::   zata, zasa           ! temporary scalars, calculations of automatic change to temp & sal due to vvl (done elsewhere)  
+      REAL(wp) ::   zsrau, zse3t, zdep   ! temporary scalars, 1/density, 1/height of box, 1/height of effected water column  
+      REAL(wp) ::   zdheat, zdsalt       ! total change of temperature and salinity  
       !!----------------------------------------------------------------------
 
@@ -125,5 +130,5 @@
       IF( .NOT.ln_traqsr )   qsr(:,:) = 0.e0   ! no solar radiation penetration
 
-      ! Concentration dillution effect on (t,s)
+      ! Concentration dilution effect on (t,s) due to evapouration, precipitation and qns, but not river runoff  
       DO jj = 2, jpj
          DO ji = fs_2, fs_jpim1   ! vector opt.
@@ -132,12 +137,12 @@
 #endif
             IF( lk_vvl) THEN
-               zta = ro0cpr * qns(ji,jj) * zse3t &                   ! temperature : heat flux
-                &    - emp(ji,jj) * zsrau * tn(ji,jj,1)  * zse3t     ! & cooling/heating effet of EMP flux
+               zta =  ro0cpr * qns(ji,jj) * zse3t &                  ! temperature : heat flux 
+                &    - emp(ji,jj) * zsrau * tn(ji,jj,1) * zse3t      ! & cooling/heating effet of EMP flux 
                zsa = ( emps(ji,jj) - emp(ji,jj) ) &
                 &                 * zsrau * sn(ji,jj,1)  * zse3t     ! concent./dilut. effect due to sea-ice 
                                                                      ! melt/formation and (possibly) SSS restoration
             ELSE
-               zta = ro0cpr * qns(ji,jj) * zse3t     ! temperature : heat flux
-               zsa = emps(ji,jj) * zsrau * sn(ji,jj,1)   * zse3t     ! salinity :  concent./dilut. effect
+               zta =  ro0cpr * qns(ji,jj) * zse3t                    ! temperature : heat flux 
+               zsa =  emps(ji,jj) * zsrau * sn(ji,jj,1) * zse3t      ! salinity :  concent./dilut. effect 
             ENDIF
             ta(ji,jj,1) = ta(ji,jj,1) + zta                          ! add the trend to the general tracer trend
@@ -145,4 +150,32 @@
          END DO
       END DO
+
+      IF ( ln_rnf ) THEN  
+
+      ! Effect on (t,s) due to river runoff (dilution effect automatically applied via vertical tracer advection) 
+        DO jj=1,jpj  
+           DO ji=1,jpi  
+              zdep = 1. / rnf_dep(ji,jj)  
+              zse3t= 1. / fse3t(ji,jj,1)  
+
+              IF ( rnf(ji,jj) .gt. 0.0 ) THEN
+                 ! ammend t and s due to direct tracer flux
+                 IF ( rnf_tmp(ji,jj) == -999 )   rnf_tmp(ji,jj)=tn(ji,jj,1)        ! if not specified set runoff temp to be sst
+                 DO jk=1, rnf_mod_dep(ji,jj)
+                    ta(ji,jj,jk) = ta(ji,jj,jk) + rnf_tmp(ji,jj) * rnf(ji,jj) * zsrau * zdep
+                    sa(ji,jj,jk) = sa(ji,jj,jk) + rnf_sal(ji,jj) * rnf(ji,jj) * zsrau * zdep
+                 ENDDO
+              ELSEIF (rnf(ji,jj) .lt. 0.) THEN   !! for use in baltic when flow is out of domain, want no change in temp and sal
+                 ! negate concentration/dilution effect from traadv, as the tracer leaves domain
+                 DO jk=1, rnf_mod_dep(ji,jj)
+                    ta(ji,jj,jk) = ta(ji,jj,jk) + tn(ji,jj,jk) * rnf(ji,jj) * zsrau * zdep
+                    sa(ji,jj,jk) = sa(ji,jj,jk) + sn(ji,jj,jk) * rnf(ji,jj) * zsrau * zdep
+                 ENDDO
+              ENDIF
+
+           ENDDO  
+        ENDDO  
+
+      ENDIF  
 
       IF( l_trdtra ) THEN      ! save the sbc trends for diagnostic
