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