Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/ISF/isfcavmlt.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/ISF/isfcavmlt.F90	(revision 14762)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/ISF/isfcavmlt.F90	(revision 15540)
@@ -32,4 +32,5 @@
 
    !! * Substitutions
+#  include "single_precision_substitute.h90"
 #  include "do_loop_substitute.h90"
    !!----------------------------------------------------------------------
@@ -53,9 +54,9 @@
       !!
       !!-------------------------- OUT -------------------------------------
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! heat and fwf fluxes
+      REAL(dp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! heat and fwf fluxes
       !!-------------------------- IN  -------------------------------------
       INTEGER, INTENT(in) :: kt
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pgt  , pgs    ! gamma t and gamma s
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pttbl, pstbl  ! top boundary layer tracer
+      REAL(dp), DIMENSION(jpi,jpj), INTENT(in   ) :: pgt  , pgs    ! gamma t and gamma s
+      REAL(dp), DIMENSION(jpi,jpj), INTENT(in   ) :: pttbl, pstbl  ! top boundary layer tracer
       !!---------------------------------------------------------------------
       !
@@ -101,14 +102,14 @@
       !!---------------------------------------------------------------------
       !!-------------------------- OUT -------------------------------------
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! heat content, latent heat and fwf fluxes
+      REAL(dp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! heat content, latent heat and fwf fluxes
       !!-------------------------- IN  -------------------------------------
       INTEGER                     , INTENT(in   ) :: kt                  ! current time step
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pstbl               ! salinity in tbl
-      !!--------------------------------------------------------------------
-      REAL(wp), DIMENSION(jpi,jpj) :: ztfrz                              ! tbl freezing temperature
+      REAL(dp), DIMENSION(jpi,jpj), INTENT(in   ) :: pstbl               ! salinity in tbl
+      !!--------------------------------------------------------------------
+      REAL(dp), DIMENSION(jpi,jpj) :: ztfrz                              ! tbl freezing temperature
       !!--------------------------------------------------------------------
       !
       ! Compute freezing temperature
-      CALL eos_fzp( pstbl(:,:), ztfrz(:,:), risfdep(:,:) )
+      CALL eos_fzp( pstbl(:,:), ztfrz(:,:), CASTDP(risfdep(:,:)) )
       !
       ! read input file
@@ -145,15 +146,15 @@
       !!
       !!-------------------------- OUT -------------------------------------
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! hean content, ocean-ice heat and fwf fluxes
-      !!-------------------------- IN  -------------------------------------
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pgt           ! temperature exchange coeficient
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pttbl, pstbl  ! temperature and salinity in top boundary layer
-      !!--------------------------------------------------------------------
-      REAL(wp), DIMENSION(jpi,jpj) :: ztfrz         ! freezing temperature
-      REAL(wp), DIMENSION(jpi,jpj) :: zthd          ! thermal driving
+      REAL(dp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! hean content, ocean-ice heat and fwf fluxes
+      !!-------------------------- IN  -------------------------------------
+      REAL(dp), DIMENSION(jpi,jpj), INTENT(in   ) :: pgt           ! temperature exchange coeficient
+      REAL(dp), DIMENSION(jpi,jpj), INTENT(in   ) :: pttbl, pstbl  ! temperature and salinity in top boundary layer
+      !!--------------------------------------------------------------------
+      REAL(dp), DIMENSION(jpi,jpj) :: ztfrz         ! freezing temperature
+      REAL(dp), DIMENSION(jpi,jpj) :: zthd          ! thermal driving
       !!--------------------------------------------------------------------
       !
       ! Calculate freezing temperature
-      CALL eos_fzp( pstbl(:,:), ztfrz(:,:), risfdep(:,:) )
+      CALL eos_fzp( pstbl(:,:), ztfrz(:,:), CASTDP(risfdep(:,:)) )
       !
       ! thermal driving
@@ -193,15 +194,15 @@
       !!
       !!-------------------------- OUT -------------------------------------
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! latent heat and fwf fluxes
-      !!-------------------------- IN  -------------------------------------
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pgt  , pgs          ! heat/salt exchange coeficient
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pttbl, pstbl        ! mean temperature and salinity in top boundary layer
-      !!--------------------------------------------------------------------
-      REAL(wp) :: zeps1,zeps2,zeps3,zeps4,zeps6,zeps7       ! dummy local scalar for quadratic equation resolution
-      REAL(wp) :: zaqe,zbqe,zcqe,zaqer,zdis,zsfrz,zcfac     ! dummy local scalar for quadratic equation resolution
-      REAL(wp) :: zeps = 1.e-20
-      REAL(wp), DIMENSION(jpi,jpj) :: ztfrz         ! freezing point
-      REAL(wp), DIMENSION(jpi,jpj) :: zqcon         ! conductive flux through the ice shelf
-      REAL(wp), DIMENSION(jpi,jpj) :: zthd          ! thermal driving
+      REAL(dp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! latent heat and fwf fluxes
+      !!-------------------------- IN  -------------------------------------
+      REAL(dp), DIMENSION(jpi,jpj), INTENT(in   ) :: pgt  , pgs          ! heat/salt exchange coeficient
+      REAL(dp), DIMENSION(jpi,jpj), INTENT(in   ) :: pttbl, pstbl        ! mean temperature and salinity in top boundary layer
+      !!--------------------------------------------------------------------
+      REAL(dp) :: zeps1,zeps2,zeps3,zeps4,zeps6,zeps7       ! dummy local scalar for quadratic equation resolution
+      REAL(dp) :: zaqe,zbqe,zcqe,zaqer,zdis,zsfrz,zcfac     ! dummy local scalar for quadratic equation resolution
+      REAL(dp) :: zeps = 1.e-20
+      REAL(dp), DIMENSION(jpi,jpj) :: ztfrz         ! freezing point
+      REAL(dp), DIMENSION(jpi,jpj) :: zqcon         ! conductive flux through the ice shelf
+      REAL(dp), DIMENSION(jpi,jpj) :: zthd          ! thermal driving
       !
       INTEGER  ::   ji, jj     ! dummy loop indices
@@ -268,16 +269,16 @@
       !!---------------------------------------------------------------------
       !!-------------------------- OUT -------------------------------------
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! heat content, latent heat and fwf fluxes
+      REAL(dp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! heat content, latent heat and fwf fluxes
       !!-------------------------- IN  -------------------------------------
       INTEGER                     , INTENT(in   ) :: kt                  ! current time step
-      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pstbl               ! salinity in tbl
-      !!--------------------------------------------------------------------
-      REAL(wp)                     :: zfwf_fld, zfwf_oasis               ! total fwf in the forcing fields (pattern) and from the oasis interface (amount)
-      REAL(wp), DIMENSION(jpi,jpj) :: ztfrz                              ! tbl freezing temperature
-      REAL(wp), DIMENSION(jpi,jpj) :: zfwf                               ! 2d fwf map after scaling
+      REAL(dp), DIMENSION(jpi,jpj), INTENT(in   ) :: pstbl               ! salinity in tbl
+      !!--------------------------------------------------------------------
+      REAL(dp)                     :: zfwf_fld, zfwf_oasis               ! total fwf in the forcing fields (pattern) and from the oasis interface (amount)
+      REAL(dp), DIMENSION(jpi,jpj) :: ztfrz                              ! tbl freezing temperature
+      REAL(dp), DIMENSION(jpi,jpj) :: zfwf                               ! 2d fwf map after scaling
       !!--------------------------------------------------------------------
       !
       ! Calculate freezing temperature
-      CALL eos_fzp( pstbl(:,:), ztfrz(:,:), risfdep(:,:) )
+      CALL eos_fzp( pstbl(:,:), ztfrz(:,:), CASTDP(risfdep(:,:)) )
       !
       ! read input file
