CDFDatasets.jl is a julia package to read Common Data Format (CDF) datasets compatible with the CommonDataModel.jl interface.
Installation: at the Julia REPL, run using Pkg; Pkg.add("CDFDatasets")
It provides a high-level interface with features:
- Concatenation of multiple CDF files;
- Multi-backend support (
CommonDataFormat.jlandCDFpp(C++)); - Integration with
DimensionalData.jl.
It is recommended to use the native Julia implementation CommonDataFormat.jl for reading CDF files. CDFpp backend is mainly used for cross-validation, available in the PyCDFpp directory.
using CDFDatasets
# Open a CDF file
ds = cdfopen("omni_coho1hr_merged_mag_plasma_20250901_v01.cdf")
times = ds["Epoch"]
bx = ds["BR"]