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/traatf.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/traatf.F90

    r14072 r14219  
    5959#  include "do_loop_substitute.h90" 
    6060#  include "domzgr_substitute.h90" 
     61#  include "single_precision_substitute.h90" 
    6162   !!---------------------------------------------------------------------- 
    6263   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    8990      INTEGER                                  , INTENT(in   ) :: kt             ! ocean time-step index 
    9091      INTEGER                                  , INTENT(in   ) :: Kbb, Kmm, Kaa  ! time level indices 
    91       REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts            ! active tracers 
     92      REAL(dp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts            ! active tracers  
    9293      !! 
    9394      INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices 
     
    152153      ELSE                                            ! Leap-Frog + Asselin filter time stepping 
    153154         ! 
    154          IF( ln_linssh ) THEN   ;   CALL tra_atf_fix( kt, Kbb, Kmm, Kaa, nit000,        'TRA', pts, jpts )  ! linear free surface 
    155          ELSE                   ;   CALL tra_atf_vvl( kt, Kbb, Kmm, Kaa, nit000, rn_Dt, 'TRA', pts, sbc_tsc, sbc_tsc_b, jpts )  ! non-linear free surface 
     155         IF( ln_linssh ) THEN   ;   CALL tra_atf_fix( kt, Kbb, Kmm, Kaa, nit000,        'TRA', pts, jpts )  ! linear free surface  
     156         ELSE                   ;   CALL tra_atf_vvl( kt, Kbb, Kmm, Kaa, nit000, CASTWP(rn_Dt), 'TRA', pts, sbc_tsc, sbc_tsc_b, jpts )  ! non-linear free surface 
    156157         ENDIF 
    157158         ! 
     
    171172      ! 
    172173      !                        ! control print 
    173       IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=pts(:,:,:,jp_tem,Kmm), clinfo1=' nxt  - Tn: ', mask1=tmask,   & 
    174          &                                  tab3d_2=pts(:,:,:,jp_sal,Kmm), clinfo2=       ' Sn: ', mask2=tmask ) 
     174      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=CASTWP(pts(:,:,:,jp_tem,Kmm)), clinfo1=' nxt  - Tn: ', mask1=tmask,   & 
     175         &                                  tab3d_2=CASTWP(pts(:,:,:,jp_sal,Kmm)), clinfo2=       ' Sn: ', mask2=tmask ) 
    175176      ! 
    176177      IF( ln_timing )   CALL timing_stop('tra_atf') 
     
    194195      CHARACTER(len=3)                         , INTENT(in   ) ::  cdtype        ! =TRA or TRC (tracer indicator) 
    195196      INTEGER                                  , INTENT(in   ) ::  kjpt          ! number of tracers 
    196       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::  pt            ! tracer fields 
     197      REAL(dp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::  pt            ! tracer fields 
    197198      ! 
    198199      INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices 
     
    238239      CHARACTER(len=3)                         , INTENT(in   ) ::  cdtype    ! =TRA or TRC (tracer indicator) 
    239240      INTEGER                                  , INTENT(in   ) ::  kjpt      ! number of tracers 
    240       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::  pt        ! tracer fields 
     241      REAL(dp), DIMENSION(jpi,jpj,jpk,kjpt,jpt), INTENT(inout) ::  pt        ! tracer fields 
    241242      REAL(wp), DIMENSION(jpi,jpj    ,kjpt)    , INTENT(in   ) ::  psbc_tc   ! surface tracer content 
    242243      REAL(wp), DIMENSION(jpi,jpj    ,kjpt)    , INTENT(in   ) ::  psbc_tc_b ! before surface tracer content 
     
    244245      LOGICAL  ::   ll_traqsr, ll_rnf, ll_isf   ! local logical 
    245246      INTEGER  ::   ji, jj, jk, jn              ! dummy loop indices 
    246       REAL(wp) ::   zfact, zfact1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d    ! local scalar 
    247       REAL(wp) ::   zfact2, ze3t_b, ze3t_n, ze3t_a, ze3t_f, ze3t_d, zscale  !   -      - 
     247      REAL(dp) ::   zfact, zfact1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d    ! local scalar 
     248      REAL(dp) ::   zfact2, ze3t_b, ze3t_n, ze3t_a, ze3t_f, ze3t_d, zscale  !   -      - 
    248249      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::   ztrd_atf 
    249250      !!---------------------------------------------------------------------- 
     
    384385   !!====================================================================== 
    385386END MODULE traatf 
     387 
Note: See TracChangeset for help on using the changeset viewer.