Index: NEMO/branches/2020/dev_r13333_KERNEL-08_techene_gm_HPG_SPG/src/OCE/DYN/dynspg_ts.F90
===================================================================
--- NEMO/branches/2020/dev_r13333_KERNEL-08_techene_gm_HPG_SPG/src/OCE/DYN/dynspg_ts.F90	(revision 13360)
+++ NEMO/branches/2020/dev_r13333_KERNEL-08_techene_gm_HPG_SPG/src/OCE/DYN/dynspg_ts.F90	(revision 13363)
@@ -162,5 +162,7 @@
       REAL(wp), DIMENSION(jpi,jpj) :: zCdU_u, zCdU_v   ! top/bottom stress at u- & v-points
       REAL(wp), DIMENSION(jpi,jpj) :: zhU, zhV         ! fluxes
+#if defined key_qco 
       REAL(wp), DIMENSION(jpi, jpj, jpk) :: ze3u, ze3v
+#endif
       !
       REAL(wp) ::   zwdramp                     ! local scalar - only used if ln_wd_dl = .True. 
@@ -229,4 +231,5 @@
       !                                   !=  zu_frc =  1/H e3*d/dt(Ua)  =!  (Vertical mean of Ua, the 3D trends)
       !                                   !  ---------------------------  !
+#if defined key_qco 
       DO jk = 1 , jpk
          ze3u(:,:,jk) = e3u(:,:,jk,Kmm)
@@ -236,4 +239,8 @@
       zu_frc(:,:) = SUM( ze3u(:,:,:) * uu(:,:,:,Krhs) * umask(:,:,:) , DIM=3 ) * r1_hu(:,:,Kmm)
       zv_frc(:,:) = SUM( ze3v(:,:,:) * vv(:,:,:,Krhs) * vmask(:,:,:) , DIM=3 ) * r1_hv(:,:,Kmm)
+#else
+      zu_frc(:,:) = SUM( e3u(:,:,:,Kmm) * uu(:,:,:,Krhs) * umask(:,:,:) , DIM=3 ) * r1_hu(:,:,Kmm)
+      zv_frc(:,:) = SUM( e3v(:,:,:,Kmm) * vv(:,:,:,Krhs) * vmask(:,:,:) , DIM=3 ) * r1_hv(:,:,Kmm)
+#endif 
       !
       !
@@ -247,9 +254,9 @@
 !!gm  Is it correct to do so ?   I think so...
       
-      !                                   !=  remove 2D Coriolis and pressure gradient trends  =!
-      !                                   !  -------------------------------------------------  !
+      !                                   !=  remove 2D Coriolis trend  =!
+      !                                   !  --------------------------  !
       !
       IF( kt == nit000 .OR. .NOT. ln_linssh )   CALL dyn_cor_2D_init( Kmm )   ! Set zwz, the barotropic Coriolis force coefficient
-      !       ! recompute zwz = f/depth  at every time step for (.NOT.ln_linssh) as the water colomn height changes
+      !                      ! recompute zwz = f/depth  at every time step for (.NOT.ln_linssh) as the water colomn height changes
       !
       !                                         !* 2D Coriolis trends
@@ -258,24 +265,5 @@
       !
       CALL dyn_cor_2d( ht(:,:), hu(:,:,Kmm), hv(:,:,Kmm), puu_b(:,:,Kmm), pvv_b(:,:,Kmm), zhU, zhV,  &   ! <<== in
-         &                                                                     zu_trd, zv_trd   )   ! ==>> out
-      !
-      IF( .NOT.ln_linssh ) THEN                 !* surface pressure gradient   (variable volume only)
-         !
-         IF( ln_wd_il ) THEN                       ! W/D : limiter applied to spgspg
-            CALL wad_spg( pssh(:,:,Kmm), zcpx, zcpy )          ! Calculating W/D gravity filters, zcpx and zcpy
-            DO_2D( 0, 0, 0, 0 )
-               zu_trd(ji,jj) = zu_trd(ji,jj) - grav * ( pssh(ji+1,jj  ,Kmm) - pssh(ji  ,jj ,Kmm) )   &
-                  &                          * r1_e1u(ji,jj) * zcpx(ji,jj)  * wdrampu(ji,jj)  !jth
-               zv_trd(ji,jj) = zv_trd(ji,jj) - grav * ( pssh(ji  ,jj+1,Kmm) - pssh(ji  ,jj ,Kmm) )   &
-                  &                          * r1_e2v(ji,jj) * zcpy(ji,jj)  * wdrampv(ji,jj)  !jth
-            END_2D
-         ELSE                                      ! now suface pressure gradient
-            DO_2D( 0, 0, 0, 0 )
-               zu_trd(ji,jj) = zu_trd(ji,jj) - grav * (  pssh(ji+1,jj  ,Kmm) - pssh(ji  ,jj  ,Kmm)  ) * r1_e1u(ji,jj)
-               zv_trd(ji,jj) = zv_trd(ji,jj) - grav * (  pssh(ji  ,jj+1,Kmm) - pssh(ji  ,jj  ,Kmm)  ) * r1_e2v(ji,jj) 
-            END_2D
-         ENDIF
-         !
-      ENDIF
+         &                                                                          zu_trd, zv_trd   )   ! ==>> out
       !
       DO_2D( 0, 0, 0, 0 )
@@ -287,4 +275,5 @@
       !                                   !  -----------------------------------------------------------  !
       CALL dyn_drg_init( Kbb, Kmm, puu, pvv, puu_b ,pvv_b, zu_frc, zv_frc,  zCdU_u, zCdU_v )      ! also provide the barotropic drag coefficients
+      !
       !                                   !=  Add atmospheric pressure forcing  =!
       !                                   !  ----------------------------------  !
@@ -330,8 +319,8 @@
       ELSE                                        ! CENTRED integration: use kt-1/2 + kt+1/2 fluxes (NOW)
          zztmp = r1_rho0 * r1_2
-         zssh_frc(:,:) = zztmp * (  emp(:,:)        + emp_b(:,:)                    &
-                &                 - rnf(:,:)        - rnf_b(:,:)                    &
-                &                 + fwfisf_cav(:,:) + fwfisf_cav_b(:,:)             &
-                &                 + fwfisf_par(:,:) + fwfisf_par_b(:,:)             )
+         zssh_frc(:,:) = zztmp * (   emp(:,:)        + emp_b(:,:)          &
+            &                      - rnf(:,:)        - rnf_b(:,:)          &
+            &                      + fwfisf_cav(:,:) + fwfisf_cav_b(:,:)   &
+            &                      + fwfisf_par(:,:) + fwfisf_par_b(:,:)   )
       ENDIF
       !                                   !=  Add Stokes drift divergence  =!   (if exist)
