Index: branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 8280)
+++ branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 8400)
@@ -44,4 +44,5 @@
    USE wrk_nemo        ! Memory Allocation
    USE timing          ! Timing
+   USE biaspar         ! bias correction variables
 
    IMPLICIT NONE
@@ -84,4 +85,7 @@
       INTEGER, INTENT(in) ::   kt   ! ocean time-step index
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdu, ztrdv
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:)   ::   z_rhd_st  ! tmp density storage for pressure corr
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:)     ::   z_gru_st  ! tmp ua trends storage for pressure corr
+      REAL(wp), ALLOCATABLE, DIMENSION(:,:)     ::   z_grv_st  ! tmp va trends storage for pressure corr
       !!----------------------------------------------------------------------
       !
@@ -92,4 +96,20 @@
          ztrdu(:,:,:) = ua(:,:,:)
          ztrdv(:,:,:) = va(:,:,:)
+      ENDIF
+      !
+      IF ( ln_bias .AND. ln_bias_pc_app ) THEN
+
+         !Allocate space for tempory variables
+         ALLOCATE( z_rhd_st(jpi,jpj,jpk), &
+            &      z_gru_st(jpi,jpj),     &
+            &      z_grv_st(jpi,jpj)      )
+
+         z_rhd_st(:,:,:) = rhd(:,:,:)     ! store orig density 
+         rhd(:,:,:)      = rhd_pc(:,:,:)  ! use pressure corrected density
+         z_gru_st(:,:)   = gru(:,:)
+         gru(:,:)        = gru_pc(:,:)
+         z_grv_st(:,:)   = grv(:,:)
+         grv(:,:)        = grv_pc(:,:)
+
       ENDIF
       !
@@ -112,4 +132,15 @@
       IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' hpg  - Ua: ', mask1=umask,   &
          &                       tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' )
+      !
+      IF ( ln_bias .AND. ln_bias_pc_app )  THEN
+         rhd(:,:,:) = z_rhd_st(:,:,:)     ! restore original density
+         gru(:,:)   = z_gru_st(:,:)
+         grv(:,:)   = z_grv_st(:,:)
+
+         !Deallocate tempory variables
+         DEALLOCATE( z_rhd_st,     &
+            &        z_gru_st,     &
+            &        z_grv_st      )
+      ENDIF
       !
       IF( nn_timing == 1 )  CALL timing_stop('dyn_hpg')
Index: branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
===================================================================
--- branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 8280)
+++ branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 8400)
@@ -74,5 +74,5 @@
       INTEGER, INTENT(in) ::   kt                      ! time step
       ! 
-      INTEGER             ::   jk                      ! dummy loop indice
+      INTEGER             ::   jk                      ! dummy loop indices
       REAL(wp)            ::   z2dt, z1_rau0           ! local scalars
       !!----------------------------------------------------------------------
@@ -94,4 +94,20 @@
       z2dt = 2._wp * rdt                              ! set time step size (Euler/Leapfrog)
       IF( neuler == 0 .AND. kt == nit000 )   z2dt = rdt
+
+
+#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 defined key_vvl
+! Don't directly adjust ssh but change hdivn at all levels instead
+! In trasbc also add in the heat and salt content associated with these changes at each level  
+        DO jk = 1, jpkm1                                 
+                 hdivn(:,:,jk) = hdivn(:,:,jk) - ( ssh_iau(:,:) / ( ht_0(:,:) + 1.0 - ssmask(:,:) ) ) * ( e3t_0(:,:,jk) / fse3t_n(:,:,jk) ) * tmask(:,:,jk) 
+        END DO
+      ENDIF
+#endif
+#endif
+
 
       !                                           !------------------------------!
@@ -123,11 +139,4 @@
 #endif
 
-#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 )
-         ssha(:,:) = ssha(:,:) + z2dt * ssh_iau(:,:)
-      ENDIF
-#endif
 
       !                                           !------------------------------!
