Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/BDY/bdylib.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/BDY/bdylib.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/BDY/bdylib.F90	(revision 14286)
@@ -112,5 +112,5 @@
       igrd = 1                       ! Everything is at T-points here
       !
-CALL bdy_orlanski_3d( idx, igrd, REAL(phib(:,:,:), wp), phia(:,:,:), dta, lrim0, ll_npo )
+      CALL bdy_orlanski_3d( idx, igrd, REAL(phib(:,:,:), wp), phia(:,:,:), dta, lrim0, ll_npo )
       !
    END SUBROUTINE bdy_orl
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/C1D/step_c1d.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/C1D/step_c1d.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/C1D/step_c1d.F90	(revision 14286)
@@ -34,4 +34,5 @@
    !! Software governed by the CeCILL license (see ./LICENSE)
    !!----------------------------------------------------------------------
+#  include "single_precision_substitute.h90"
 CONTAINS
 
@@ -69,8 +70,8 @@
       ! Ocean physics update
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-                         CALL eos_rab( ts(:,:,:,:,Nbb), rab_b, Nnn )  ! before local thermal/haline expension ratio at T-points
-                         CALL eos_rab( ts(:,:,:,:,Nnn), rab_n, Nnn )  ! now    local thermal/haline expension ratio at T-points
-                         CALL bn2( ts(:,:,:,:,Nbb), rab_b, rn2b, Nnn ) ! before Brunt-Vaisala frequency
-                         CALL bn2( ts(:,:,:,:,Nnn), rab_n, rn2 , Nnn ) ! now    Brunt-Vaisala frequency
+                         CALL eos_rab( CASTWP(ts(:,:,:,:,Nbb)), rab_b, Nnn )  ! before local thermal/haline expension ratio at T-points
+                         CALL eos_rab( CASTWP(ts(:,:,:,:,Nnn)), rab_n, Nnn )  ! now    local thermal/haline expension ratio at T-points
+                         CALL bn2( CASTWP(ts(:,:,:,:,Nbb)), rab_b, rn2b, Nnn ) ! before Brunt-Vaisala frequency
+                         CALL bn2( CASTWP(ts(:,:,:,:,Nnn)), rab_n, rn2 , Nnn ) ! now    Brunt-Vaisala frequency
 
       !  VERTICAL PHYSICS
@@ -107,5 +108,5 @@
       IF( ln_zdfosm  )  CALL tra_osm( kstp, Nnn     , ts, Nrhs  )  ! OSMOSIS non-local tracer fluxes
                         CALL tra_zdf( kstp, Nbb, Nnn, Nrhs, ts, Naa   )         ! vertical mixing
-                        CALL eos( ts(:,:,:,:,Nnn), rhd, rhop, gdept_0(:,:,:) )  ! now potential density for zdfmxl
+                        CALL eos( CASTEWP(ts(:,:,:,:,Nnn)), rhd, rhop, gdept_0(:,:,:) )  ! now potential density for zdfmxl
       IF( ln_zdfnpc )   CALL tra_npc( kstp,      Nnn, Nrhs, ts, Naa   )         ! applied non penetrative convective adjustment on (t,s)
                         CALL tra_atf( kstp, Nbb, Nnn, Naa, ts )                 ! time filtering of "now" tracer arrays
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DIA/diawri.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DIA/diawri.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DIA/diawri.F90	(revision 14286)
@@ -75,6 +75,5 @@
    INTEGER ::   nid_T, nz_T, nh_T, ndim_T, ndim_hT   ! grid_T file
    INTEGER ::          nb_T              , ndim_bT   ! grid_T file
-   INTEGER ::   nid_U, nz_U, nh_U, ndim_U, ndim_hU   ! grid_U file
-   INTEGER ::   nid_V, nz_V, nh_V, ndim_V, ndim_hV   ! grid_V file
+
    INTEGER ::   nid_W, nz_W, nh_W                    ! grid_W file
    INTEGER ::   nid_A, nz_A, nh_A, ndim_A, ndim_hA   ! grid_ABL file   
@@ -354,5 +353,5 @@
                &                 * r1_e1e2t(ji,jj) / e3t(ji,jj,1,Kmm) * ssmask(ji,jj)
          END_2D
-         CALL lbc_lnk( 'diawri', z2d, 'T', 1. )
+         CALL lbc_lnk( 'diawri', z2d, 'T', 1._wp )
          IF ( iom_use("sKE" ) )  CALL iom_put( "sKE" , z2d )   
       ENDIF
@@ -367,5 +366,5 @@
                &                 * r1_e1e2f(ji,jj) / e3f(ji,jj,1) * ssfmask(ji,jj)
          END_2D
