|
NEP 2.7.0
NetCDF Extension Pack
|
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.
examples/classic/, examples/f_classic/)Both C and Fortran versions provided for all programs.
quickstart.c / f_quickstart.f90 — Minimal introduction; the simplest starting pointsimple_2D.c / f_simple_2D.f90 — Basic 2D arrays with dimensions and variablescoord_vars.c / f_coord_vars.f90 — Coordinate variables and named dimensionscoord.c / f_coord.f90 — Multi-dimensional coordinate systemsdump_classic_metadata.c / f_dump_classic_metadata.f90 — Reading and printing all metadatasize_limits.c / f_size_limits.f90 — Classic format size limits and 64-bit offset formatunlimited_dim.c / f_unlimited_dim.f90 — Unlimited dimensions and record variablesvar4d.c / f_var4d.f90 — 4-dimensional variablesexamples/netcdf-4/, examples/f_netcdf-4/)Both C and Fortran versions provided for all programs.
simple_nc4.c / f_simple_nc4.f90 — NetCDF-4 file creation basicsformat_variants.c / f_format_variants.f90 — Classic, 64-bit, CDF-5, and NetCDF-4 formatscompression.c / f_compression.f90 — Deflate and shuffle compression filterschunking_performance.c / f_chunking_performance.f90 — Chunking strategies and performance impactmulti_unlimited.c / f_multi_unlimited.f90 — Multiple independent unlimited dimensionsuser_types.c / f_user_types.f90 — Compound and enum user-defined typesgroups.c / f_groups.f90 — Hierarchical groups and dimension visibilitydump_nc4_metadata.c / f_dump_nc4_metadata.f90 — Reading and printing NetCDF-4 metadataexamples/nczarr/)Both C and Fortran versions provided for all programs.
nczarr_simple.c / f_nczarr_simple.f90 — Local NcZarr create/read/write with file://...#mode=nczarr URLsnczarr_chunking.c / f_nczarr_chunking.f90 — Explicit chunk shape with nc_def_var_chunking()nczarr_compression.c / f_nczarr_compression.f90 — Deflate + shuffle compression in NcZarr storesnczarr_enhanced.c / f_nczarr_enhanced.f90 — Hierarchical groups and multiple unlimited dimensionsexamples/opendap/)Both C and Fortran versions provided for all programs.
opendap_simple.c / f_opendap_simple.f90 — Open and read a remote dataset via OPeNDAP URLopendap_subset.c / f_opendap_subset.f90 — Read a hyperslab from a remote variableopendap_constraint.c / f_opendap_constraint.f90 — Apply constraint expressions to filter remote dataexamples/performance/)C only. Built with -DENABLE_BENCHMARKS=ON (CMake) or --enable-benchmarks (Autotools).
cache_tuning.c — Chunk cache size and slots effect on read performancechunking.c — Row-optimized, column-optimized, and balanced chunk shape comparisondeflate.c — Deflate compression levels 1–9 speed and ratio benchmarkinglz4.c — LZ4 compression performance vs deflatebzip2.c — BZIP2 compression performance vs deflatezstandard.c — Zstandard (ZSTD) compression benchmarkingszip.c — SZIP compression benchmarkinglossless.c — Lossless compression algorithm comparisonquantize.c — Quantization for lossy compression and storage reductionendianness.c — Byte order effects on I/O performancefill_values.c — Fill value storage and read performanceexamples/parallelIO/)Built only when parallel tests are enabled (--enable-parallel-tests / -DENABLE_PARALLEL_TESTS=ON).
square16_par.c / f_square16_par.f90 — MPI-based parallel NetCDF-4 write and read