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/TOP/TRP/trcldf.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/TOP/TRP/trcldf.F90

    r14086 r14219  
    4646#  include "do_loop_substitute.h90" 
    4747#  include "domzgr_substitute.h90" 
     48#  include "single_precision_substitute.h90" 
    4849   !!---------------------------------------------------------------------- 
    4950   !! NEMO/TOP 4.0 , NEMO Consortium (2018) 
     
    6263      INTEGER,                                    INTENT(in   ) :: kt              ! ocean time-step index 
    6364      INTEGER,                                    INTENT(in   ) :: Kbb, Kmm, Krhs  ! ocean time-level index 
    64       REAL(wp), DIMENSION(jpi,jpj,jpk,jptra,jpt), INTENT(inout) :: ptr             ! passive tracers and RHS of tracer equation 
     65      REAL(dp), DIMENSION(jpi,jpj,jpk,jptra,jpt), INTENT(inout) :: ptr             ! passive tracers and RHS of tracer equation 
    6566      ! 
    6667      INTEGER            :: ji, jj, jk, jn 
     
    9495      CASE ( np_lap   )                                                                                    ! iso-level laplacian 
    9596         CALL tra_ldf_lap  ( kt, Kmm, nittrc000,'TRC', zahu, zahv, gtru, gtrv, gtrui, gtrvi,            & 
    96            &                     ptr(:,:,:,:,Kbb), ptr(:,:,:,:,Krhs),                   jptra, 1 ) 
     97           &                     CASTWP(ptr(:,:,:,:,Kbb)), ptr(:,:,:,:,Krhs),                   jptra, 1 ) 
    9798      CASE ( np_lap_i )                                                                                    ! laplacian : standard iso-neutral operator (Madec) 
    9899         CALL tra_ldf_iso  ( kt, Kmm, nittrc000,'TRC', zahu, zahv, gtru, gtrv, gtrui, gtrvi,            & 
    99            &                     ptr(:,:,:,:,Kbb), ptr(:,:,:,:,Kbb), ptr(:,:,:,:,Krhs), jptra, 1 ) 
     100           &                     CASTWP(ptr(:,:,:,:,Kbb)), CASTWP(ptr(:,:,:,:,Kbb)), ptr(:,:,:,:,Krhs), jptra, 1 ) 
    100101      CASE ( np_lap_it )                                                                                   ! laplacian : triad iso-neutral operator (griffies) 
    101102         CALL tra_ldf_triad( kt, Kmm, nittrc000,'TRC', zahu, zahv, gtru, gtrv, gtrui, gtrvi,            & 
    102            &                     ptr(:,:,:,:,Kbb), ptr(:,:,:,:,Kbb), ptr(:,:,:,:,Krhs), jptra, 1 ) 
     103           &                     CASTWP(ptr(:,:,:,:,Kbb)), CASTWP(ptr(:,:,:,:,Kbb)), ptr(:,:,:,:,Krhs), jptra, 1 ) 
    103104      CASE ( np_blp , np_blp_i , np_blp_it )                                                               ! bilaplacian: all operator (iso-level, -neutral) 
    104          IF(nn_hls.EQ.2) CALL lbc_lnk( 'trc_ldf', ptr(:,:,:,:,Kbb), 'T',1.) 
     105         IF(nn_hls.EQ.2) CALL lbc_lnk( 'trc_ldf', ptr(:,:,:,:,Kbb), 'T',1._wp) 
    105106         CALL tra_ldf_blp  ( kt, Kmm, nittrc000,'TRC', zahu, zahv, gtru, gtrv, gtrui, gtrvi,            & 
    106            &                     ptr(:,:,:,:,Kbb) , ptr(:,:,:,:,Krhs),                 jptra, nldf_trc ) 
     107           &                     CASTWP(ptr(:,:,:,:,Kbb)) , ptr(:,:,:,:,Krhs),                 jptra, nldf_trc ) 
    107108      END SELECT 
    108109      ! 
     
    118119         WRITE(charout, FMT="('ldf ')") 
    119120         CALL prt_ctl_info( charout, cdcomp = 'top' ) 
    120          CALL prt_ctl( tab4d_1=ptr(:,:,:,:,Krhs), mask1=tmask, clinfo=ctrcnm, clinfo3='trd' ) 
     121         CALL prt_ctl( tab4d_1=CASTWP(ptr(:,:,:,:,Krhs)), mask1=tmask, clinfo=ctrcnm, clinfo3='trd' ) 
    121122      ENDIF 
    122123      ! 
Note: See TracChangeset for help on using the changeset viewer.