[MITgcm-devel] mom_calc_ke
Martin Losch
Martin.Losch at awi.de
Wed Jul 18 15:14:33 EDT 2012
Hi there, I stumbled across a situation, where the optimization of ifort (-O3) destroys the code and leads to NaNs. The problem is (probably) due to the optimzed code not producing small negative numbers in S/R mom_calc_ke for KE (kinetic energy). In mom_?_bottomdrag, we have SQRT(KE) and this results in NaNs in some cases. The problem can be fixed, when the if-statement in mom_?_bottomdrag (line 91 for u and 97 for v) is changed from .NE. 0. to .GT. 0.
What do you think? is this worth it?
Martin
More information about the MITgcm-devel
mailing list