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 14778 – NEMO

Changeset 14778


Ignore:
Timestamp:
2021-05-03T10:58:22+02:00 (3 years ago)
Author:
clem
Message:

trunk: avoid roundoff error (it does not change results, it is only important for online diags)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/ICE/icethd_ent.F90

    r13547 r14778  
    121121         DO ji = 1, npti 
    122122            rswitch      = MAX( 0._wp , SIGN( 1._wp , zhnew(ji) - epsi20 ) )  
    123             qnew(ji,jk1) = rswitch * ( zeh_cum1(ji,jk1) - zeh_cum1(ji,jk1-1) ) / MAX( zhnew(ji), epsi20 ) 
     123            qnew(ji,jk1) = rswitch * MAX( 0._wp, zeh_cum1(ji,jk1) - zeh_cum1(ji,jk1-1) ) / MAX( zhnew(ji), epsi20 ) ! max for roundoff error 
    124124         END DO 
    125125      END DO 
Note: See TracChangeset for help on using the changeset viewer.