Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.




Dataset Creators/Designers

The Common Data Format (CDF) is a conceptual data abstraction for storing, manipulating, and accessing multidimensional datasets. The basic component of CDF is a software programming interface that is a device-independent view of the CDF data model. The application developer is insulated from the actual physical file format for reasons of conceptual simplicity, device independence, and future expandability. CDF files created on any given platform can be transported to any other platform onto which CDF is ported and used with any CDF tools or layered applications. A more detailed introduction to CDF can be found in the CDF User Guide.

How do I make a CDF?

A CDF file can be created either by using the programming interface (Standard Interface or Internal Interface) or the CDFEdit and SkeletonTable toolkit programs included in the standard CDF distribution package. Fortran, Perl, Java, C#, and VB languages can be used to call C interfaces to create CDFs. Commercial IDL® and MATLAB® support CDF. Open source Python can also be used to create a CDF. The Creating CDF Files page contains helpful information. There are several CDF Quick Start Guides available with detailed instructions and information for the various software languages.

How do I write a data structure to a CDF?

It depends on what the CDF’s data structure looks like. CDFIrsDump dumps the internal records (IRs) in a CDF. This is a debugging tool to show the internal data structure of a CDF. Refer to CDF’s Internal Format Description document for more information.

What libraries will write CDFs?

All of the CDF libraries provided by SPDF allow developers/dataset creators to write data to a CDF file. The term CDF is also used to refer to the physical files that the CDF library generates. A dataset stored using the CDF library is called a CDF.

What metadata should I use?

There are two sets of metadata. The set of attributes describing the CDF in global terms are global attributes. Some of these attributes under ISTP includes “Project”, “Discipline”, “Descriptor”, “PI_Name”, etc. Variable attributes are specifically for variables. Some of the variable attributes used under ITSP are “FIELDNAM”, “VAR_TYPE”, “FILLVAL”, “VALIDMIN”, “VALIDMAX.” Use of the SKTEditor tool to create a CDF will ensure the required metadata is included and validated in an ISTP-compliant CDF. Further information about metadata can be found in the ISTP Metadata Guidelines.

When describing datasets, users should use standard common terminology (metadata). The first is a series of records comprising a collection of variables consisting of scalars, vectors, and n-dimensional arrays. The second is a set of attribute entries (metadata) describing the CDF in global terms or specifically for a single variable. This dual function of CDF is what provides its “dataset independence.” Both the metadata (attributes) and the data objects (variables) are combined into an integrated dataset.

What are best practices for laying out a CDF and naming the variables and filenames? (ISTP and non-ISTP practices)

Each attribute in a CDF has a unique name. Attribute names are case sensitive regardless of the operating system being used and may consist of up to CDF_ATTR_NAME_LEN or CDF_ATTR_NAME_LEN256 printable characters (including blanks). Trailing blanks, however, are ignored when the CDF library compares attribute names. “UNITS” and “UNITS” are considered to be the same name, so they cannot both exist in the same CDF. This was done because Version 1 of CDF padded attribute names on the right with blanks out to eight characters. When CDF version 1 was converted to version 2 these trailing blanks remained in the attributes names. To allow CDF Version 2 applications to read such a CDF without having to be concerned with the trailing blanks, the trailing blanks are ignored by the CDF when comparing attributes names. The trailing blanks are returned as part of the name, however, only when an attribute is inquired by an application program. More information can be found here: File naming recommendations.

Did I make a valid dataset?

Use the CDF tool, cdfvalidate, to check if a CDF is valid. If it is not valid, the user will receive an error message about the file.