Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/diaobs.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/diaobs.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/diaobs.F90	(revision 15540)
@@ -88,5 +88,5 @@
    INTEGER , DIMENSION(:), ALLOCATABLE ::   nextrprof, nextrsurf   ! Number of profile & surface extra variables
    INTEGER , DIMENSION(:), ALLOCATABLE ::   n2dintsurf             ! Interpolation option for surface variables
-   REAL(wp), DIMENSION(:), ALLOCATABLE ::   zavglamscl, zavgphiscl ! E/W & N/S diameter of averaging footprint for surface variables
+   REAL(dp), DIMENSION(:), ALLOCATABLE ::   zavglamscl, zavgphiscl ! E/W & N/S diameter of averaging footprint for surface variables
    LOGICAL , DIMENSION(:), ALLOCATABLE ::   lfpindegs              ! T=> surface obs footprint size specified in degrees, F=> in metres
    LOGICAL , DIMENSION(:), ALLOCATABLE ::   llnightav              ! Logical for calculating night-time averages
@@ -169,7 +169,7 @@
       REAL(wp) :: ztype_avglamscl ! Local version of rn_*_avglamscl
       REAL(wp) :: ztype_avgphiscl ! Local version of rn_*_avgphiscl
-      REAL(wp), DIMENSION(:,:,:),   ALLOCATABLE :: zglam   ! Model longitudes for profile variables
-      REAL(wp), DIMENSION(:,:,:),   ALLOCATABLE :: zgphi   ! Model latitudes  for profile variables
-      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: zmask   ! Model land/sea mask associated with variables
+      REAL(dp), DIMENSION(:,:,:),   ALLOCATABLE :: zglam   ! Model longitudes for profile variables
+      REAL(dp), DIMENSION(:,:,:),   ALLOCATABLE :: zgphi   ! Model latitudes  for profile variables
+      REAL(dp), DIMENSION(:,:,:,:), ALLOCATABLE :: zmask   ! Model land/sea mask associated with variables
       !!
       NAMELIST/namobs/ln_diaobs, ln_t3d, ln_s3d, ln_sla,              &
@@ -628,15 +628,15 @@
       INTEGER :: jvar              ! Variable number
       INTEGER :: ji, jj, jk        ! Loop counters
-      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: &
+      REAL(dp), DIMENSION(:,:,:,:), ALLOCATABLE :: &
          & zprofvar                ! Model values for variables in a prof ob
-      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: &
+      REAL(dp), DIMENSION(:,:,:,:), ALLOCATABLE :: &
          & zprofmask               ! Mask associated with zprofvar
-      REAL(wp), DIMENSION(jpi,jpj) :: &
+      REAL(dp), DIMENSION(jpi,jpj) :: &
          & zsurfvar, &             ! Model values equivalent to surface ob.
          & zsurfmask               ! Mask associated with surface variable
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: &
+      REAL(dp), DIMENSION(:,:,:), ALLOCATABLE :: &
          & zglam,    &             ! Model longitudes for prof variables
          & zgphi                   ! Model latitudes for prof variables
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: zdept, zdepw
+      REAL(dp), DIMENSION(:,:,:), ALLOCATABLE :: zdept, zdepw
 
       !-----------------------------------------------------------------------
@@ -787,7 +787,8 @@
       INTEGER :: jtype                    ! Data set loop variable
       INTEGER :: jo, jvar, jk
-      REAL(wp), DIMENSION(:), ALLOCATABLE :: &
-         & zu, &
-         & zv
+      REAL(dp), DIMENSION(:), ALLOCATABLE ::  zu, zv
+
+
+
 
       !-----------------------------------------------------------------------
@@ -1083,6 +1084,7 @@
       INTEGER, DIMENSION(ntypes), INTENT(INOUT) :: &
          &                    n2dint 
-      REAL(wp), DIMENSION(ntypes), INTENT(INOUT) :: &
-         &                    ravglamscl, ravgphiscl
+      REAL(dp), DIMENSION(ntypes), INTENT(INOUT) ::  ravglamscl, ravgphiscl
+
+
       LOGICAL, DIMENSION(ntypes), INTENT(INOUT) :: &
          &                    lfpindegs, lavnight
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/grt_cir_dis.h90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/grt_cir_dis.h90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/grt_cir_dis.h90	(revision 15540)
@@ -5,5 +5,5 @@
    !!----------------------------------------------------------------------
 
-   REAL(KIND=wp) FUNCTION grt_cir_dis( pa1, pa2, pb1, pb2, pc1, pc2 )
+   REAL(KIND=dp) FUNCTION grt_cir_dis( pa1, pa2, pb1, pb2, pc1, pc2 )
       !!----------------------------------------------------------------------
       !!                     *** FUNCTION grt_cir_dis ***
@@ -21,12 +21,12 @@
       
       !! * Arguments
-      REAL(KIND=wp) :: pa1   !  sin(lat1)
-      REAL(KIND=wp) :: pa2   !  sin(lat2)
-      REAL(KIND=wp) :: pb1   !  cos(lat1) * cos(lon1)
-      REAL(KIND=wp) :: pb2   !  cos(lat2) * cos(lon2)
-      REAL(KIND=wp) :: pc1   !  cos(lat1) * sin(lon1)
-      REAL(KIND=wp) :: pc2   !  cos(lat2) * sin(lon2)
+      REAL(KIND=dp) :: pa1   !  sin(lat1)
+      REAL(KIND=dp) :: pa2   !  sin(lat2)
+      REAL(KIND=dp) :: pb1   !  cos(lat1) * cos(lon1)
+      REAL(KIND=dp) :: pb2   !  cos(lat2) * cos(lon2)
+      REAL(KIND=dp) :: pc1   !  cos(lat1) * sin(lon1)
+      REAL(KIND=dp) :: pc2   !  cos(lat2) * sin(lon2)
 
-      REAL(KIND=wp) :: cosdist ! cosine of great circle distance
+      REAL(KIND=dp) :: cosdist ! cosine of great circle distance
 
       ! Compute cosine of great circle distance, constraining it to be between
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/grt_cir_dis_saa.h90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/grt_cir_dis_saa.h90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/grt_cir_dis_saa.h90	(revision 15540)
@@ -5,5 +5,5 @@
    !!----------------------------------------------------------------------
 
-   REAL(KIND=wp) FUNCTION grt_cir_dis_saa( pa, pb, pc )
+   REAL(KIND=dp) FUNCTION grt_cir_dis_saa( pa, pb, pc )
       !!----------------------------------------------------------------------
       !!                     *** FUNCTION grt_cir_dis_saa ***
@@ -23,7 +23,7 @@
       
       !! * Arguments
-      REAL(KIND=wp) :: pa   !  lon1 - lon2
-      REAL(KIND=wp) :: pb   !  lat1 - lat2
-      REAL(KIND=wp) :: pc   !  cos(lat2)
+      REAL(KIND=dp) :: pa   !  lon1 - lon2
+      REAL(KIND=dp) :: pb   !  lat1 - lat2
+      REAL(KIND=dp) :: pc   !  cos(lat2)
 
       grt_cir_dis_saa = SQRT( pa * pa + ( pb * pc )**2 )
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/jul2greg.h90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/jul2greg.h90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/jul2greg.h90	(revision 15540)
@@ -52,7 +52,8 @@
          & iyea,    &
          & iref
-      REAL(KIND=wp) :: &
-         & zday, &
-         & zref
+      REAL(KIND=dp) ::  zday, zref
+
+
+
       CHARACTER(len=200) :: &
          & cerr
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/linquad.h90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/linquad.h90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/linquad.h90	(revision 15540)
@@ -24,15 +24,16 @@
 
       !! * Arguments
-      REAL(KIND=wp), INTENT(IN) :: px        ! (lon) of the point P(x,y) 
-      REAL(KIND=wp), INTENT(IN) :: py        ! (lat) of the point P(x,y)               
-      REAL(KIND=wp), DIMENSION(4), INTENT(IN) :: &
-         & pxv,  &                  ! (lon, lat) of the surrounding cell
-         & pyv                     
+      REAL(KIND=dp), INTENT(IN) :: px        ! (lon) of the point P(x,y) 
+      REAL(KIND=dp), INTENT(IN) :: py        ! (lat) of the point P(x,y)               
+      REAL(KIND=dp), DIMENSION(4), INTENT(IN) ::  pxv, pyv ! (lon, lat) of the surrounding cell
+
+
+
   
       !! * Local declarations
-      REAL(KIND=wp) :: zst1
-      REAL(KIND=wp) :: zst2
-      REAL(KIND=wp) :: zst3
-      REAL(KIND=wp) :: zst4
+      REAL(KIND=dp) :: zst1
+      REAL(KIND=dp) :: zst2
+      REAL(KIND=dp) :: zst3
+      REAL(KIND=dp) :: zst4
 
       !-----------------------------------------------------------------------
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/maxdist.h90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/maxdist.h90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/maxdist.h90	(revision 15540)
@@ -5,5 +5,5 @@
    !!----------------------------------------------------------------------
 
-   REAL(wp) FUNCTION maxdist( pxv, pyv )
+   REAL(dp) FUNCTION maxdist( pxv, pyv )
       !!----------------------------------------------------------------------
       !!                    ***  FUNCTION maxdist ***
@@ -27,11 +27,12 @@
 
       !! * Local declarations
-      REAL(KIND=wp), DIMENSION(4) :: &
-          &  zxv, &
-          &  zyv, &
-          &  za,  &
-          &  zb,  &
-          &  zc
-      REAL(KIND=wp) :: zdist
+      REAL(KIND=dp), DIMENSION(4) ::  zxv, zyv, za, zb, zc
+
+
+
+
+
+
+      REAL(KIND=dp) :: zdist
       
       INTEGER :: ji
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_averg_h2d.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_averg_h2d.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_averg_h2d.F90	(revision 15540)
@@ -82,21 +82,21 @@
          & kmaxjfp,  &          ! Max size of model points in j-direction for obs footprint
          & k2dint               ! Averaging scheme options - see header
-      REAL(KIND=wp), INTENT(INOUT) :: &
+      REAL(KIND=dp), INTENT(INOUT) :: &
          & plam, &              ! Geographical (lat,lon) coordinates of
          & pphi                 ! observation
-      REAL(KIND=wp), DIMENSION(kmaxifp,kmaxjfp), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kmaxifp,kmaxjfp), INTENT(IN) :: &
          & pglam, &             ! Model variable lon
          & pgphi                ! Model variable lat
-      REAL(KIND=wp), DIMENSION(kmaxifp+1,kmaxjfp+1), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kmaxifp+1,kmaxjfp+1), INTENT(IN) :: &
          & pglamf, &            ! Model variable lon at corners of grid-boxes
          & pgphif               ! Model variable lat at corners of grid-boxes
