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

    r12377 r14219  
    3434   PUBLIC   dyn_ldf_init  ! called by opa  module  
    3535 
     36#  include "single_precision_substitute.h90" 
    3637   !!---------------------------------------------------------------------- 
    3738   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
     
    4950      INTEGER                             , INTENT( in )  ::  kt               ! ocean time-step index 
    5051      INTEGER                             , INTENT( in )  ::  Kbb, Kmm, Krhs   ! ocean time level indices 
    51       REAL(wp), DIMENSION(jpi,jpj,jpk,jpt), INTENT(inout) ::  puu, pvv         ! ocean velocities and RHS of momentum equation 
     52      REAL(dp), DIMENSION(jpi,jpj,jpk,jpt), INTENT(inout) ::  puu, pvv         ! ocean velocities and RHS of momentum equation 
    5253      ! 
    53       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrdu, ztrdv 
     54      REAL(dp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrdu, ztrdv 
    5455      !!---------------------------------------------------------------------- 
    5556      ! 
     
    6566      ! 
    6667      CASE ( np_lap   )   
    67          CALL dyn_ldf_lap( kt, Kbb, Kmm, puu(:,:,:,Kbb), pvv(:,:,:,Kbb), puu(:,:,:,Krhs), pvv(:,:,:,Krhs), 1 ) ! iso-level    laplacian 
     68      CALL dyn_ldf_lap( kt, Kbb, Kmm, CASTWP(puu(:,:,:,Kbb)), CASTWP(pvv(:,:,:,Kbb)), puu(:,:,:,Krhs), pvv(:,:,:,Krhs), 1 ) 
    6869      CASE ( np_lap_i )  
    6970         CALL dyn_ldf_iso( kt, Kbb, Kmm, puu, pvv, Krhs    )                                                   ! rotated      laplacian 
    7071      CASE ( np_blp   )   
    71          CALL dyn_ldf_blp( kt, Kbb, Kmm, puu(:,:,:,Kbb), pvv(:,:,:,Kbb), puu(:,:,:,Krhs), pvv(:,:,:,Krhs)    ) ! iso-level bi-laplacian 
     72      CALL dyn_ldf_blp( kt, Kbb, Kmm, CASTWP(puu(:,:,:,Kbb)), CASTWP(pvv(:,:,:,Kbb)), puu(:,:,:,Krhs), pvv(:,:,:,Krhs)    ) 
    7273      ! 
    7374      END SELECT 
     
    8081      ENDIF 
    8182      !                                          ! print sum trends (used for debugging) 
    82       IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=puu(:,:,:,Krhs), clinfo1=' ldf  - Ua: ', mask1=umask,   & 
    83          &                                  tab3d_2=pvv(:,:,:,Krhs), clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
     83      IF(sn_cfctl%l_prtctl)   CALL prt_ctl( tab3d_1=CASTWP(puu(:,:,:,Krhs)), clinfo1=' ldf  - Ua: ', mask1=umask,   & 
     84         &                                  tab3d_2=CASTWP(pvv(:,:,:,Krhs)), clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    8485      ! 
    8586      IF( ln_timing )   CALL timing_stop('dyn_ldf') 
Note: See TracChangeset for help on using the changeset viewer.