2012 Unidata NetCDF Workshop > Introduction to the NetCDF APIs
10.4 The Fortran-77 API
The Fortran-77 library provided early Fortran support for modelers and scientists.
Strengths
- Well documented:Complete and up-to-date Fortran-77 Users Guide
- Well 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.)
- Useful with ncgen3: From CDL, ncgen3 can generate F77 code
needed to create the corresponding netCDF classic file
Weaknesses
- Support for netCDF-4 user-defined compound types not portable, requires Fortran-2003
- Column-major subscript order (1st dimension varies fastest) reversed from CDL row-major order
- Uses character arrays as a substitute for strings, so user must
be aware of string lengths.
- You have to explicitly provide memory
space for any netCDF data values and attribute values you read.
- Status of every function call must be explicitly checked
Other Characteristics
- Implemented entirely in C (!), as a thin layer on top of the C
netCDF library.
2012 Unidata NetCDF Workshop > Introduction to the NetCDF APIs