-      REAL(KIND=wp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(IN) :: &
          & pmask                ! Model variable mask
-      REAL(KIND=wp), INTENT(IN) :: &
+      REAL(KIND=dp), INTENT(IN) :: &
          & plamscl, &           ! Diameter (lat,lon) of obs footprint in metres
          & pphiscl              ! This is the full width (rather than half-width)
       LOGICAL, INTENT(IN) :: &
          & lindegrees           ! T=> obs footprint specified in degrees, F=> in metres
-      REAL(KIND=wp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(OUT) ::  &
+      REAL(KIND=dp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(OUT) ::  &
          & pweig                ! Weights for averaging
       INTEGER, INTENT(IN), OPTIONAL :: &
@@ -170,22 +170,23 @@
          & kmaxjfp              ! Max size of model points in j-direction for obs footprint
 
-      REAL(KIND=wp), INTENT(IN) :: &
-         & plam, &
-         & pphi                 ! Geographical (lat,lon) coordinates of
+      REAL(KIND=dp), INTENT(IN) ::  plam, pphi
+
+
+
                                 ! observation
-      REAL(KIND=wp), INTENT(IN) :: &
+      REAL(KIND=dp), INTENT(IN) :: &
          & plamscl, &           ! Diameter (lat,lon) of obs footprint in metres or degrees (see below)
          & pphiscl              ! This is the full width (rather than half-width)
       LOGICAL, INTENT(IN) :: &
          & lindegrees           ! T=>scales specified in degrees, F=> in metres
-      REAL(KIND=wp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(IN) :: &
          & pmask                ! Model variable mask
-      REAL(KIND=wp), DIMENSION(kmaxifp,kmaxjfp), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kmaxifp,kmaxjfp), INTENT(IN) :: &
          & pglam, &             ! Model variable lon
          & pgphi                ! Model variable lat
-      REAL(KIND=wp), DIMENSION(kmaxifp+1,kmaxjfp+1), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kmaxifp+1,kmaxjfp+1), INTENT(IN) :: &
          & pglamf, &             ! Model variable lon at corners of grid boxes
          & pgphif                ! Model variable lat at corners of grid boxes
-      REAL(KIND=wp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(OUT) ::  &
+      REAL(KIND=dp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(OUT) ::  &
          & pweig                ! Weights for interpolation
 
@@ -197,11 +198,11 @@
          & jnumsubgrid = 20     ! The number of sub grid-boxes (in x and y directions) used to approximate area of obs fp
 
-      REAL(KIND=wp), DIMENSION(4) :: &
+      REAL(KIND=dp), DIMENSION(4) :: &
          & zxvert, zyvert, &    ! The lon/lat of the vertices(corners) of the grid box in m relative to centre of obs fp
          & zdist                ! Distance of each vertex to the centre of the obs footprint
-      REAL(KIND=wp), DIMENSION(4) :: &
+      REAL(KIND=dp), DIMENSION(4) :: &
          & zxgrid, zygrid, &      ! Distance of each vertex of grid box to the centre of the grid box in x/y directions
          & zdgrid
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zdx, zdy, &          ! The sub grid-box sizes (in metres)
          & zarea_subbox, &      ! The area of each sub grid-box (in metres squared)
@@ -210,5 +211,5 @@
          & zarea_fp, &          ! Total area of obs footprint within the grid box
          & zareabox             ! Total area of the grid box
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zphiscl_m, &         ! Diameter of obs footprint in metres
          & zlamscl_m
@@ -353,23 +354,25 @@
          & kmaxjfp              ! Max size of model points in j-direction for obs footprint
 
-      REAL(KIND=wp), INTENT(IN) :: &
-         & plam, &
-         & pphi                 ! Geographical (lat,lon) coordinates of
+      REAL(KIND=dp), INTENT(IN) ::  plam, pphi ! Geographical (lat,lon) coordinates of
+
+
+
                                 ! observation
-      REAL(KIND=wp), INTENT(IN) :: &
-         & plamscl, &
-         & pphiscl              ! Width in x/y directions of obs footprint in metres
+      REAL(KIND=dp), INTENT(IN) ::  plamscl, pphiscl  ! Width in x/y directions of obs footprint in metres
+
+
+
                                 ! This is the full width (rather than half-width)
       LOGICAL, INTENT(IN) :: &
          & lindegrees           !T=> scales specified in degrees, F=> in metres
-      REAL(KIND=wp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(IN) :: &
          & pmask                ! Model variable mask
-      REAL(KIND=wp), DIMENSION(kmaxifp,kmaxjfp), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kmaxifp,kmaxjfp), INTENT(IN) :: &
          & pglam, &             ! Model variable lat at centre of grid boxes
          & pgphi                ! Model variable lon at centre of grid boxes
-      REAL(KIND=wp), DIMENSION(kmaxifp+1,kmaxjfp+1), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kmaxifp+1,kmaxjfp+1), INTENT(IN) :: &
          & pglamf, &             ! Model variable lat at corners of grid boxes
          & pgphif                ! Model variable lon at corners of grid boxes
-      REAL(KIND=wp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(OUT) ::  &
+      REAL(KIND=dp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(OUT) ::  &
          & pweig                ! Weights for interpolation
 
@@ -379,22 +382,22 @@
       INTEGER, DIMENSION(4) :: &
          & jnumvert
-      REAL(KIND=wp), DIMENSION(4) :: &
+      REAL(KIND=dp), DIMENSION(4) :: &
          & zxvert, zyvert         ! The lon/lat of the vertices(corners) of the grid box in m relative to centre of obs fp
-      REAL(KIND=wp), DIMENSION(4) :: &
+      REAL(KIND=dp), DIMENSION(4) :: &
          & zdist                  ! Distance of each vertex to the centre of the obs footprint
-      REAL(KIND=wp), DIMENSION(4) :: &
+      REAL(KIND=dp), DIMENSION(4) :: &
          & zxgrid, zygrid, &      ! Distance of each vertex of grid box to the centre of the grid box in x/y directions
          & zdgrid
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zareabox, &            ! Total area of grid box
          & zarea_fp, &            ! Total area of obs footprint
          & zarea_intersect        ! Area of the intersection between the grid box and the obs footprint
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zlamscl_m, &
          & zphiscl_m              ! Total width (lat,lon) of obs footprint in metres
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & z_awidth, z_aheight, & ! Width and height of model grid box
          & z_cwidth, z_cheight    ! Width and height of union of model grid box and obs footprint
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zleft, zright, &       ! Distance (metres) of corners area of intersection
          & ztop, zbottom          ! between grid box and obs footprint
@@ -507,9 +510,9 @@
          & kmaxifp,   &         ! Max size of model points in i-direction for obs footprint
          & kmaxjfp              ! Max size of model points in j-direction for obs footprint
-      REAL(KIND=wp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(IN) :: &
          & pweig                ! Interpolation weights
-      REAL(KIND=wp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kmaxifp,kmaxjfp,kpk2), INTENT(IN) :: &
          & pmod                 ! Model variable to interpolate
-      REAL(KIND=wp), DIMENSION(kpk2), INTENT(OUT) ::  &
+      REAL(KIND=dp), DIMENSION(kpk2), INTENT(OUT) ::  &
          & pobsk                ! Model profile interpolated to obs (i,j) pt
 
@@ -518,6 +521,7 @@
       INTEGER :: &
          & ikmax
-      REAL(KIND=wp) :: &
-         & zsum
+      REAL(KIND=dp) ::  zsum
+
+
 
       !------------------------------------------------------------------------
@@ -574,10 +578,10 @@
       INTEGER , INTENT(IN) :: &
          & k2dint                   !Type of interpolation/averaging used
-      REAL(KIND=wp), INTENT(IN) :: &
+      REAL(KIND=dp), INTENT(IN) :: &
          & plamscl,   &             !Total width/radius in metres of the observation footprint
          & pphiscl                  !
       LOGICAL, INTENT(IN) :: &
          & lindegrees               !T=> plamscl and pphiscl are specified in degrees
-      REAL(KIND=wp), DIMENSION(jpi,jpj), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(jpi,jpj), INTENT(IN) :: &
          & pmask                    !Land/sea mask
                                     !F=> plamscl and pphiscl are specified in metres
@@ -587,8 +591,8 @@
 
       !! * Local variables
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & ze1min,     &            !Minimum global grid-size in i,j directions
          & ze2min
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zphiscl_m, &
          & zlamscl_m
@@ -605,5 +609,5 @@
             !If the scales are specified in degrees, work out the max 
             !distance (metres) in x/y directions
-            CALL obs_deg2dist( jpi, jpj, CASTWP(glamt), CASTWP(gphit), &
+            CALL obs_deg2dist( jpi, jpj, glamt, gphit, &
                &               plamscl, pphiscl, zlamscl_m, zphiscl_m )
          ELSE
@@ -655,10 +659,10 @@
       INTEGER , INTENT(IN) :: &
          & ki, kj                   !x/y dimensions of input lat/lon variables
-      REAL(KIND=wp), INTENT(IN), DIMENSION(ki,kj) :: &
+      REAL(KIND=dp), INTENT(IN), DIMENSION(ki,kj) :: &
          & pglam, pgphi             !Longitude and latitudes of grid points
-      REAL(KIND=wp), INTENT(IN) :: &
+      REAL(KIND=dp), INTENT(IN) :: &
          & plamscl_deg,   &         !Size in degrees of the observation footprint
          & pphiscl_deg              !
-      REAL(KIND=wp), INTENT(OUT) :: &
+      REAL(KIND=dp), INTENT(OUT) :: &
          & plamscl_max, &           !Maximum size of obs footprint in metres
          & pphiscl_max
@@ -667,9 +671,9 @@
       INTEGER :: &
          & ji, jj                   !Counters
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zlon1, zlon2, &          !Lon values surrounding centre of grid point
          & zlat1, zlat2, &          !Lat values surrounding centre of grid point
          & zdlat, zdlon             !Distance in radians in lat/lon directions
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & za1, za2, za, zc, zd
       
@@ -740,15 +744,15 @@
       !! * Modules used
       !! * Arguments
-         REAL(KIND=wp), INTENT(IN) :: &
+         REAL(KIND=dp), INTENT(IN) :: &
             &  pglam_bl, pglam_br, &       !lon at corners of grid box
             &  pglam_tl, pglam_tr
-         REAL(KIND=wp), INTENT(IN) :: &
+         REAL(KIND=dp), INTENT(IN) :: &
             &  pgphi_bl, pgphi_br, &       !lat at corners of grid box
             &  pgphi_tl, pgphi_tr
-         REAL(KIND=wp), INTENT(IN) :: &
+         REAL(KIND=dp), INTENT(IN) :: &
             &  pphi, plam                  !lat/lon of centre of obs footprint
-         REAL(KIND=wp), DIMENSION(4), INTENT(OUT) :: &
+         REAL(KIND=dp), DIMENSION(4), INTENT(OUT) :: &
             &  pxvert, pyvert              !x/y location (in metres relative to centre of obs footprint) of corners
-         REAL(KIND=wp), DIMENSION(4), INTENT(OUT) :: &
+         REAL(KIND=dp), DIMENSION(4), INTENT(OUT) :: &
             &  pdist                       !distance (in metres) of each corner relative to centre of obs footprint
 
@@ -756,11 +760,11 @@
          INTEGER :: &
             &  jvert                       !Counter for corners
-         REAL(KIND=wp) :: &
+         REAL(KIND=dp) :: &
             &  zphi, zlam                  !Local values for lon/lat of corners
-         REAL(KIND=wp) :: & 
+         REAL(KIND=dp) :: & 
             &  za1, za2,  &                !For great circle distance calculations
             &  zb1, zb2,  &
             &  zc1, zc2
-         REAL(KIND=wp) :: &
+         REAL(KIND=dp) :: &
             &  zdist_centre_lat, &         !Distances in lat/lon directions (in metres)
             &  zdist_centre_lon
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_conv.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_conv.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_conv.F90	(revision 15540)
@@ -20,5 +20,5 @@
    !! * Modules used
    USE par_kind, ONLY : & ! Precision variables
-      & wp   
+      & dp, wp   
    IMPLICIT NONE
  
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_conv_functions.h90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_conv_functions.h90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_conv_functions.h90	(revision 15540)
@@ -5,5 +5,5 @@
    !!----------------------------------------------------------------------
 
-  REAL(KIND=wp) FUNCTION potemp( ps, pt, pp, ppr )
+  REAL(KIND=dp) FUNCTION potemp( ps, pt, pp, ppr )
       !!----------------------------------------------------------------------
       !!                    ***  FUNCTION potemp  ***
@@ -32,16 +32,16 @@
       REAL(KIND=wp), INTENT(IN) :: ps
       REAL(KIND=wp), INTENT(IN) :: pt
-      REAL(KIND=wp), INTENT(IN) :: pp
+      REAL(KIND=dp), INTENT(IN) :: pp
       REAL(KIND=wp), INTENT(IN) :: ppr
 
       !! * Local declarations
-      REAL(KIND=wp) :: zpol
-      REAL(KIND=wp), PARAMETER :: a1 =  1.067610e-05
-      REAL(KIND=wp), PARAMETER :: a2 = -1.434297e-06
-      REAL(KIND=wp), PARAMETER :: a3 = -7.566349e-09
-      REAL(KIND=wp), PARAMETER :: a4 = -8.535585e-06
-      REAL(KIND=wp), PARAMETER :: a5 =  3.074672e-08
-      REAL(KIND=wp), PARAMETER :: a6 =  1.918639e-08
-      REAL(KIND=wp), PARAMETER :: a7 =  1.788718e-10
+      REAL(KIND=dp) :: zpol
+      REAL(KIND=dp), PARAMETER :: a1 =  1.067610e-05
+      REAL(KIND=dp), PARAMETER :: a2 = -1.434297e-06
+      REAL(KIND=dp), PARAMETER :: a3 = -7.566349e-09
+      REAL(KIND=dp), PARAMETER :: a4 = -8.535585e-06
+      REAL(KIND=dp), PARAMETER :: a5 =  3.074672e-08
+      REAL(KIND=dp), PARAMETER :: a6 =  1.918639e-08
+      REAL(KIND=dp), PARAMETER :: a7 =  1.788718e-10
 
       zpol = a1 + a2 * ps + a3 * ( pp + ppr ) + a4 * pt &
@@ -52,5 +52,5 @@
    END FUNCTION potemp
 
-   REAL(KIND=wp) FUNCTION fspott( pft, pfs, pfp )
+   REAL(KIND=dp) FUNCTION fspott( pft, pfs, pfp )
       !!----------------------------------------------------------------------
       !!                    ***  FUNCTION fspott  ***
@@ -71,7 +71,7 @@
 
       !! * Arguments
-      REAL(KIND=wp) :: pft   ! in situ temperature in degrees Celsius
-      REAL(KIND=wp) :: pfs   ! salinity in psu
-      REAL(KIND=wp) :: pfp   ! pressure in bars
+      REAL(KIND=dp) :: pft   ! in situ temperature in degrees Celsius
+      REAL(KIND=dp) :: pfs   ! salinity in psu
+      REAL(KIND=dp) :: pfp   ! pressure in bars
       
       fspott = &
@@ -91,5 +91,5 @@
    END FUNCTION fspott
 
-   REAL(KIND=wp) FUNCTION atg( p_s, p_t, p_p )
+   REAL(KIND=dp) FUNCTION atg( p_s, p_t, p_p )
       !!----------------------------------------------------------------------
       !!                    ***  FUNCTION atg  ***
@@ -115,10 +115,10 @@
 
       REAL(KIND=wp), INTENT(IN) :: p_s    ! Salinity in PSU
-      REAL(KIND=wp), INTENT(IN) :: p_t    ! Temperature in centigrades
-      REAL(KIND=wp), INTENT(IN) :: p_p    ! Pressure in decibars.
-
-      !! * Local declarations
-      
-      REAL(KIND=wp) :: z_ds
+      REAL(KIND=dp), INTENT(IN) :: p_t    ! Temperature in centigrades
+      REAL(KIND=dp), INTENT(IN) :: p_p    ! Pressure in decibars.
+
+      !! * Local declarations
+      
+      REAL(KIND=dp) :: z_ds
 
       z_ds = p_s - 35.0
@@ -131,5 +131,5 @@
    END FUNCTION atg
       
-   REAL(KIND=wp) FUNCTION theta( p_s, p_t0, p_p0, p_pr )
+   REAL(KIND=dp) FUNCTION theta( p_s, p_t0, p_p0, p_pr )
       !!----------------------------------------------------------------------
       !!                    ***  FUNCTION theta  ***
@@ -159,9 +159,9 @@
 
       !! * Local declarations
-      REAL(KIND=wp) :: z_p
-      REAL(KIND=wp) :: z_t
-      REAL(KIND=wp) :: z_h
-      REAL(KIND=wp) :: z_xk
-      REAL(KIND=wp) :: z_q
+      REAL(KIND=dp) :: z_p
+      REAL(KIND=dp) :: z_t
+      REAL(KIND=dp) :: z_h
+      REAL(KIND=dp) :: z_xk
+      REAL(KIND=dp) :: z_q
 
       z_p = p_p0
@@ -184,5 +184,5 @@
    END FUNCTION theta
 
-   REAL(KIND=wp) FUNCTION depth( p_p, p_lat )
+   REAL(KIND=dp) FUNCTION depth( p_p, p_lat )
       !!----------------------------------------------------------------------
       !!                    ***  FUNCTION depth  ***
@@ -210,6 +210,6 @@
 
       !! * Local declarations
-      REAL(KIND=wp) :: z_x
-      REAL(KIND=wp) :: z_gr
+      REAL(KIND=dp) :: z_x
+      REAL(KIND=dp) :: z_gr
       
       z_x = SIN( p_lat / 57.29578 )
@@ -221,5 +221,5 @@
    END FUNCTION depth
 
-   REAL(KIND=wp) FUNCTION p_to_dep( p_p, p_lat )
+   REAL(KIND=dp) FUNCTION p_to_dep( p_p, p_lat )
       !!----------------------------------------------------------------------
       !!                    ***  FUNCTION p_to_dep  ***
@@ -245,7 +245,7 @@
 
       !! * Local declarations
-      REAL(KIND=wp) :: z_x
-      REAL(KIND=wp) :: z_c1
-      REAL(KIND=wp) :: z_c2
+      REAL(KIND=dp) :: z_x
+      REAL(KIND=dp) :: z_c1
+      REAL(KIND=dp) :: z_c2
 
       z_x = SIN( p_lat / 57.29578 )
@@ -257,5 +257,5 @@
    END FUNCTION p_to_dep
 
-   REAL(KIND=wp) FUNCTION dep_to_p( p_dep, p_lat )
+   REAL(KIND=dp) FUNCTION dep_to_p( p_dep, p_lat )
       !!----------------------------------------------------------------------
       !!                    ***  FUNCTION dep_to_p  ***
@@ -280,8 +280,8 @@
 
       !! * Local declarations
-      REAL(KIND=wp) :: z_x
-      REAL(KIND=wp) :: z_c1
-      REAL(KIND=wp) :: z_c2
-      REAL(KIND=wp) :: z_d
+      REAL(KIND=dp) :: z_x
+      REAL(KIND=dp) :: z_c1
+      REAL(KIND=dp) :: z_c2
+      REAL(KIND=dp) :: z_d
 
       z_x = SIN( p_lat / 57.29578 )
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_grd_bruteforce.h90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_grd_bruteforce.h90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_grd_bruteforce.h90	(revision 15540)
@@ -34,10 +34,10 @@
       INTEGER, INTENT(IN) :: kmyproc            ! Processor number for MPP
       INTEGER, INTENT(IN) :: ktotproc           ! Total number of processors
-      REAL(KIND=wp), DIMENSION(kpi,kpj), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kpi,kpj), INTENT(IN) :: &
          & pglam,   &               ! Grid point longitude
          & pgphi,   &               ! Grid point latitude
          & pmask                    ! Grid point mask
       INTEGER,INTENT(IN) :: kobs                ! Size of the observation arrays
-      REAL(KIND=wp), DIMENSION(kobs), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kobs), INTENT(IN) :: &
          & plam, &                  ! Longitude of obsrvations 
          & pphi                     ! Latitude of observations
@@ -48,8 +48,7 @@
   
       !! * Local declarations
-      REAL(wp), DIMENSION(:), ALLOCATABLE :: &
-         & zplam, zpphi
-      REAL(wp) :: zlammax
-      REAL(wp) :: zlam
+      REAL(dp), DIMENSION(:), ALLOCATABLE ::  zplam, zpphi
+      REAL(dp) :: zlammax
+      REAL(dp) :: zlam
       INTEGER :: ji
       INTEGER :: jj
@@ -60,5 +59,5 @@
       INTEGER :: joffset
       INTEGER :: jostride
-      REAL(KIND=wp), DIMENSION(:,:), ALLOCATABLE :: &
+      REAL(KIND=dp), DIMENSION(:,:), ALLOCATABLE :: &
          & zlamg, &
          & zphig, &
@@ -70,5 +69,5 @@
       LOGICAL, DIMENSION(:,:), ALLOCATABLE :: &
          & llinvalidcell
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: &
+      REAL(dp), DIMENSION(:,:,:), ALLOCATABLE :: &
          & zlamtm,  &
          & zphitm
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_grid.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_grid.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_grid.F90	(revision 15540)
@@ -55,15 +55,15 @@
    INTEGER, PRIVATE :: gsearch_nlons_def    ! Num of longitudes
    INTEGER, PRIVATE :: gsearch_nlats_def    ! Num of latitudes
-   REAL(wp), PRIVATE :: gsearch_lonmin_def  ! Min longitude
-   REAL(wp), PRIVATE :: gsearch_latmin_def  ! Min latitude
-   REAL(wp), PRIVATE :: gsearch_dlon_def    ! Lon spacing
-   REAL(wp), PRIVATE :: gsearch_dlat_def    ! Lat spacing
+   REAL(dp), PRIVATE :: gsearch_lonmin_def  ! Min longitude
+   REAL(dp), PRIVATE :: gsearch_latmin_def  ! Min latitude
+   REAL(dp), PRIVATE :: gsearch_dlon_def    ! Lon spacing
+   REAL(dp), PRIVATE :: gsearch_dlat_def    ! Lat spacing
    !! Variable versions
    INTEGER, PRIVATE :: nlons     ! Num of longitudes
    INTEGER, PRIVATE :: nlats     ! Num of latitudes
-   REAL(wp), PRIVATE :: lonmin ! Min longitude
-   REAL(wp), PRIVATE :: latmin ! Min latitude
-   REAL(wp), PRIVATE :: dlon     ! Lon spacing
-   REAL(wp), PRIVATE :: dlat     ! Lat spacing
+   REAL(dp), PRIVATE :: lonmin ! Min longitude
+   REAL(dp), PRIVATE :: latmin ! Min latitude
+   REAL(dp), PRIVATE :: dlon     ! Lon spacing
+   REAL(dp), PRIVATE :: dlat     ! Lat spacing
    
    INTEGER, PRIVATE :: maxxdiff, maxydiff ! Max diffs between model points
@@ -71,7 +71,8 @@
    
    ! Data storage
-   REAL(wp), PRIVATE, DIMENSION(:,:), ALLOCATABLE :: &
-      & lons,  &
-      & lats
+   REAL(dp), PRIVATE, DIMENSION(:,:), ALLOCATABLE ::  lons, lats
+
+
+
    INTEGER, PRIVATE, DIMENSION(:,:), ALLOCATABLE :: &
       & ixpos, &
@@ -115,5 +116,5 @@
       INTEGER :: &
          & kobsin                     ! Size of the observation arrays
-      REAL(KIND=wp), DIMENSION(kobsin), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kobsin), INTENT(IN) :: &
          & plam, &                  ! Longitude of obsrvations 
          & pphi                     ! Latitude of observations
@@ -135,5 +136,5 @@
                   &                             1, jpi, 1, jpj,           &
                   &                             narea-1, jpnij,           &
-                  &                             CASTWP(glamt), CASTWP(gphit), tmask,      &
+                  &                             glamt, gphit, tmask,      &
                   &                             kobsin, plam, pphi,       &
                   &                             kobsi, kobsj, kproc )
@@ -156,5 +157,5 @@
                   &                             1, jpi, 1, jpj,           &
                   &                             narea-1, jpnij,           &
-                  &                             CASTWP(glamf), CASTWP(gphif), fmask,      &
+                  &                             glamf, gphif, fmask,      &
                   &                             kobsin, plam, pphi,       &
                   &                             kobsi, kobsj, kproc )
@@ -190,5 +191,5 @@
       !! * Arguments
       INTEGER :: kobs                     ! Size of the observation arrays
-      REAL(KIND=wp), DIMENSION(kobs), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kobs), INTENT(IN) :: &
          & plam, &                  ! Longitude of obsrvations 
          & pphi                     ! Latitude of observations
@@ -199,8 +200,7 @@
   
       !! * Local declarations
-      REAL(KIND=wp), DIMENSION(:), ALLOCATABLE :: &
-         & zplam
-      REAL(wp) :: zlammax
-      REAL(wp) :: zlam
+      REAL(KIND=dp), DIMENSION(:), ALLOCATABLE ::  zplam
+      REAL(dp) :: zlammax
+      REAL(dp) :: zlam
       INTEGER :: ji
       INTEGER :: jj
@@ -228,5 +228,5 @@
       INTEGER :: joffset
       INTEGER :: jostride
-      REAL(KIND=wp), DIMENSION(:,:), ALLOCATABLE :: &
+      REAL(KIND=dp), DIMENSION(:,:), ALLOCATABLE :: &
          & zlamg, &
          & zphig, &
@@ -238,5 +238,5 @@
       LOGICAL, DIMENSION(:,:), ALLOCATABLE :: &
          & llinvalidcell
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: &
+      REAL(dp), DIMENSION(:,:,:), ALLOCATABLE :: &
          & zlamtm,  &
          & zphitm
@@ -669,13 +669,11 @@
       INTEGER, DIMENSION(2) :: incdim
       CHARACTER(LEN=20) :: datestr=" ",timestr=" "
-      REAL(wp) :: tmpx1, tmpx2, tmpy1, tmpy2
-      REAL(wp) :: meanxdiff, meanydiff
-      REAL(wp) :: meanxdiff1, meanydiff1
-      REAL(wp) :: meanxdiff2, meanydiff2
+      REAL(dp) :: tmpx1, tmpx2, tmpy1, tmpy2
+      REAL(dp) :: meanxdiff, meanydiff
+      REAL(dp) :: meanxdiff1, meanydiff1
+      REAL(dp) :: meanxdiff2, meanydiff2
       INTEGER :: numx1, numx2, numy1, numy2, df
       INTEGER :: jimin, jimax, jjmin, jjmax
-      REAL(wp), DIMENSION(:,:), ALLOCATABLE :: &
-         & lonsi,     &
-         & latsi
+      REAL(dp), DIMENSION(:,:), ALLOCATABLE ::  lonsi, latsi
       INTEGER, DIMENSION(:,:), ALLOCATABLE :: &  
          & ixposi,    &
@@ -685,7 +683,7 @@
       INTEGER, DIMENSION(histsize) :: &
          & histx1, histx2, histy1, histy2
-      REAL(wp), DIMENSION(histsize) :: &
+      REAL(dp), DIMENSION(histsize) :: &
          & fhistx1, fhistx2, fhisty1, fhisty2
-      REAL(wp) :: histtol
+      REAL(dp) :: histtol
       CHARACTER(LEN=26) :: clfmt            ! writing format
       INTEGER           :: idg              ! number of digits
@@ -825,5 +823,5 @@
                &                     1, jpi, 1, jpj,            &
                &                     narea-1, jpnij,            &
-               &                     CASTWP(glamt), CASTWP(gphit), tmask,       &
+               &                     glamt, gphit, tmask,       &
                &                     nlons*nlats, lonsi, latsi, &
                &                     ixposi, iyposi, iproci )
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_inter_sup.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_inter_sup.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_inter_sup.F90	(revision 15540)
@@ -64,7 +64,7 @@
       INTEGER, OPTIONAL, DIMENSION(kptsi,kptsj,kobs), INTENT(IN) :: &
          & kproc            ! Precomputed processor for each i,j,iobs points
