A user encountered a "once in many simulated decades" problem running CCM3 on a Cray PVP machine. The user reported that the fix did not change answers, but allowed the model to continue past the point where the base code blew up. The problem has nothing to do with the code itself, but has to do with a problem with the Cray compiler. Thus the problem does not occur on non-Cray platforms. Furthermore, the problem causes the code to blow-up, and as such you would only need to add this snippet of code in, if you encounter this problem.
The specific problem was as follows. In subroutine ECODYN there is the following sequence of instructions:
fwet(k) = max(h2ocan(k),0.) / max(maxh2o,1.e-06)
fwet(k) = min( fwet(k), 1.) **0.667
In the first line, mathematically the computation of fwet(k) is guaranteed
non-negative. Unfortunately, on Cray PVP machines there are pathological
situations where the division can result in a roundoff negative. When this
happens, the second line causes a floating point error. The fix involves
inserting the statement:
fwet(k) = max(fwet(k),0.)
between these two statements.
CCM Core group: