[MITgcm-devel] following on testing
Jean-Michel Campin
jmc at ocean.mit.edu
Fri May 21 23:30:52 EDT 2004
Hi Alistair,
Concerning the results that changed when pkg/mom_common
was created, I looked at global_ocean.cs32x15:
1) when I use the old version of mom_u,v_sidedrag.F
I can reproduce the old result.
the differences between the 2 code are:
new version:
& min(viscAh+viscAhGrid* rA(i,j,bi,bj) /deltaTmom,viscAhMax)
& *uFld(i,j)
& -min(viscA4+viscA4Grid*(rA(i,j,bi,bj)**2)/deltaTmom,viscA4Max)
& *del2u(i,j)
old version:
& viscAh*uFld(i,j)
& -viscA4*del2u(i,j)
2) Given the parameters that are used, the results
should be identical (mathematicly). But because the new version
addresses more global arrays (rA) and use
some min function inside a loop where lot of other things
are computed, my guess is that the compiler does not do
the same thing (=> optimisation issue).
And even without optimisation problems, the min and other
computation might not return the same value as before.
I have 2 remarks:
a) I am a litle bit concern by the efficiency of this part
of code that has been added, specially when viscAhMax &
viscA4Max are not really used, and also because
viscAh,viscAhGrid,viscA4,viscA4Grid are rarely used all together.
If we decide to split this loop according to what is
really used, this could (hopefully) fix the problem of
those changing results.
b) I think that the rA(i,j,bi,bj) should be replaced by rAw(i,j,bi,bj).
in mom_u_sidedrag.F, and replaced by rAs(i,j,bi,bj) in mom_v_sidedrag.F.
I don't think that this is a serious problem, but
on cs32x32, uDragTerms(33,33) is zero (because,if I remember well, rA(33,33)=0)
but I don't think uDragTerms(33,33) is used anywhere.
See you,
Jean-Michel
More information about the MITgcm-devel
mailing list