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 12603 for NEMO/branches/2020/dev_r12512_HPC-04_mcastril_Mixed_Precision_implementation/src/OCE/ICB/icbthm.F90 – NEMO

Ignore:
Timestamp:
2020-03-25T16:20:25+01:00 (4 years ago)
Author:
orioltp
Message:

Adding several interfaces to work with both single and double precision

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r12512_HPC-04_mcastril_Mixed_Precision_implementation/src/OCE/ICB/icbthm.F90

    r12291 r12603  
    5757      TYPE(point)  , POINTER ::   pt 
    5858      ! 
    59       COMPLEX(wp), DIMENSION(jpi,jpj) :: cicb_melt, cicb_hflx 
     59      COMPLEX(dp), DIMENSION(jpi,jpj) :: cicb_melt, cicb_hflx 
    6060      !!---------------------------------------------------------------------- 
    6161      ! 
    6262      !! initialiaze cicb_melt and cicb_heat 
    63       cicb_melt = CMPLX( 0.e0, 0.e0, wp )  
    64       cicb_hflx = CMPLX( 0.e0, 0.e0, wp )  
     63      cicb_melt = CMPLX( 0.e0, 0.e0, dp )  
     64      cicb_hflx = CMPLX( 0.e0, 0.e0, dp )  
    6565      ! 
    6666      z1_rday = 1._wp / rday 
     
    176176            !! the use of DDPDD function for the cumulative sum is needed for reproducibility 
    177177            zmelt    = ( zdM - ( zdMbitsE - zdMbitsM ) ) * z1_dt   ! kg/s 
    178             CALL DDPDD( CMPLX( zmelt * z1_e1e2, 0.e0, wp ), cicb_melt(ii,ij) ) 
     178            CALL DDPDD( CMPLX( zmelt * z1_e1e2, 0.e0, dp ), cicb_melt(ii,ij) ) 
    179179            ! 
    180180            ! iceberg heat flux 
     
    185185            zheat_hcflux = zmelt * pt%heat_density       ! heat content flux : kg/s x J/kg = J/s 
    186186            zheat_latent = - zmelt * rLfus               ! latent heat flux:  kg/s x J/kg = J/s 
    187             CALL DDPDD( CMPLX( ( zheat_hcflux + zheat_latent ) * z1_e1e2, 0.e0, wp ), cicb_hflx(ii,ij) ) 
     187            CALL DDPDD( CMPLX( ( zheat_hcflux + zheat_latent ) * z1_e1e2, 0.e0, dp ), cicb_hflx(ii,ij) ) 
    188188            ! 
    189189            ! diagnostics 
     
    230230      END DO 
    231231      ! 
    232       berg_grid%floating_melt = REAL(cicb_melt,wp)    ! kg/m2/s 
    233       berg_grid%calving_hflx  = REAL(cicb_hflx,wp) 
     232      berg_grid%floating_melt = REAL(cicb_melt,dp)    ! kg/m2/s 
     233      berg_grid%calving_hflx  = REAL(cicb_hflx,dp) 
    234234      ! 
    235235      ! now use melt and associated heat flux in ocean (or not) 
Note: See TracChangeset for help on using the changeset viewer.