Encyclopaedia Index

SAVE, a PIL logical variable

SAVE = T, which is its default value, indicates that the results of the EARTH run are to be saved to a file, the default name of which is PHI or PHIDA according to whether the PREFIX file contains the line PHIDA=F or PHIDA=T, respectively.

Such files can be used for graphical-display purposes, by PHOTON or by the VR-Viewer.

They can also be used for re-starting the solver program, EARTH.

See RESTRT and NSAVE for related information.

The results are written to the file at the end of the EARTH run. Often, however, users want to store results more frequently, for example at a set time-step interval. They may do this by use of Q1 settings. (See PHENC entries: IDISPA,B,C & D)

Alternatively, the user can call the subroutine DUMP from Section 8 of Group 19 of GROUND, for saving the results at selected time steps. Each time DUMP is called the file written to must be renamed. To do this the following COMMON block must be included in GROUND:

COMMON/NMFILS/NMFIL(60)
CHARACTER NMFIL*48 , CH3*3, STORNM*48

The following coding should be inserted in Section 8 of Group 19 when PHOENICS is CONFIGured to use an unformatted direct-access access file for restarts,


          IF(CG(1).NE.' '.AND.MOD(ISTEP,IG(1)).EQ.0) THEN

          CH3='   '

          WRITE(CH3,FMT='(I3.3)') ISTEP

          IL=INDEX(CG(1),' ')-1

          IF(IL.EQ.-1) IL=4

          STORNM=NMFIL(23)

          NMFIL(23)=CG(1)(1:IL)//CH3

          CALL DUMP

          NMFIL(23)=STORNM

        ENDIF

This will write the results, at step numbers that are whole-number multiples of IG(1), to a file named as the first non-blank characters CG(1) concatenated with the step number.
For example, if in the Q1 file the user sets, CG(1)=ABC;IG(1)=10, the files having the following names will be dumped: ABC010, ABC020, ABC030, A40,...etc.

If PHOENICS is CONFIGured to use a formatted sequential file for restarts, NMFIL(22) must be set instead of NMFIL(23).

PHENC entry PHI-file explains the format of such files.