-      REAL(KIND=wp), DIMENSION(kpi,kpj,kpk), INTENT(IN) ::&
+      REAL(KIND=dp), DIMENSION(kpi,kpj,kpk), INTENT(IN) ::&
          & pval             ! Local 3D array to extract data from
-      REAL(KIND=wp), DIMENSION(kptsi,kptsj,kpk,kobs), INTENT(OUT) ::&
+      REAL(KIND=dp), DIMENSION(kptsi,kptsj,kpk,kobs), INTENT(OUT) ::&
          & pgval            ! Stencil at each point
       !! * Local declarations
@@ -119,12 +119,11 @@
       INTEGER, OPTIONAL, DIMENSION(kptsi,kptsj,kobs), INTENT(IN) :: &
          & kproc            ! Precomputed processor for each i,j,iobs points
-      REAL(KIND=wp), DIMENSION(kpi,kpj), INTENT(IN) ::&
+      REAL(KIND=dp), DIMENSION(kpi,kpj), INTENT(IN) ::&
          & pval             ! Local 3D array to extra data from
-      REAL(KIND=wp), DIMENSION(kptsi,kptsj,kobs), INTENT(OUT) ::&
+      REAL(KIND=dp), DIMENSION(kptsi,kptsj,kobs), INTENT(OUT) ::&
          & pgval            ! Stencil at each point
       !! * Local declarations
