Encyclopaedia Index


a) Opening and Closing files

Programs of PHOENICS, namely SATELLITE, EARTH, PHOTON, AUTOPLOT and PINTO call the subroutines OPENZZ and CLOSZZ to connect and disconnect all disk files accessed during program execution.

These two subroutines are located in the site-dependent file ALSITD.F, in sub-directory d_allpro/d_filsys; and they contain all the types of FORTRAN OPEN and CLOSE statements that the codes require.

The first argument of OPENZZ and CLOSZZ sets the file reference number, which determines the file attributes supplied as data in the program-specific configuration files: SATCON, EARCON, etc. These attributes are:

the name of the file;
the logical unit (LU) number it uses;
the FORTRAN OPEN statement (IOPEN) required for it;
the FORTRAN CLOSE statement (ICLOSE) required for it; and
the record length (LREC) of the file.

The OPEN-statement options supplied in OPENZZ are tabulated below:

IOPEN Arguments of OPEN statement

  1. (for config file only) old, formatted, shared, read-only, recl=lrec.
  2. old, formatted, sequential, recl=lrec.
  3. unknown, formatted, sequential, print file, recl=lrec.
  4. unknown, formatted, sequential, recl=lrec.
  5. old, formatted, direct-access, shared, read-only, recl=lrec.
  6. unknown, un-formatted, direct-access, recl=lrec.
  7. old, un-formatted, direct-access, recl=lrec.
  8. open read from vdu.
  9. open write to vdu.
  10. old, formatted, sequential, shared, read-only, recl=lrec.
  11. old, formatted, sequential, recl=lrec.
  12. unknown, formatted, direct-access, recl=lrec.
  13. scratch, un-formatted, direct-access, recl=lrec.
  14. old, unformatted, sequential, recl=lrec.
  15. file not opened; this may be useful for opening to the vdu on some systems.
  16. scratch, formatted, direct-access, recl=lrec.
  17. new, formatted, sequential, recl=lrec.

The CLOSE-statement options supplied in CLOSZZ are tabulated below:

ICLOSE Arguments of ICLOSE statements

  1. Keep
  2. Delete
  3. Scratch

b) Nomenclature for Files Accessed at Run-time

SATPRE, EARPRE, GUIPRE, PHOPRE, AUTPRE, and PINPRE are set in CONFIG to the full prefixes for the files kept in the sub-directories under d_phoe16; for example:

SATPRE =../d_satell/
EARPRE =../d_earth/
CONFIGs, as described in the following
PHOPRE =../d_photon/
AUTPRE =../d_autopl/
PINPRE =../d_pinto/

File-name postscripts signify the type of file according to:

DA = direct access;
XX = scratch file.

Files with names which do not end in DA or XX are formatted sequential files.