[MITgcm-devel] testreport

Martin Losch mlosch at awi-bremerhaven.de
Thu Dec 9 04:24:42 EST 2004


Hi Ed,
I am not quite sure why, but I now get 16 for some comparisons AND 22 
for other (for with abave is not equal to zero), and I think I know 
why:
if the first line in tmp4.txt (the first output of MONITOR) is zero 
(which it is for u and v for all experiments that start from rest), the 
variable best in tmp_cmpnum.c is set to -22. If then all remaining 
comparison agree exactly, relerr==0 all the time and the small value of 
-22 is never reset because we put
if (relerr > 0.0 {
   linnum = (int)log10(relerr);
   best = ( best > linnum ) ? best : linnum
}
I fixed it for myself by adding for relerr == 0
else {
   linnum = -16
   best = ( best > linnum > ? best: linnum
}
Not very elegant, but it seems to work. I am NOT going to check this 
in, because I believe that there is a better way to do this, and my 
c-programming, as you now, it subterranean.

Martin




More information about the MITgcm-devel mailing list