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/BDY/bdylib.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/BDY/bdylib.F90

    r13527 r14219  
    4545      TYPE(OBC_INDEX),                     INTENT(in) ::   idx  ! OBC indices 
    4646      REAL(wp), DIMENSION(:,:), POINTER,   INTENT(in) ::   dta  ! OBC external data 
    47       REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) ::   phia  ! tracer trend 
     47      REAL(dp), DIMENSION(jpi,jpj,jpk), INTENT(inout) ::   phia  ! tracer trend 
    4848      !! 
    4949      REAL(wp) ::   zwgt           ! boundary weight 
     
    7474      TYPE(OBC_INDEX),                     INTENT(in) ::   idx  ! OBC indices 
    7575      REAL(wp), DIMENSION(:,:), POINTER,   INTENT(in) ::   dta  ! OBC external data 
    76       REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) ::   phia  ! tracer trend 
     76      REAL(dp), DIMENSION(jpi,jpj,jpk), INTENT(inout) ::   phia  ! tracer trend 
    7777      !! 
    7878      INTEGER  ::   ib, ik, igrd   ! dummy loop indices 
     
    102102      TYPE(OBC_INDEX),                   INTENT(in   ) ::   idx  ! OBC indices 
    103103      REAL(wp), DIMENSION(:,:), POINTER, INTENT(in   ) ::   dta  ! OBC external data 
    104       REAL(wp), DIMENSION(jpi,jpj,jpk),  INTENT(inout) ::   phib  ! before tracer field 
    105       REAL(wp), DIMENSION(jpi,jpj,jpk),  INTENT(inout) ::   phia  ! tracer trend 
     104      REAL(dp), DIMENSION(jpi,jpj,jpk),  INTENT(inout) ::   phib  ! before tracer field 
     105      REAL(dp), DIMENSION(jpi,jpj,jpk),  INTENT(inout) ::   phia  ! tracer trend 
    106106      LOGICAL ,                          INTENT(in   ) ::   lrim0   ! indicate if rim 0 is treated 
    107107      LOGICAL ,                          INTENT(in   ) ::   ll_npo  ! switch for NPO version 
     
    112112      igrd = 1                       ! Everything is at T-points here 
    113113      ! 
    114       CALL bdy_orlanski_3d( idx, igrd, phib(:,:,:), phia(:,:,:), dta, lrim0, ll_npo ) 
     114CALL bdy_orlanski_3d( idx, igrd, REAL(phib(:,:,:), wp), phia(:,:,:), dta, lrim0, ll_npo ) 
    115115      ! 
    116116   END SUBROUTINE bdy_orl 
     
    152152      REAL(wp), POINTER, DIMENSION(:,:)          :: zmask_xdif ! land/sea mask for x-derivatives 
    153153      REAL(wp), POINTER, DIMENSION(:,:)          :: zmask_ydif ! land/sea mask for y-derivatives 
    154       REAL(wp), POINTER, DIMENSION(:,:)          :: pe_xdif    ! scale factors for x-derivatives 
    155       REAL(wp), POINTER, DIMENSION(:,:)          :: pe_ydif    ! scale factors for y-derivatives 
     154      REAL(dp), POINTER, DIMENSION(:,:)          :: pe_xdif    ! scale factors for x-derivatives 
     155      REAL(dp), POINTER, DIMENSION(:,:)          :: pe_ydif    ! scale factors for y-derivatives 
    156156      !!---------------------------------------------------------------------- 
    157157      ! 
     
    293293      INTEGER ,                            INTENT(in   ) ::   igrd     ! grid index 
    294294      REAL(wp), DIMENSION(:,:,:),          INTENT(in   ) ::   phib     ! model before 3D field 
    295       REAL(wp), DIMENSION(:,:,:),          INTENT(inout) ::   phia     ! model after 3D field (to be updated) 
     295      REAL(dp), DIMENSION(:,:,:),          INTENT(inout) ::   phia     ! model after 3D field (to be updated) 
    296296      REAL(wp), DIMENSION(:,:  ), POINTER, INTENT(in   ) ::   phi_ext  ! external forcing data 
    297297      LOGICAL ,                            INTENT(in   ) ::   lrim0    ! indicate if rim 0 is treated 
     
    314314      REAL(wp), POINTER, DIMENSION(:,:,:)        :: zmask_xdif ! land/sea mask for x-derivatives 
    315315      REAL(wp), POINTER, DIMENSION(:,:,:)        :: zmask_ydif ! land/sea mask for y-derivatives 
    316       REAL(wp), POINTER, DIMENSION(:,:)          :: pe_xdif    ! scale factors for x-derivatives 
    317       REAL(wp), POINTER, DIMENSION(:,:)          :: pe_ydif    ! scale factors for y-derivatives 
     316      REAL(dp), POINTER, DIMENSION(:,:)          :: pe_xdif    ! scale factors for x-derivatives 
     317      REAL(dp), POINTER, DIMENSION(:,:)          :: pe_ydif    ! scale factors for y-derivatives 
    318318      !!---------------------------------------------------------------------- 
    319319      ! 
     
    458458      !!---------------------------------------------------------------------- 
    459459      INTEGER,                    INTENT(in   )  ::   igrd     ! grid index 
    460       REAL(wp), DIMENSION(:,:,:), INTENT(inout)  ::   phia     ! model after 3D field (to be updated), must be masked 
     460      REAL(dp), DIMENSION(:,:,:), INTENT(inout)  ::   phia     ! model after 3D field (to be updated), must be masked 
    461461      TYPE(OBC_INDEX),            INTENT(in   )  ::   idx      ! OBC indices 
    462462      LOGICAL ,                   INTENT(in   )  ::   lrim0    ! indicate if rim 0 is treated 
Note: See TracChangeset for help on using the changeset viewer.