Below are a couple simple NetCDF programs illustrating the most basic, and commonly used,
functionality of the NetCDF library. They should be useful for the NetCDF beginner... The
makefile is
here.
The basics: Reading and Writing
- ncNewFile.c
- Minimal example showing how to create a well annotated NetCDF file and fill it up with data.
- ncReadFile.c
- How to read an existing NetCDF file
Misc
- ncHeaderDump.c
- How to query a NetCDF file for various bits of information.
Utilities
- mjrNetCDF.c mjrNetCDF.h
- Some simple utilities to make the examples less difficult to read.