DEBUG print-out from EARTH

When EARTH runs fail through errors detected either by EARTH itself or
by the Fortran (eg "floating-point division by zero"), the
location and cause of the error may
be determined by activating the PHOENICS debug facility:

However, this can create a very large amount of print-out indeed, of
which only the last few lines may be significant. These lines show in
which sweep, slab, time step and iteration the failure occurred, and
also which variable was being processed at the time.

The debug print-out also permits determination of which were the recently accessed
sub-routines, information which is most useful to users if the sub-routines are
open-source ones which can be accessed and altered.

The cause of the error may be less easy to determine; and it can indeed sometimes be
impossible for anyone but a member of CHAM's user-support team, who has access to the
complete source code.

However, even without that access, some insight into the nature of the problem can
sometimes be gained by setting to T the variable DBSOL1, DBSOL2 or DBSOL3 according to
whether the workings of the 1D, 2D or 3D solver are to be enquired into; and by setting
also DBGPHI(name)=T, where name refers to the value of INDVAR (also called MPHI) which is
in question at the time of the failure.

The coefficients can then be inspected, and compared with expectations, a process which
can help the insightful user to find out where he went wrong (if indeeed he did).

A typical extract from such print-out is shown, with explanatory remarks, not
forming part of that print-out, enclosed in [ ]'s.

[The print-out below is elicited when the following line is added to the
Q1 file of
core-library case 249, the square cavity with a moving lid:

DEBUG=T;DBSOL2=T;DBGPHI(U1)=T;ISWDB1=10;ISWDB2=10;LSWEEP=10

Different versions of PHOENICS, and different computers, may give somewhat different
numbers, and indeed print-out lay-outs. However the general principles of debug
interpretation remain the same.]

[The above print-out comes from the subroutine which calls the linear-equation
solver. The same values appear below beneath the index k3su, the value of which
is the zero-location of the variable in th F-array.

It will be seen that the parameters NXPRIN and NYPRIN (here 2 and 2),
which govern the
frequency of variable-field print-out are effective also for debug print-out.]