2011 Unidata NetCDF Workshop > Introduction to the NetCDF APIs and Example Programs
7.4 The Fortran-77 API
The Fortran-77 library provided early Fortran support for modelers and scientists.
Strengths
- Well-documented: The netCDF Fortran-77 Users Guide is complete and
up-to-date, and reference documentation is maintained in man-page
form.
- Comprehensively tested: A large number of tests are run when
the netCDF Fortran-77 library is installed from source.
- Support for netCDF-4: the F77 API supports the extended data
model of netCDF-4 (but using some advanced features may make your
code unportable.)
Weaknesses
- Uses character arrays as a substitute for strings, so user must
be aware of string lengths.
- Fortran's column-major subscript order is different from CDL's
row-major order, whcih can make ncdump's CDL output confusing.
- Memory handling: You have to provide memory
space for any netCDF data values and attribute values you read.
- Error handling: The status of every function call must be
checked, which detracts from code clarity.
Other Characteristics
- Implemented in C, as a thin layer on top of the C
netCDF library.
Examples
Annotated examples of complete Fortran77 netCDF programs are available from
the program examples page.
2011 Unidata NetCDF Workshop > Introduction to the NetCDF APIs and Example Programs