[MITgcm-devel] mom_calc_ke
Jean-Michel Campin
jmc at ocean.mit.edu
Thu Jul 19 08:51:19 EDT 2012
Hi Martin,
Was not thinking of loop boundary but to same computation when
quadratic drag is off. But I can do this later (need to check
how to write this to please TAF). And might be good also to
check-in your fix first (in case mine does not go well).
Cheers,
Jean-Michel
On Thu, Jul 19, 2012 at 10:47:24AM +0200, Martin Losch wrote:
> Hi Jean-Michel,
> why do you want to split it? To have different loop boundaries for the first part, like this:
> DO j=1-Oly,sNy+Oly-1
> DO i=1-Olx,sNx+Olx-1
> or even
> DO j=1-Oly,sNy+Oly
> DO i=1-Olx,sNx+Olx
> ? I can do that along with my change.
>
> Martin
>
> On Jul 18, 2012, at 11:36 PM, Jean-Michel Campin wrote:
>
> > Hi Martin,
> >
> > I think it's better to have .GT.0. rather than .NE.0. anyway,
> > so if it helps with your compiler optimisation problem,
> > you should go and change it.
> >
> > I also had in mind (for a long time) to split this bottom-drag
> > computation loop in (at least) 2 parts (linear & quadratic) but
> > no urgent need to do it now.
> >
> > Cheers,
> > Jean-Michel
> >
> > On Wed, Jul 18, 2012 at 09:14:33PM +0200, Martin Losch wrote:
> >> 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
> >>
> >>
> >> _______________________________________________
> >> MITgcm-devel mailing list
> >> MITgcm-devel at mitgcm.org
> >> http://mitgcm.org/mailman/listinfo/mitgcm-devel
> >
> > _______________________________________________
> > MITgcm-devel mailing list
> > MITgcm-devel at mitgcm.org
> > http://mitgcm.org/mailman/listinfo/mitgcm-devel
>
>
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel
More information about the MITgcm-devel
mailing list