-      REAL(KIND=wp), DIMENSION(jpi,jpj,1) ::   zval
-      REAL(KIND=wp), DIMENSION(kptsi,kptsj,1,kobs) ::&
-         & zgval 
+      REAL(KIND=dp), DIMENSION(jpi,jpj,1) ::   zval
+      REAL(KIND=dp), DIMENSION(kptsi,kptsj,1,kobs) ::  zgval
 
       ! Set up local "3D" buffer
@@ -179,10 +178,10 @@
       INTEGER, OPTIONAL, DIMENSION(kptsi,kptsj,kobs), INTENT(IN) :: &
          & kproc            ! Precomputed processor for each i,j,iobs points
-      REAL(KIND=wp), DIMENSION(kpi,kpj,kpk), INTENT(IN) ::&
+      REAL(KIND=dp), DIMENSION(kpi,kpj,kpk), INTENT(IN) ::&
          & pval             ! Local 3D array to extract data from
-      REAL(KIND=wp), DIMENSION(kptsi,kptsj,kpk,kobs), INTENT(OUT) ::&
+      REAL(KIND=dp), DIMENSION(kptsi,kptsj,kpk,kobs), INTENT(OUT) ::&
          & pgval            ! Stencil at each point
       !! * Local declarations
-      REAL(KIND=wp), DIMENSION(:,:), ALLOCATABLE :: &
+      REAL(KIND=dp), DIMENSION(:,:), ALLOCATABLE :: &
          & zsend, &
          & zrecv
@@ -348,7 +347,7 @@
          & kgrdi, &         ! i,j indicies for each stencil
          & kgrdj
-      REAL(KIND=wp), DIMENSION(kpi,kpj,kpk), INTENT(IN) ::&
+      REAL(KIND=dp), DIMENSION(kpi,kpj,kpk), INTENT(IN) ::&
          & pval             ! Local 3D array to extract data from
-      REAL(KIND=wp), DIMENSION(kptsi,kptsj,kpk,kobs), INTENT(OUT) ::&
+      REAL(KIND=dp), DIMENSION(kptsi,kptsj,kpk,kobs), INTENT(OUT) ::&
          & pgval            ! Stencil at each point
       !! * Local declarations
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_inter_z1d.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_inter_z1d.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_inter_z1d.F90	(revision 15540)
@@ -13,5 +13,5 @@
    !! * Modules used
    USE par_kind, ONLY : &  ! Precision variables
-      & wp
+      & dp, wp
 
    IMPLICIT NONE
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_level_search.h90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_level_search.h90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_level_search.h90	(revision 15540)
@@ -25,9 +25,9 @@
       !! * Arguments
       INTEGER, INTENT(IN) :: kgrd     ! Number of gridpoints
