|
NEP 4.3.0
NetCDF Expansion Pack
|
NEP's example programs exercise NEP features: the nxCDF backend, the UDF format readers, and the disk-bound performance benchmarks.
The generic NetCDF teaching examples — classic NetCDF, NetCDF-4, NcZarr, OPeNDAP remote access, parallel I/O, and all Fortran versions — moved to the NetCDF Developer's Handbook repository in v4.3.0, where they are maintained as 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.
Built when nxCDF is enabled (-DNEP_ENABLE_NXCDF=ON).
C only. Benchmarks run as tests with -DNEP_ENABLE_BENCHMARKS=ON (CMake). All benchmark numbers are disk-bound: write time includes fsync, and each read starts with the file dropped from the page cache (see examples/perf_disk.h). Reference results are measured with -DCMAKE_BUILD_TYPE=RelWithDebInfo (-O2).
LZ4/BZIP2-specific benchmark programs, CSVs and plotters are maintained by nep-compress.
Python visualization examples open NEP UDF files directly with netCDF4.Dataset and write static Matplotlib PNGs. They are optional and disabled by default. The examples cover FITS images, CDF temperature data, GeoTIFF rasters, GRIB2 wind grids, and PDS4 MESSENGER, Perseverance, MAVEN, and New Horizons products.
Enable visualizations with -DNEP_ENABLE_VIZ_EXAMPLES=ON for CMake or --enable-viz-examples for Autotools. Normal examples and at least one UDF reader must also be enabled. A source-root .venv must provide NumPy, Matplotlib, and netCDF4 built from source against the exact NetCDF-C installation used by NEP; wheels or system packages using another libnetcdf cannot load NEP UDF handlers.
Tests use the generated build-tree .ncrc: NCRCENV_RC selects the file, NETCDF_RC points to its directory, and LD_LIBRARY_PATH includes the NEP UDF libraries. Generated PNGs and <basename>_metadata.txt files remain in the visualization build directory and are neither installed nor written to the source tree. Each plot is grayscale, no caption appears inside its PNG, figures are limited to 8.0 by 6.1 inches at 150 DPI, and metadata contains ordered non-empty title, caption, and alt_text fields; captions are limited to 75 words.
See examples/viz/README.md for setup, build, test, and direct-execution instructions.