Index: /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/CONFIG/SHARED/field_def.xml
===================================================================
--- /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 5103)
+++ /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 5104)
@@ -327,4 +327,5 @@
          <field id="utau"         long_name="Wind Stress along i-axis"                    unit="N/m2" />
          <field id="uoce"         long_name="ocean current along i-axis"                  unit="m/s"  grid_ref="grid_U_3D" />
+         <field id="ssu"          long_name="ocean surface current along i-axis"          unit="m/s"     />
          <field id="uocetr_eff"   long_name="Effective ocean transport along i-axis"      unit="m3/s" grid_ref="grid_U_3D" />
          <field id="uocet"        long_name="ocean transport along i-axis times temperature" unit="degC.m/s" grid_ref="grid_U_3D" />
@@ -352,4 +353,5 @@
          <field id="vtau"         long_name="Wind Stress along j-axis"                    unit="N/m2" />
          <field id="voce"         long_name="ocean current along j-axis"                  unit="m/s"  grid_ref="grid_V_3D" />
+         <field id="ssv"          long_name="ocean surface current along j-axis"          unit="m/s"  />
          <field id="vocetr_eff"   long_name="Effective ocean transport along j-axis"      unit="m3/s" grid_ref="grid_V_3D" />
          <field id="vocet"        long_name="ocean transport along j-axis times temperature" unit="degC.m/s" grid_ref="grid_V_3D" />
@@ -743,4 +745,5 @@
     <field_group id="groupU" >
       <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
+      <field field_ref="ssu"          name="uos"     long_name="sea_surface_x_velocity"    />
       <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
     </field_group>
@@ -748,4 +751,5 @@
     <field_group id="groupV" >
       <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
+      <field field_ref="ssv"          name="vos"     long_name="sea_surface_y_velocity"    />
       <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
     </field_group>
Index: /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90
===================================================================
--- /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 5103)
+++ /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 5104)
@@ -539,7 +539,8 @@
         ! Partial steps: before Horizontal DErivative
         ! only gtsu, gtsv, rhd, gru , grv are used 
-      IF( ln_zps )    CALL zps_hde    ( kt, jpts, pts, gtsu, gtsv,  &  ! Partial steps: before horizontal gradient
-        &                                         rhd, gru , grv    )  ! of t, s, rd at the last ocean level
-      IF( ln_zps .AND. ln_isfcav) &
+      IF( ln_zps  .AND. .NOT. ln_isfcav)                            &
+         &            CALL zps_hde    ( kt, jpts, pts, gtsu, gtsv,  &  ! Partial steps: before horizontal gradient
+         &                                        rhd, gru , grv    )  ! of t, s, rd at the last ocean level
+      IF( ln_zps .AND.        ln_isfcav)                            &
          &            CALL zps_hde_isf( kt, jpts, pts, gtsu, gtsv,  &    ! Partial steps for top cell (ISF)
          &                                        rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   &
Index: /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
===================================================================
--- /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 5103)
+++ /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 5104)
@@ -746,9 +746,9 @@
 
 
-            IF( ln_zps .AND. .NOT. lk_c1d )                     &
-               &  CALL zps_hde    ( kt, jpts, tsb, gtsu, gtsv,  &    ! Partial steps: before horizontal gradient
-               &                              rhd, gru , grv    )  ! of t, s, rd at the last ocean level
-            IF( ln_zps .AND. .NOT. lk_c1d .AND. ln_isfcav)      &
-               &  CALL zps_hde_isf( nit000, jpts, tsb, gtsu, gtsv,  &    ! Partial steps for top cell (ISF)
+            IF( ln_zps .AND. .NOT. lk_c1d .AND. .NOT. ln_isfcav)      &
+               &  CALL zps_hde    ( kt, jpts, tsb, gtsu, gtsv,        &  ! Partial steps: before horizontal gradient
+               &                              rhd, gru , grv          )  ! of t, s, rd at the last ocean level
+            IF( ln_zps .AND. .NOT. lk_c1d .AND.       ln_isfcav)      &
+               &  CALL zps_hde_isf( nit000, jpts, tsb, gtsu, gtsv,    &    ! Partial steps for top cell (ISF)
                &                                  rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   &
                &                           gtui, gtvi, grui, grvi, arui, arvi, gzui, gzvi, ge3rui, ge3rvi    ) ! of t, s, rd at the last ocean level
Index: /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 5103)
+++ /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 5104)
@@ -167,4 +167,6 @@
          CALL iom_put( "uoce" , umask(:,:,:) * un(:,:,:)                  )    ! i-current
          CALL iom_put( "voce" , vmask(:,:,:) * vn(:,:,:)                  )    ! j-current
+         CALL iom_put( "ssu"  , umask(:,:,1) * un(:,:,1)                  )    ! i-current
+         CALL iom_put( "ssv"  , vmask(:,:,1) * vn(:,:,1)                  )    ! j-current
       ENDIF
       CALL iom_put(    "avt"  , avt                        )    ! T vert. eddy diff. coef.
