The CDF patch is able to provide modified version of cdfread/cdfwrite (and other routines such as cdfinfo, cdfupdate, and a set of time encoding/decoding functions) in the patches below, but not updates to cdflib.
Times in CDF are generally stored in one of three forms: CDF_EPOCH (8-byte floating milliseconds from 0AD), CDF_EPOCH16 (two 8-byte floats of seconds from 0AD and picoseconds of that second), and CDF_TIME_TT2000 (8 byte integer of nanoseconds from 2000 AD). By default, MATLAB's cdfread uses an object cdfepoch for each CDF_EPOCH value, and can also read the epoch and convert it to datenum. Creating cdfepoch object for each CDF_EPOCH is not efficient as it takes time and more space. cdfread can not read CDF_EPOCH16 (and CDF_TIME_TT2000). CDF_EPOCH16 can only be read, as is, from the cdflib package; no conversion to datenum is available. cdflib reads CDF_EPOCH data like any other data types. SPDF's spdfcdfread can handle all time types, and optionally can convert their values to MATLAB's datenum. SPDF's spdfcdfread also provides cdfepoch and cdftt2000 objects (more accurate but not as efficient as MATLAB's datenum).
If you get error messages reading a CDF file while using MATALB distributed CDF package/modules, we strongly encourage you to try the patch from this page. The patch, based on the original MATLAB-provided code and later expanded, includes many user suggested enhancements and features. The patch can be updated quickly if needed. This patch works only for Matlab version R2007a and later. .
NOTE: Current MATLAB's release is still based on CDF V3.3.0. [Use cdflib.getLibraryVersion function to acquire CDF's library version.] While it works fine with the CDF files with the older data types, it will not work with files that have the newer data types: CDF_INT8 and CDF_TIME_TT2000 (TT2000 for short), that were introduced in CDF V22.214.171.124. Some of the data from newer NASA missions, e.g., Van Allen Probes, MMS, would present a problem as TT2000 is used as the time format. MATLAB plans to upgrade the CDF in its 2016a release. Before then, you have to use the patch for CDF files that have newer data types.
Please note: MATLAB's CDFLIB package was developed and is maintained sorely by MATLAB.
Use "help" for their information.
Mac OS X: