Opened 10 years ago
Closed 10 years ago
#1301 closed Bug (fixed)
underflow in tra_qsr_init
Reported by: | cbricaud | Owned by: | nemo |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | OCE | Version: | v3.6 |
Severity: | Keywords: | ||
Cc: |
Description
2 lines give underflow ( due to EXP ):
zc0 = zz0 * EXP( -fsdepw(ji,jj,jk )*xsi0r ) + zz1 * EXP( -fsdepw(ji,jj,jk )*xsi1r )
zc1 = zz0 * EXP( -fsdepw(ji,jj,jk+1)*xsi0r ) + zz1 * EXP( -fsdepw(ji,jj,jk+1)*xsi1r )
proposition of fix:
zc0 = zz0 * EXP( MAX( -fsdepw(ji,jj,jk )*xsi0r ,-1.e-4 ) ) +
zz1 * EXP( MAX(-fsdepw(ji,jj,jk )*xsi1r ,-1.e-4 ) )
zc1 = zz0 * EXP( MAX( -fsdepw(ji,jj,jk+1)*xsi0r ,-1.e-4 ) ) +
zz1 * EXP( MAX(-fsdepw(ji,jj,jk+1)*xsi1r,-1.e-4 ) )
someone have a better idea ?
Commit History (0)
(No commits)
Change History (2)
comment:1 Changed 10 years ago by cbricaud
comment:2 Changed 10 years ago by cbricaud
- Resolution set to fixed
- Status changed from new to closed
no need to change something. it was just a problem of compilation option with xlf compiler.
the previous proposition was not good.
This one should be better :
zz0 = rn_abs * r1_rau0_rcp
zz1 = ( 1. - rn_abs ) * r1_rau0_rcp
DO jk = 1, nksr !* solar heat absorbed at T-point computed once for all
END DO