Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/dynatf_qco.F90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/dynatf_qco.F90	(revision 14647)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/dynatf_qco.F90	(revision 14648)
@@ -270,6 +270,6 @@
       ENDIF
       !
-      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=puu(:,:,:,Kaa), clinfo1=' nxt  - puu(:,:,:,Kaa): ', mask1=umask,   &
-         &                                  tab3d_2=pvv(:,:,:,Kaa), clinfo2=' pvv(:,:,:,Kaa): '       , mask2=vmask )
+      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=CASTWP(puu(:,:,:,Kaa)), clinfo1=' nxt  - puu(:,:,:,Kaa): ', mask1=umask,   &
+         &                                  tab3d_2=CASTWP(pvv(:,:,:,Kaa)), clinfo2=' pvv(:,:,:,Kaa): '       , mask2=vmask )
       !
       IF( ln_dynspg_ts )   DEALLOCATE( zue, zve )
Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/dynspg_ts.F90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/dynspg_ts.F90	(revision 14647)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/dynspg_ts.F90	(revision 14648)
@@ -266,5 +266,5 @@
          zhV(:,:) = pvv_b(:,:,Kmm) * hv(:,:,Kmm) * e1v(:,:)        ! NB: FULL domain : put a value in last row and column
          !
-         CALL dyn_cor_2d( ht(:,:), hu(:,:,Kmm), hv(:,:,Kmm), puu_b(:,:,Kmm), pvv_b(:,:,Kmm), zhU, zhV,  &   ! <<== in
+         CALL dyn_cor_2d( CASTWP(ht(:,:)), hu(:,:,Kmm), hv(:,:,Kmm), puu_b(:,:,Kmm), pvv_b(:,:,Kmm), zhU, zhV,  &   ! <<== in
             &                                                                          zu_trd, zv_trd   )   ! ==>> out
          !
@@ -283,5 +283,5 @@
          END_2D
       ELSE				     !* remove baroclinic drag AND provide the barotropic drag coefficients
-         CALL dyn_drg_init( Kbb, Kmm, puu, pvv, puu_b, pvv_b, zu_frc, zv_frc, zCdU_u, zCdU_v )
+         CALL dyn_drg_init( Kbb, Kmm, CASTWP(puu), CASTWP(pvv), puu_b, pvv_b, zu_frc, zv_frc, zCdU_u, zCdU_v )
       ENDIF
       !
@@ -530,5 +530,6 @@
          END_2D
          !
-         CALL lbc_lnk( 'dynspg_ts', ssha_e, 'T', 1._wp,  zhU, 'U', -1._wp,  zhV, 'V', -1._wp )
+         CALL lbc_lnk( 'dynspg_ts', ssha_e, 'T', 1._wp )  
+         CALL lbc_lnk( 'dynspg_ts', zhU, 'U', -1._wp,  zhV, 'V', -1._wp )
          !
          ! Duplicate sea level across open boundaries (this is only cosmetic if linssh=T)
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 14647)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/sshwzv.F90	(revision 14648)
@@ -281,5 +281,5 @@
       REAL(dp), DIMENSION(jpi,jpj,jpt), INTENT(inout) ::   pssh           ! SSH field
       !
-      REAL(wp) ::   zcoef   ! local scalar
+      REAL(dp) ::   zcoef   ! local scalar
       !!----------------------------------------------------------------------
       !
Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_lnk_call_generic.h90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_lnk_call_generic.h90	(revision 14647)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_lnk_call_generic.h90	(revision 14648)
@@ -33,6 +33,6 @@
       CHARACTER(len=1)     , OPTIONAL        , INTENT(in   ) ::   cdna2 , cdna3 , cdna4 , cdna5 , cdna6 , cdna7 , cdna8 , cdna9, &
          &                                                        cdna10, cdna11, cdna12, cdna13, cdna14, cdna15, cdna16
