Affiliate disclosure

Book titles on this page link to Amazon. As an Amazon Associate, DataField.Dev earns from qualifying purchases — at no additional cost to you.

Chapter 25 — Further Reading

NetCDF and HDF5 are large libraries with excellent primary documentation; the fastest way to real fluency is the official guides plus a tool to look inside the files you write. Sources are grouped by purpose and tagged Tier 1 (canonical/verified) or Tier 2 (attributed). The book's own consolidated pointers are in Appendix H.

Primary documentation (start here)

  • The NetCDF Fortran-90 Interface Guide (Unidata/UCAR, docs.unidata.ucar.edu/netcdf-fortran). Tier 1. The authoritative reference for every nf90_* routine, its arguments, and the define-mode/data-mode model. Keep it open while you write your first writer and reader.
  • The NetCDF User's Guide (Unidata/UCAR). Tier 1. The concepts behind the interface — the data model, the classic vs netCDF-4 formats, the relationship to HDF5, and the ncdump/ncgen tools.
  • The HDF5 Reference Manual and User's Guide (The HDF Group, support.hdfgroup.org / docs.hdfgroup.org). Tier 1. The full h5*_f Fortran interface, the object model (files, groups, dataspaces, datasets, property lists), and the chunking/filter pipeline. Dense but definitive.
  • The CF Conventions document (cfconventions.org). Tier 1. The standard itself: units, coordinate variables, standard_name table, cell methods, and the global attributes. Skim the introduction, then use the standard-name table as a lookup.

Books

  • Metcalf, Reid & Cohen, Modern Fortran Explained (Oxford). Tier 1. The standard reference for Fortran I/O that these libraries build on — unformatted and stream I/O, the material of Chapter 7 that §25.1 scales up.
  • Curcic, Modern Fortran (Manning). Tier 1. Practical modern-Fortran patterns, including working with external libraries and building real scientific programs; good companion for wiring NetCDF/HDF5 into a project.

History and background

  • Rew & Davis, "NetCDF: An Interface for Scientific Data Access," IEEE Computer Graphics and Applications (1990). Tier 2. The original description of NetCDF's design goals — portability and self-description for exchanging scientific data. Attributed from common knowledge; confirm the exact citation before quoting it.

Free and online

  • fortran-lang.org. Tier 1. Community hub with tutorials and pointers to libraries; the on-ramp for the modern Fortran ecosystem, including how packages like these fit with fpm.
  • The gfortran manual (gcc.gnu.org/onlinedocs/gfortran). Tier 1. For the I/O intrinsics and iso_fortran_env facts (storage_size, int64) the size-estimate examples rely on.

Tools — look inside your files

  • ncdump / ncgen (ship with NetCDF). Tier 1. ncdump -h file.nc prints the CDL header — the single most useful command for checking that your writer produced what you intended.
  • h5dump / HDFView (The HDF Group). Tier 1. h5dump -H file.h5 shows datatype, shape, storage layout, and filters; HDFView is a GUI browser for the group tree.
  • ncview and Panoply (NASA GISS). Tier 1. Quick viewers for NetCDF; Panoply in particular reads CF metadata and maps data in physical space with no configuration — the payoff of §25.5, and a preview of Chapter 26.
  • xarray, netCDF4, and h5py (Python). Tier 1. The Python side of the "Fortran computes, Python analyzes" workflow: xarray.open_dataset('f.nc') and h5py.File('f.h5') read the files your solver writes, with shapes and metadata discovered automatically.

Suggested order

  1. Skim the NetCDF User's Guide concepts, then write a small writer from the Fortran-90 Interface Guide and inspect it with ncdump -h.
  2. Add CF metadata using the conventions document's introduction and standard-name table; confirm a viewer (Panoply/ncview) lays it out correctly.
  3. When you need hierarchy or fine control over compression, work through the HDF5 User's Guide object model and repeat the write/inspect loop with h5dump -H.
  4. Close the loop by opening one of your files in xarray or h5py — proof that the format is a clean, language-neutral interface.