[MITgcm-devel] testreport

Martin Losch mlosch at awi-bremerhaven.de
Wed Dec 8 07:29:29 EST 2004


Ed,

remember that in testreport we tried to flag comparisons of zeros with 
22. This feature does not work, probably because of this:
>     abave = 0.5*(fabs(a)+fabs(b));
>     if (abave > 0.0) {
>       SOME CODE
>     }
>     else {
>       if (best == -16 && abave != 0)  best = -22;
>     }

best=-22 can never be reached, because if the second statement is 
reached, abave=0. I am not quite sure how to do it better, but maybe we 
should do something like this:

     abave = 0.5*(fabs(a)+fabs(b));
     if (abave > 0.0) {
	SOME CODE
     }
     else {
       best = -22;
     }
    if (best == -16 && abave != 0)  best = -23; or some other flag that 
tells us that something goes wrong.

What do you think?

Martin






More information about the MITgcm-devel mailing list