Index: /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90
===================================================================
--- /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 5103)
+++ /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 5104)
@@ -137,7 +137,8 @@
          CALL eos( tsb, rhd, rhop, gdept_0(:,:,:) )        ! before potential and in situ densities
 #if ! defined key_c1d
-         IF( ln_zps )    CALL zps_hde    ( nit000, jpts, tsb, gtsu, gtsv,  &    ! Partial steps: before horizontal gradient
+         IF( ln_zps .AND. .NOT. ln_isfcav)                                 &
+            &            CALL zps_hde    ( nit000, jpts, tsb, gtsu, gtsv,  &    ! Partial steps: before horizontal gradient
             &                                            rhd, gru , grv    )  ! of t, s, rd at the last ocean level
-         IF( ln_zps .AND. ln_isfcav) &
+         IF( ln_zps .AND. ln_isfcav)                                       &
             &            CALL zps_hde_isf( nit000, jpts, tsb, gtsu, gtsv,  &    ! Partial steps for top cell (ISF)
             &                                            rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   &
Index: /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90
===================================================================
--- /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 5103)
+++ /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 5104)
@@ -151,12 +151,18 @@
                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)         ! 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)
-               ua(ji,jj,ikbu) = ua(ji,jj,ikbu) + p2dt * tfrua(ji,jj) * ua_b(ji,jj) / ze3ua
-               va(ji,jj,ikbv) = va(ji,jj,ikbv) + p2dt * tfrva(ji,jj) * va_b(ji,jj) / ze3va
-            END DO
-         END DO
+            END DO
+         END DO
+         IF ( ln_isfcav ) THEN
+            DO jj = 2, jpjm1        
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  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)
+                  ua(ji,jj,ikbu) = ua(ji,jj,ikbu) + p2dt * tfrua(ji,jj) * ua_b(ji,jj) / ze3ua
+                  va(ji,jj,ikbv) = va(ji,jj,ikbv) + p2dt * tfrva(ji,jj) * va_b(ji,jj) / ze3va
+               END DO
+            END DO
+         END IF
       ENDIF
 #endif
@@ -173,7 +179,7 @@
                ze3ua =  ( 1._wp - r_vvl ) * fse3u_n(ji,jj,jk) + r_vvl   * fse3u_a(ji,jj,jk)   ! after scale factor at T-point
                zcoef = - p2dt / ze3ua      
-               zzwi          = zcoef * avmu (ji,jj,jk  ) / fse3uw(ji,jj,jk  )
-               zwi(ji,jj,jk) = zzwi  * wumask(ji,jj,jk)
-               zzws          = zcoef * avmu (ji,jj,jk+1) / fse3uw(ji,jj,jk+1) 
+               zzwi          = zcoef * avmu  (ji,jj,jk  ) / fse3uw(ji,jj,jk  )
+               zwi(ji,jj,jk) = zzwi  * wumask(ji,jj,jk  )
+               zzws          = zcoef * avmu  (ji,jj,jk+1) / fse3uw(ji,jj,jk+1) 
                zws(ji,jj,jk) = zzws  * wumask(ji,jj,jk+1)
                zwd(ji,jj,jk) = 1._wp - zzwi - zzws
Index: /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90
===================================================================
--- /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90	(revision 5103)
+++ /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90	(revision 5104)
@@ -142,5 +142,4 @@
             DO jj = 1, jpjm1
                DO ji = 1, jpim1
-! IF should be useless check zpshde (PM)
                   zgru(ji,jj,mbku(ji,jj)) = gru(ji,jj)
                   zgrv(ji,jj,mbkv(ji,jj)) = grv(ji,jj)
Index: /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
===================================================================
--- /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 5103)
+++ /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 5104)
@@ -241,9 +241,11 @@
       !                     !  Surface boundary condition on tke
       !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-      DO jj = 2, jpjm1            ! en(mikt(ji,jj))   = rn_emin
-         DO ji = fs_2, fs_jpim1   ! vector opt.
-               en(ji,jj,mikt(ji,jj))=rn_emin
-         END DO
-      END DO
+      IF ( ln_isfcav ) THEN
+         DO jj = 2, jpjm1            ! en(mikt(ji,jj))   = rn_emin
+            DO ji = fs_2, fs_jpim1   ! vector opt.
+               en(ji,jj,mikt(ji,jj))=rn_emin * tmask(ji,jj,1)
+            END DO
+         END DO
+      END IF
       DO jj = 2, jpjm1            ! en(1)   = rn_ebb taum / rau0  (min value rn_emin0)
          DO ji = fs_2, fs_jpim1   ! vector opt.
