|
NEP 2.7.0
NetCDF Extension Pack
|
NEP implements five NetCDF User Defined Format (UDF) handlers that allow external scientific data formats to be opened with the standard nc_open() API. All readers are disabled by default and must be enabled at build time.
| 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 |
All five readers can be enabled simultaneously — there are no mutual-exclusivity restrictions as of v2.2.0.
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 |
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> |
| Autotools | ${datarootdir}/nep/.ncrc | --with-ncrc-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.