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/FLO/flo4rk.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/FLO/flo4rk.F90

    r13237 r15540  
    2020 
    2121   !                                   ! RK4 and Lagrange interpolation coefficients 
    22    REAL(wp), DIMENSION (4) ::   tcoef1 = (/  1.0  ,  0.5  ,  0.5  ,  0.0  /)   !  
    23    REAL(wp), DIMENSION (4) ::   tcoef2 = (/  0.0  ,  0.5  ,  0.5  ,  1.0  /)   ! 
    24    REAL(wp), DIMENSION (4) ::   scoef2 = (/  1.0  ,  2.0  ,  2.0  ,  1.0  /)   ! 
    25    REAL(wp), DIMENSION (4) ::   rcoef  = (/-1./6. , 1./2. ,-1./2. , 1./6. /)   ! 
    26    REAL(wp), DIMENSION (3) ::   scoef1 = (/  0.5  ,  0.5  ,  1.0  /)           ! 
     22   REAL(dp), DIMENSION (4) ::   tcoef1 = (/  1.0  ,  0.5  ,  0.5  ,  0.0  /)   !  
     23   REAL(dp), DIMENSION (4) ::   tcoef2 = (/  0.0  ,  0.5  ,  0.5  ,  1.0  /)   ! 
     24   REAL(dp), DIMENSION (4) ::   scoef2 = (/  1.0  ,  2.0  ,  2.0  ,  1.0  /)   ! 
     25   REAL(dp), DIMENSION (4) ::   rcoef  = (/-1./6. , 1./2. ,-1./2. , 1./6. /)   ! 
     26   REAL(dp), DIMENSION (3) ::   scoef1 = (/  0.5  ,  0.5  ,  1.0  /)           ! 
    2727 
    2828#  include "domzgr_substitute.h90" 
     
    5252      INTEGER ::  ierror              ! error value 
    5353 
    54       REAL(wp), DIMENSION(jpnfl)   ::   zgifl , zgjfl , zgkfl    ! index RK  positions 
    55       REAL(wp), DIMENSION(jpnfl)   ::   zufl  , zvfl  , zwfl     ! interpolated velocity at the float position  
    56       REAL(wp), DIMENSION(jpnfl,4) ::   zrkxfl, zrkyfl, zrkzfl   ! RK coefficients 
     54      REAL(dp), DIMENSION(jpnfl)   ::   zgifl , zgjfl , zgkfl    ! index RK  positions 
     55      REAL(dp), DIMENSION(jpnfl)   ::   zufl  , zvfl  , zwfl     ! interpolated velocity at the float position  
     56      REAL(dp), DIMENSION(jpnfl,4) ::   zrkxfl, zrkyfl, zrkzfl   ! RK coefficients 
    5757      !!--------------------------------------------------------------------- 
    5858      ! 
     
    169169      !!---------------------------------------------------------------------- 
    170170      INTEGER                    , INTENT(in   ) ::   Kbb, Kmm           ! ocean time level indices 
    171       REAL(wp) , DIMENSION(jpnfl), INTENT(in   ) ::   pxt , pyt , pzt    ! position of the float 
    172       REAL(wp) , DIMENSION(jpnfl), INTENT(  out) ::   pufl, pvfl, pwfl   ! velocity at this position 
     171      REAL(dp) , DIMENSION(jpnfl), INTENT(in   ) ::   pxt , pyt , pzt    ! position of the float 
     172      REAL(dp) , DIMENSION(jpnfl), INTENT(  out) ::   pufl, pvfl, pwfl   ! velocity at this position 
    173173      INTEGER                    , INTENT(in   ) ::   ki                 ! 
    174174      !! 
    175175      INTEGER  ::   jfl, jind1, jind2, jind3   ! dummy loop indices 
    176       REAL(wp) ::   zsumu, zsumv, zsumw        ! local scalar 
     176      REAL(dp) ::   zsumu, zsumv, zsumw        ! local scalar 
    177177      INTEGER  , DIMENSION(jpnfl)       ::   iilu, ijlu, iklu   ! nearest neighbour INDEX-u 
    178178      INTEGER  , DIMENSION(jpnfl)       ::   iilv, ijlv, iklv   ! nearest neighbour INDEX-v 
     
    181181      INTEGER  , DIMENSION(jpnfl,4)     ::   iidv, ijdv, ikdv   ! 64 nearest neighbour INDEX-v 
    182182      INTEGER  , DIMENSION(jpnfl,4)     ::   iidw, ijdw, ikdw   ! 64 nearest neighbour INDEX-w 
    183       REAL(wp) , DIMENSION(jpnfl,4)     ::   zlagxu, zlagyu, zlagzu   ! Lagrange  coefficients 
    184       REAL(wp) , DIMENSION(jpnfl,4)     ::   zlagxv, zlagyv, zlagzv   !    -           - 
    185       REAL(wp) , DIMENSION(jpnfl,4)     ::   zlagxw, zlagyw, zlagzw   !    -           - 
    186       REAL(wp) , DIMENSION(jpnfl,4,4,4) ::   ztufl , ztvfl , ztwfl   ! velocity at choosen time step 
     183      REAL(dp) , DIMENSION(jpnfl,4)     ::   zlagxu, zlagyu, zlagzu   ! Lagrange  coefficients 
     184      REAL(dp) , DIMENSION(jpnfl,4)     ::   zlagxv, zlagyv, zlagzv   !    -           - 
     185      REAL(dp) , DIMENSION(jpnfl,4)     ::   zlagxw, zlagyw, zlagzw   !    -           - 
     186      REAL(dp) , DIMENSION(jpnfl,4,4,4) ::   ztufl , ztvfl , ztwfl   ! velocity at choosen time step 
    187187      !!--------------------------------------------------------------------- 
    188188  
Note: See TracChangeset for help on using the changeset viewer.