Index: /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 5103)
+++ /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 5104)
@@ -146,7 +146,8 @@
       IF( lk_ldfslp ) THEN                            ! slope of lateral mixing
                          CALL eos( tsb, rhd, gdept_0(:,:,:) )               ! before in situ density
-         IF( ln_zps )    CALL zps_hde    ( kstp, jpts, tsb, gtsu, gtsv,  &  ! Partial steps: before horizontal gradient
+         IF( ln_zps .AND. .NOT. ln_isfcav)                               &
+            &            CALL zps_hde    ( kstp, jpts, tsb, gtsu, gtsv,  &  ! Partial steps: before horizontal gradient
             &                                          rhd, gru , grv    )  ! of t, s, rd at the last ocean level
-         IF( ln_zps .AND. ln_isfcav) &
+         IF( ln_zps .AND.       ln_isfcav)                               &
             &            CALL zps_hde_isf( kstp, jpts, tsb, gtsu, gtsv,  &    ! Partial steps for top cell (ISF)
             &                                          rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   &
@@ -180,7 +181,8 @@
           ! is necessary to compute momentum advection for the rhs of barotropic loop:
                             CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) ) ! now in situ density for hpg computation
-            IF( ln_zps )    CALL zps_hde    ( kstp, jpts, tsn, gtsu, gtsv,  &    ! Partial steps: before horizontal gradient
+            IF( ln_zps .AND. .NOT. ln_isfcav)                               &
+               &            CALL zps_hde    ( kstp, jpts, tsn, gtsu, gtsv,  &    ! Partial steps: before horizontal gradient
                &                                          rhd, gru , grv    )  ! of t, s, rd at the last ocean level
-            IF( ln_zps .AND. ln_isfcav) &
+            IF( ln_zps .AND.       ln_isfcav)                               &
                &            CALL zps_hde_isf( kstp, jpts, tsn, gtsu, gtsv,  &    ! Partial steps for top cell (ISF)
                &                                          rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   &
@@ -259,7 +261,8 @@
                              CALL tra_nxt( kstp )                ! tracer fields at next time step
                              CALL eos    ( tsa, rhd, rhop, fsdept_n(:,:,:) )  ! Time-filtered in situ density for hpg computation
-            IF( ln_zps )     CALL zps_hde    ( kstp, jpts, tsa, gtsu, gtsv,  &    ! Partial steps: before horizontal gradient
+            IF( ln_zps .AND. .NOT. ln_isfcav)                                &
+               &             CALL zps_hde    ( kstp, jpts, tsa, gtsu, gtsv,  &    ! Partial steps: before horizontal gradient
                &                                           rhd, gru , grv    )  ! of t, s, rd at the last ocean level
-            IF( ln_zps .AND. ln_isfcav) &
+            IF( ln_zps .AND.       ln_isfcav)                                &
                &             CALL zps_hde_isf( kstp, jpts, tsa, gtsu, gtsv,  &    ! Partial steps for top cell (ISF)
                &                                           rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   &
@@ -268,7 +271,8 @@
          IF ( .NOT. lk_dynspg_ts ) THEN                     ! eos already called in time-split case
                              CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) )  ! now in situ density for hpg computation
-         IF( ln_zps )        CALL zps_hde    ( kstp, jpts, tsn, gtsu, gtsv,  &    ! Partial steps: before horizontal gradient
-            &                                              rhd, gru , grv    )  ! of t, s, rd at the last ocean level
-         IF( ln_zps .AND. ln_isfcav) &
+         IF( ln_zps .AND. .NOT. ln_isfcav)                                   &
+               &             CALL zps_hde    ( kstp, jpts, tsn, gtsu, gtsv,  &    ! Partial steps: before horizontal gradient
+               &                                           rhd, gru , grv    )  ! of t, s, rd at the last ocean level
+         IF( ln_zps .AND.       ln_isfcav)                                   & 
                &             CALL zps_hde_isf( kstp, jpts, tsn, gtsu, gtsv,  &    ! Partial steps for top cell (ISF)
                &                                           rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   &
Index: /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90
===================================================================
--- /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90	(revision 5103)
+++ /branches/2015/dev_r5094_UKMO_ISFCLEAN/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90	(revision 5104)
@@ -83,6 +83,7 @@
 #endif
 
-         IF( ln_zps )    CALL zps_hde    ( kstp, jptra, trn, gtru, gtrv )   ! Partial steps: now horizontal gradient of passive
-         IF( ln_zps .AND. ln_isfcav) &
+         IF( ln_zps  .AND. .NOT. ln_isfcav)        &
+            &            CALL zps_hde    ( kstp, jptra, trn, gtru, gtrv )   ! Partial steps: now horizontal gradient of passive
+         IF( ln_zps .AND.        ln_isfcav)        &
             &            CALL zps_hde_isf( kstp, jptra, trn, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi )  ! Partial steps: now horizontal gradient of passive
                                                                 ! tracers at the bottom ocean level