-         CALL lbc_lnk( 'diawri', z2d, 'F', 1. )
+         CALL lbc_lnk( 'diawri', z2d, 'F', 1._wp )
          CALL iom_put( "ssKEf", z2d )                     
       ENDIF
@@ -482,5 +481,5 @@
             &              - e1u(ji  ,jj+1) * uu(ji  ,jj+1,1,Kmm) + e1u(ji,jj) * uu(ji,jj,1,Kmm)  ) * r1_e1e2f(ji,jj)
          END_2D
-         CALL lbc_lnk( 'diawri', z2d, 'F', 1. )
+         CALL lbc_lnk( 'diawri', z2d, 'F', 1._wp )
          CALL iom_put( "ssrelvor", z2d )                  ! relative vorticity ( zeta ) 
          !
@@ -495,5 +494,5 @@
             z2d(ji,jj) = ze3 * z2d(ji,jj) 
          END_2D
-         CALL lbc_lnk( 'diawri', z2d, 'F', 1. )
+         CALL lbc_lnk( 'diawri', z2d, 'F', 1._wp )
          CALL iom_put( "ssrelpotvor", z2d )                  ! relative potential vorticity (zeta/h)
          !
@@ -506,5 +505,5 @@
             z2d(ji,jj) = ze3 * ff_f(ji,jj) + z2d(ji,jj) 
          END_2D
-         CALL lbc_lnk( 'diawri', z2d, 'F', 1. )
+         CALL lbc_lnk( 'diawri', z2d, 'F', 1._wp )
          CALL iom_put( "ssabspotvor", z2d )                  ! absolute potential vorticity ( q )
          !
@@ -512,5 +511,5 @@
             z2d(ji,jj) = 0.5_wp * z2d(ji,jj)  * z2d(ji,jj) 
          END_2D
-         CALL lbc_lnk( 'diawri', z2d, 'F', 1. )
+         CALL lbc_lnk( 'diawri', z2d, 'F', 1._wp )
          CALL iom_put( "ssEns", z2d )                        ! potential enstrophy ( 1/2*q2 )
          !
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DOM/dom_oce.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DOM/dom_oce.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DOM/dom_oce.F90	(revision 14286)
@@ -243,5 +243,5 @@
    INTEGER , PUBLIC ::   nsec_monday   !: seconds between 00h         of the last Monday   and half of the current time step
    INTEGER , PUBLIC ::   nsec_day      !: seconds between 00h         of the current   day and half of the current time step
-   REAL(dp), PUBLIC ::   fjulday       !: current julian day 
+   REAL(dp), PUBLIC ::   fjulday       !: current julian day
    REAL(dp), PUBLIC ::   fjulstartyear !: first day of the current year in julian days
    REAL(wp), PUBLIC ::   adatrj        !: number of elapsed days since the begining of the whole simulation
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/dynatf.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/dynatf.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/dynatf.F90	(revision 14286)
@@ -363,5 +363,5 @@
       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 )
       IF( l_trddyn     )   DEALLOCATE( zua, zva )
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 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/dynspg_ts.F90	(revision 14286)
@@ -270,5 +270,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
       !
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/wet_dry.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/wet_dry.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/DYN/wet_dry.F90	(revision 14286)
@@ -392,3 +392,2 @@
    !!==============================================================================
 END MODULE wet_dry
-
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ICB/icbdyn.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ICB/icbdyn.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ICB/icbdyn.F90	(revision 14286)
@@ -24,7 +24,4 @@
 
    PUBLIC   icb_dyn  ! routine called in icbstp.F90 module
-
-   !! * Substitutions
-#  include "single_precision_substitute.h90"
 
    !!----------------------------------------------------------------------
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ICB/icbini.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ICB/icbini.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ICB/icbini.F90	(revision 14286)
@@ -41,6 +41,4 @@
    !! * Substitutions
 #  include "do_loop_substitute.h90"
-#  include "single_precision_substitute.h90"
-
    !!----------------------------------------------------------------------
    !! NEMO/OCE 4.0 , NEMO Consortium (2018)
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ISF/isfcpl.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ISF/isfcpl.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ISF/isfcpl.F90	(revision 14286)
@@ -588,5 +588,5 @@
       ENDDO
       !
-      ! global 
+      ! global
       CALL mpp_sum('isfcpl',nisfl  )
       !
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ISF/isfdynatf.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ISF/isfdynatf.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ISF/isfdynatf.F90	(revision 14286)
@@ -27,5 +27,4 @@
 #  include "do_loop_substitute.h90"
 #  include "domzgr_substitute.h90"
