NEP 2.7.0
NetCDF Extension Pack
Loading...
Searching...
No Matches
NEP Example Programs

NEP includes over 55 C and Fortran example programs covering classic NetCDF, NetCDF-4, NcZarr, OPeNDAP remote access, performance tuning, and parallel I/O.

They are companion code for The NetCDF Developer's Handbook: The Authoritative Guide to Writing High-Performance Programs for Scientific Data Management, Second Edition.

See examples/README.md for build instructions and usage details.

Classic NetCDF (examples/classic/, examples/f_classic/)

Both C and Fortran versions provided for all programs.

NetCDF-4 (examples/netcdf-4/, examples/f_netcdf-4/)

Both C and Fortran versions provided for all programs.

NcZarr (examples/nczarr/)

Both C and Fortran versions provided for all programs.

OPeNDAP Remote Access (examples/opendap/)

Both C and Fortran versions provided for all programs.

Performance and Compression Benchmarking (examples/performance/)

C only. Built with -DENABLE_BENCHMARKS=ON (CMake) or --enable-benchmarks (Autotools).

  • cache_tuning.c — Chunk cache size and slots effect on read performance
  • chunking.c — Row-optimized, column-optimized, and balanced chunk shape comparison
  • deflate.c — Deflate compression levels 1–9 speed and ratio benchmarking
  • lz4.c — LZ4 compression performance vs deflate
  • bzip2.c — BZIP2 compression performance vs deflate
  • zstandard.c — Zstandard (ZSTD) compression benchmarking
  • szip.c — SZIP compression benchmarking
  • lossless.c — Lossless compression algorithm comparison
  • quantize.c — Quantization for lossy compression and storage reduction
  • endianness.c — Byte order effects on I/O performance
  • fill_values.c — Fill value storage and read performance

Parallel I/O (examples/parallelIO/)

Built only when parallel tests are enabled (--enable-parallel-tests / -DENABLE_PARALLEL_TESTS=ON).