New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 14219 for NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traadv_ubs.F90 – NEMO

Ignore:
Timestamp:
2020-12-18T18:52:57+01:00 (4 years ago)
Author:
mcastril
Message:

Add Mixed Precision support by Oriol Tintó

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/OCE/TRA/traadv_ubs.F90

    r14072 r14219  
    4040#  include "do_loop_substitute.h90" 
    4141#  include "domzgr_substitute.h90" 
     42#  include "single_precision_substitute.h90" 
    4243   !!---------------------------------------------------------------------- 
    4344   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    6061      !!      For example the i-component of the advective fluxes are given by : 
    6162      !!                !  e2u e3u un ( mi(Tn) - zltu(i  ) )   if un(i) >= 0 
    62       !!          ztu = !  or 
     63      !!          ztu = !  or  
    6364      !!                !  e2u e3u un ( mi(Tn) - zltu(i+1) )   if un(i) < 0 
    6465      !!      where zltu is the second derivative of the before temperature field: 
     
    9495      ! TEMP: [tiling] This can be A2D(nn_hls) if using XIOS (subdomain support) 
    9596      REAL(wp), DIMENSION(jpi,jpj,jpk         ), INTENT(in   ) ::   pU, pV, pW      ! 3 ocean volume transport components 
    96       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::   pt              ! tracers and RHS of tracer equation 
     97      REAL(dp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::   pt              ! tracers and RHS of tracer equation 
    9798      ! 
    9899      INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices 
     
    174175         ! 
    175176         IF( l_trd ) THEN                  ! trend diagnostics 
    176              CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_xad, ztu, pU, pt(:,:,:,jn,Kmm) ) 
    177              CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_yad, ztv, pV, pt(:,:,:,jn,Kmm) ) 
     177             CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_xad, ztu, pU, CASTWP(pt(:,:,:,jn,Kmm)) ) 
     178             CALL trd_tra( kt, Kmm, Krhs, cdtype, jn, jptra_yad, ztv, pV, CASTWP(pt(:,:,:,jn,Kmm)) ) 
    178179         END IF 
    179180         ! 
     
    232233            ! 
    233234         CASE(  4  )                               ! 4th order COMPACT 
    234             CALL interp_4th_cpt( pt(:,:,:,jn,Kmm) , ztw )         ! 4th order compact interpolation of T at w-point 
     235            CALL interp_4th_cpt( CASTWP(pt(:,:,:,jn,Kmm)) , ztw ) 
    235236            DO_3D( 0, 0, 0, 0, 2, jpkm1 ) 
    236237               ztw(ji,jj,jk) = pW(ji,jj,jk) * ztw(ji,jj,jk) * wmask(ji,jj,jk) 
     
    278279      INTEGER , INTENT(in   )                         ::   Kmm    ! time level index 
    279280      REAL(wp), INTENT(in   )                         ::   p2dt   ! tracer time-step 
    280       REAL(wp),                DIMENSION(jpi,jpj,jpk) ::   pbef   ! before field 
     281      REAL(dp),                DIMENSION(jpi,jpj,jpk) ::   pbef   ! before field 
    281282      REAL(wp), INTENT(inout), DIMENSION(A2D(nn_hls)    ,jpk) ::   paft   ! after field 
    282283      REAL(wp), INTENT(inout), DIMENSION(A2D(nn_hls)    ,jpk) ::   pcc    ! monotonic flux in the k direction 
Note: See TracChangeset for help on using the changeset viewer.