|
NEP 2.7.0
NetCDF Extension Pack
|
NetCDF Extension Pack (NEP) - Public API. More...
#include <stdio.h>#include <netcdf.h>#include <netcdf_filter.h>Go to the source code of this file.
Macros | |
| #define | BZIP2_ID 307 |
| #define | LZ4_ID 32004 |
| #define | LZF_ID 32000 |
| #define | NEP_UDF_GEOTIFF_BIGTIFF NC_UDF0 |
| #define | NEP_UDF_GEOTIFF_STANDARD NC_UDF1 |
| #define | NEP_UDF_GRIB2 NC_UDF2 |
| #define | NEP_UDF_CDF NC_UDF4 |
| #define | NEP_UDF_FITS NC_UDF3 |
| #define | NEP_UDF_PDS4 NC_UDF5 |
| #define | NEP_MAGIC_GEOTIFF_STANDARD "II*" |
| #define | NEP_MAGIC_GEOTIFF_BIGTIFF "II+" |
| #define | NEP_MAGIC_CDF "\xCD\xF3\x00\x01" |
| #define | NEP_MAGIC_GRIB2 "GRIB" |
| #define | NEP_MAGIC_FITS "SIMPLE" |
| #define | NEP_MAGIC_PDS4 "<?xml" |
| #define | NEP_FORMAT_NAME_GEOTIFF "GeoTIFF" |
| #define | NEP_FORMAT_NAME_CDF "NASA CDF" |
| #define | NEP_FORMAT_NAME_GRIB2 "GRIB2" |
| #define | NEP_FORMAT_NAME_FITS "FITS" |
| #define | NEP_FORMAT_NAME_PDS4 "PDS4" |
Functions | |
| int | nc_def_var_bzip2 (int ncid, int varid, int level) |
| int | nc_inq_var_bzip2 (int ncid, int varid, int *bzip2p, int *levelp) |
| int | nc_def_var_lz4 (int ncid, int varid, int level) |
| int | nc_inq_var_lz4 (int ncid, int varid, int *lz4p, int *levelp) |
| int | nc_def_var_lzf (int ncid, int varid) |
| int | nc_inq_var_lzf (int ncid, int varid, int *lzfp) |
NetCDF Extension Pack (NEP) - Public API.
Defines compression filter IDs and API, and the centralized mapping of file formats to NetCDF User-Defined Format (UDF) slot numbers.
NetCDF-C 4.10.0+ provides 10 UDF slots (UDF0-UDF9):
| #define BZIP2_ID 307 |
The filter ID for BZIP2 compression.
| #define LZ4_ID 32004 |
The filter ID for LZ4 compression.
| #define LZF_ID 32000 |
The filter ID for LZF compression.
| int nc_def_var_bzip2 | ( | int | ncid, |
| int | varid, | ||
| int | level | ||
| ) |
nep supports compression filters for netCDF/HDF5 files which are not natively supported by the netCDF C library.
BZIP2
Bzip2 is a free and open-source file compression program that uses the Burrows–Wheeler algorithm. For more information see https://www.sourceware.org/bzip2/ and https://en.wikipedia.org/wiki/Bzip2.
In C:
In Fortran:
| ncid | File ID. |
| varid | Variable ID. |
| level | From 1 to 9. Set the block size to 100k, 200k ... 900k when compressing. (bzip2 default level is 9). |
| int nc_def_var_lz4 | ( | int | ncid, |
| int | varid, | ||
| int | level | ||
| ) |
Turn on lz4 compression for a variable.
| ncid | File ID. |
| varid | Variable ID. |
| level | From 1 to 9. Set the block size to 100k, 200k ... 900k when compressing. (lz4 default level is 9). |
| int nc_def_var_lzf | ( | int | ncid, |
| int | varid | ||
| ) |
| int nc_inq_var_bzip2 | ( | int | ncid, |
| int | varid, | ||
| int * | bzip2p, | ||
| int * | levelp | ||
| ) |
Learn whether bzip2 compression is on for a variable, and, if so, the level setting.
| ncid | File ID. |
| varid | Variable ID. |
| bzip2p | Pointer that gets a 0 if bzip2 is not in use for this var, and a 1 if it is. Ignored if NULL. |
| levelp | Pointer that gets the level setting (from 1 to 9), if bzip2 is in use. Ignored if NULL. |
| int nc_inq_var_lz4 | ( | int | ncid, |
| int | varid, | ||
| int * | lz4p, | ||
| int * | levelp | ||
| ) |
Learn whether lz4 compression is on for a variable, and, if so, the level setting.
| ncid | File ID. |
| varid | Variable ID. |
| lz4p | Pointer that gets a 0 if lz4 is not in use for this var, and a 1 if it is. Ignored if NULL. |
| levelp | Pointer that gets the acceleration setting (from 1 to 9). Ignored if NULL. |
| int nc_inq_var_lzf | ( | int | ncid, |
| int | varid, | ||
| int * | lzfp | ||
| ) |