Index: NEMO/branches/2021/ticket2680_C1D_PAPA/src/OCE/C1D/dtauvd.F90
===================================================================
--- NEMO/branches/2021/ticket2680_C1D_PAPA/src/OCE/C1D/dtauvd.F90	(revision 14915)
+++ NEMO/branches/2021/ticket2680_C1D_PAPA/src/OCE/C1D/dtauvd.F90	(revision 15008)
@@ -93,5 +93,5 @@
 
       !
-      IF(  ln_uvd_init .OR. ln_uvd_dyndmp  ) THEN
+      IF( ln_uvd_init .OR. ln_uvd_dyndmp ) THEN
          !                          !==   allocate the data arrays   ==!
          ALLOCATE( sf_uvd(2), STAT=ierr0 )
@@ -117,5 +117,5 @@
 
 
-   SUBROUTINE dta_uvd( kt, Kmm, puvd )
+   SUBROUTINE dta_uvd( kt, Kmm, pud, pvd )
       !!----------------------------------------------------------------------
       !!                   ***  ROUTINE dta_uvd  ***
@@ -134,5 +134,6 @@
       INTEGER                           , INTENT(in   ) ::   kt     ! ocean time-step
       INTEGER                           , INTENT(in   ) ::   Kmm    ! time level index
-      REAL(wp), DIMENSION(jpi,jpj,jpk,2), INTENT(  out) ::   puvd   ! U & V current data
+      REAL(wp), DIMENSION(jpi,jpj,jpk)  , INTENT(  out) ::   pud    ! U & V current data
+      REAL(wp), DIMENSION(jpi,jpj,jpk)  , INTENT(  out) ::   pvd    ! U & V current data
       !
       INTEGER ::   ji, jj, jk, jl, jkk               ! dummy loop indicies
@@ -146,6 +147,6 @@
       CALL fld_read( kt, 1, sf_uvd )      !==   read U & V current data at time step kt   ==!
       !
-      puvd(:,:,:,1) = sf_uvd(1)%fnow(:,:,:)                 ! NO mask
-      puvd(:,:,:,2) = sf_uvd(2)%fnow(:,:,:) 
+      pud(:,:,:) = sf_uvd(1)%fnow(:,:,:)                 ! NO mask
+      pvd(:,:,:) = sf_uvd(2)%fnow(:,:,:) 
       !
       IF( ln_sco ) THEN                   !==   s- or mixed s-zps-coordinate   ==!
@@ -162,15 +163,15 @@
                zl = gdept(ji,jj,jk,Kmm)
                IF    ( zl < gdept_1d(1  ) ) THEN          ! extrapolate above the first level of data
-                  zup(jk) =  puvd(ji,jj,1    ,1)
-                  zvp(jk) =  puvd(ji,jj,1    ,2)
+                  zup(jk) =  pud(ji,jj,1)
+                  zvp(jk) =  pvd(ji,jj,1)
                ELSEIF( zl > gdept_1d(jpk) ) THEN          ! extrapolate below the last level of data
-                  zup(jk) =  puvd(ji,jj,jpkm1,1)
-                  zvp(jk) =  puvd(ji,jj,jpkm1,2)
+                  zup(jk) =  pud(ji,jj,jpkm1)
+                  zvp(jk) =  pvd(ji,jj,jpkm1)
                ELSE                                      ! inbetween : vertical interpolation between jkk & jkk+1
                   DO jkk = 1, jpkm1                      ! when  gdept(jkk) < zl < gdept(jkk+1)
                      IF( (zl-gdept_1d(jkk)) * (zl-gdept_1d(jkk+1)) <= 0._wp ) THEN
                         zi = ( zl - gdept_1d(jkk) ) / (gdept_1d(jkk+1)-gdept_1d(jkk))
-                        zup(jk) = puvd(ji,jj,jkk,1) + ( puvd(ji,jj,jkk+1,1 ) - puvd(ji,jj,jkk,1) ) * zi 
-                        zvp(jk) = puvd(ji,jj,jkk,2) + ( puvd(ji,jj,jkk+1,2 ) - puvd(ji,jj,jkk,2) ) * zi
+                        zup(jk) = pud(ji,jj,jkk) + ( pud(ji,jj,jkk+1) - pud(ji,jj,jkk) ) * zi 
+                        zvp(jk) = pvd(ji,jj,jkk) + ( pvd(ji,jj,jkk+1) - pvd(ji,jj,jkk) ) * zi
                      ENDIF
                   END DO
@@ -178,9 +179,9 @@
             END DO
             DO jk = 1, jpkm1           ! apply mask
-               puvd(ji,jj,jk,1) = zup(jk) * umask(ji,jj,jk)
-               puvd(ji,jj,jk,2) = zvp(jk) * vmask(ji,jj,jk)
+               pud(ji,jj,jk) = zup(jk) * umask(ji,jj,jk)
+               pvd(ji,jj,jk) = zvp(jk) * vmask(ji,jj,jk)
             END DO
-            puvd(ji,jj,jpk,1) = 0._wp
-            puvd(ji,jj,jpk,2) = 0._wp
+            pud(ji,jj,jpk) = 0._wp
+            pvd(ji,jj,jpk) = 0._wp
          END_2D
          ! 
@@ -189,6 +190,6 @@
       ELSE                                !==   z- or zps- coordinate   ==!
          !                             
-         puvd(:,:,:,1) = puvd(:,:,:,1) * umask(:,:,:)       ! apply mask
-         puvd(:,:,:,2) = puvd(:,:,:,2) * vmask(:,:,:)
+         pud(:,:,:) = pud(:,:,:) * umask(:,:,:)       ! apply mask
+         pvd(:,:,:) = pvd(:,:,:) * vmask(:,:,:)
          !
          IF( ln_zps ) THEN                ! zps-coordinate (partial steps) interpolation at the last ocean level
@@ -197,6 +198,6 @@
                IF( ik > 1 ) THEN
                   zl = ( gdept_1d(ik) - gdept_0(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) )
-                  puvd(ji,jj,ik,1) = (1.-zl) * puvd(ji,jj,ik,1) + zl * puvd(ji,jj,ik-1,1)
-                  puvd(ji,jj,ik,2) = (1.-zl) * puvd(ji,jj,ik,2) + zl * puvd(ji,jj,ik-1,2)
+                  pud(ji,jj,ik) = (1.-zl) * pud(ji,jj,ik) + zl * pud(ji,jj,ik-1)
+                  pvd(ji,jj,ik) = (1.-zl) * pvd(ji,jj,ik) + zl * pvd(ji,jj,ik-1)
                ENDIF
             END_2D