-#  include "single_precision_substitute.h90"
 
 CONTAINS
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ISF/isfstp.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ISF/isfstp.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/ISF/isfstp.F90	(revision 14286)
@@ -88,7 +88,7 @@
             ze3t(:,:,jk) = e3t(:,:,jk,Kmm)
          END DO 
-         CALL isf_tbl_lvl( ht(:,:), ze3t           , misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav )
+         CALL isf_tbl_lvl( CASTWP(ht(:,:)), ze3t           , misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav )
 #else
-         CALL isf_tbl_lvl( ht(:,:),  CASTWP(e3t(:,:,:,Kmm)), misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav )
+         CALL isf_tbl_lvl( CASTWP(ht(:,:)),  CASTWP(e3t(:,:,:,Kmm)), misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav )
 #endif
          !
@@ -117,7 +117,7 @@
             ze3t(:,:,jk) = e3t(:,:,jk,Kmm)
          END DO
-         CALL isf_tbl_lvl( ht(:,:), ze3t           , misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par )
+         CALL isf_tbl_lvl( CASTWP(ht(:,:)), ze3t           , misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par )
 #else
-         CALL isf_tbl_lvl( ht(:,:),  CASTWP(e3t(:,:,:,Kmm)), misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par )
+         CALL isf_tbl_lvl( CASTWP(ht(:,:)),  CASTWP(e3t(:,:,:,Kmm)), misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par )
 #endif
          !
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traadv_cen.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traadv_cen.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traadv_cen.F90	(revision 14286)
@@ -189,3 +189,2 @@
    !!======================================================================
 END MODULE traadv_cen
-
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traadv_mus.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traadv_mus.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traadv_mus.F90	(revision 14286)
@@ -246,3 +246,2 @@
    !!======================================================================
 END MODULE traadv_mus
-
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traatf.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traatf.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traatf.F90	(revision 14286)
@@ -385,3 +385,2 @@
    !!======================================================================
 END MODULE traatf
-
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traatf_qco.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traatf_qco.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traatf_qco.F90	(revision 14286)
@@ -56,4 +56,5 @@
 #  include "do_loop_substitute.h90"
 #  include "domzgr_substitute.h90"
+#  include "single_precision_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OCE 4.0 , NEMO Consortium (2018)
@@ -86,5 +87,5 @@
       INTEGER                                  , INTENT(in   ) :: kt             ! ocean time-step index
       INTEGER                                  , INTENT(in   ) :: Kbb, Kmm, Kaa  ! time level indices
-      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts            ! active tracers
+      REAL(dp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts            ! active tracers
       !!
       INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
@@ -161,6 +162,6 @@
       !
       !                        ! control print
-      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=pts(:,:,:,jp_tem,Kmm), clinfo1=' nxt  - Tn: ', mask1=tmask,   &
-         &                                  tab3d_2=pts(:,:,:,jp_sal,Kmm), clinfo2=       ' Sn: ', mask2=tmask )
+      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=CASTWP(pts(:,:,:,jp_tem,Kmm)), clinfo1=' nxt  - Tn: ', mask1=tmask,   &
+         &                                  tab3d_2=CASTWP(pts(:,:,:,jp_sal,Kmm)), clinfo2=       ' Sn: ', mask2=tmask )
       !
       IF( ln_timing )   CALL timing_stop('tra_atf_qco')
@@ -184,5 +185,5 @@
       CHARACTER(len=3)                         , INTENT(in   ) ::  cdtype        ! =TRA or TRC (tracer indicator)
       INTEGER                                  , INTENT(in   ) ::  kjpt          ! number of tracers