-      REAL(KIND=wp), DIMENSION(kgrd), INTENT(INOUT) :: &
+      REAL(KIND=dp), DIMENSION(kgrd), INTENT(INOUT) :: &
          &   pgrddep  ! Depths of gridpoints
       INTEGER, INTENT(IN) :: &
          &   kobs     ! Number of observations
-      REAL(KIND=wp), DIMENSION(kobs), INTENT(INOUT) :: &
+      REAL(KIND=dp), DIMENSION(kobs), INTENT(INOUT) :: &
          &   pobsdep  ! Depths of observations
       INTEGER ,DIMENSION(kobs), INTENT(OUT) :: &
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_mpp.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_mpp.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_mpp.F90	(revision 15540)
@@ -265,12 +265,12 @@
       !! References : http://www.mpi-forum.org
       !!----------------------------------------------------------------------
-      REAL(KIND=wp), DIMENSION(jpiglo,jpjglo), INTENT(inout) ::   pval
-      !
-      INTEGER :: ierr
-      !
-#if ! defined key_mpi_off
-      !
-INCLUDE 'mpif.h'
-      REAL(KIND=wp), DIMENSION(:,:), ALLOCATABLE ::   zcp
+      REAL(KIND=dp), DIMENSION(jpiglo,jpjglo), INTENT(inout) ::   pval
+      !
+      INTEGER :: ierr
+      !
+#if ! defined key_mpi_off
+      !
+      REAL(KIND=dp), DIMENSION(:,:), ALLOCATABLE ::   zcp
+INCLUDE 'mpif.h'
       !!----------------------------------------------------------------------
 
@@ -361,6 +361,6 @@
 #if ! defined key_mpi_off
       !
-INCLUDE 'mpif.h'
       INTEGER, DIMENSION(jpnij) ::   irdsp, isdsp
+INCLUDE 'mpif.h'
       !-----------------------------------------------------------------------
       ! Compute displacements
@@ -405,6 +405,6 @@
       INTEGER                    , INTENT(in   ) :: knoout
       INTEGER , DIMENSION(jpnij) , INTENT(in   ) ::   kinv, koutv
-      REAL(wp), DIMENSION(knoin) , INTENT(in   ) ::   pvalsin
-      REAL(wp), DIMENSION(knoout), INTENT(  out) ::   pvalsout
+      REAL(dp), DIMENSION(knoin) , INTENT(in   ) ::   pvalsin
+      REAL(dp), DIMENSION(knoout), INTENT(  out) ::   pvalsout
       !!
       INTEGER :: ierr
@@ -413,6 +413,6 @@
 #if ! defined key_mpi_off
       !
-INCLUDE 'mpif.h'
       INTEGER, DIMENSION(jpnij) ::   irdsp, isdsp
+INCLUDE 'mpif.h'
       !!----------------------------------------------------------------------
       !
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_oper.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_oper.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_oper.F90	(revision 15540)
@@ -108,9 +108,9 @@
       INTEGER       , INTENT(in   ) ::   kdaystp         ! Number of time steps per day
       INTEGER       , INTENT(in   ) ::   kvar            ! Number of variables in prodatqc
-      REAL(KIND=wp) , INTENT(in   ), DIMENSION(kpi,kpj,kpk) ::   pvar             ! Model field
-      REAL(KIND=wp) , INTENT(in   ), DIMENSION(kpi,kpj,kpk) ::   pmask            ! Land-sea mask
-      REAL(KIND=wp) , INTENT(in   ), DIMENSION(kpi,kpj)     ::   plam             ! Model longitude
-      REAL(KIND=wp) , INTENT(in   ), DIMENSION(kpi,kpj)     ::   pphi             ! Model latitudes
-      REAL(KIND=wp) , INTENT(in   ), DIMENSION(kpi,kpj,kpk) ::   pgdept, pgdepw   ! depth of T and W levels 
+      REAL(KIND=dp) , INTENT(in   ), DIMENSION(kpi,kpj,kpk) ::   pvar             ! Model field
+      REAL(KIND=dp) , INTENT(in   ), DIMENSION(kpi,kpj,kpk) ::   pmask            ! Land-sea mask
+      REAL(KIND=dp) , INTENT(in   ), DIMENSION(kpi,kpj)     ::   plam             ! Model longitude
+      REAL(KIND=dp) , INTENT(in   ), DIMENSION(kpi,kpj)     ::   pphi             ! Model latitudes
+      REAL(KIND=dp) , INTENT(in   ), DIMENSION(kpi,kpj,kpk) ::   pgdept, pgdepw   ! depth of T and W levels 
       INTEGER, DIMENSION(imaxavtypes), OPTIONAL ::   kdailyavtypes             ! Types for daily averages
 
@@ -135,14 +135,14 @@
       INTEGER, ALLOCATABLE, DIMENSION(:) :: iv_indic
 
-      REAL(KIND=wp) :: zlam
-      REAL(KIND=wp) :: zphi
-      REAL(KIND=wp) :: zdaystp
-      REAL(KIND=wp), DIMENSION(kpk) :: &
+      REAL(KIND=dp) :: zlam
+      REAL(KIND=dp) :: zphi
+      REAL(KIND=dp) :: zdaystp
+      REAL(KIND=dp), DIMENSION(kpk) :: &
          & zobsk,  &
          & zobs2k
-      REAL(KIND=wp), DIMENSION(2,2,1) :: &
+      REAL(KIND=dp), DIMENSION(2,2,1) :: &
          & zweig1, &
          & zweig
-      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: &
+      REAL(dp), DIMENSION(:,:,:,:), ALLOCATABLE :: &
          & zmask,  &
          & zint,   &
@@ -150,9 +150,9 @@
          & zgdept, & 
          & zgdepw
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: &
+      REAL(dp), DIMENSION(:,:,:), ALLOCATABLE :: &
          & zglam,  &
          & zgphi
-      REAL(KIND=wp), DIMENSION(1) :: zmsk
-      REAL(KIND=wp), DIMENSION(:,:,:), ALLOCATABLE :: interp_corner
+      REAL(KIND=dp), DIMENSION(1) :: zmsk
+      REAL(KIND=dp), DIMENSION(:,:,:), ALLOCATABLE :: interp_corner
 
       LOGICAL :: ld_dailyav
@@ -492,9 +492,9 @@
       INTEGER, INTENT(IN) :: kdaystp   ! Number of time steps per day
       INTEGER, INTENT(IN) :: k2dint    ! Horizontal interpolation type (see header)
-      REAL(wp), INTENT(IN), DIMENSION(kpi,kpj) :: &
+      REAL(dp), INTENT(IN), DIMENSION(kpi,kpj) :: &
          & psurf,  &                   ! Model surface field
          & psurfmask                   ! Land-sea mask
       LOGICAL, INTENT(IN) :: ldnightav ! Logical for averaging night-time data
-      REAL(KIND=wp), INTENT(IN) :: &
+      REAL(KIND=dp), INTENT(IN) :: &
          & plamscl, &                  ! Diameter in metres of obs footprint in E/W, N/S directions
          & pphiscl                     ! This is the full width (rather than half-width)
@@ -520,9 +520,9 @@
          & icount_night,      &
          & imask_night
-      REAL(wp) :: zlam
-      REAL(wp) :: zphi
-      REAL(wp), DIMENSION(1) :: zext, zobsmask
-      REAL(wp) :: zdaystp
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: &
+      REAL(dp) :: zlam
+      REAL(dp) :: zphi
+      REAL(dp), DIMENSION(1) :: zext, zobsmask
+      REAL(dp) :: zdaystp
+      REAL(dp), DIMENSION(:,:,:), ALLOCATABLE :: &
          & zweig,  &
          & zmask,  &
@@ -535,5 +535,5 @@
          & zgphif
 
-      REAL(wp), DIMENSION(:,:), SAVE, ALLOCATABLE :: &
+      REAL(dp), DIMENSION(:,:), SAVE, ALLOCATABLE :: &
          & zintmp,  &
          & zouttmp, &
@@ -655,7 +655,7 @@
 
       CALL obs_int_comm_2d( imaxifp, imaxjfp, isurf, kpi, kpj, &
-         &                  igrdi, igrdj, CASTWP(glamt), zglam )
+         &                  igrdi, igrdj, glamt, zglam )
       CALL obs_int_comm_2d( imaxifp, imaxjfp, isurf, kpi, kpj, &
-         &                  igrdi, igrdj, CASTWP(gphit), zgphi )
+         &                  igrdi, igrdj, gphit, zgphi )
       CALL obs_int_comm_2d( imaxifp, imaxjfp, isurf, kpi, kpj, &
          &                  igrdi, igrdj, psurfmask, zmask )
@@ -663,7 +663,7 @@
          &                  igrdi, igrdj, psurf, zsurf )
       CALL obs_int_comm_2d( imaxifp+1, imaxjfp+1, isurf, kpi, kpj, &
-         &                  igrdip1, igrdjp1, CASTWP(glamf), zglamf )
+         &                  igrdip1, igrdjp1, glamf, zglamf )
       CALL obs_int_comm_2d( imaxifp+1, imaxjfp+1, isurf, kpi, kpj, &
-         &                  igrdip1, igrdjp1, CASTWP(gphif), zgphif )
+         &                  igrdip1, igrdjp1, gphif, zgphif )
 
       ! At the end of the day get interpolated means
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_prep.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_prep.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_prep.F90	(revision 15540)
@@ -154,5 +154,5 @@
          &                 surfdata%mi,   surfdata%mj,   & 
          &                 surfdata%rlam, surfdata%rphi, &
-         &                 CASTWP(glamt),        CASTWP(gphit),        &
+         &                 glamt,        gphit,        &
          &                 tmask(:,:,1), surfdata%nqc,  &
          &                 iosdsobs,     ilansobs,     &
@@ -279,7 +279,7 @@
       INTEGER, DIMENSION(imaxavtypes), OPTIONAL :: &
          & kdailyavtypes                          ! Types for daily averages
-      REAL(wp), INTENT(IN), DIMENSION(kpi,kpj,kpk,profdata%nvar) :: &
+      REAL(dp), INTENT(IN), DIMENSION(kpi,kpj,kpk,profdata%nvar) :: &
          & zmask
-      REAL(wp), INTENT(IN), DIMENSION(kpi,kpj,profdata%nvar) :: &
+      REAL(dp), INTENT(IN), DIMENSION(kpi,kpj,profdata%nvar) :: &
          & pglam, &
          & pgphi
@@ -609,7 +609,7 @@
       INTEGER :: iskip
       INTEGER :: idaystp
-      REAL(KIND=wp) :: zminstp
-      REAL(KIND=wp) :: zhoustp
-      REAL(KIND=wp) :: zobsstp 
+      REAL(KIND=dp) :: zminstp
+      REAL(KIND=dp) :: zhoustp
+      REAL(KIND=dp) :: zobsstp 
       INTEGER, DIMENSION(12) ::   imonth_len    !: length in days of the months of the current year
  
