Encyclopaedia Index

(x) Activating storage for user-desired variables

By way of subroutine MAKE

The subroutines MAKE and GXMAKE are called ONLY in Group 1 section 1 of GROUND, GREX3 or a GX.. subroutine, because that it is that section which is called from within EARTH at the point at which the F-array is being segmented. Their use is extensively exemplified in the GREX3 and GX... Fortran files, which can be inspected via POLIS/ PHOENICS-2/Fortran.

Subroutine MAKE makes available NX*NY-long segments of the F-array, the contents of which can thereafter be addressed by way of the block-location indices which constitute their arguments. These indices are already known to GROUND subroutines because they are contained within common blocks in the 'included' file GRDLOC.

The following CALLs to MAKE (from GREX3) are typical:-

They show, to take the firt example, that 2D storage is made available for XG, the x-coordinate of a cell centre, on certain conditions concerned with choices which have been made in the Q1 file for the first-phase length scale. EARTH will then automatically ensure that the geometrically-correct values are placed in the corresponding F-array segment.

Storage for EASP1, the first EARTH-spare array, by contrast is made unconditionally. Since no particular quantity is implied by the name EASP1, the array will be contain default values of 1.E+19, until these are later over-written.

By way of NFUSER

Users may allocate segments of the F-array to their own use by placing in their Q1-files the statement:

Thereafter, they will be able to refer to the contents of those elements as:

where IUSER is an integer within the range 1 to NFUSER.

This is a facility of great power. With its aid, users are able to add large amounts of coding of their own, while still enjoying all the facilities of PHOENICS.

Values in the NFUSER section of the F-array are dumped to the phi- file, and are picked up again when a run is restarted. This is true also of values in the MAKE and GXMAKE segments.

The NFUSER is often used as a first recourse, which is subsequently replaced by the more flexible GXMAKE facility, now to be described.

By way of GXMAKE

Whereas NFUSER allocates a single block of storage elements, which the user subsequently has to subdivide in GROUND, calls to GXMAKE, which may be conditional, can create many segments, of varying lengths, at the same time allocating indices to the zero locations and names which will be used in print-out.

The following examples, which appeared during a super-search of the GROUND files, are typical. The second argument is the length of the segment; the first argument is the zero-location index, and the third argument is the name.

The contexts in which they are used will not be explained here. Instead, the reader is advised to make such a super-search himself, and than to study the coding sequences which are revealed as enclosing and following the GXMAKE calls.