Encyclopaedia Index


SPEDAT is a PIL command which is used for transmitting SPEcial DATa from the Q1 file to GROUND, such data being the ones for which no PIL variables or functions otherwise exist.

It thus enables limitations of PIL to be easily circumvented; but its use requires the provision in EARTH or GROUND of the appropriate data-using coding.

It is extensively used for transmitting:

  1. character strings appearing in In-Form statements; and
  2. object-related data introduced by use of the VR editor or by manual editing of statements beginning >OBJ in the Q1 file.


  1. Using SPEDAT for setting data
  2. GROUND-coding Fortran statements for getting the data
  3. How the data are transmitted to EARTH
  4. Examples of the use of SPEDAT
  5. Other arguments of SPEDAT

1. Using SPEDAT for setting data

The full syntax of the PIL command, when used for SETting data, is:



For example, inclusion in the Q1 file of the line:

SPEDAT(SET, new_idea, new_variable, r, 11.e3)

will cause the following to be written into the EARDAT file:


This line is subsequently read by EARTH; and its content is used in the subsequent flow-simulating calculation.

NOTE !! It is permitted (since PHOENICS-3.1) to replace SET by S, or even to omit it (and the comma which follows it) altogether.

2. The GROUND-coding Fortran statements for getting the data

The reading and interpretation of the EARDAT line in EARTH requires the presence, usually in a GROUND subroutine, of the following line, or its equivalent:


Warning: Here the quotes are essential !

Then the real variable RVAL will be set equal to 1.1E4 .

The third argument indicates which of the four following arguments is to be taken, as follows:

  1. REAL value via RVAL;
  2. INTEGER value via IVAL;
  3. LOGICAL value via LVAL; and
  4. CHARACTER value via CVAL

Because the GETSPD command has rather many arguments, it is sometimes preferable to use whichever is appropriate of the following four subroutines in the GROUND Fortran file:

3. How the data are transmitted to EARTH

At the time of creating the EARDAT file, the PHOENICS Satellite module writes the SPEDAT data as indicated in the following examples, in which the first integer indicates how many following lines are to be read by EARTH.

4. Examples of the use of SPEDAT, GETSPD, GETSDR, etc can be found in the Encyclopaedia, in the input-file libraries and in the corresponding open-source Fortran files, as follows:

5. Other arguments of the PIL command

SET is not the only possible first argument of the SPEDAT command. Others are:

They are not often used, because SPEDAT statements are usually introduced by hand-editing, which allows more direct methods of de-activating previously-made settings; but they have their uses in complex multi-purpose Q1s, controlled by PIL-logic constructs.