INTEGER FUNCTION INIT3()
init3c() is a C wrapper calling the Fortran INIT3()
int init3c( ) ;
#include "iodecl3.h"
for C.
INIT3() initializes the I/O API's internal data
structures and returns the unit number for the
log device (opening the file
with logical name
"LOGDEV"
on that unit, if the logical name
has been set, otherwise returning unit 6 for "standard
Fortran output".
May be called multiple times; in which case, calls after the first simply return the unit number for the log file.
User may optionally supply a "scenario description file" with up to 60 lines of up to 80 characters each, by setenv'ing the logical name SCENFILE to the physical file name of the a user-supplied text file containing the scenario description. Contents of the scenario description file will be copied into the headers of all files opened for writing by the calling program.
User may optionally supply a file name for the working log file by setenv'ing the logical name LOGFILE to the path name.
User may optionally supply an "execution ID" character-string of up to 80 characters by setenv'ing the logical name EXECUTION_ID to it. Contents of the execution ID will be copied into the headers of all files opened for writing by the calling program.
INCLUDE 'IODECL3.EXT'
for Fortran, or#include "iodecl3.h"
for C.Repeated INIT3()- SHUT3() sequences within one program's execution may cause strange results. (Calls of INIT3() subsequent to SHUT3() will generate a warning message to the log).
USE M3UTILIO
... INCLUDE 'IODECL3.EXT' ... INTEGER LOGUNIT ... LOGUNIT = INIT3( ) C Now I/O API is set up, and LOGUNIT is the unit number C for the log file (or is 6 for st'd output). ...
... #include "iodecl3.h" ... int logunit ; ... logunit = init3c( ) ; /* Now I/O API is set up, and LOGUNIT is the Fortran unit number for the log file (or is 6 for st'd Fortran output). */ ...
To: Models-3/EDSS I/O API: The Help Pages