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/OCE/DOM/daymod.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/OCE/DOM/daymod.F90

    r14072 r14219  
    6969      !!---------------------------------------------------------------------- 
    7070      INTEGER  ::   inbday, imonday, isecrst   ! local integers 
    71       REAL(wp) ::   zjul             ! local scalar 
     71      REAL(dp) ::   zjul             ! local scalar 
    7272      !!---------------------------------------------------------------------- 
    7373      ! 
     
    9494      isecrst = ( nhour * NINT(rhhmm) + nminute ) * NINT(rmmss) 
    9595 
    96       CALL ymds2ju( nyear, nmonth, nday, REAL(isecrst,wp), fjulday ) 
     96      CALL ymds2ju( nyear, nmonth, nday, REAL(isecrst,dp), fjulday )   
    9797      IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < 0.1 / rday )   fjulday = REAL(NINT(fjulday),wp)   ! avoid truncation error 
    9898      IF( nhour*NINT(rhhmm*rmmss) + nminute*NINT(rmmss) - ndt05 .LT. 0 ) fjulday = fjulday+1.       ! move back to the day at nit000 (and not at nit000 - 1) 
     
    116116 
    117117      !compute number of days between last Monday and today 
    118       CALL ymds2ju( 1900, 01, 01, 0.0_wp, zjul )     ! compute julian day value of 01.01.1900 (our reference that was a Monday) 
     118      CALL ymds2ju( 1900, 01, 01, 0.0_dp, zjul )     ! compute julian day value of 01.01.1900 (our reference that was a Monday) 
    119119      inbday = FLOOR(fjulday - zjul)              ! compute nb day between  01.01.1900 and start of current day 
    120120      imonday = MOD(inbday, 7)                    ! compute nb day between last monday and current day 
     
    260260         ! 
    261261         !compute first day of the year in julian days 
    262          CALL ymds2ju( nyear, 01, 01, 0.0_wp, fjulstartyear ) 
     262         CALL ymds2ju( nyear, 01, 01, 0.0_dp, fjulstartyear ) 
    263263         ! 
    264264         IF(lwp) WRITE(numout,'(a,i8,a,i4.4,a,i2.2,a,i2.2,a,i3.3)') '======>> time-step =', kt,   & 
     
    401401         ENDIF 
    402402         ! calendar control 
    403          CALL iom_rstput( kt, nitrst, numrow, 'kt'     , REAL( kt    , wp)   )   ! time-step 
    404          CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp)   )   ! date 
     403         CALL iom_rstput( kt, nitrst, numrow, 'kt'     , REAL( kt    , dp)   )   ! time-step 
     404         CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, dp)   )   ! date 
    405405         CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj              )   ! number of elapsed days since 
    406406         !                                                                                                   ! the begining of the run [s] 
    407          CALL iom_rstput( kt, nitrst, numrow, 'ntime'  , REAL( nn_time0, wp) ) ! time 
     407         CALL iom_rstput( kt, nitrst, numrow, 'ntime'  , REAL( nn_time0, dp) ) ! time 
    408408      ENDIF 
    409409      ! 
Note: See TracChangeset for help on using the changeset viewer.