The example netCDF-4 programs write and read a netCDF-4 file with features of the netCDF enhanced data model, such as groups, new primitive types, and a user-defined compound type,
Exactly equivalent Fortran examples for both f90 and f77 are available in the netcdf-fortran-4.2 distribution examples/ directory. Equivalent examples for the Java, C++, or third-party language APIs are not yet available.
We'll comment below on some differences between the netCDF-3 and netCDF-4 C APIs.