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 14219 for NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/TOP/PISCES/P4Z/p4zpoc.F90 – NEMO

Ignore:
Timestamp:
2020-12-18T18:52:57+01:00 (4 years ago)
Author:
mcastril
Message:

Add Mixed Precision support by Oriol Tintó

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/src/TOP/PISCES/P4Z/p4zpoc.F90

    r13295 r14219  
    4040#  include "do_loop_substitute.h90" 
    4141#  include "domzgr_substitute.h90" 
     42#  include "single_precision_substitute.h90" 
    4243   !!---------------------------------------------------------------------- 
    4344   !! NEMO/TOP 4.0 , NEMO Consortium (2018) 
     
    243244        WRITE(charout, FMT="('poc1')") 
    244245        CALL prt_ctl_info( charout, cdcomp = 'top' ) 
    245         CALL prt_ctl(tab4d_1=tr(:,:,:,:,Krhs), mask1=tmask, clinfo=ctrcnm) 
     246        CALL prt_ctl(tab4d_1=CASTWP(tr(:,:,:,:,Krhs)), mask1=tmask, clinfo=ctrcnm) 
    246247     ENDIF 
    247248 
     
    435436         WRITE(charout, FMT="('poc2')") 
    436437         CALL prt_ctl_info( charout, cdcomp = 'top' ) 
    437          CALL prt_ctl(tab4d_1=tr(:,:,:,:,Krhs), mask1=tmask, clinfo=ctrcnm) 
     438         CALL prt_ctl(tab4d_1=CASTWP(tr(:,:,:,:,Krhs)), mask1=tmask, clinfo=ctrcnm) 
    438439      ENDIF 
    439440      ! 
     
    504505         ! 
    505506         alphan(1) = gamain(reminup, rshape, ifault) 
    506          reminp(1) = gamain(reminup, rshape+1.0, ifault) * xremip / alphan(1) 
     507         reminp(1) = gamain(reminup, rshape+1.0_wp, ifault) * xremip / alphan(1) 
    507508         DO jn = 2, jcpoc-1 
    508509            reminup = 1./ 400. * EXP( REAL(jn, wp) * remindelta) 
    509510            remindown = 1. / 400. * EXP( REAL(jn-1, wp) * remindelta) 
    510511            alphan(jn) = gamain(reminup, rshape, ifault) - gamain(remindown, rshape, ifault) 
    511             reminp(jn) = gamain(reminup, rshape+1.0, ifault) - gamain(remindown, rshape+1.0, ifault) 
     512            reminp(jn) = gamain(reminup, rshape+1.0_wp, ifault) - gamain(remindown, rshape+1.0_wp, ifault) 
    512513            reminp(jn) = reminp(jn) * xremip / alphan(jn) 
    513514         END DO 
    514515         remindown = 1. / 400. * EXP( REAL(jcpoc-1, wp) * remindelta) 
    515516         alphan(jcpoc) = 1.0 - gamain(remindown, rshape, ifault) 
    516          reminp(jcpoc) = 1.0 - gamain(remindown, rshape+1.0, ifault) 
     517         reminp(jcpoc) = 1.0 - gamain(remindown, rshape+1.0_wp, ifault) 
    517518         reminp(jcpoc) = reminp(jcpoc) * xremip / alphan(jcpoc) 
    518519 
Note: See TracChangeset for help on using the changeset viewer.