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

Changeset 14777


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/releases/r4.0/r4.0-HEAD/src/ICE/icethd_ent.F90

    r13284 r14777  
    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.