Concise Description
Read or write CDF files in Python
Description
cdflib is a pure-Python implementation of NASA's Common Data Format (CDF) for reading and writing CDF files. It is not a set of bindings around the NASA CDF C library: the core depends only on NumPy, so there is nothing to compile and no external library to install. cdflib reads variables, global attributes and variable attributes from CDF version 2 and version 3 files held on local disk, behind an HTTP/HTTPS URL, or in an S3 bucket (including chunked byte-range reads), transparently decompressing GZIP- and RLE-compressed files and optionally validating their MD5 checksums. It writes CDF version 3 files, with optional per-variable and whole-file compression and checksums. Its cdfepoch module converts between the CDF time types (CDF_EPOCH, CDF_EPOCH16 and CDF_TT2000) and ISO 8601 strings, NumPy datetime64 values, Unix timestamps and broken-down date components, using a bundled leap-second table; an optional astropy backend exposes the same conversions as astropy Time formats. Optional xarray helpers convert a CDF file into an xarray Dataset and write an xarray Dataset back out as a CDF, checking and filling in ISTP-compliant metadata in both directions, which also makes netCDF-to-CDF conversion straightforward.
Authors
htyeim (GitHub)
Jan Christoph Terasa
(
Institute of Experimental and Applied Physics, University of Kiel
)
Andreas J. Weiss
Functionality
Technical Details
Data & File Formats
Keywords
Related Items
Licensing & Funding
Version Information