Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 4703)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 4704)
@@ -259,5 +259,5 @@
       IF(lwp) WRITE(numout,*) "dia_hsb: heat salt volume budgets activated"
       IF(lwp) WRITE(numout,*) '~~~~~~~'
-      surf(:,:) = e1t(:,:) * e2t(:,:) * tmask(:,:,1) * tmask_i(:,:)      ! masked surface grid cell area
+      surf(:,:) = e1t(:,:) * e2t(:,:) * tmask_i(:,:)      ! masked surface grid cell area
       surf_tot  = glob_sum( surf(:,:) )                                       ! total ocean surface area
 
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 4703)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 4704)
@@ -114,6 +114,6 @@
                ikbu = miku(ji,jj)       ! ocean top level at u- and v-points 
                ikbv = mikv(ji,jj)       ! (first wet ocean u- and v-points)
-               avmu(ji,jj,ikbu-1) = -tfrua(ji,jj) * fse3uw(ji,jj,ikbu+1)
-               avmv(ji,jj,ikbv-1) = -tfrva(ji,jj) * fse3vw(ji,jj,ikbv+1)
+               IF (ikbu .GE. 2) avmu(ji,jj,ikbu-1) = -tfrua(ji,jj) * fse3uw(ji,jj,ikbu-1)
+               IF (ikbv .GE. 2) avmv(ji,jj,ikbv-1) = -tfrva(ji,jj) * fse3vw(ji,jj,ikbv-1)
             END DO
          END DO
@@ -152,6 +152,6 @@
                ua(ji,jj,ikbu) = ua(ji,jj,ikbu) + p2dt * bfrua(ji,jj) * ua_b(ji,jj) / ze3ua
                va(ji,jj,ikbv) = va(ji,jj,ikbv) + p2dt * bfrva(ji,jj) * va_b(ji,jj) / ze3va
-               ikbu = miku(ji,jj)         ! ocean bottom level at u- and v-points 
-               ikbv = mikv(ji,jj)         ! (deepest ocean u- and v-points)
+               ikbu = miku(ji,jj)         ! top ocean level at u- and v-points 
+               ikbv = mikv(ji,jj)         ! (first wet ocean u- and v-points)
                ze3ua =  ( 1._wp - r_vvl ) * fse3u_n(ji,jj,ikbu) + r_vvl   * fse3u_a(ji,jj,ikbu)
                ze3va =  ( 1._wp - r_vvl ) * fse3v_n(ji,jj,ikbv) + r_vvl   * fse3v_a(ji,jj,ikbv)
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90	(revision 4703)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90	(revision 4704)
@@ -244,5 +244,5 @@
                      &                            *   tmask(ji,jj,jk-1)
                   vslp(ji,jj,jk) = vslp(ji,jj,jk) * ( vmask(ji+1,jj,jk) + vmask(ji-1,jj,jk  ) ) * 0.5_wp   &
-                     &                            * ( vmask(ji  ,jj,jk) + vmask(ji  ,jj,jk+1) ) * 0.5_wp
+                     &                            * ( vmask(ji  ,jj,jk) + vmask(ji  ,jj,jk+1) ) * 0.5_wp   &
                      &                            *   tmask(ji,jj,jk-1)
                END DO
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90	(revision 4703)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90	(revision 4704)
@@ -99,5 +99,6 @@
       CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype     ! =TRA or TRC (tracer indicator)
       INTEGER                              , INTENT(in   ) ::   kjpt       ! number of tracers
-      REAL(wp), DIMENSION(jpi,jpj    ,kjpt), INTENT(in   ) ::   pgu, pgv   ! tracer gradient at pstep levels
+      REAL(wp), DIMENSION(jpi,jpj    ,kjpt), INTENT(in   ) ::   pgu , pgv    ! tracer gradient at pstep levels
+      REAL(wp), DIMENSION(jpi,jpj    ,kjpt), INTENT(in   ) ::   pgui, pgvi   ! tracer gradient at pstep levels
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb        ! before and now tracer fields
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta        ! tracer trend 
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap.F90
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap.F90	(revision 4703)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap.F90	(revision 4704)
@@ -118,12 +118,12 @@
                      
                      ! (ISH)
-                     ! ice shelf level level 
+                     ! ice shelf level level MAX(2,jk) => only where ice shelf
                      iku = miku(ji,jj) 
                      ikv = mikv(ji,jj) 
-                     IF( iku == jk ) THEN 
+                     IF( iku == MAX(2,jk) ) THEN 
                         zabe1 = fsahtu(ji,jj,iku) * umask(ji,jj,iku) * re2u_e1u(ji,jj) * fse3u_n(ji,jj,iku) 
                         ztu(ji,jj,jk) = zabe1 * pgui(ji,jj,jn) 
                      ENDIF 
-                     IF( ikv == jk ) THEN 
+                     IF( ikv == MAX(2,jk) ) THEN 
                         zabe2 = fsahtv(ji,jj,ikv) * vmask(ji,jj,ikv) * re1v_e2v(ji,jj) * fse3v_n(ji,jj,ikv) 
                         ztv(ji,jj,jk) = zabe2 * pgvi(ji,jj,jn) 
Index: branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90
===================================================================
--- branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90	(revision 4703)
+++ branches/2014/dev_r4650_UKMO2_ice_shelves/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90	(revision 4704)
@@ -179,6 +179,6 @@
                zecv = SQRT(  vn(ji,jj,ikbv) * vn(ji,jj,ikbv) + zuv*zuv + rn_bfeb2 )
                !
-               tfrua(ji,jj) = - 0.5_wp * ( ztfrt(ji,jj) + ztfrt(ji+1,jj  ) ) * zecu 
-               tfrva(ji,jj) = - 0.5_wp * ( ztfrt(ji,jj) + ztfrt(ji  ,jj+1) ) * zecv
+               tfrua(ji,jj) = - 0.5_wp * ( ztfrt(ji,jj) + ztfrt(ji+1,jj  ) ) * zecu * (1._wp - umask(ji,jj,1))
+               tfrva(ji,jj) = - 0.5_wp * ( ztfrt(ji,jj) + ztfrt(ji  ,jj+1) ) * zecv * (1._wp - vmask(ji,jj,1))
                ! (ISF) END ====================================================================
 
