Index: branches/2017/dev_r8789_sbc/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
===================================================================
--- branches/2017/dev_r8789_sbc/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 8793)
+++ branches/2017/dev_r8789_sbc/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 8794)
@@ -100,4 +100,26 @@
       CALL div_hor( kt )                               ! Horizontal divergence
       !
+if defined key_asminc
+      !                                                ! Include the IAU weighted SSH increment
+      IF( lk_asminc .AND. ln_sshinc .AND. ln_asmiau ) THEN
+         CALL ssh_asm_inc( kt )
+         IF ( ln_linssh ) THEN
+            ! Adjust sea surface height directly
+            ! (note that qns/sfx are not modified to take into account heat/salt content added as effect would 
+            ! just need to be removed by concentration / dilution effect in trasbc)
+            ssha(:,:) = ssha(:,:) + z2dt * ssh_iau(:,:)
+         ELSE
+            ! Don't directly adjust sea surface height but change horizontal divergence at all levels instead
+            ! (in trasbc the heat and salt content associated with these changes are also taken into account)
+            DO jk = 1, jpkm1                                 
+               hdivn(:,:,jk) = hdivn(:,:,jk) - ( ssh_iau(:,:) / ( ht_0(:,:) + 1.0 - ssmask(:,:) ) )   &
+                                               * ( e3t_0(:,:,jk) / e3t_n(:,:,jk) ) * tmask(:,:,jk) 
+            END DO
+            CALL lbc_lnk( hdivn, 'T', 1. )
+         ENDIF
+      ENDIF
+      !
+#endif
+      !
       zhdiv(:,:) = 0._wp
       DO jk = 1, jpkm1                                 ! Horizontal divergence of barotropic transports
@@ -121,11 +143,4 @@
          ENDIF
       ENDIF
-
-#if defined key_asminc
-      IF( lk_asminc .AND. ln_sshinc .AND. ln_asmiau ) THEN     ! Include the IAU weighted SSH increment
-         CALL ssh_asm_inc( kt )
-         ssha(:,:) = ssha(:,:) + z2dt * ssh_iau(:,:)
-      ENDIF
-#endif
       !                                           !------------------------------!
       !                                           !           outputs            !
Index: branches/2017/dev_r8789_sbc/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90
===================================================================
--- branches/2017/dev_r8789_sbc/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 8793)
+++ branches/2017/dev_r8789_sbc/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90	(revision 8794)
@@ -27,4 +27,7 @@
    USE trd_oce        ! trends: ocean variables
    USE trdtra         ! trends manager: tracers 
+#if defined key_asminc   
+   USE asminc         ! Assimilation increment
+#endif
    !
    USE in_out_manager ! I/O manager
@@ -208,4 +211,34 @@
       IF( iom_use('rnf_x_sss') )   CALL iom_put( "rnf_x_sss", rnf*tsn(:,:,1,jp_sal) )   ! runoff term on sss
 
+#if defined key_asminc
+      !
+      !----------------------------------------
+      !        Assmilation effects
+      !----------------------------------------
+      !
+      IF( ln_sshinc ) THEN         ! input of heat and salt due to assimilation
+      	 !
+         ! Only required for vvl case (without vvl all the ssh increment is added to the surface layer and because the extra
+         ! water added by assimilation is always assumed to have the same T/S as the layer it is added to, and no additional T/S 
+         ! content is explicitly added into qns/sfx due to ssh_iau, there is no need to include a compensating term to adjust 
+         ! for it here)
+         !
+         IF( .NOT. ln_linssh ) THEN 
+            DO jj = 2, jpj 
+               DO ji = fs_2, fs_jpim1
+                  zdep = ssh_iau(ji,jj) / ( ht_0(ji,jj) + 1.0 - ssmask(ji, jj) )
+                  DO jk = 1, jpkm1
+                     tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem)   &
+                                           &            + tsn(ji,jj,jk,jp_tem) * zdep * ( e3t_0(ji,jj,jk) / e3t_n(ji,jj,jk) )
+                     tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal)   &
+                                           &            + tsn(ji,jj,jk,jp_sal) * zdep * ( e3t_0(ji,jj,jk) / e3t_n(ji,jj,jk) )
+                  END DO
+               END DO  
+            END DO  
+         ENDIF
+         !
+      ENDIF
+#endif
+
       !
       !----------------------------------------
