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 15540 for NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/SBC/cpl_oasis3.F90 – NEMO

Ignore:
Timestamp:
2021-11-26T12:27:56+01:00 (3 years ago)
Author:
sparonuz
Message:

Mixed precision version, tested up to 30 years on ORCA2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/SBC/cpl_oasis3.F90

    r14644 r15540  
    7474      CHARACTER(len = 8)    ::   clname    ! Name of the coupling field 
    7575      CHARACTER(len = 1)    ::   clgrid    ! Grid type 
    76       REAL(wp)              ::   nsgn      ! Control of the sign change 
     76      REAL(dp)              ::   nsgn      ! Control of the sign change 
    7777      INTEGER, DIMENSION(nmaxcat,nmaxcpl) ::   nid   ! Id of the field (no more than 9 categories and 9 extrena models) 
    7878      INTEGER               ::   nct       ! Number of categories in field 
     
    8282   TYPE(FLD_CPL), DIMENSION(nmaxfld), PUBLIC ::   srcv, ssnd   !: Coupling fields 
    8383 
    84    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   exfld   ! Temporary buffer for receiving 
     84   REAL(dp), DIMENSION(:,:), ALLOCATABLE ::   exfld   ! Temporary buffer for receiving 
    8585 
    8686   !!---------------------------------------------------------------------- 
     
    8989   !! Software governed by the CeCILL license (see ./LICENSE) 
    9090   !!---------------------------------------------------------------------- 
     91#  include "single_precision_substitute.h90" 
    9192CONTAINS 
    9293 
     
    316317      INTEGER                   , INTENT(  out) ::   kinfo     ! OASIS3 info argument 
    317318      INTEGER                   , INTENT(in   ) ::   kstep     ! ocean time-step in seconds 
    318       REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   pdata 
     319      REAL(dp), DIMENSION(:,:,:), INTENT(in   ) ::   pdata 
    319320      !! 
    320321      INTEGER                                   ::   jc,jm     ! local loop index 
     
    361362      INTEGER                   , INTENT(in   ) ::   kid       ! variable index in the array 
    362363      INTEGER                   , INTENT(in   ) ::   kstep     ! ocean time-step in seconds 
    363       REAL(wp), DIMENSION(:,:,:), INTENT(inout) ::   pdata     ! IN to keep the value if nothing is done 
    364       REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   pmask     ! coupling mask 
     364      REAL(dp), DIMENSION(:,:,:), INTENT(inout) ::   pdata     ! IN to keep the value if nothing is done 
     365      REAL(dp), DIMENSION(:,:,:), INTENT(in   ) ::   pmask     ! coupling mask 
    365366      INTEGER                   , INTENT(  out) ::   kinfo     ! OASIS3 info argument 
    366367      !! 
     
    419420         !--- we must call lbc_lnk to fill the halos that where not received. 
    420421         IF( .NOT. ll_1st ) THEN 
    421             CALL lbc_lnk( 'cpl_oasis3', pdata(:,:,jc), srcv(kid)%clgrid, srcv(kid)%nsgn ) 
     422            CALL lbc_lnk( 'cpl_oasis3', pdata(:,:,jc), srcv(kid)%clgrid, CASTSP(srcv(kid)%nsgn) ) 
    422423         ENDIF 
    423424 
     
    547548 
    548549   SUBROUTINE oasis_put(k1,k2,p1,k3) 
    549       REAL(wp), DIMENSION(:,:), INTENT(in   ) ::  p1 
     550      REAL(dp), DIMENSION(:,:), INTENT(in   ) ::  p1 
    550551      INTEGER                 , INTENT(in   ) ::  k1,k2 
    551552      INTEGER                 , INTENT(  out) ::  k3 
     
    555556 
    556557   SUBROUTINE oasis_get(k1,k2,p1,k3) 
    557       REAL(wp), DIMENSION(:,:), INTENT(  out) ::  p1 
     558      REAL(dp), DIMENSION(:,:), INTENT(  out) ::  p1 
    558559      INTEGER                 , INTENT(in   ) ::  k1,k2 
    559560      INTEGER                 , INTENT(  out) ::  k3 
Note: See TracChangeset for help on using the changeset viewer.