-      REAL(PRECISION)                        , INTENT(in   ) ::   psgn1   ! sign used across the north fold
-      REAL(PRECISION)      , OPTIONAL        , INTENT(in   ) ::   psgn2 , psgn3 , psgn4 , psgn5 , psgn6 , psgn7 , psgn8 , psgn9, &
+      REAL(wp)                        , INTENT(in   ) ::   psgn1   ! sign used across the north fold
+      REAL(wp)      , OPTIONAL        , INTENT(in   ) ::   psgn2 , psgn3 , psgn4 , psgn5 , psgn6 , psgn7 , psgn8 , psgn9, &
          &                                                        psgn10, psgn11, psgn12, psgn13, psgn14, psgn15, psgn16
       INTEGER              , OPTIONAL        , INTENT(in   ) ::   kfillmode   ! filling method for halo over land (default = constant)
@@ -45,5 +45,5 @@
       TYPE(PTR_4d_/**/PRECISION), DIMENSION(16) ::   ptab_ptr    ! pointer array
       CHARACTER(len=1) , DIMENSION(16) ::   cdna_ptr    ! nature of ptab_ptr grid-points
-      REAL(PRECISION)  , DIMENSION(16) ::   psgn_ptr    ! sign used across the north fold boundary
+      REAL(wp)  , DIMENSION(16) ::   psgn_ptr    ! sign used across the north fold boundary
       !!---------------------------------------------------------------------
       !
@@ -83,8 +83,8 @@
       REAL(PRECISION), DIMENSION(DIMS), TARGET, INTENT(inout), CONTIGUOUS ::   ptab       ! arrays on which the lbc is applied
       CHARACTER(len=1)              , INTENT(in   ) ::   cdna       ! nature of pt2d array grid-points
-      REAL(PRECISION)               , INTENT(in   ) ::   psgn       ! sign used across the north fold boundary
+      REAL(wp)               , INTENT(in   ) ::   psgn       ! sign used across the north fold boundary
       TYPE(PTR_4d_/**/PRECISION), DIMENSION(:), INTENT(inout) ::   ptab_ptr   ! array of pointers
       CHARACTER(len=1), DIMENSION(:), INTENT(inout) ::   cdna_ptr   ! nature of pt2d_array array grid-points
-      REAL(PRECISION) , DIMENSION(:), INTENT(inout) ::   psgn_ptr   ! sign used across the north fold boundary
+      REAL(wp) , DIMENSION(:), INTENT(inout) ::   psgn_ptr   ! sign used across the north fold boundary
       INTEGER                       , INTENT(inout) ::   kfld       ! number of elements that has been attributed
       !!---------------------------------------------------------------------
Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_lnk_neicoll_generic.h90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_lnk_neicoll_generic.h90	(revision 14647)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_lnk_neicoll_generic.h90	(revision 14648)
@@ -4,5 +4,5 @@
       TYPE(PTR_4d_/**/PRECISION),  DIMENSION(:), INTENT(inout) ::   ptab        ! pointer of arrays on which apply the b.c.
       CHARACTER(len=1), DIMENSION(:), INTENT(in   ) ::   cd_nat      ! nature of array grid-points
-      REAL(PRECISION),  DIMENSION(:), INTENT(in   ) ::   psgn        ! sign used across the north fold boundary
+      REAL(wp),  DIMENSION(:), INTENT(in   ) ::   psgn        ! sign used across the north fold boundary
       INTEGER                       , INTENT(in   ) ::   kfld        ! number of pt3d arrays
       INTEGER ,             OPTIONAL, INTENT(in   ) ::   kfillmode   ! filling method for halo over land (default = constant)
Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_lnk_pt2pt_generic.h90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_lnk_pt2pt_generic.h90	(revision 14647)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_lnk_pt2pt_generic.h90	(revision 14648)
@@ -5,5 +5,5 @@
       TYPE(PTR_4d_/**/PRECISION),  DIMENSION(:), INTENT(inout) ::   ptab        ! pointer of arrays on which apply the b.c.
       CHARACTER(len=1), DIMENSION(:), INTENT(in   ) ::   cd_nat      ! nature of array grid-points