@@ -887,7 +887,7 @@
       INTEGER , INTENT(in   )                     ::   kpi    , kpj      ! Number of grid points in (i,j)
       INTEGER , INTENT(in   ), DIMENSION(kobsno)  ::   kobsi  , kobsj    ! Observation (i,j) coordinates
-      REAL(wp), INTENT(in   ), DIMENSION(kobsno)  ::   pobslam, pobsphi  ! Observation (lon,lat) coordinates
-      REAL(wp), INTENT(in   ), DIMENSION(kpi,kpj) ::   plam   , pphi     ! Model (lon,lat) coordinates
-      REAL(wp), INTENT(in   ), DIMENSION(kpi,kpj) ::   pmask             ! Land mask array
+      REAL(dp), INTENT(in   ), DIMENSION(kobsno)  ::   pobslam, pobsphi  ! Observation (lon,lat) coordinates
+      REAL(dp), INTENT(in   ), DIMENSION(kpi,kpj) ::   plam   , pphi     ! Model (lon,lat) coordinates
+      REAL(dp), INTENT(in   ), DIMENSION(kpi,kpj) ::   pmask             ! Land mask array
       INTEGER , INTENT(inout), DIMENSION(kobsno)  ::   kobsqc            ! Observation quality control
       INTEGER , INTENT(inout)                     ::   kosdobs           ! Observations outside space domain
@@ -899,8 +899,8 @@
       INTEGER , INTENT(in   )                     ::   kqc_cutoff        ! Cutoff QC value
       !
-      REAL(KIND=wp), DIMENSION(2,2,kobsno) ::   zgmsk          ! Grid mask
-      REAL(KIND=wp), DIMENSION(2,2,kobsno) ::   zbmsk          ! Boundary mask
-      REAL(KIND=wp), DIMENSION(jpi,jpj)    ::   zbdymask
-      REAL(KIND=wp), DIMENSION(2,2,kobsno) ::   zglam, zgphi   ! Model Lon/lat at grid points
+      REAL(KIND=dp), DIMENSION(2,2,kobsno) ::   zgmsk          ! Grid mask
+      REAL(KIND=dp), DIMENSION(2,2,kobsno) ::   zbmsk          ! Boundary mask
+      REAL(KIND=dp), DIMENSION(jpi,jpj)    ::   zbdymask
+      REAL(KIND=dp), DIMENSION(2,2,kobsno) ::   zglam, zgphi   ! Model Lon/lat at grid points
       INTEGER      , DIMENSION(2,2,kobsno) ::   igrdi, igrdj   ! Grid i,j
       LOGICAL ::   lgridobs           ! Is observation on a model grid point.
@@ -1096,14 +1096,14 @@
       INTEGER, DIMENSION(kobsno), INTENT(IN) :: &
          & kobsk              ! Observation k coordinate
-      REAL(KIND=wp), DIMENSION(kprofno), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kprofno), INTENT(IN) :: &
          & pobslam, &         ! Observation (lon,lat) coordinates
          & pobsphi
-      REAL(KIND=wp), DIMENSION(kobsno), INTENT(INOUT) :: &
+      REAL(KIND=dp), DIMENSION(kobsno), INTENT(INOUT) :: &
          & pobsdep            ! Observation depths  
-      REAL(KIND=wp), DIMENSION(kpi,kpj), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kpi,kpj), INTENT(IN) :: &
          & plam, pphi         ! Model (lon,lat) coordinates
-      REAL(KIND=wp), DIMENSION(kpk), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kpk), INTENT(IN) :: &
          & pdep               ! Model depth coordinates
-      REAL(KIND=wp), DIMENSION(kpi,kpj,kpk), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kpi,kpj,kpk), INTENT(IN) :: &
          & pmask              ! Land mask array
       INTEGER, DIMENSION(kprofno), INTENT(INOUT) :: &
@@ -1121,15 +1121,15 @@
 
       !! * Local declarations
-      REAL(KIND=wp), DIMENSION(2,2,kpk,kprofno) :: &
+      REAL(KIND=dp), DIMENSION(2,2,kpk,kprofno) :: &
          & zgmsk              ! Grid mask
-      REAL(KIND=wp), DIMENSION(2,2,kprofno) :: &
+      REAL(KIND=dp), DIMENSION(2,2,kprofno) :: &
          & zbmsk              ! Boundary mask
-      REAL(KIND=wp), DIMENSION(jpi,jpj) :: zbdymask
-      REAL(KIND=wp), DIMENSION(2,2,kpk,kprofno) :: &
+      REAL(KIND=dp), DIMENSION(jpi,jpj) :: zbdymask
+      REAL(KIND=dp), DIMENSION(2,2,kpk,kprofno) :: &
          & zgdepw
-      REAL(KIND=wp), DIMENSION(2,2,kprofno) :: &
+      REAL(KIND=dp), DIMENSION(2,2,kprofno) :: &
          & zglam, &           ! Model longitude at grid points
          & zgphi              ! Model latitude at grid points
-      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zdepw
+      REAL(dp), DIMENSION(jpi,jpj,jpk) :: zdepw
       INTEGER, DIMENSION(2,2,kprofno) :: &
          & igrdi, &           ! Grid i,j
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_profiles_def.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_profiles_def.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_profiles_def.F90	(revision 15540)
@@ -69,10 +69,10 @@
          & idqc           !: Depth QC flag
 
-      REAL(KIND=wp), POINTER, DIMENSION(:) :: &
+      REAL(KIND=dp), POINTER, DIMENSION(:) :: &
          & vdep,  &       !: Depth coordinate of profile data
          & vobs,  &       !: Profile data
          & vmod           !: Model counterpart of the profile data vector
 
-      REAL(KIND=wp), POINTER, DIMENSION(:,:) :: &
+      REAL(KIND=dp), POINTER, DIMENSION(:,:) :: &
          & vext           !: Extra variables
 
@@ -127,5 +127,5 @@
          & itqc           !: Time QC
 
-      REAL(KIND=wp), POINTER, DIMENSION(:) :: &
+      REAL(KIND=dp), POINTER, DIMENSION(:) :: &
          & rlam, &        !: Longitude coordinate of profile data
          & rphi           !: Latitude coordinate of profile data
@@ -176,5 +176,5 @@
       ! variables
 
-      REAL(KIND=wp), POINTER, DIMENSION(:,:,:,:) :: &
+      REAL(KIND=dp), POINTER, DIMENSION(:,:,:,:) :: &
          & vdmean        !: Daily averaged model field
 
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_read_altbias.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_read_altbias.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_read_altbias.F90	(revision 15540)
@@ -92,17 +92,17 @@
       INTEGER :: i_var_id
 
-      REAL(wp), DIMENSION(1) :: &
+      REAL(dp), DIMENSION(1) :: &
          & zext, &
          & zobsmask
-      REAL(wp), DIMENSION(2,2,1) :: &
+      REAL(dp), DIMENSION(2,2,1) :: &
          & zweig
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: &
+      REAL(dp), DIMENSION(:,:,:), ALLOCATABLE :: &
          & zmask, &
          & zbias, &
          & zglam, &
          & zgphi
-      REAL(wp), DIMENSION(jpi,jpj) ::   z_altbias
-      REAL(wp) :: zlam
-      REAL(wp) :: zphi
+      REAL(dp), DIMENSION(jpi,jpj) ::   z_altbias
+      REAL(dp) :: zlam
+      REAL(dp) :: zphi
       INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: &
          & igrdi, &
@@ -166,7 +166,7 @@
 
       CALL obs_int_comm_2d( 2, 2, sladata%nsurf, jpi, jpj, &
-         &                  igrdi, igrdj, CASTWP(glamt), zglam )
-      CALL obs_int_comm_2d( 2, 2, sladata%nsurf, jpi, jpj, &
-         &                  igrdi, igrdj, CASTWP(gphit), zgphi )
+         &                  igrdi, igrdj, glamt, zglam )
+      CALL obs_int_comm_2d( 2, 2, sladata%nsurf, jpi, jpj, &
+         &                  igrdi, igrdj, gphit, zgphi )
       CALL obs_int_comm_2d( 2, 2, sladata%nsurf, jpi, jpj, &
          &                  igrdi, igrdj, tmask(:,:,1), zmask )
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_read_prof.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_read_prof.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_read_prof.F90	(revision 15540)
@@ -130,5 +130,5 @@
       INTEGER, DIMENSION(kvars) :: &
          & iv3dt
-      REAL(wp), DIMENSION(:), ALLOCATABLE :: &
+      REAL(dp), DIMENSION(:), ALLOCATABLE :: &
          & zphi, &
          & zlam
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_read_surf.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_read_surf.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_read_surf.F90	(revision 15540)
@@ -110,5 +110,5 @@
          & ifileidx, &
          & isurfidx
-      REAL(wp), DIMENSION(:), ALLOCATABLE :: &
+      REAL(dp), DIMENSION(:), ALLOCATABLE :: &
          & zphi, &
          & zlam
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_readmdt.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_readmdt.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_readmdt.F90	(revision 15540)
@@ -74,13 +74,13 @@
       INTEGER ::   nummdt
       !
-      REAL(wp), DIMENSION(1)     ::   zext, zobsmask
-      REAL(wp), DIMENSION(2,2,1) ::   zweig
-      !
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   zmask, zmdtl, zglam, zgphi
+      REAL(dp), DIMENSION(1)     ::   zext, zobsmask
+      REAL(dp), DIMENSION(2,2,1) ::   zweig
+      !
+      REAL(dp), DIMENSION(:,:,:), ALLOCATABLE ::   zmask, zmdtl, zglam, zgphi
       INTEGER , DIMENSION(:,:,:), ALLOCATABLE ::   igrdi, igrdj
       !
-      REAL(wp), DIMENSION(jpi,jpj) ::  z_mdt, mdtmask
+      REAL(dp), DIMENSION(jpi,jpj) ::  z_mdt, mdtmask
          
-      REAL(wp) :: zlam, zphi, zfill, zinfill    ! local scalar
+      REAL(dp) :: zlam, zphi, zfill, zinfill    ! local scalar
       !!----------------------------------------------------------------------
 
@@ -137,6 +137,6 @@
       END DO
 
-      CALL obs_int_comm_2d( 2, 2, sladata%nsurf, jpi, jpj, igrdi, igrdj, CASTWP(glamt)  , zglam )
-      CALL obs_int_comm_2d( 2, 2, sladata%nsurf, jpi, jpj, igrdi, igrdj, CASTWP(gphit)  , zgphi )
+      CALL obs_int_comm_2d( 2, 2, sladata%nsurf, jpi, jpj, igrdi, igrdj, glamt  , zglam )
+      CALL obs_int_comm_2d( 2, 2, sladata%nsurf, jpi, jpj, igrdi, igrdj, gphit  , zgphi )
       CALL obs_int_comm_2d( 2, 2, sladata%nsurf, jpi, jpj, igrdi, igrdj, mdtmask, zmask )
       CALL obs_int_comm_2d( 2, 2, sladata%nsurf, jpi, jpj, igrdi, igrdj, z_mdt  , zmdtl )
