Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/sshwzv.F90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/sshwzv.F90	(revision 14219)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/sshwzv.F90	(revision 14644)
@@ -54,5 +54,4 @@
 #  include "domzgr_substitute.h90"
 #  include "single_precision_substitute.h90"
-
    !!----------------------------------------------------------------------
    !! NEMO/OCE 4.0 , NEMO Consortium (2018)
@@ -263,5 +262,5 @@
 
 
-   SUBROUTINE ssh_atf( kt, Kbb, Kmm, Kaa, pssh, pssh_f )
+   SUBROUTINE ssh_atf( kt, Kbb, Kmm, Kaa, pssh )
       !!----------------------------------------------------------------------
       !!                    ***  ROUTINE ssh_atf  ***
@@ -280,9 +279,7 @@
       INTEGER                         , INTENT(in   ) ::   kt             ! ocean time-step index
       INTEGER                         , INTENT(in   ) ::   Kbb, Kmm, Kaa  ! ocean time level indices
-      REAL(dp), DIMENSION(jpi,jpj,jpt)          , TARGET, INTENT(inout) ::   pssh           ! SSH field
-      REAL(dp), DIMENSION(jpi,jpj    ), OPTIONAL, TARGET, INTENT(  out) ::   pssh_f         ! filtered SSH field
-      !
-      REAL(dp) ::   zcoef   ! local scalar
-      REAL(dp), POINTER, DIMENSION(:,:) ::   zssh   ! pointer for filtered SSH 
+      REAL(dp), DIMENSION(jpi,jpj,jpt), INTENT(inout) ::   pssh           ! SSH field
+      !
+      REAL(wp) ::   zcoef   ! local scalar
       !!----------------------------------------------------------------------
       !
@@ -294,22 +291,21 @@
          IF(lwp) WRITE(numout,*) '~~~~~~~ '
       ENDIF
-      !              !==  Euler time-stepping: no filter, just swap  ==!
-      IF ( .NOT.( l_1st_euler ) ) THEN   ! Only do time filtering for leapfrog timesteps
-         IF( PRESENT( pssh_f ) ) THEN   ;   zssh => pssh_f
-         ELSE                           ;   zssh => pssh(:,:,Kmm)
-         ENDIF
-         !                                                  ! filtered "now" field
-         pssh(:,:,Kmm) = pssh(:,:,Kmm) + rn_atfp * ( pssh(:,:,Kbb) - 2 * pssh(:,:,Kmm) + pssh(:,:,Kaa) )
+      !
+      IF( .NOT.l_1st_euler ) THEN   ! Apply Asselin time filter on Kmm field (not on euler 1st)
          !
-         IF( .NOT.ln_linssh ) THEN                          ! "now" <-- with forcing removed
+         IF( ln_linssh ) THEN                ! filtered "now" field
+            pssh(:,:,Kmm) = pssh(:,:,Kmm) + rn_atfp * ( pssh(:,:,Kbb) - 2 * pssh(:,:,Kmm) + pssh(:,:,Kaa) )
+            !
+         ELSE                                ! filtered "now" field with forcing removed
             zcoef = rn_atfp * rn_Dt * r1_rho0
-            pssh(:,:,Kmm) = pssh(:,:,Kmm) - zcoef * (     emp_b(:,:) - emp   (:,:)   &
-               &                             - rnf_b(:,:)        + rnf   (:,:)       &
-               &                             + fwfisf_cav_b(:,:) - fwfisf_cav(:,:)   &
-               &                             + fwfisf_par_b(:,:) - fwfisf_par(:,:)   ) * ssmask(:,:)
+            pssh(:,:,Kmm) = pssh(:,:,Kmm) + rn_atfp * ( pssh(:,:,Kbb) - 2 * pssh(:,:,Kmm) + pssh(:,:,Kaa) )   &
+               &                          - zcoef   * (         emp_b(:,:) -        emp(:,:)   &
+               &                                              - rnf_b(:,:) +        rnf(:,:)   &
+               &                                       + fwfisf_cav_b(:,:) - fwfisf_cav(:,:)   &
+               &                                       + fwfisf_par_b(:,:) - fwfisf_par(:,:)   ) * ssmask(:,:)
 
             ! ice sheet coupling
             IF( ln_isf .AND. ln_isfcpl .AND. kt == nit000+1 )   &
-               &   pssh(:,:,Kbb) = pssh(:,:,Kbb) - rn_atfp * rn_Dt * ( risfcpl_ssh(:,:) - 0.0 ) * ssmask(:,:)
+               &   pssh(:,:,Kbb) = pssh(:,:,Kbb) - rn_atfp * rn_Dt * ( risfcpl_ssh(:,:) - 0._wp ) * ssmask(:,:)
 
          ENDIF