-      REAL(PRECISION),  DIMENSION(:), INTENT(in   ) ::   psgn        ! sign used across the north fold boundary
+      REAL(wp),  DIMENSION(:), INTENT(in   ) ::   psgn        ! sign used across the north fold boundary
       INTEGER                       , INTENT(in   ) ::   kfld        ! number of pt3d arrays
       INTEGER ,             OPTIONAL, INTENT(in   ) ::   kfillmode   ! filling method for halo over land (default = constant)
Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_nfd_ext_generic.h90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_nfd_ext_generic.h90	(revision 14647)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_nfd_ext_generic.h90	(revision 14648)
@@ -4,5 +4,5 @@
       REAL(PRECISION), DIMENSION(:,1-kextj:),INTENT(inout) ::   ptab
       CHARACTER(len=1), INTENT(in   ) ::   cd_nat      ! nature of array grid-points
-      REAL(PRECISION),  INTENT(in   ) ::   psgn        ! sign used across the north fold boundary
+      REAL(wp),  INTENT(in   ) ::   psgn        ! sign used across the north fold boundary
       INTEGER,          INTENT(in   ) ::   kextj       ! extra halo width at north fold
       !
Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_nfd_generic.h90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_nfd_generic.h90	(revision 14647)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_nfd_generic.h90	(revision 14648)
@@ -3,5 +3,5 @@
       TYPE(PTR_4d_/**/PRECISION),  DIMENSION(:), INTENT(inout) ::   ptab        ! pointer of arrays on which apply the b.c.
       CHARACTER(len=1), DIMENSION(:), INTENT(in   ) ::   cd_nat      ! nature of array grid-points
-      REAL(PRECISION),  DIMENSION(:), INTENT(in   ) ::   psgn        ! sign used across the north fold boundary
+      REAL(wp),  DIMENSION(:), INTENT(in   ) ::   psgn        ! sign used across the north fold boundary
       INTEGER                       , INTENT(in   ) ::   khls        ! halo size, default = nn_hls
       INTEGER                       , INTENT(in   ) ::   kfld        ! number of pt3d arrays
Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_nfd_nogather_generic.h90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_nfd_nogather_generic.h90	(revision 14647)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/lbc_nfd_nogather_generic.h90	(revision 14648)
@@ -10,5 +10,5 @@
       REAL(PRECISION),  DIMENSION(:,:,:,:), INTENT(inout) ::   ptab2       ! 
       CHARACTER(len=1)                    , INTENT(in   ) ::   cd_nat      ! nature of array grid-points
-      REAL(PRECISION)                     , INTENT(in   ) ::   psgn        ! sign used across the north fold boundary
+      REAL(wp)                     , INTENT(in   ) ::   psgn        ! sign used across the north fold boundary
       INTEGER                             , INTENT(in   ) ::   khls        ! halo size, default = nn_hls
       !
Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/mpp_lbc_north_icb_generic.h90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/mpp_lbc_north_icb_generic.h90	(revision 14647)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/mpp_lbc_north_icb_generic.h90	(revision 14648)
@@ -31,5 +31,5 @@
       CHARACTER(len=1)        , INTENT(in   ) ::   cd_type  ! nature of pt3d grid-points
       !                                                     !   = T ,  U , V , F or W -points
-      REAL(PRECISION)         , INTENT(in   ) ::   psgn     ! = -1. the sign change across the
+      REAL(wp)         , INTENT(in   ) ::   psgn     ! = -1. the sign change across the
       !!                                                    ! north fold, =  1. otherwise
       INTEGER                 , INTENT(in   ) ::   kextj    ! Extra halo width at north fold
Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/mpp_lnk_icb_generic.h90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/mpp_lnk_icb_generic.h90	(revision 14647)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/mpp_lnk_icb_generic.h90	(revision 14648)
@@ -31,5 +31,5 @@
       REAL(PRECISION), DIMENSION(1-kexti:jpi+kexti,1-kextj:jpj+kextj), INTENT(inout) ::   pt2d     ! 2D array with extra halo
       CHARACTER(len=1)                                        , INTENT(in   ) ::   cd_type  ! nature of ptab array grid-points
