Encyclopaedia Index

See also the tutorial on GROUND coding.


GROUND.F, Fortran file accessible to PHOENICS users, containing the subroutine GROUND.

Description of GROUND

GROUND is a FORTRAN subroutine which forms part of the EARTH module. It resides in the sub-directory d_earth/d_grxfor.

GROUND is supplied as a structured set of GOTO's and statement labels, between which users are invited to insert coding sequences which will augment or replace those with which EARTH is already provided.

Like the subroutine SATLIT attached to the SATELLITE, GROUND is an empty subroutine, organised into 24 parts; it performs no function unless the user inserts some coding in the spaces provided.

Although 24 parts are provided for conformity with SATELLITE data- entry GROUPs (See PHENC: GROUP), not all are active. Specifically EARTH does not call GROUND when it is concerned with the activities associated with GROUPs 7, 12, 15, 16, 17, 18, 21 or 22.

By contrast, several of the other groups are entered for so many different purposes that they have been divided into sections, for example GROUPs 8, 9, 10, 13 and 19.


EARTH calls the empty GROUND subroutine via GREX3 (see PHENC entry), which is structured similarly to GROUND but with many CALLs and other executable statements in the blank spaces. These calls to GREX3 are made at pre-set occasions in the equation-solving process, sometimes on the prompting of information supplied by SATELLITE.

If the variable USEGRX has been set as T by SATELLITE, the statements in GREX will be executed first; otherwise, control is passed to label 25, near the end of the subroutine, where conditio- nal CALLs are provided to other GROUND-style subroutines, of which the last is the empty GROUND. The statement:


at the end of GREX, is the one in question.

Functions of the active GROUPs and sections

These are indicated briefly by comments in the listing (qv), and much more extensively by the examples in GREX3. Both may be inspected via POLIS/PHOENICS-2/Fortran.

How to make use of GROUND

Common uses of GROUND are for the introduction of coding sequences which add to those supplied by CHAM in respect of:-

Users contemplating the creation of their own GROUND subroutine are advised first to inspect GREX3, and indeed the GX.. subroutines which it calls, for two reasons. First, they may find that what they need is already in fact provided by PHOENICS; and secondly, if it is not provided, there may well exist something which is close enough for copying and modification to be the speediest effective course of action.

After the new coding sequences have been introduced, GROUND must of course be re-compiled and the EARTH module re-linked.

Most users who have successfully created GROUNDs which meets their needs find it convenient to rename them, for example to NEWGR1, NEWGR2, etc. Then they insert at the bottom of an empty GROUND subroutine the statements:

IF(condition1) CALL NEWGR1
IF(condition2) CALL NEWGR2 etc,

the conditions being of their own contriving.

This parallels the IF(NAMGRD.EQ.'xxxx') statements of GREX3, and ensures that they still have an empty GROUND for any further work.

GROUND, access to user portion of

(see USEGRD)

GROUND, influencing EARTH by way of

See PHENC entries: Fortran coding and F-array

GROUND, naming of subroutines in

(see NAMGRD)

GROUND, transferring logical data to

(see LG and LSG)

GROUND, transferring real data to

(see RG and RSG)

GROUND, transferring special character data to

(see CG and CSG)