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/ZDF/zdfmfc.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/ZDF/zdfmfc.F90

    r14986 r15540  
    4343   PUBLIC   zdf_mfc_init    ! routine called in nemo module 
    4444   ! 
    45    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::  edmfa, edmfb, edmfc   !: diagonal term of the matrix. 
    46    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) ::  edmftra               !: y term for matrix inversion 
    47    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::  edmfm               !: y term for matrix inversion 
     45   REAL(dp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::  edmfa, edmfb, edmfc   !: diagonal term of the matrix. 
     46   REAL(dp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) ::  edmftra               !: y term for matrix inversion 
     47   REAL(dp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::  edmfm               !: y term for matrix inversion 
    4848   ! 
    4949   !! ** Namelist  namzdf_edmf  ** 
    50    REAL(wp) ::   rn_cemf           ! entrain of T/S 
    51    REAL(wp) ::   rn_cwmf           ! detrain of T/S 
    52    REAL(wp) ::   rn_cent           ! entrain of the convective mass flux 
    53    REAL(wp) ::   rn_cdet           ! detrain of the convective mass flux 
    54    REAL(wp) ::   rn_cap            ! Factor of computation for convective area (negative => area constant) 
    55    REAL(wp) ::   App_max           ! Maximum of the convective area 
     50   REAL(dp) ::   rn_cemf           ! entrain of T/S 
     51   REAL(dp) ::   rn_cwmf           ! detrain of T/S 
     52   REAL(dp) ::   rn_cent           ! entrain of the convective mass flux 
     53   REAL(dp) ::   rn_cdet           ! detrain of the convective mass flux 
     54   REAL(dp) ::   rn_cap            ! Factor of computation for convective area (negative => area constant) 
     55   REAL(dp) ::   App_max           ! Maximum of the convective area 
    5656   LOGICAL, PUBLIC, SAVE  ::   ln_edmfuv         !: EDMF flag for velocity  ! 
    5757   ! 
     
    9797      INTEGER                                  , INTENT(in)    :: Kmm, Krhs ! time level indices 
    9898      REAL(dp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts       ! active tracers and RHS of tracer equation 
    99       REAL(wp), DIMENSION(A2D(nn_hls),jpk,2) ::   ztsp         ! T/S of the plume 
    100       REAL(wp), DIMENSION(A2D(nn_hls),jpk,2) ::   ztse         ! T/S at W point 
    101       REAL(wp), DIMENSION(A2D(nn_hls),jpk) :: zrwp          ! 
    102       REAL(wp), DIMENSION(A2D(nn_hls),jpk) :: zrwp2         ! 
    103       REAL(wp), DIMENSION(A2D(nn_hls),jpk) :: zapp          ! 
    104       REAL(wp), DIMENSION(A2D(nn_hls),jpk) :: zedmf         ! 
    105       REAL(wp), DIMENSION(A2D(nn_hls),jpk) :: zepsT, zepsW  ! 
    106       ! 
    107       REAL(wp), DIMENSION(A2D(nn_hls)) :: zustar, zustar2   ! 
    108       REAL(wp), DIMENSION(A2D(nn_hls)) :: zuws, zvws, zsws, zfnet          ! 
    109       REAL(wp), DIMENSION(A2D(nn_hls)) :: zfbuo, zrautbm1 
     99      REAL(dp), DIMENSION(A2D(nn_hls),jpk,2) ::   ztsp         ! T/S of the plume 
     100      REAL(dp), DIMENSION(A2D(nn_hls),jpk,2) ::   ztse         ! T/S at W point 
     101      REAL(dp), DIMENSION(A2D(nn_hls),jpk) :: zrwp          ! 
     102      REAL(dp), DIMENSION(A2D(nn_hls),jpk) :: zrwp2         ! 
     103      REAL(dp), DIMENSION(A2D(nn_hls),jpk) :: zapp          ! 
     104      REAL(dp), DIMENSION(A2D(nn_hls),jpk) :: zedmf         ! 
     105      REAL(dp), DIMENSION(A2D(nn_hls),jpk) :: zepsT, zepsW  ! 
     106      ! 
     107      REAL(dp), DIMENSION(A2D(nn_hls)) :: zustar, zustar2   ! 
     108      REAL(dp), DIMENSION(A2D(nn_hls)) :: zuws, zvws, zsws, zfnet          ! 
     109      REAL(dp), DIMENSION(A2D(nn_hls)) :: zfbuo, zrautbm1 
    110110      REAL(dp), DIMENSION(A2D(nn_hls)) :: zrautb, zraupl 
    111       REAL(wp), DIMENSION(A2D(nn_hls)) :: zwpsurf            ! 
    112       REAL(wp), DIMENSION(A2D(nn_hls)) :: zop0 , zsp0 ! 
    113       REAL(wp), DIMENSION(A2D(nn_hls)) :: zrwp_0, zrwp2_0  ! 
    114       REAL(wp), DIMENSION(A2D(nn_hls)) :: zapp0           ! 
    115       REAL(wp), DIMENSION(A2D(nn_hls)) :: zphp, zph, zphpm1, zphm1, zNHydro 
    116       REAL(wp), DIMENSION(A2D(nn_hls)) :: zhcmo          ! 
    117       ! 
    118       REAL(wp), DIMENSION(A2D(nn_hls),jpk)   ::   zn2    ! N^2 
    119       REAL(wp), DIMENSION(A2D(nn_hls),2  ) ::   zab, zabm1, zabp ! alpha and beta 
     111      REAL(dp), DIMENSION(A2D(nn_hls)) :: zwpsurf            ! 
     112      REAL(dp), DIMENSION(A2D(nn_hls)) :: zop0 , zsp0 ! 
     113      REAL(dp), DIMENSION(A2D(nn_hls)) :: zrwp_0, zrwp2_0  ! 
     114      REAL(dp), DIMENSION(A2D(nn_hls)) :: zapp0           ! 
     115      REAL(dp), DIMENSION(A2D(nn_hls)) :: zphp, zph, zphpm1, zphm1, zNHydro 
     116      REAL(dp), DIMENSION(A2D(nn_hls)) :: zhcmo          ! 
     117      ! 
     118      REAL(dp), DIMENSION(A2D(nn_hls),jpk)   ::   zn2    ! N^2 
     119      REAL(dp), DIMENSION(A2D(nn_hls),2  ) ::   zab, zabm1, zabp ! alpha and beta 
    120120      
    121       REAL(wp), PARAMETER :: zepsilon = 1.e-30                 ! local small value 
    122  
    123       REAL(wp) :: zrho, zrhop 
    124       REAL(wp) :: zcnh, znum, zden, zcoef1, zcoef2 
    125       REAL(wp) :: zca, zcb, zcd, zrw, zxl, zcdet, zctre 
    126       REAL(wp) :: zaw, zbw, zxw 
    127       REAL(wp) :: alpha 
     121      REAL(dp), PARAMETER :: zepsilon = 1.e-30                 ! local small value 
     122 
     123      REAL(dp) :: zrho, zrhop 
     124      REAL(dp) :: zcnh, znum, zden, zcoef1, zcoef2 
     125      REAL(dp) :: zca, zcb, zcd, zrw, zxl, zcdet, zctre 
     126      REAL(dp) :: zaw, zbw, zxw 
     127      REAL(dp) :: alpha 
    128128     ! 
    129129      INTEGER, INTENT(in   )    ::   kt   ! ocean time-step index      ! 
     
    214214         ! Compute the buoyancy acceleration on T-points at jk-1 
    215215         zrautbm1(:,:) = zrautb(:,:) 
    216          CALL eos( CASTWP(pts (:,:,jk  ,:,Kmm)) ,  zrautb(:,:)   ) 
    217          CALL eos( CASTWP(ztsp(:,:,jk-1,:    )) ,  zraupl(:,:)   ) 
     216         CALL eos( pts (:,:,jk  ,:,Kmm) ,  zrautb(:,:)   ) 
     217         CALL eos( ztsp(:,:,jk-1,:    ) ,  zraupl(:,:)   ) 
    218218 
    219219         DO_2D( 0, 0, 0, 0 ) 
     
    399399 
    400400      REAL(dp), DIMENSION(A2D(nn_hls),jpk), INTENT(inout) ::  zdiagi, zdiagd, zdiags  ! inout: tridaig. terms 
    401       REAL(wp)                            , INTENT(in   ) ::   p2dt                   ! tracer time-step 
     401      REAL(dp)                            , INTENT(in   ) ::   p2dt                   ! tracer time-step 
    402402      INTEGER                             , INTENT(in   ) ::   Kaa                    ! ocean time level indices 
    403403 
     
    445445      INTEGER ::   jk    ! dummy loop indices 
    446446      INTEGER ::   ios   ! Local integer output status for namelist read 
    447       REAL(wp)::   zcr   ! local scalar 
     447      REAL(dp)::   zcr   ! local scalar 
    448448      !! 
    449449      NAMELIST/namzdf_mfc/ ln_edmfuv, rn_cemf, rn_cwmf, rn_cent, rn_cdet, rn_cap, App_max 
Note: See TracChangeset for help on using the changeset viewer.