On Calling the I/O API from Fortran

Just do it, linking in the libm3io.a and libnetcdf.a object libraries (or their debug-compiled variants).

The Fortran-callable I/O API routines are:

CHECK3: is <timestep> available for <variable> from <file>
CLOSE3: close <file> and flush it to disk
DESC3: describe <file>
DDTVAR3: compute time derivative of <variable> from <file>
INIT3: start up I/O API; return log-file unit
INTERP3: interpolate <variable> from <file> to <time>
OPEN3: open <file> for <status>
READ3: read <timestep> of <layer> of <variable> from <file>
SHUT3: shut down I/O API; flush files to disk
WRITE3: write read <timestep> of <variable> to <file>
XTRACT3: read <window> of <timestep> of <variable> from <file>

The Fortran-callable date and time routines are:

CURRSTEP: find start of <timestep> containing <time>
DAYMON: find month and day-of-month for <jdate>
DT2STR: Construct character string for <jdate> and <time>
GETDTTIME: get current wall-clock date and time
HHMMSS: construct string "HH:MM:SS" for <time>
ISDSTIME: Is daylight savings time in effect on <jdate>?
JULIAN: find Julian day number (1...365,6) for <month> <day> <year>
MMDDYY: construct string "Month DD, YYYY" for <jdate>
NEXTIME: update <jdate & time> by <timestep>
SEC2TIME: get Models-3 time representation for <seconds>
SECSDIFF: find time difference (seconds) between two <jdate & time>s
TIME2SEC: get number of seconds for <time>

The Fortran-callable utility routines are:

DSCGRID: get description of named coordinate system
DSCGRID: get description of named grid
ENVDBLE: get DOUBLE PRECISION value of logical name from the environment
ENVINT: get INTEGER value of logical name from the environment
ENVREAL: get REAL value of logical name from the environment
ENVSTR: get CHARACTER-STRING value of logical name from the environment
ENVYN: get LOGICAL value of logical name from the environment
FIND1, FIND2, FIND3, FIND4: find integer key-tuple in sorted keytuple-table
GCD: greatest common divisor function
GETDBLE: prompt user for DOUBLE and get response, with default
GETDFILE: open direct access Fortran file with specified logical name
GETEFILE: open sequential Fortran file with specified logical name
GETMENU: prompt user for menu choice, with default and error checking.
GETNUM: prompt user for INTEGER, with default and range and error checking
GETREAL: prompt user for REAL, with default, etc.
GETSTR: prompt user for CHARACTER STRING, with default and error checking.
GETYN: prompt user for "Yes-No" answer, with default and error checking
GRIDOPS: select and compute various comparison operations
INDEX1: look up character-string name in name-table
JUNIT: return a "safe" Fortran unit number
LBLANK: number of leading blanks in <string>
LEN2: number of leading blanks in string; superseded by LBLANK().
M3ERR: warning message; or error message with SHUT3() and CALL EXIT( 2 ); superseded by M3EXIT() and M3WARN().
M3EXIT: exit message with SHUT3() and CALL EXIT( <status> )
M3MESG: Write 1-line message to Fortran-program log.
M3WARN: <warning message> with <date and time>
NAMEVAL: get value of environment variable (for Fortran)
POLY: degree-d polynomial interpolation
SORTI1, SORTI2, SORTI3, SORTI4: sort <index table> acording to a <keytuple-table>
TRIMLEN: effective length of string exclusive of trailing blanks
UPCASE: make string into ALL CAPS


Previous Section: Dates and Times and Time-increments

Next Section: Calling from C

Up: Conventions

To: Models-3/EDSS I/O API: The Help Pages