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/ISF/isfcavmlt.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/ISF/isfcavmlt.F90

    r13472 r15540  
    3232 
    3333   !! * Substitutions 
     34#  include "single_precision_substitute.h90" 
    3435#  include "do_loop_substitute.h90" 
    3536   !!---------------------------------------------------------------------- 
     
    5354      !! 
    5455      !!-------------------------- OUT ------------------------------------- 
    55       REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! heat and fwf fluxes 
     56      REAL(dp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! heat and fwf fluxes 
    5657      !!-------------------------- IN  ------------------------------------- 
    5758      INTEGER, INTENT(in) :: kt 
    58       REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pgt  , pgs    ! gamma t and gamma s 
    59       REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pttbl, pstbl  ! top boundary layer tracer 
     59      REAL(dp), DIMENSION(jpi,jpj), INTENT(in   ) :: pgt  , pgs    ! gamma t and gamma s 
     60      REAL(dp), DIMENSION(jpi,jpj), INTENT(in   ) :: pttbl, pstbl  ! top boundary layer tracer 
    6061      !!--------------------------------------------------------------------- 
    6162      ! 
     
    101102      !!--------------------------------------------------------------------- 
    102103      !!-------------------------- OUT ------------------------------------- 
    103       REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! heat content, latent heat and fwf fluxes 
     104      REAL(dp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! heat content, latent heat and fwf fluxes 
    104105      !!-------------------------- IN  ------------------------------------- 
    105106      INTEGER                     , INTENT(in   ) :: kt                  ! current time step 
    106       REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pstbl               ! salinity in tbl 
    107       !!-------------------------------------------------------------------- 
    108       REAL(wp), DIMENSION(jpi,jpj) :: ztfrz                              ! tbl freezing temperature 
     107      REAL(dp), DIMENSION(jpi,jpj), INTENT(in   ) :: pstbl               ! salinity in tbl 
     108      !!-------------------------------------------------------------------- 
     109      REAL(dp), DIMENSION(jpi,jpj) :: ztfrz                              ! tbl freezing temperature 
    109110      !!-------------------------------------------------------------------- 
    110111      ! 
    111112      ! Compute freezing temperature 
    112       CALL eos_fzp( pstbl(:,:), ztfrz(:,:), risfdep(:,:) ) 
     113      CALL eos_fzp( pstbl(:,:), ztfrz(:,:), CASTDP(risfdep(:,:)) ) 
    113114      ! 
    114115      ! read input file 
     
    145146      !! 
    146147      !!-------------------------- OUT ------------------------------------- 
    147       REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! hean content, ocean-ice heat and fwf fluxes 
    148       !!-------------------------- IN  ------------------------------------- 
    149       REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pgt           ! temperature exchange coeficient 
    150       REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pttbl, pstbl  ! temperature and salinity in top boundary layer 
    151       !!-------------------------------------------------------------------- 
    152       REAL(wp), DIMENSION(jpi,jpj) :: ztfrz         ! freezing temperature 
    153       REAL(wp), DIMENSION(jpi,jpj) :: zthd          ! thermal driving 
     148      REAL(dp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! hean content, ocean-ice heat and fwf fluxes 
     149      !!-------------------------- IN  ------------------------------------- 
     150      REAL(dp), DIMENSION(jpi,jpj), INTENT(in   ) :: pgt           ! temperature exchange coeficient 
     151      REAL(dp), DIMENSION(jpi,jpj), INTENT(in   ) :: pttbl, pstbl  ! temperature and salinity in top boundary layer 
     152      !!-------------------------------------------------------------------- 
     153      REAL(dp), DIMENSION(jpi,jpj) :: ztfrz         ! freezing temperature 
     154      REAL(dp), DIMENSION(jpi,jpj) :: zthd          ! thermal driving 
    154155      !!-------------------------------------------------------------------- 
    155156      ! 
    156157      ! Calculate freezing temperature 
    157       CALL eos_fzp( pstbl(:,:), ztfrz(:,:), risfdep(:,:) ) 
     158      CALL eos_fzp( pstbl(:,:), ztfrz(:,:), CASTDP(risfdep(:,:)) ) 
    158159      ! 
    159160      ! thermal driving 
     
    193194      !! 
    194195      !!-------------------------- OUT ------------------------------------- 
    195       REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! latent heat and fwf fluxes 
    196       !!-------------------------- IN  ------------------------------------- 
    197       REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pgt  , pgs          ! heat/salt exchange coeficient 
    198       REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pttbl, pstbl        ! mean temperature and salinity in top boundary layer 
    199       !!-------------------------------------------------------------------- 
    200       REAL(wp) :: zeps1,zeps2,zeps3,zeps4,zeps6,zeps7       ! dummy local scalar for quadratic equation resolution 
    201       REAL(wp) :: zaqe,zbqe,zcqe,zaqer,zdis,zsfrz,zcfac     ! dummy local scalar for quadratic equation resolution 
    202       REAL(wp) :: zeps = 1.e-20 
    203       REAL(wp), DIMENSION(jpi,jpj) :: ztfrz         ! freezing point 
    204       REAL(wp), DIMENSION(jpi,jpj) :: zqcon         ! conductive flux through the ice shelf 
    205       REAL(wp), DIMENSION(jpi,jpj) :: zthd          ! thermal driving 
     196      REAL(dp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! latent heat and fwf fluxes 
     197      !!-------------------------- IN  ------------------------------------- 
     198      REAL(dp), DIMENSION(jpi,jpj), INTENT(in   ) :: pgt  , pgs          ! heat/salt exchange coeficient 
     199      REAL(dp), DIMENSION(jpi,jpj), INTENT(in   ) :: pttbl, pstbl        ! mean temperature and salinity in top boundary layer 
     200      !!-------------------------------------------------------------------- 
     201      REAL(dp) :: zeps1,zeps2,zeps3,zeps4,zeps6,zeps7       ! dummy local scalar for quadratic equation resolution 
     202      REAL(dp) :: zaqe,zbqe,zcqe,zaqer,zdis,zsfrz,zcfac     ! dummy local scalar for quadratic equation resolution 
     203      REAL(dp) :: zeps = 1.e-20 
     204      REAL(dp), DIMENSION(jpi,jpj) :: ztfrz         ! freezing point 
     205      REAL(dp), DIMENSION(jpi,jpj) :: zqcon         ! conductive flux through the ice shelf 
     206      REAL(dp), DIMENSION(jpi,jpj) :: zthd          ! thermal driving 
    206207      ! 
    207208      INTEGER  ::   ji, jj     ! dummy loop indices 
     
    268269      !!--------------------------------------------------------------------- 
    269270      !!-------------------------- OUT ------------------------------------- 
    270       REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! heat content, latent heat and fwf fluxes 
     271      REAL(dp), DIMENSION(jpi,jpj), INTENT(  out) :: pqhc, pqoce, pqfwf  ! heat content, latent heat and fwf fluxes 
    271272      !!-------------------------- IN  ------------------------------------- 
    272273      INTEGER                     , INTENT(in   ) :: kt                  ! current time step 
    273       REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pstbl               ! salinity in tbl 
    274       !!-------------------------------------------------------------------- 
    275       REAL(wp)                     :: zfwf_fld, zfwf_oasis               ! total fwf in the forcing fields (pattern) and from the oasis interface (amount) 
    276       REAL(wp), DIMENSION(jpi,jpj) :: ztfrz                              ! tbl freezing temperature 
    277       REAL(wp), DIMENSION(jpi,jpj) :: zfwf                               ! 2d fwf map after scaling 
     274      REAL(dp), DIMENSION(jpi,jpj), INTENT(in   ) :: pstbl               ! salinity in tbl 
     275      !!-------------------------------------------------------------------- 
     276      REAL(dp)                     :: zfwf_fld, zfwf_oasis               ! total fwf in the forcing fields (pattern) and from the oasis interface (amount) 
     277      REAL(dp), DIMENSION(jpi,jpj) :: ztfrz                              ! tbl freezing temperature 
     278      REAL(dp), DIMENSION(jpi,jpj) :: zfwf                               ! 2d fwf map after scaling 
    278279      !!-------------------------------------------------------------------- 
    279280      ! 
    280281      ! Calculate freezing temperature 
    281       CALL eos_fzp( pstbl(:,:), ztfrz(:,:), risfdep(:,:) ) 
     282      CALL eos_fzp( pstbl(:,:), ztfrz(:,:), CASTDP(risfdep(:,:)) ) 
    282283      ! 
    283284      ! read input file 
Note: See TracChangeset for help on using the changeset viewer.