The EDSS/Models-3 I/O API


The Models-3 I/O API is A programming interface, not a data format !!

I/O API files are not synonymous with "netCDF files" !!
Instead, netCDF is one of four (and a half) distinct lower layers on which the data and metadata structures for I/O API files are currently available; additional lower layers have been incorporated at times in the past, and may very well be incorporated at various times in the future.
(Does anyone want to fund development of an MPI 2 lower layer? -- Contact the author!)

The I/O API follows a "punctuated rolling release" model: great effort has been expended to provide and maintain upwards compatibility, so that any program developed to use the I/O API will work correctly with any subsequent release of the I/O API. Newer releases will contain (a) bug-fixes, and (b) new feature and capabilities. There are only the following upward-compatibility issues:

I/O API-2.1 to I/O API-3.0: 2002
Requires re-linking due to netCDF API changes—fully source- and object-file compatible: uses netCDF-3.x which was not fully compatible with netCDF-2.x.

Targets Fortran-90 compilers only, and starts to use Fortran-90 features such as MODULEs

New features for 3.0 include MODULE M3UTILIO, containing INTERFACEs, INCLUDE-files and other declarations.

Deprecate direct use of INCLUDE-files.

Deprecate use of M3ERR() routine in favor of the more general M3EXIT()

Deprecate m3tools/utmtool, in favor of its replacement m3tools/projtool.

I/O API-3.0 to I/O API-3.1: 2013
Requires re-compile: Fully source compatible but not object compatible—fundamental PARAMETER MXVARS3 changed from 120 to 2048.


New experimental MODULE MATXATTS supports full input-grid and output-grid descriptions for matrix files (which may be used, for example, for grid-to-grid transforms by such programs as m3tools/mtxcple).

I/O API-3.1 to I/O API-3.2:
Minor source code changes required:


Experimental MODULE MATXATTS becomes MODULE MODATTS3, with additional support for various extra (CF, CMAQ, SMOKE(?)) metadata.

New MODULE MODGCTP for geospatial transform and interpolation operations; now contains some INTERFACEs formerly in MODULE M3UTILIO.

New MODULE MODNCFIO safely encapsulates netCDF and PnetCDF declarations, replacing include-file NETCDF.EXT (and

PnetCDF/MPI distributed I/O support for CMAQ. MODULE MODPDATA encapsulates data structures and routines for distributed CMAQ I/O.


New MODULE MODMPASFIO for MPAS-format-netCDF I/O and MPAS (unstructured Voronoi-complex) grid-geometry utilities.

Replace netCDF-2 CALL NC*() statements throughout with the corresponding netCDF-3 IERR = NF_*(), to accommodate the fact that recent versions of netCDF-Fortran silently did away with the former.

Remove previously-deprecated m3tools/utmtool (superseded by m3tools/projtool).


The Models-3/EDSS Input/Output Applications Programming Interface (I/O API) provides the environmental model developer with an easy-to-learn, easy-to-use programming library for data storage and access, available from both Fortran and C. The same routines can be used for both file storage (using netCDF files) and model coupling (using PVM mailboxes). It is the standard data access library for both the NCSC/CMAS's EDSS project and EPA's Models-3, CMAQ, and SMOKE, as well as various other atmospheric and hydrological modeling systems. There was a external-package wrapper for the I/O API in the Weather Research and Forecasting Model [WRF], which provided the option of direct I/O API output, enabling (among other things) the use of I/O API coupling mode to couple WRF-Chem with SMOKE—an effort unfortunately dropped by NCAR.

Since it is built around an object based conception of environmental modeling, the I/O API provides a variety of data structure types for organizing the data, and a set of access routines which offer selective direct access to the data in terms meaningful to the modeler. For example,

Read layer 1 of variable 'OZONE' from 'CONCFILE' for 5:00 PM GMT on July 19, 1988 and put the result into array A.
is a direct English translation of a typical I/O API READ3() call. "Selective direct access" means that this READ3 call retrieves exactly this ozone data immediately. It does not have to read through previous hours of data, nor whatever other variables (such as NOX or PAN) are in what order in the file. Data can be read or written in any order (or not at all). This characteristic provides the following advantages: I/O API files also have the following characteristics

The I/O API also contains an extensive set of utility routines for manipulating dates and times, performing coordinate conversions, storing and recalling grid definitions, sparse matrix arithmetic, etc., as well as a set of geospatial-transform, data-manipulation and statistical analysis programs, and programs for interfacing with a number of external modeling systems, such as CAMX/UAM, WRF, and MPAS. It has an extensive documentation set, including

Various extensions and research efforts to the I/O API have been developed or are under development. Developments include the use of the I/O API interacting with PVM for model coupling, and adding operations to read or write entire time series (with multiple time steps) as single operations, and research projects include data-parallel I/O and a very powerful "geospatial cell complex" data type with polygonal-cell decompositions that may be both time independent (as for finite elememt modeling) and time dependent (as for moving-mesh plume-in-grid modeling).

These web pages are copyright © 1992-2002 MCNC and Carlie J. Coats, Jr., © 2003-2005 by Baron Advanced Meteorological Systems (hereinafter, BAMS), © 2005-2013,2017- Carlie J. Coats, Jr., and © 2014- UNC Institute for the Environment. The I/O API source code and documentation are copyright © 1992-2002 MCNC and Carlie J. Coats, Jr., © 2003-2013 BAMS, © 2005- Carlie J. Coats, Jr., and © 2014- UNC Institute for the Environment. The library source code is distributed under the GNU Lesser (library) Public License (LGPL) Version 2.1, and the tools-program source code is distrubuted under the GNU General Public License, Version 2, subject to copyright-statement retention constraints. See the Notices: Copyright, and Acknowledgements page.

    $Id: index.html 77 2018-01-18 15:29:37Z coats $