@@ -189,10 +189,10 @@
       INTEGER, INTENT(IN) ::  kpi, kpj
       INTEGER, INTENT(IN) ::  Kmm
-      REAL(wp), DIMENSION(kpi,kpj), INTENT(INOUT) ::   mdt     ! MDT used on the model grid
-      REAL(wp)                    , INTENT(IN   ) ::   zfill 
+      REAL(dp), DIMENSION(kpi,kpj), INTENT(INOUT) ::   mdt     ! MDT used on the model grid
+      REAL(dp)                    , INTENT(IN   ) ::   zfill 
       ! 
       INTEGER  :: ji, jj
-      REAL(wp) :: zdxdy, zarea, zeta1, zeta2, zcorr_mdt, zcorr_bcketa, zcorr     ! local scalar
-      REAL(wp), DIMENSION(jpi,jpj) :: zpromsk
+      REAL(dp) :: zdxdy, zarea, zeta1, zeta2, zcorr_mdt, zcorr_bcketa, zcorr     ! local scalar
+      REAL(dp), DIMENSION(jpi,jpj) :: zpromsk
       CHARACTER(LEN=14), PARAMETER ::   cpname = 'obs_offset_mdt'
       !!----------------------------------------------------------------------
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_rot_vel.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_rot_vel.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_rot_vel.F90	(revision 15540)
@@ -58,10 +58,10 @@
       TYPE(obs_prof), INTENT(INOUT) :: profdata    ! Profile data to be read
       INTEGER, INTENT(IN) :: k2dint     ! Horizontal interpolation methed
-      REAL(wp), DIMENSION(*) :: &
+      REAL(dp), DIMENSION(*) :: &
          & pu, &
          & pv
       !! * Local declarations
-      REAL(wp), DIMENSION(2,2,1) :: zweig
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: &
+      REAL(dp), DIMENSION(2,2,1) :: zweig
+      REAL(dp), DIMENSION(:,:,:), ALLOCATABLE :: &
          & zmasku, &
          & zmaskv, &
@@ -74,13 +74,13 @@
          & zglamv, &
          & zgphiv
-      REAL(wp), DIMENSION(1) :: &
+      REAL(dp), DIMENSION(1) :: &
          & zsinu, &
          & zcosu, &
          & zsinv, &
          & zcosv
-      REAL(wp) :: zsin
-      REAL(wp) :: zcos
-      REAL(wp), DIMENSION(1) :: zobsmask
-      REAL(wp), DIMENSION(jpi,jpj) :: zsingu,zcosgu,zsingv,zcosgv
+      REAL(dp) :: zsin
+      REAL(dp) :: zcos
+      REAL(dp), DIMENSION(1) :: zobsmask
+      REAL(dp), DIMENSION(jpi,jpj) :: zsingu,zcosgu,zsingv,zcosgv
       INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: &
          & igrdiu, &
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_sstbias.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_sstbias.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_sstbias.F90	(revision 15540)
@@ -82,24 +82,24 @@
       INTEGER, DIMENSION(knumtypes) :: &
          & ibiastypes             ! Array of the bias types in each file
-      REAL(wp), DIMENSION(jpi,jpj,knumtypes) :: & 
+      REAL(dp), DIMENSION(jpi,jpj,knumtypes) :: & 
          & z_sstbias              ! Array to store the SST bias values
-      REAL(wp), DIMENSION(jpi,jpj) :: & 
+      REAL(dp), DIMENSION(jpi,jpj) :: & 
          & z_sstbias_2d           ! Array to store the SST bias values   
-      REAL(wp), DIMENSION(1) :: &
+      REAL(dp), DIMENSION(1) :: &
          & zext, &
          & zobsmask
-      REAL(wp), DIMENSION(2,2,1) :: &
+      REAL(dp), DIMENSION(2,2,1) :: &
          & zweig
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: &
+      REAL(dp), DIMENSION(:,:,:), ALLOCATABLE :: &
          & zmask, &
          & zglam, &
          & zgphi
-      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: &
+      REAL(dp), DIMENSION(:,:,:), ALLOCATABLE :: &
          & zmask_tmp, &
          & zglam_tmp, &
          & zgphi_tmp   
-      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::  zbias   
-      REAL(wp) :: zlam
-      REAL(wp) :: zphi
+      REAL(dp), ALLOCATABLE, DIMENSION(:,:,:) ::  zbias   
+      REAL(dp) :: zlam
+      REAL(dp) :: zphi
       INTEGER, DIMENSION(:,:,:), ALLOCATABLE :: &
          & igrdi, &
@@ -171,7 +171,7 @@
       END DO
       CALL obs_int_comm_2d( 2, 2, sstdata%nsurf, jpi, jpj, &
-         &                  igrdi, igrdj, CASTWP(glamt), zglam )
+         &                  igrdi, igrdj, glamt, zglam )
       CALL obs_int_comm_2d( 2, 2, sstdata%nsurf, jpi, jpj, &
-         &                  igrdi, igrdj, CASTWP(gphit), zgphi )
+         &                  igrdi, igrdj, gphit, zgphi )
       CALL obs_int_comm_2d( 2, 2, sstdata%nsurf, jpi, jpj, &
          &                  igrdi, igrdj, tmask(:,:,1), zmask )
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_surf_def.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_surf_def.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_surf_def.F90	(revision 15540)
@@ -20,5 +20,5 @@
    !! * Modules used
    USE par_kind, ONLY : & ! Precision variables
-      & wp         
+      & dp, wp         
    USE obs_mpp, ONLY : &  ! MPP tools 
       obs_mpp_sum_integer
@@ -75,16 +75,16 @@
          & cwmo           !: WMO indentifier
          
-      REAL(KIND=wp), POINTER, DIMENSION(:) :: &
+      REAL(KIND=dp), POINTER, DIMENSION(:) :: &
          & rlam, &        !: Longitude coordinate of surface observation
          & rphi           !: Latitude coordinate of surface observation
 
-      REAL(KIND=wp), POINTER, DIMENSION(:,:) :: &
+      REAL(KIND=dp), POINTER, DIMENSION(:,:) :: &
          & robs, &        !: Surface observation 
          & rmod           !: Model counterpart of the surface observation vector
 
-      REAL(KIND=wp), POINTER, DIMENSION(:,:) :: &
+      REAL(KIND=dp), POINTER, DIMENSION(:,:) :: &
          & rext           !: Extra fields interpolated to observation points
 
-      REAL(KIND=wp), POINTER, DIMENSION(:,:) :: &
+      REAL(KIND=dp), POINTER, DIMENSION(:,:) :: &
          & vdmean         !: Time averaged of model field
 
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_write.F90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_write.F90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obs_write.F90	(revision 15540)
@@ -100,5 +100,5 @@
       INTEGER :: iadd
       INTEGER :: iext
-      REAL(wp) :: zpres
+      REAL(dp) :: zpres
 
       IF ( PRESENT( padd ) ) THEN
@@ -586,7 +586,7 @@
       INTEGER :: inumgoodobs
       INTEGER :: inumgoodobsmpp
-      REAL(wp) :: zsumx
-      REAL(wp) :: zsumx2
-      REAL(wp) :: zomb
+      REAL(dp) :: zsumx
+      REAL(dp) :: zsumx2
+      REAL(dp) :: zomb
       
 
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obsinter_h2d.h90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obsinter_h2d.h90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obsinter_h2d.h90	(revision 15540)
@@ -86,16 +86,16 @@
                                 ! = 3 bilinear (quadrilateral grid)
                                 ! = 4 polynomial (quadrilateral grid)
-      REAL(KIND=wp), INTENT(INOUT) :: &
+      REAL(KIND=dp), INTENT(INOUT) :: &
          & plam, &
          & pphi                 ! Geographical (lat,lon) coordinates of
                                 ! observation
-      REAL(KIND=wp), DIMENSION(2,2), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(2,2), INTENT(IN) :: &
          & pglam, &             ! Model variable lat
          & pgphi                ! Model variable lon
-      REAL(KIND=wp), DIMENSION(2,2,kpk2), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(2,2,kpk2), INTENT(IN) :: &
          & pmask                ! Model variable mask
-      REAL(KIND=wp), DIMENSION(2,2,kpk2), INTENT(OUT) ::  &
+      REAL(KIND=dp), DIMENSION(2,2,kpk2), INTENT(OUT) ::  &
          & pweig                ! Weights for interpolation
-      REAL(KIND=wp), DIMENSION(kpk2), INTENT(OUT) ::  &
+      REAL(KIND=dp), DIMENSION(kpk2), INTENT(OUT) ::  &
          & pobsmask             ! Vertical mask for observations
       INTEGER, INTENT(IN), OPTIONAL :: &
@@ -110,5 +110,5 @@
          & iamb1, &
          & iamb2
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zphimm,  &
          & zphimp,  &
@@ -123,5 +123,5 @@
          & zlammin, &
          & zlammax
-      REAL(KIND=wp), DIMENSION(kpk2) :: &
+      REAL(KIND=dp), DIMENSION(kpk2) :: &
          & z2dmm,  &
          & z2dmp,  &
@@ -390,9 +390,9 @@
          & kpk,   &             ! Parameter values for automatic arrays
          & kpk2
-      REAL(KIND=wp), DIMENSION(2,2,kpk2), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(2,2,kpk2), INTENT(IN) :: &
          & pweig                ! Interpolation weights
-      REAL(KIND=wp), DIMENSION(2,2,kpk2), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(2,2,kpk2), INTENT(IN) :: &
          & pmod                 ! Model variable to interpolate
-      REAL(KIND=wp), DIMENSION(kpk2), INTENT(OUT) ::  &
+      REAL(KIND=dp), DIMENSION(kpk2), INTENT(OUT) ::  &
          & pobsk                ! Model profile interpolated to obs (i,j) pt
 
@@ -402,5 +402,5 @@
       INTEGER :: &
          & ikmax
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zsum
       !------------------------------------------------------------------------
@@ -462,5 +462,5 @@
          & kpk2, &             ! Parameter values for automatic arrays
          & kmax
-      REAL(KIND=wp), INTENT(IN) :: &
+      REAL(KIND=dp), INTENT(IN) :: &
          & pphi,   &           ! Geographical location of observation
          & plam,   &
@@ -473,7 +473,7 @@
          & plampm, &
          & plampp
-      REAL(KIND=wp), DIMENSION(2,2,kpk2), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(2,2,kpk2), INTENT(IN) :: &
          & pmask               ! Model variable mask 
-      REAL(KIND=wp), DIMENSION(kpk2), INTENT(OUT) :: &
+      REAL(KIND=dp), DIMENSION(kpk2), INTENT(OUT) :: &
          & p2dmm, &            ! Interpolation weights
          & p2dmp, &