-      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::  pt            ! tracer fields
+      REAL(dp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::  pt            ! tracer fields
       !
       INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
@@ -228,5 +229,5 @@
       CHARACTER(len=3)                         , INTENT(in   ) ::  cdtype    ! =TRA or TRC (tracer indicator)
       INTEGER                                  , INTENT(in   ) ::  kjpt      ! number of tracers
-      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::  pt        ! tracer fields
+      REAL(dp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::  pt        ! tracer fields
       REAL(wp), DIMENSION(jpi,jpj    ,kjpt)    , INTENT(in   ) ::  psbc_tc   ! surface tracer content
       REAL(wp), DIMENSION(jpi,jpj    ,kjpt)    , INTENT(in   ) ::  psbc_tc_b ! before surface tracer content
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/tradmp.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/tradmp.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/tradmp.F90	(revision 14286)
@@ -148,5 +148,5 @@
       ENDIF
       !                           ! Control print
-IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=CASTWP(pts(:,:,:,jp_tem,Krhs)), clinfo1=' dmp  - Ta: ', mask1=tmask, tab3d_2=REAL(pts(:,:,:,jp_sal,Krhs), wp), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' )
+IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=CASTWP(pts(:,:,:,jp_tem,Krhs)), clinfo1=' dmp  - Ta: ', mask1=tmask, tab3d_2=CASTWP(pts(:,:,:,jp_sal,Krhs)), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' )
 
       !
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traldf_lap_blp.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traldf_lap_blp.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traldf_lap_blp.F90	(revision 14286)
@@ -244,6 +244,6 @@
       CALL lbc_lnk( 'traldf_lap_blp', zlap(:,:,:,:) , 'T', 1.0_wp )     ! Lateral boundary conditions (unchanged sign)
       !                                               ! Partial top/bottom cell: GRADh( zlap )
-      IF( ln_isfcav .AND. ln_zps ) THEN   ;   CALL zps_hde_isf( kt, Kmm, kjpt, zlap, zglu, zglv, zgui, zgvi )
-      ELSEIF(             ln_zps ) THEN   ;   CALL zps_hde    ( kt, Kmm, kjpt, zlap, zglu, zglv )
+      IF( ln_isfcav .AND. ln_zps ) THEN   ;   CALL zps_hde_isf( kt, Kmm, kjpt, zlap, zglu, zglv, zgui, zgvi )  ! both top & bottom
+      ELSEIF(             ln_zps ) THEN   ;   CALL zps_hde    ( kt, Kmm, kjpt, zlap, zglu, zglv )              ! only bottom
       ENDIF
       !
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traldf_triad.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traldf_triad.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traldf_triad.F90	(revision 14286)
@@ -43,5 +43,4 @@
 #  include "do_loop_substitute.h90"
 #  include "domzgr_substitute.h90"
-#  include "single_precision_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OCE 4.0 , NEMO Consortium (2018)
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/tramle.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/tramle.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/tramle.F90	(revision 14286)
@@ -381,3 +381,2 @@
    !!==============================================================================
 END MODULE tramle
-
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/trazdf.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/trazdf.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/trazdf.F90	(revision 14286)
@@ -265,3 +265,2 @@
    !!==============================================================================
 END MODULE trazdf
-
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRD/trddyn.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRD/trddyn.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRD/trddyn.F90	(revision 14286)
@@ -38,5 +38,4 @@
 #  include "do_loop_substitute.h90"
 #  include "domzgr_substitute.h90"
-#  include "single_precision_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OCE 4.0 , NEMO Consortium (2018)
@@ -182,3 +181,2 @@
    !!======================================================================
 END MODULE trddyn
-
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRD/trdken.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRD/trdken.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRD/trdken.F90	(revision 14286)
@@ -248,3 +248,2 @@
    !!======================================================================
 END MODULE trdken
-
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRD/trdvor.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRD/trdvor.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRD/trdvor.F90	(revision 14286)
@@ -400,6 +400,5 @@
 
          ! Boundary conditions
-         CALL lbc_lnk_multi( 'trdvor', vor_avrtot, 'F', 1.0_wp &
-              &                      , vor_avrres, 'F', 1.0_wp )
+         CALL lbc_lnk_multi( 'trdvor', vor_avrtot, 'F', 1.0_wp , vor_avrres, 'F', 1.0_wp )
 
 
@@ -459,7 +458,5 @@
       !!      from ocean surface down to control surface (NetCDF output)
       !!----------------------------------------------------------------------
-      REAL(dp)  :: zjulian
-      REAL(dp)  :: zsto
-      REAL(dp) :: zout
+      REAL(dp) ::   zjulian, zsto, zout
       CHARACTER (len=40) ::   clhstnam
       CHARACTER (len=40) ::   clop
@@ -577,3 +574,2 @@
    !!======================================================================
 END MODULE trdvor
-
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/lib_fortran.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/lib_fortran.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/lib_fortran.F90	(revision 14286)
@@ -76,131 +76,14 @@
 CONTAINS
 
-#  define GLOBSUM_CODE
-
-#     define SINGLE_PRECISION
-#        define DIM_1d
-#        define FUNCTION_GLOBSUM           glob_sum_1d_sp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBSUM
-#        undef DIM_1d
-
-#        define DIM_2d
-#        define OPERATION_GLOBSUM
-#        define FUNCTION_GLOBSUM           glob_sum_2d_sp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBSUM
-#        undef OPERATION_GLOBSUM
-#        define OPERATION_FULL_GLOBSUM
-#        define FUNCTION_GLOBSUM           glob_sum_full_2d_sp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBSUM
-#        undef OPERATION_FULL_GLOBSUM
-#        undef DIM_2d
-
-#        define DIM_3d
-#        define OPERATION_GLOBSUM
-#        define FUNCTION_GLOBSUM           glob_sum_3d_sp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBSUM
-#        undef OPERATION_GLOBSUM
-#        define OPERATION_FULL_GLOBSUM
-#        define FUNCTION_GLOBSUM           glob_sum_full_3d_sp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBSUM
-#        undef OPERATION_FULL_GLOBSUM
-#        undef DIM_3d
-#     undef SINGLE_PRECISION
-! Double Precision versions
-#        define DIM_1d
-#        define FUNCTION_GLOBSUM           glob_sum_1d_dp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBSUM
-#        undef DIM_1d
-
-#        define DIM_2d
-#        define OPERATION_GLOBSUM
-#        define FUNCTION_GLOBSUM           glob_sum_2d_dp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBSUM
-#        undef OPERATION_GLOBSUM
-#        define OPERATION_FULL_GLOBSUM
-#        define FUNCTION_GLOBSUM           glob_sum_full_2d_dp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBSUM
-#        undef OPERATION_FULL_GLOBSUM
-#        undef DIM_2d
-
-#        define DIM_3d
-#        define OPERATION_GLOBSUM
-#        define FUNCTION_GLOBSUM           glob_sum_3d_dp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBSUM
-#        undef OPERATION_GLOBSUM
-#        define OPERATION_FULL_GLOBSUM
-#        define FUNCTION_GLOBSUM           glob_sum_full_3d_dp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBSUM
-#        undef OPERATION_FULL_GLOBSUM
-#        undef DIM_3d
-
-#  undef GLOBSUM_CODE
-
-! Single Precision versions
-#  define GLOBMINMAX_CODE
-
-#     define SINGLE_PRECISION
-#        define DIM_2d
-#        define OPERATION_GLOBMIN
-#        define FUNCTION_GLOBMINMAX           glob_min_2d_sp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBMINMAX
-#        undef OPERATION_GLOBMIN
-#        define OPERATION_GLOBMAX
-#        define FUNCTION_GLOBMINMAX           glob_max_2d_sp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBMINMAX
-#        undef OPERATION_GLOBMAX
-#        undef DIM_2d
-
-#        define DIM_3d
-#        define OPERATION_GLOBMIN
-#        define FUNCTION_GLOBMINMAX           glob_min_3d_sp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBMINMAX
-#        undef OPERATION_GLOBMIN
-#        define OPERATION_GLOBMAX
-#        define FUNCTION_GLOBMINMAX           glob_max_3d_sp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBMINMAX
-#        undef OPERATION_GLOBMAX
-#        undef DIM_3d
-#     undef SINGLE_PRECISION
-! Double Precision versions
-#        define DIM_2d
-#        define OPERATION_GLOBMIN
-#        define FUNCTION_GLOBMINMAX           glob_min_2d_dp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBMINMAX
-#        undef OPERATION_GLOBMIN
-#        define OPERATION_GLOBMAX
-#        define FUNCTION_GLOBMINMAX           glob_max_2d_dp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBMINMAX
-#        undef OPERATION_GLOBMAX
-#        undef DIM_2d
-
-#        define DIM_3d
-#        define OPERATION_GLOBMIN
-#        define FUNCTION_GLOBMINMAX           glob_min_3d_dp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBMINMAX
-#        undef OPERATION_GLOBMIN
-#        define OPERATION_GLOBMAX
-#        define FUNCTION_GLOBMINMAX           glob_max_3d_dp
-#        include "lib_fortran_generic.h90"
-#        undef FUNCTION_GLOBMINMAX
-#        undef OPERATION_GLOBMAX
-#        undef DIM_3d
-#  undef GLOBMINMAX_CODE
+
+!                          ! FUNCTION global_sum !
+!                          ! single precision version !
+# define PRECISION sp
+# include "lib_fortran_globsum.h90"
+# undef PRECISION
+!                          ! double precision version !
+# define PRECISION dp
+# include "lib_fortran_globsum.h90"
+# undef PRECISION
 
 !                          ! FUNCTION local_sum !
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/lib_fortran_generic.h90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/lib_fortran_generic.h90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/lib_fortran_generic.h90	(revision 14286)
@@ -1,12 +1,6 @@
-#if defined SINGLE_PRECISION
-#   define TYPE                          REAL(sp)
-#else
-#   define TYPE                          REAL(dp)
-#endif
-
 #if defined GLOBSUM_CODE
 !                          ! FUNCTION FUNCTION_GLOBSUM !
 #   if defined DIM_1d
-#      define ARRAY_TYPE(i,j,k)    TYPE                 , INTENT(in   ) ::   ARRAY_IN(i,j,k)
+#      define ARRAY_TYPE(i,j,k)    REAL(PRECISION)                 , INTENT(in   ) ::   ARRAY_IN(i,j,k)
 #      define ARRAY_IN(i,j,k)   ptab(i)
 #      define ARRAY2_IN(i,j,k)  ptab2(i)
@@ -16,5 +10,5 @@
 #   endif
 #   if defined DIM_2d
-#      define ARRAY_TYPE(i,j,k)    TYPE                 , INTENT(in   ) ::   ARRAY_IN(i,j,k)
+#      define ARRAY_TYPE(i,j,k)    REAL(PRECISION)                 , INTENT(in   ) ::   ARRAY_IN(i,j,k)
 #      define ARRAY_IN(i,j,k)   ptab(i,j)
 #      define ARRAY2_IN(i,j,k)  ptab2(i,j)
@@ -23,5 +17,5 @@
 #   endif
 #   if defined DIM_3d
-#      define ARRAY_TYPE(i,j,k)    TYPE                 , INTENT(in   ) ::   ARRAY_IN(i,j,k)
+#      define ARRAY_TYPE(i,j,k)    REAL(PRECISION)                 , INTENT(in   ) ::   ARRAY_IN(i,j,k)
 #      define ARRAY_IN(i,j,k)   ptab(i,j,k)
 #      define ARRAY2_IN(i,j,k)  ptab2(i,j,k)
@@ -40,10 +34,10 @@
       CHARACTER(len=*),  INTENT(in   ) ::   cdname  ! name of the calling subroutine
       ARRAY_TYPE(:,:,:)                             ! array on which operation is applied
-      TYPE   ::  FUNCTION_GLOBSUM
+      REAL(PRECISION)   ::  FUNCTION_GLOBSUM
       !
       !!-----------------------------------------------------------------------
       !!
       COMPLEX(dp)::   ctmp
-      TYPE   ::   ztmp
+      REAL(PRECISION)   ::   ztmp
       INTEGER    ::   ji, jj, jk   ! dummy loop indices
       INTEGER    ::   ipi, ipj, ipk    ! dimensions
@@ -69,5 +63,4 @@
    END FUNCTION FUNCTION_GLOBSUM
 
-#undef TYPE
 #undef ARRAY_TYPE
 #undef ARRAY2_TYPE
@@ -82,5 +75,5 @@
 !                          ! FUNCTION FUNCTION_GLOBMINMAX !
 #   if defined DIM_2d
-#      define ARRAY_TYPE(i,j,k)    TYPE                 , INTENT(in   ) ::   ARRAY_IN(i,j,k)
+#      define ARRAY_TYPE(i,j,k)    REAL(PRECISION)                 , INTENT(in   ) ::   ARRAY_IN(i,j,k)
 #      define ARRAY_IN(i,j,k)   ptab(i,j)
 #      define ARRAY2_IN(i,j,k)  ptab2(i,j)
@@ -88,5 +81,5 @@
 #   endif
 #   if defined DIM_3d
-#      define ARRAY_TYPE(i,j,k)    TYPE                 , INTENT(in   ) ::   ARRAY_IN(i,j,k)
+#      define ARRAY_TYPE(i,j,k)    REAL(PRECISION)                 , INTENT(in   ) ::   ARRAY_IN(i,j,k)
 #      define ARRAY_IN(i,j,k)   ptab(i,j,k)
 #      define ARRAY2_IN(i,j,k)  ptab2(i,j,k)
@@ -108,5 +101,5 @@
       CHARACTER(len=*),  INTENT(in   ) ::   cdname  ! name of the calling subroutine
       ARRAY_TYPE(:,:,:)                             ! array on which operation is applied
-      TYPE   ::  FUNCTION_GLOBMINMAX
+      REAL(PRECISION)   ::  FUNCTION_GLOBMINMAX
       !
       !!-----------------------------------------------------------------------
@@ -114,5 +107,5 @@
       !!
       COMPLEX(dp)::   ctmp
-      REAL(wp)   ::   ztmp
+      REAL(PRECISION)   ::   ztmp
       INTEGER    ::   jk       ! dummy loop indices
       INTEGER    ::   ipk      ! dimensions
@@ -133,5 +126,4 @@
    END FUNCTION FUNCTION_GLOBMINMAX
 
-#undef TYPE
 #undef ARRAY_TYPE
 #undef ARRAY2_TYPE
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/stpmlf.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/stpmlf.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/stpmlf.F90	(revision 14286)
@@ -68,4 +68,5 @@
    !! * Substitutions
 #  include "domzgr_substitute.h90"
+#  include "single_precision_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/OCE 4.0 , NEMO Consortium (2018)
@@ -161,8 +162,8 @@
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
       !  THERMODYNAMICS
-                         CALL eos_rab( ts(:,:,:,:,Nbb), rab_b, Nnn )       ! before local thermal/haline expension ratio at T-points
-                         CALL eos_rab( ts(:,:,:,:,Nnn), rab_n, Nnn )       ! now    local thermal/haline expension ratio at T-points
-                         CALL bn2    ( ts(:,:,:,:,Nbb), rab_b, rn2b, Nnn ) ! before Brunt-Vaisala frequency
-                         CALL bn2    ( ts(:,:,:,:,Nnn), rab_n, rn2, Nnn  ) ! now    Brunt-Vaisala frequency
+                         CALL eos_rab( CASTWP(ts(:,:,:,:,Nbb)), rab_b, Nnn )       ! before local thermal/haline expension ratio at T-points
+                         CALL eos_rab( CASTWP(ts(:,:,:,:,Nnn)), rab_n, Nnn )       ! now    local thermal/haline expension ratio at T-points
+                         CALL bn2    ( CASTWP(ts(:,:,:,:,Nbb)), rab_b, rn2b, Nnn ) ! before Brunt-Vaisala frequency
+                         CALL bn2    ( CASTWP(ts(:,:,:,:,Nnn)), rab_n, rn2, Nnn  ) ! now    Brunt-Vaisala frequency
 
       !  VERTICAL PHYSICS
@@ -172,5 +173,5 @@
       !
       IF( l_ldfslp ) THEN                             ! slope of lateral mixing
-                         CALL eos( ts(:,:,:,:,Nbb), rhd, gdept_0(:,:,:) )               ! before in situ density
+                         CALL eos( CASTWP(ts(:,:,:,:,Nbb)), rhd, gdept_0(:,:,:) )               ! before in situ density
 
          IF( ln_zps .AND. .NOT. ln_isfcav)                                    &
@@ -199,10 +200,10 @@
                             CALL ssh_nxt    ( kstp, Nbb, Nnn, ssh,  Naa )   ! after ssh (includes call to div_hor)
       IF( .NOT.lk_linssh )  THEN
-                             CALL dom_qco_r3c( ssh(:,:,Naa), r3t(:,:,Naa), r3u(:,:,Naa), r3v(:,:,Naa)           )   ! "after" ssh/h_0 ratio at t,u,v pts
-         IF( ln_dynspg_exp ) CALL dom_qco_r3c( ssh(:,:,Nnn), r3t(:,:,Nnn), r3u(:,:,Nnn), r3v(:,:,Nnn), r3f(:,:) )   ! spg_exp : needed only for "now" ssh/h_0 ratio at f point
+                             CALL dom_qco_r3c( CASTWP(ssh(:,:,Naa)), r3t(:,:,Naa), r3u(:,:,Naa), r3v(:,:,Naa)           )   ! "after" ssh/h_0 ratio at t,u,v pts
+         IF( ln_dynspg_exp ) CALL dom_qco_r3c( CASTWP(ssh(:,:,Nnn)), r3t(:,:,Nnn), r3u(:,:,Nnn), r3v(:,:,Nnn), r3f(:,:) )   ! spg_exp : needed only for "now" ssh/h_0 ratio at f point
       ENDIF
                             CALL wzv        ( kstp, Nbb, Nnn, Naa, ww  )    ! Nnn cross-level velocity
       IF( ln_zad_Aimp )     CALL wAimp      ( kstp,      Nnn           )    ! Adaptive-implicit vertical advection partitioning
-                            CALL eos        ( ts(:,:,:,:,Nnn), rhd, rhop, zgdept ) ! now in situ density for hpg computation
+                            CALL eos        ( CASTWP(ts(:,:,:,:,Nnn)), rhd, rhop, zgdept ) ! now in situ density for hpg computation
 
 
@@ -227,5 +228,5 @@
       IF( ln_dynspg_ts ) THEN                         ! vertical scale factors and vertical velocity need to be updated
                             CALL div_hor    ( kstp, Nbb, Nnn )                ! Horizontal divergence  (2nd call in time-split case)
-         IF(.NOT.lk_linssh) CALL dom_qco_r3c ( ssh(:,:,Naa), r3t(:,:,Naa), r3u(:,:,Naa), r3v(:,:,Naa), r3f(:,:) )   ! update ssh/h_0 ratio at t,u,v,f pts 
+         IF(.NOT.lk_linssh) CALL dom_qco_r3c ( CASTWP(ssh(:,:,Naa)), r3t(:,:,Naa), r3u(:,:,Naa), r3v(:,:,Naa), r3f(:,:) )   ! update ssh/h_0 ratio at t,u,v,f pts 
       ENDIF
                             CALL dyn_zdf    ( kstp, Nbb, Nnn, Nrhs, uu, vv, Naa  )  ! vertical diffusion
@@ -259,5 +260,5 @@
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                          CALL ssh_atf    ( kstp, Nbb, Nnn, Naa, ssh )            ! time filtering of "now" sea surface height
-      IF(.NOT.lk_linssh) CALL dom_qco_r3c( ssh(:,:,Nnn), r3t_f, r3u_f, r3v_f )   ! "now" ssh/h_0 ratio from filtrered ssh
+      IF(.NOT.lk_linssh) CALL dom_qco_r3c( CASTWP(ssh(:,:,Nnn)), r3t_f, r3u_f, r3v_f )   ! "now" ssh/h_0 ratio from filtrered ssh
 #if defined key_top
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -401,5 +402,5 @@
       !!
       INTEGER                             , INTENT(in   ) ::   Kmm, Kaa   ! before and after time level indices
-      REAL(wp), DIMENSION(jpi,jpj,jpk,jpt), INTENT(inout) ::   puu, pvv   ! velocities
+      REAL(dp), DIMENSION(jpi,jpj,jpk,jpt), INTENT(inout) ::   puu, pvv   ! velocities
       !
       INTEGER  ::   jk   ! dummy loop indices
@@ -449,6 +450,6 @@
       INTEGER                                  , INTENT(in   ) ::   kt         ! ocean time-step index
       INTEGER                                  , INTENT(in   ) ::   Kbb, Kaa   ! before and after time level indices
-      REAL(wp), DIMENSION(jpi,jpj,jpk,jpt)     , INTENT(inout) ::   puu, pvv   ! velocities to be time filtered
-      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) ::   pts        ! active tracers
+      REAL(dp), DIMENSION(jpi,jpj,jpk,jpt)     , INTENT(inout) ::   puu, pvv   ! velocities to be time filtered
+      REAL(dp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) ::   pts        ! active tracers
       !!----------------------------------------------------------------------
       !
@@ -460,6 +461,6 @@
 # endif
       !                                        ! local domain boundaries  (T-point, unchanged sign)
-      CALL lbc_lnk_multi( 'finalize_lbc', puu(:,:,:,       Kaa), 'U', -1., pvv(:,:,:       ,Kaa), 'V', -1.   &
-                       &                , pts(:,:,:,jp_tem,Kaa), 'T',  1., pts(:,:,:,jp_sal,Kaa), 'T',  1. )
+      CALL lbc_lnk_multi( 'finalize_lbc', puu(:,:,:,       Kaa), 'U', -1._wp, pvv(:,:,:       ,Kaa), 'V', -1._wp   &
+                       &                , pts(:,:,:,jp_tem,Kaa), 'T',  1._wp, pts(:,:,:,jp_sal,Kaa), 'T',  1._wp )
       !
       !                                        !* BDY open boundaries
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/TOP/AGE/trcsms_age.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/TOP/AGE/trcsms_age.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/TOP/AGE/trcsms_age.F90	(revision 14286)
@@ -29,5 +29,4 @@
    REAL(wp), PUBLIC :: frac_add_age    !: fraction of level nl_age below age_depth where it is incremented
 
-#  include "single_precision_substitute.h90" 
 
    !!----------------------------------------------------------------------
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/TOP/TRP/trctrp.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/TOP/TRP/trctrp.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/TOP/TRP/trctrp.F90	(revision 14286)
@@ -40,5 +40,4 @@
    PUBLIC   trc_trp    ! called by trc_stp
 
-#  include "single_precision_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 4.0 , NEMO Consortium (2018)
Index: /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/TOP/TRP/trdmxl_trc.F90
===================================================================
--- /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/TOP/TRP/trdmxl_trc.F90	(revision 14285)
+++ /NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/TOP/TRP/trdmxl_trc.F90	(revision 14286)
@@ -986,3 +986,2 @@
    !!======================================================================
 END MODULE trdmxl_trc
-
