|
NEP 4.0.0
NetCDF Expansion Pack
|
NEP implements NetCDF User Defined Format (UDF) handlers that allow external scientific data formats to be opened with the standard nc_open() API, plus an optional NEXTCDF-4 backend that replaces the built-in NetCDF-4/HDF5 backend when selected explicitly. Most format readers are disabled by default and must be enabled at build time; the legacy PDB reader is enabled by default.
| Slot | Format | Magic / Detection | Introduced |
|---|---|---|---|
| UDF0 | GeoTIFF BigTIFF | II+ | v1.5.0 |
| UDF1 | GeoTIFF standard TIFF | II* or MM\x00* | v1.5.0 |
| UDF2 | GRIB2 | GRIB | v1.7.0 |
| UDF3 | FITS | SIMPLE | v2.0.0 |
| UDF4 | NASA CDF | \xCD\xF3\x00\x01 | v1.3.0 |
| UDF5 | NASA/ESA PDS4 | XML root Product_Observational | v2.2.0 |
| UDF6 | DICOM | DICM at byte offset 128 | v3.0.0 |
| UDF7 | Legacy PDB | HEADER | v3.3.0 |
| UDF8 | PDBx/mmCIF | data_ | v3.4.0 |
| UDF9 | NEXTCDF-4 | explicit NC_NEXTCDF4 | v4.0.0 |
All readers can be enabled simultaneously — there are no mutual-exclusivity restrictions. The NEXTCDF-4 backend can be enabled together with all readers.
Each NEP format reader has a dedicated page with the full mapping, build options, dependencies, resources, and examples:
| Format | UDF Slot | Reference Page |
|---|---|---|
| GeoTIFF | UDF0 / UDF1 | GeoTIFF |
| GRIB2 | UDF2 | GRIB2 |
| FITS | UDF3 | FITS |
| NASA CDF | UDF4 | NASA CDF |
| NASA/ESA PDS4 | UDF5 | PDS4-to-NetCDF Mapping |
| DICOM | UDF6 | DICOM |
| Legacy PDB | UDF7 | PDB |
| PDBx/mmCIF | UDF8 | mmCIF |
| NEXTCDF-4 | UDF9 | NEXTCDF-4 |
See also the native NetCDF-4 compression documentation: LZ4/BZIP2 HDF5 filters.
.ncrcNEP installs a .ncrc configuration file that enables NetCDF-C's UDF self-loading mechanism. Once configured, nc_open() and ncdump automatically select the correct format handler with no application code changes.
Setup — merge the installed file into ~/.ncrc:
Or point NETCDF_RC to the directory for a per-session override:
Then open any supported format transparently:
Install path:
| Build system | Default | Override |
|---|---|---|
| CMake | ${prefix}/share/nep/.ncrc | -DNEP_NCRC_INSTALL_DIR=<path> |
Note: .ncrc autoload requires NetCDF-C built from the main branch. With NetCDF-C 4.10.0, call NC_*_initialize() explicitly before nc_open().
See the NetCDF UDF documentation for the full RC file format reference.