@@ -484,5 +484,5 @@
       INTEGER :: &
          & jk
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zphi2,   &
          & zlam2,   &
@@ -611,5 +611,5 @@
          & kpk2, &             ! Parameter values for automatic arrays
          & kmax
-      REAL(KIND=wp), INTENT(IN) ::        &
+      REAL(KIND=dp), INTENT(IN) ::        &
          & pphi,   &           ! Geographical location of observation
          & plam,   &
@@ -622,7 +622,7 @@
          & plampm, &
          & plampp
-      REAL(KIND=wp), DIMENSION(2,2,kpk2), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(2,2,kpk2), INTENT(IN) :: &
          & pmask               ! Model variable mask 
-      REAL(KIND=wp), DIMENSION(kpk2), INTENT(OUT) :: &
+      REAL(KIND=dp), DIMENSION(kpk2), INTENT(OUT) :: &
          & p2dmm, &            ! Interpolation weights
          & p2dmp, &
@@ -633,5 +633,5 @@
       INTEGER :: &
          & jk
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zcosp,   &
          & zdlmm,   &
@@ -709,5 +709,5 @@
          & kpk2, &             ! Parameter values for automatic arrays
          & kmax
-      REAL(KIND=wp), INTENT(IN) :: &
+      REAL(KIND=dp), INTENT(IN) :: &
          & pphi,   &           ! Geographical location of observation
          & plam,   &
@@ -716,7 +716,7 @@
          & plammp, &
          & plampp
-      REAL(KIND=wp), DIMENSION(2,2,kpk2), INTENT(IN)  :: &
+      REAL(KIND=dp), DIMENSION(2,2,kpk2), INTENT(IN)  :: &
          & pmask               ! Model variable mask
-      REAL(KIND=wp), DIMENSION(kpk2), INTENT(OUT) :: &
+      REAL(KIND=dp), DIMENSION(kpk2), INTENT(OUT) :: &
          & p2dmm, &            ! Interpolation weights
          & p2dmp, &
@@ -727,5 +727,5 @@
       INTEGER :: &
          & jk
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zdlmp, &
          & zdppm, &
@@ -776,5 +776,5 @@
          & kpk2, &             ! Parameter values for automatic arrays
          & kmax
-      REAL(KIND=wp), INTENT(IN) ::        &
+      REAL(KIND=dp), INTENT(IN) ::        &
          & pphi,   &           ! Geographical location of observation
          & plam,   &
@@ -787,7 +787,7 @@
          & plampm, &
          & plampp
-      REAL(KIND=wp), DIMENSION(2,2,kpk2), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(2,2,kpk2), INTENT(IN) :: &
          & pmask               ! Model variable mask 
-      REAL(KIND=wp), DIMENSION(kpk2), INTENT(OUT) :: &
+      REAL(KIND=dp), DIMENSION(kpk2), INTENT(OUT) :: &
          & p2dmm, &            ! Interpolation weights
          & p2dmp, &
@@ -799,5 +799,5 @@
       INTEGER :: &
          & jk
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zbiwmm, &
          & zbiwmp, &
@@ -858,5 +858,5 @@
          & kpk2,   &           ! Parameter values for automatic arrays 
          & kmax
-      REAL(KIND=wp), INTENT(IN) :: &
+      REAL(KIND=dp), INTENT(IN) :: &
          & pphi,   &           ! Geographical location of observation
          & plam,   &
@@ -869,7 +869,7 @@
          & plampm, &
          & plampp
-      REAL(KIND=wp), DIMENSION(2,2,kpk2), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(2,2,kpk2), INTENT(IN) :: &
          & pmask               ! Model variable mask
-      REAL(KIND=wp), DIMENSION(kpk2), INTENT(OUT) :: &
+      REAL(KIND=dp), DIMENSION(kpk2), INTENT(OUT) :: &
          & p2dmm,  &           ! Interpolation weights
          & p2dmp,  &
@@ -880,7 +880,7 @@
       INTEGER :: &
          & jk
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zplp
-      REAL(KIND=wp), DIMENSION(4,4) :: &
+      REAL(KIND=dp), DIMENSION(4,4) :: &
          & zmat,  &
          & zmati
@@ -960,5 +960,5 @@
  
       !! * Arguments
-      REAL(KIND=wp), INTENT(IN) :: &
+      REAL(KIND=dp), INTENT(IN) :: &
          & pphi,   &           ! Geographical location of observation
          & plam,   &
@@ -971,5 +971,5 @@
          & plampm, &
          & plampp
-      REAL(KIND=wp), INTENT(OUT) :: &
+      REAL(KIND=dp), INTENT(OUT) :: &
          & pbiwmm, &           ! Interpolation weights
          & pbiwmp, &
@@ -984,5 +984,5 @@
       INTEGER :: &
          & itermax
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zphi,    &           ! Geographical location of observation
          & zlam,    &
@@ -1161,7 +1161,7 @@
       INTEGER, INTENT(IN) :: &
          & kdim             ! Array dimension
-      REAL(KIND=wp), DIMENSION(kdim,kdim), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kdim,kdim), INTENT(IN) :: &
          & pmatin 
-      REAL(KIND=wp), DIMENSION(kdim,kdim), INTENT(OUT) :: &
+      REAL(KIND=dp), DIMENSION(kdim,kdim), INTENT(OUT) :: &
          & pmatou 
   
@@ -1172,7 +1172,7 @@
       INTEGER, DIMENSION(kdim) :: &
          & indx
-      REAL(KIND=wp), DIMENSION(kdim,kdim) :: &
+      REAL(KIND=dp), DIMENSION(kdim,kdim) :: &
          & zmat
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zd
 
@@ -1217,7 +1217,7 @@
       INTEGER, DIMENSION(kdim1), INTENT(OUT) :: &
          & kindex
-      REAL(KIND=wp), INTENT(OUT) :: &
+      REAL(KIND=dp), INTENT(OUT) :: &
          & pflt
-      REAL(KIND=wp), DIMENSION(kdim2,kdim2), INTENT(INOUT) :: &
+      REAL(KIND=dp), DIMENSION(kdim2,kdim2), INTENT(INOUT) :: &
          & pmatin 
   
@@ -1225,7 +1225,7 @@
       INTEGER, PARAMETER :: &
          & jpmax = 100
-      REAL(KIND=wp), PARAMETER :: &
+      REAL(KIND=dp), PARAMETER :: &
          & pptiny = 1.0e-20_wp
-      REAL(KIND=wp), DIMENSION(jpmax) :: &
+      REAL(KIND=dp), DIMENSION(jpmax) :: &
          & zvv
       INTEGER :: &
@@ -1235,5 +1235,5 @@
       INTEGER :: &
          & imax
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zsum,  &
          & zdum,  &
@@ -1320,7 +1320,7 @@
       INTEGER, DIMENSION(kdim1), INTENT(IN) :: &
          & kindex
-      REAL(KIND=wp), DIMENSION(kdim1), INTENT(INOUT) :: &
+      REAL(KIND=dp), DIMENSION(kdim1), INTENT(INOUT) :: &
          & pvect
-      REAL(KIND=wp), DIMENSION(kdim2,kdim2), INTENT(IN) :: &
+      REAL(KIND=dp), DIMENSION(kdim2,kdim2), INTENT(IN) :: &
          & pmat
   
@@ -1331,5 +1331,5 @@
          & jj,  &
          & jll
-      REAL(KIND=wp) :: &
+      REAL(KIND=dp) :: &
          & zsum
 
Index: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obsinter_z1d.h90
===================================================================
--- NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obsinter_z1d.h90	(revision 14986)
+++ NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/OBS/obsinter_z1d.h90	(revision 15540)
@@ -34,19 +34,19 @@
       INTEGER, INTENT(IN), DIMENSION(kdep) :: &
          & kkco                 ! Array indicies for interpolation
-      REAL(KIND=wp), INTENT(IN), DIMENSION(kdep) :: &
+      REAL(KIND=dp), INTENT(IN), DIMENSION(kdep) :: &
          & pobsdep              ! Depth of the observation
-      REAL(KIND=wp), INTENT(IN), DIMENSION(kpk) :: &
+      REAL(KIND=dp), INTENT(IN), DIMENSION(kpk) :: &
          & pobsk,  &            ! Model profile at a given (lon,lat)
          & pobs2k, &            ! 2nd derivative of the interpolating function
          & pdep,   &            ! Model depth array
          & pobsmask             ! Vertical mask
-      REAL(KIND=wp), INTENT(OUT), DIMENSION(kdep) :: &
+      REAL(KIND=dp), INTENT(OUT), DIMENSION(kdep) :: &
          & pobs                 ! Model equivalent at observation point
   
       !! * Local declarations
-      REAL(KIND=wp) :: z1dm       ! Distance above and below obs to model grid points
-      REAL(KIND=wp) :: z1dp         
-      REAL(KIND=wp) :: zsum       ! Dummy variables for computation
-      REAL(KIND=wp) :: zsum2
+      REAL(KIND=dp) :: z1dm       ! Distance above and below obs to model grid points
+      REAL(KIND=dp) :: z1dp         
+      REAL(KIND=dp) :: zsum       ! Dummy variables for computation
+      REAL(KIND=dp) :: zsum2
       INTEGER :: jdep             ! Observation depths loop variable
     
@@ -122,21 +122,21 @@
       !! * Arguments
       INTEGER, INTENT(IN) :: kpk               ! Number of vertical levels
-      REAL(KIND=wp), INTENT(IN), DIMENSION(kpk) :: &
+      REAL(KIND=dp), INTENT(IN), DIMENSION(kpk) :: &
          & pobsk, &          ! Model profile at a given (lon,lat)
          & pdep,  &          ! Model depth array
          & pobsmask          ! Vertical mask
-      REAL(KIND=wp), INTENT(OUT), DIMENSION(kpk) :: &
+      REAL(KIND=dp), INTENT(OUT), DIMENSION(kpk) :: &
          & pobs2k            ! 2nd derivative of the interpolating function
   
       !! * Local declarations
       INTEGER :: jk
-      REAL(KIND=wp) :: za
-      REAL(KIND=wp) :: zb
-      REAL(KIND=wp) :: zc
-      REAL(KIND=wp) :: zpa
-      REAL(KIND=wp) :: zkm
-      REAL(KIND=wp) :: zkp
-      REAL(KIND=wp) :: zk
-      REAL(KIND=wp), DIMENSION(kpk-1) :: &
+      REAL(KIND=dp) :: za
+      REAL(KIND=dp) :: zb
+      REAL(KIND=dp) :: zc
+      REAL(KIND=dp) :: zpa
+      REAL(KIND=dp) :: zkm
+      REAL(KIND=dp) :: zkp
+      REAL(KIND=dp) :: zk
+      REAL(KIND=dp), DIMENSION(kpk-1) :: &
          & zs, &
          & zp, &
