1 |
C $Header: /u/gcmpack/models/MITgcmUV/eesupp/inc/DFILE.h,v 1.3 1998/10/28 03:11:33 cnh Exp $ |
2 |
|
3 |
#ifdef USE_DFILE |
4 |
|
5 |
C /==========================================================\ |
6 |
C | DFILE.h | |
7 |
C |==========================================================| |
8 |
C | Header file for binary dump file I/O structures. | |
9 |
C \==========================================================/ |
10 |
C Compile time constants |
11 |
C ioUnitsPerThread - Number of ioUnits allowed |
12 |
C busyUnit - Status flag. Indicates whether unit |
13 |
C freeUnit is open |
14 |
C accessModeRO - Read-only v. read-write flag |
15 |
C accessModeRW |
16 |
C errorModeSTOP - Indicates action on I/O error |
17 |
C errorModeCONT |
18 |
INTEGER ioUnitsPerThread |
19 |
PARAMETER ( ioUnitsPerThread = 1 ) |
20 |
INTEGER busyUnit |
21 |
PARAMETER ( busyUnit = 0 ) |
22 |
INTEGER freeUnit |
23 |
PARAMETER ( freeUnit = 1 ) |
24 |
INTEGER accessModeRO |
25 |
PARAMETER ( accessModeRO = 0 ) |
26 |
INTEGER accessModeRW |
27 |
PARAMETER ( accessModeRW = 1 ) |
28 |
INTEGER errorModeSTOP |
29 |
PARAMETER ( errorModeSTOP = 0 ) |
30 |
INTEGER errorModeCONT |
31 |
PARAMETER ( errorModeCONT = 1 ) |
32 |
INTEGER metaDataNotWritten |
33 |
PARAMETER ( metaDataNotWritten = 0 ) |
34 |
INTEGER metaDataWritten |
35 |
PARAMETER ( metaDataWritten = 1 ) |
36 |
|
37 |
C mUnit - Fortran unit number for metafile |
38 |
C dUnit - Fortran unit number for data |
39 |
C unitStatus - Busy/Free status flag |
40 |
C nameOfMFile - Name of metadata file used in I/O |
41 |
C nameOfDFile - Name of data file used in I/O |
42 |
C accessMode - Access mode that was set when this unit was opened. |
43 |
C Access mode is either read-only or |
44 |
C read-write. |
45 |
C errorMode - Error mode that was set when this unit was opened. |
46 |
C Error mode is either STOP on error which means the |
47 |
C program halts or continue or error. For continue |
48 |
C error the program usually tries to write an error |
49 |
C message to stderr. Howeever, the most common cause for |
50 |
C an IO error is a full disk in which case that |
51 |
C error message may be lost! |
52 |
C theAcessMode - The current acces mode. This will be the mode |
53 |
C associated with a file that is opened. |
54 |
C theErrorMode - The current error mode. This will be the mode |
55 |
C associated with a file that is opened. |
56 |
COMMON /DFILE_I/ mUnitNumber, dUnitNumber, unitStatus, |
57 |
& accessMode, errorMode, |
58 |
& theAccessMode, theErrorMode, metaDataStatus |
59 |
INTEGER mUnitNumber(ioUnitsPerThread,MAX_NO_THREADS) |
60 |
INTEGER dUnitNumber(ioUnitsPerThread,MAX_NO_THREADS) |
61 |
INTEGER unitStatus (ioUnitsPerThread,MAX_NO_THREADS) |
62 |
INTEGER accessMode (ioUnitsPerThread,MAX_NO_THREADS) |
63 |
INTEGER errorMode (ioUnitsPerThread,MAX_NO_THREADS) |
64 |
INTEGER metaDataStatus(ioUnitsPerThread,MAX_NO_THREADS) |
65 |
INTEGER theAccessMode |
66 |
INTEGER theErrorMode |
67 |
|
68 |
C nameOfMFile - Name of metadata file used in I/O |
69 |
C nameOfDFile - Name of data file used in I/O |
70 |
COMMON /DFILE_C/ nameOfMfile, nameOfDfile |
71 |
CHARACTER*(MAX_LEN_FNAM) |
72 |
& nameOfMfile(ioUnitsPerThread,MAX_NO_THREADS) |
73 |
CHARACTER*(MAX_LEN_FNAM) |
74 |
& nameOfDfile(ioUnitsPerThread,MAX_NO_THREADS) |
75 |
|
76 |
C ioBuf_R4 - IO buffer for 32-bit floating point IO. |
77 |
C Sized to fit anything up to a global domain 3d field. |
78 |
C ( but without overlaps ) |
79 |
C ioBuf_R8 - IO buffer for 64-bit floating point IO. |
80 |
C Sized to fit anything up to a global domain 3d field. |
81 |
C ( but without overlaps ) |
82 |
COMMON /DFILE_R/ |
83 |
& ioBuf_R8, ioBuf_R4 |
84 |
Real*8 ioBuf_R8( sNx*nSx*nPx * sNy*nSy*nPy * Nr ) |
85 |
Real*4 ioBuf_R4( sNx*nSx*nPx * sNy*nSy*nPy * Nr ) |
86 |
|
87 |
#endif /* USE_DFILE */ |