The CDF office has developed a set of the data format translators, which users can use to translate files in netCDF (Version 4 with limited data types), FITs, HDF4 and HDF5 (not an efficient tool) to CDF. The data translation tools are available for download.
As for the translation from HDF4 to HDF5, the NCSA Hierarchical Data Format (HDF) office has developed a tool that converts a HDF4 file to HDF5, and this tool (h4toh5) is available from the HDF home page.
Below is a list of the data translations (linked or made from CDF V3.9.1) that are currently available:
MakeCDF is a CDF application that reads flat datasets, in both binary and text and generates a ISTP-compliant CDF dataset from that data. It is available at spdf.gsfc.nasa.gov/makecdf.html.
In a bid to facilitate and promote data exchanges among space scientists, the CDF office has developed the following set of data translation tools.
CDF-to-ASCII (performed by CDFexport or CDFdump)
CDF-to-CDFML (CDF representation in XML)
CDFML-to-CDF
CDF-to-CDF Skeleton table
CDF-to-netCDF: Can convert CDF to netCDF V3, classic or V4. For V3 or classic, those non-supported data types from CDF will be converted to the netCDF types that can preserve the data values as much as possible: e.g., CDF_UINT1 to NC_SHORT, CDF_UINT2 to NC_INT, CDF_UINT4 and CDF_INT8 to NC_DOUBLE. The epoch types, CDF_EPOCH, CDF_EPOCH16 and CDF_TIME_TT2000 are presented in NC_CHAR
netCDF-to-CDF: The download-able module supports netCDF V4 (but not uint64 and user defined data types)
CDF-to-FITS
FITS-to-CDF
CDF-to-Json: Convert CDF to Json representation of CDF in Java
Json-to-CDF: Convert Json representation of CDF back to CDF in Java
HDF4-to-CDF
HDF5-to-CDF (Reads the HDF5 text dump from HDF Group’s h5dump and makes a CDF. The converter will be provided upon request)
CDFexport and CDFdump are C-based utility tools that can generate an ASCII text file. CDFexport can also generate a subsetted CDF of the selected variables from a CDF, among other things. It is a part of the CDF distribution package.
CDF to and from CDFML converters, both Java-based, are available in the CDF distribution package.
CDF to and from Json converters are added to the CDF package. These data format converting tools are ialso Java-based. Like CDF-XML, they depend on the CDF library and Java APIs.
Unidata developed NCdump can display a netCDF in text form.
Most of the translators are available either in binary or source code.
If you would like to have a copy of any of the translators listed below installed on your local machine or desktop, please download the translator(s) of interest and follow the instructions in the README.install or INSTALL file.
The table listed below is available for download. Please contact us if you need pre-built binary for any other platforms that are not included.
For Unix-based systems, the translator is packaged as a compressed file. You need to run Unix’s tar command something this: tar -zxvt xxxxx.tar.gz where xxxxx.tar.gz is the compressed download to extract the files. Before you run the application, please update your PATH environment variable to include the directory that has the extracted translator.
Note: CDF-to-netCDF and netCDF-to-CDF converters for Windows are combined into a single .zip file.
| Linux (Intel) | Mac OS X (Intel/ARM) | Windows | |
|---|---|---|---|
| CDF-to-netCDF | Download | Download | Download |
| netCDF-to-CDF | Download | Download | Download |
| CDF-to-FITS | Download | Download | Download |
| FITS-to-CDF | Download | Download | Download |
| HDF4-to-CDF | Download | Download | Download |
| CDF-to-PDS3 | Download | Download | Download |
If you have any questions or encounter problems, please send an email to cdfsupport and we’ll respond as soon as possible.
If you are looking to make PDS4 files solely for archiving, it would be easier and more practical to submit CDF-A files to PDS with PDS labels, following the guidance at https://pds.nasa.gov/datastandards/documents/archiving/Guide-to-Archiving-CDF-Files-in-PDS4-v7.pdf.
Assuming the CDFs already have good metadata following the ISTP Guidelines, you only need to run the cdfconvert command to make a CDF-A file acceptable to PDS, and the docgen command to make the PDS label file.
Use the commands in the PDF
cdfconvert {src.cdf} {dest.cdf} -single -network -sparseness vars:srecords.no -compression vars:none -zmode 2
docgen -f cdf cdf:cdf:cdf/thg_l2_mag_and_20121226_v01.cdf cdf/pds4label.vm
There’s a PDS CDF checker