-      REAL(PRECISION)                                         , INTENT(in   ) ::   psgn     ! sign used across the north fold
+      REAL(wp)                                         , INTENT(in   ) ::   psgn     ! sign used across the north fold
       INTEGER                                                 , INTENT(in   ) ::   kexti    ! extra i-halo width
       INTEGER                                                 , INTENT(in   ) ::   kextj    ! extra j-halo width
Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/mpp_nfd_generic.h90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/mpp_nfd_generic.h90	(revision 14647)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/LBC/mpp_nfd_generic.h90	(revision 14648)
@@ -3,5 +3,5 @@
       TYPE(PTR_4d_/**/PRECISION),  DIMENSION(:), INTENT(inout) ::   ptab        ! pointer of arrays on which apply the b.c.
       CHARACTER(len=1), DIMENSION(:), INTENT(in   ) ::   cd_nat      ! nature of array grid-points
-      REAL(PRECISION),  DIMENSION(:), INTENT(in   ) ::   psgn        ! sign used across the north fold boundary
+      REAL(wp),  DIMENSION(:), INTENT(in   ) ::   psgn        ! sign used across the north fold boundary
       INTEGER                       , INTENT(in   ) ::   kfillmode   ! filling method for halo over land 
       REAL(PRECISION)               , INTENT(in   ) ::   pfillval    ! background value (used at closed boundaries)
Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/SBC/sbcmod.F90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/SBC/sbcmod.F90	(revision 14647)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/SBC/sbcmod.F90	(revision 14648)
@@ -442,5 +442,5 @@
          END_2D
          !
-         CALL lbc_lnk_multi( 'sbcwave', utau, 'U', -1._wp , vtau, 'V', -1._wp )
+         CALL lbc_lnk( 'sbcwave', utau, 'U', -1._wp , vtau, 'V', -1._wp )
          !
          taum(:,:) = taum(:,:)*tauoc_wave(:,:)
@@ -452,5 +452,5 @@
          utau(:,:) = utau(:,:) - tawx(:,:) + twox(:,:)
          vtau(:,:) = vtau(:,:) - tawy(:,:) + twoy(:,:)
-         CALL lbc_lnk_multi( 'sbcwave', utau, 'U', -1._wp, vtau, 'V', -1._wp )
+         CALL lbc_lnk( 'sbcwave', utau, 'U', -1._wp, vtau, 'V', -1._wp )
          !
          DO_2D( 0, 0, 0, 0)
Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traadv.F90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traadv.F90	(revision 14647)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traadv.F90	(revision 14648)
@@ -184,5 +184,5 @@
             IF (nn_hls.EQ.2) THEN
                CALL lbc_lnk( 'traadv', pts(:,:,:,:,Kbb), 'T', 1._wp, pts(:,:,:,:,Kmm), 'T', 1._wp)
-               CALL lbc_lnk( 'traadv', zuu(:,:,:), 'U', -1._wp, zvv(:,:,:), 'V', -1., zww(:,:,:), 'W', 1._wp)
+               CALL lbc_lnk( 'traadv', zuu(:,:,:), 'U', -1._wp, zvv(:,:,:), 'V', -1._wp, zww(:,:,:), 'W', 1._wp)
 #if defined key_loop_fusion
                CALL tra_adv_fct_lf ( kt, nit000, 'TRA', rDt, zuu, zvv, zww, Kbb, Kmm, pts, jpts, Krhs, nn_fct_h, nn_fct_v )
Index: NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traadv_fct.F90
===================================================================
--- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traadv_fct.F90	(revision 14647)
+++ NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traadv_fct.F90	(revision 14648)
@@ -294,5 +294,6 @@
          !
          IF (nn_hls.EQ.1) THEN
-            CALL lbc_lnk( 'traadv_fct', zwi, 'T', 1.0_wp, zwx, 'U', -1.0_wp , zwy, 'V', -1.0_wp, zwz, 'T', 1.0_wp )
+            CALL lbc_lnk( 'traadv_fct', zwi, 'T', 1.0_wp )
+            CALL lbc_lnk( 'traadv_fct', zwx, 'U', -1.0_wp , zwy, 'V', -1.0_wp, zwz, 'T', 1.0_wp )
          ELSE
             CALL lbc_lnk( 'traadv_fct', zwi, 'T', 1.0_wp)
