[MITgcm-devel] alpha et omega

Jean-Michel Campin jmc at ocean.mit.edu
Wed Nov 22 15:08:22 EST 2006


Hi Martin,

On Wed, Nov 22, 2006 at 07:39:41PM +0200, Martin.Losch at awi.de wrote:
> Thanks Chris,
> 
> that was the problem: strain,vort3,shear, and all viscA-type fields are not initialised properly. Only for TAF they are. I 
> should have thought about that myself. When I make sure that all fields are initially zero, then it works. Why is this not 
> done in the first place? Should we change the code to do that (basically remove the corresponding 
> ALLOW_AUTODIFF_TAMC)? (but not today, this problem has sucked everything out of me, and I will only produce 
> errors, if I try to do that)
> 
> M.

2 things:
a) threre is no truly "first place" (e.g., mom_calc_relvort3.F was
used only for coriolis/advection, and later, also used for viscosity)
and it's hard to find all non-initialized values just by looking to 
the code (and to be clear, those values have no impact at all 
on the solution). 
Some rules would help (e.g., ``S/R with output field in argument list 
should set the field every-where'', like in mom_calc_hfacz), but
rules tend not to be followed/not survive very long.
Could get an idea with what is needed for AUTODIFF_TAMC,
but ends up initializing variable several times (and I don't like to 
do things 2 times, not the most efficient, and messy to understand).
b) the best strategy is to test the code on 1 platform that does not
initialize automatically (or with undef). I remember that I did some
test on such a platform a while ago (with Constantinos' help), but 
it needs to be done regularly to check all the newly added pieces.

Jean-Michel



More information about the MITgcm-devel mailing list