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/DYN/dynzad.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/DYN/dynzad.F90

    r14072 r14219  
    3131#  include "do_loop_substitute.h90" 
    3232#  include "domzgr_substitute.h90" 
     33#  include "single_precision_substitute.h90" 
    3334   !!---------------------------------------------------------------------- 
    3435   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    5657      INTEGER                             , INTENT( in )  ::  kt               ! ocean time-step inedx 
    5758      INTEGER                             , INTENT( in )  ::  Kmm, Krhs        ! ocean time level indices 
    58       REAL(wp), DIMENSION(jpi,jpj,jpk,jpt), INTENT(inout) ::  puu, pvv         ! ocean velocities and RHS of momentum equation 
     59      REAL(dp), DIMENSION(jpi,jpj,jpk,jpt), INTENT(inout) ::  puu, pvv         ! ocean velocities and RHS of momentum equation 
    5960      ! 
    6061      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
     
    6263      REAL(wp), DIMENSION(jpi,jpj)     ::   zww 
    6364      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zwuw, zwvw 
    64       REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   ztrdu, ztrdv 
     65      REAL(dp), DIMENSION(:,:,:), ALLOCATABLE ::   ztrdu, ztrdv 
    6566      !!---------------------------------------------------------------------- 
    6667      ! 
     
    7374 
    7475      IF( l_trddyn )   THEN           ! Save puu(:,:,:,Krhs) and pvv(:,:,:,Krhs) trends 
    75          ALLOCATE( ztrdu(jpi,jpj,jpk) , ztrdv(jpi,jpj,jpk) ) 
    76          ztrdu(:,:,:) = puu(:,:,:,Krhs) 
    77          ztrdv(:,:,:) = pvv(:,:,:,Krhs) 
     76         ALLOCATE( ztrdu(jpi,jpj,jpk) , ztrdv(jpi,jpj,jpk) )  
     77         ztrdu(:,:,:) = puu(:,:,:,Krhs)  
     78         ztrdv(:,:,:) = pvv(:,:,:,Krhs)  
    7879      ENDIF 
    7980 
     
    114115      ENDIF 
    115116      !                               ! Control print 
    116       IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=puu(:,:,:,Krhs), clinfo1=' zad  - Ua: ', mask1=umask,   & 
    117          &                                  tab3d_2=pvv(:,:,:,Krhs), clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
     117      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=CASTWP(puu(:,:,:,Krhs)), clinfo1=' zad  - Ua: ', mask1=umask,   & 
     118         &                                  tab3d_2=CASTWP(pvv(:,:,:,Krhs)), clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    118119      ! 
    119120      IF( ln_timing )   CALL timing_stop('dyn_zad') 
Note: See TracChangeset for help on using the changeset viewer.