NASA Logo, National Aeronautics and Space Administration
SPDF

CDF Patch for IDL 6.2 and later, including IDL 7.* and 8.*

This page contains the IDL-CDF patch (Version 3.6.3.1) based on (CDF library Version 3.6.3.1 CDF logo) for IDL 6.2 and later. If you have problems reading a CDF file or something is not working properly in IDL, we strongly recommend downloading the IDL CDF patch on this page and see if it solves your problem. If the patch still doesn't work or we don't have a patch for your operating system, please contact cdfsupport.

To read about the available CDF modules from IDL, you can find them here: CDF_Routines.

Note: to find out the CDF version on you IDL, enter: help, /DLM, 'CDF' or run: showcdfversion module (more later) within IDL. If you have an earlier CDF version, then use the patch in this page to upgrade to CDF V3.6.3.1.

Several patches have been made available to date. If you downloaded a patch before and are not sure whether you have the latest patch, please download the patch on this page as it supersedes the previous patches.

What's Included in the Patch

  • IDL 6.2 or earlier: 1) large CDF file support (> 2 Gigabyte) 2) allows to open files created with IDL 6.3 or later, or CDF 3.1 or later.
  • IDL 6.2 or earlier - support for CDF_EPOCH16 data type. CDF_EPOCH16 is supported in IDL 6.3 or later.
  • Fix for IDL 6.2 (64-bit Linux on AMD64 machine) - CDF functions do not work properly.
  • Fix for IDL 6.3 (all OSs) - allows to create a CDF_EPOCH variable
  • Fix for IDL 6.3 (Intel Mac) - opening/reading a CDF file
  • Fix for IDL 6.4 (Intel Mac) - CDF variable values are read correctly
  • IDL 6.x and 7.* (all OSs) - significant CDF read performance improvement and elimination of a potential buffer overflow problem
  • Add a new feature to allow setting the checksum option for CDF V3.2 files
  • Modified to convert signed CDF_INT1 and CDF_BYTE data type to int so the data can be interpreted correctly in IDL
  • Add a new feature to allow setting the file validation option when opening CDF files
  • Add a few new functions to handle the new data types, CDF_INT8 and CDF_TIME_TT2000
  • Add a few new or modify the existing functions to allow vectorized epoch data values to be processed for computing, breaking down, comparison and differencing for better performance. Documents for the new/modified modules can be found here
  • Allow cdf_epoch_compare to compare times of different CDF epoch types
  • Bugs fixed

IDL CDF Patch Download and Installation Instruction

IDL CDF patch consists of two major files: shared CDF library and platform-independent Dynamically Loadable Module (DLM) definition file.

The latest patch is based on the CDF Version 3.6.3.1. Make sure to make the downloaded dynamic library (the .so file) for non-Windows executable on your machine. Please contact gsfc-cdf-support@lists.nasa.gov if you need a different CDF version.

Windows:

  1. Download one of the following files:
  2. The library has the latest leap second table embedded.
  3. Download DLM (idl_cdf.dlm)
  4. Optionally, download the leap second table. Do this only if you intend to use the previous IDL patch.
  5. Download script showcdfversion.pro.
  6. Set the IDL_DLM_PATH and IDL_PATH environment variables to point to the directory where you placed the patch. For example, if you placed the patch in c:\idl_cdf363_patch, then the command should be

    set IDL_DLM_PATH="c:\idl_cdf363_patch;<IDL_DEFAULT>"
    set IDL_PATH="c:\idl_cdf363_patch;<IDL_DEFAULT>"

    Note: The above command must be entered exactly as shown, including angle brackets and double quotes, prior to invoking IDL. If the patch is checked out fine, you can use the downloaded files: idl_cdf.dlm and idl_cdf.dll to replace the ones in the operational directory at
    <your IDL directory>\bin\bin.x86 for 32-bit mode, or
    <your IDL directory>\bin\bin.x86_64 for 64-bit mode.

    Backup up the original files.

  7. If you have downloaded the leap second table, then set the environment variable CDF_LEAPSECONDSTABLE to the table.
    set CDF_LEAPSECONDSTABLE='<your IDL directory>\CDFLeapSeconds.txt'
    This table will be used, instead of the hard-coded one embedded in the released library. Not setting the environment variable will result in the use of the table from the library. The step is necessary when the leap second table is different from the one in the library. Need to set the environment variable before running CDF modules under IDL.
  8. Invoke IDL and use it as usual. Run showcdfversion to show the IDL-CDF and CDF versions.
Mac OS X (Intel Mac):
  1. Download the following files:
    • CDF shared library - Most likely you want the 64-bit (darwin x86_64 m64) version (see the message that IDL presents when first starting), otherwise download the 32-bit (darwin i386 m32) version. The libraries are built from a Mac 10.10. Please let us know if you encounter problems running the patch on earlier Mac OS. The library has the latest leap second table embedded; contact us if you want to over-ride the table rather than install the latest patch.
    • DLM (idl_cdf.dlm)
    • Optionally, download the leap second table. Do this only if you intend to use the previous IDL patch.
    • Download script showcdfversion.pro.
  2. Make sure idl_cdf.so and idl_cdf.dlm did not get ".txt" added to the end. Rename it if so.
  3. In Terminal.app, remove Apple's quarantine bit with: sudo xattr -d -d com.apple.quarantine ~/Downloads/idl_cdf.* if the downloaded files go into ~/Downloads folder.
  4. Back up the original idl_cdf.so and idl_cdf.dlm and replace them with the newly downloaded files in the IDL installation at
    <your IDL directory>/bin/bin.darwin.i386 directory for 32-bit mode, or
    <your IDL directory>/bin/bin.darwin.x86_64 for 64-bit mode
    with the new idl_cdf.so and idl_cdf.dlm downloaded in step 1.
  5. If you have downloaded the leap second table, then set the environment variable CDF_LEAPSECONDSTABLE to the table:
    setenv CDF_LEAPSECONDSTABLE "<your downloaded directory>/CDFLeapSeconds.txt" (for csh/tcsh shell)
    export CDF_LEAPSECONDSTABLE="<your downloaded directory>/CDFLeapSeconds.txt" (for sh/bash shell)

    This table will be used, instead of the hard-coded one embedded in the released library. Not setting the environment variable will result in the use of the table from the library. The step is necessary when the leap second table is different from the one in the library. Need to set the environment variable before running CDF modules under IDL.
  6. Invoke IDL and use it as usual. Run showcdfversion to show the IDL-CDF and CDF versions. For instance,
    cd /Applications/exelis/idl/bin/bin.darwin.x86_64 # Or wherever the latest IDL is
    sudo mv idl_cdf.* ../.. # Move old files 2 levels up for safekeeping; give your administrative password
    sudo cp ~/Downloads/idl_cdf.* . # Copy new files from Downloads directory
    ls -l idl_cdf.* # Make sure there's idl_cdf.so and idl_cdf.dlm, and not a ".txt" on end; if so, rename them
    sudo xattr -d -d com.apple.quarantine idl_cdf.* # Remove Apple's quarantine bit
    # run IDL to check:
    IDL> .run showcdfversion.pro
Linux:
  1. Download the following files:
    • One of the following shared libraries. The banner information from idl when it is run will tell it is in either 32-bit (linux x86 m32) or 64-bit (linux x86_64 m64) mode.
    • The library has the latest leap second table embedded.
    • DLM (idl_cdf.dlm)
    • Optionally, download the leap second table. Do this only if you intend to use the previous IDL patch.
    • Download script showcdfversion.pro.
  2. Set the IDL_DLM_PATH environment variable to point to the directory where you placed the patch. For example, if you placed the patch in /home/harold, then the command should be:

    setenv IDL_DLM_PATH "/home/harold:<IDL_DEFAULT>" (for csh/tcsh shell)
    export IDL_DLM_PATH="/home/harold:<IDL_DEFAULT>" (for sh/bash shell)

    Note: The above command must be entered exactly as shown, including angle brackets and double quotes, prior to invoking IDL.

    If the patch is checked out fine, you can use the downloaded files to replace the ones in the operational directory (may need the root access) at
    <your IDL directory>/bin/bin.linux.x86 32-bit mode, or
    <your IDL directory>/bin/bin.linux.x86_64 for 64-bit mode.

  3. If you have downloaded the leap second table, then set the environment variable CDF_LEAPSECONDSTABLE to the table.
    setenv CDF_LEAPSECONDSTABLE "<your IDL directory>/CDFLeapSeconds.txt" (for csh/tcsh shell)
    export CDF_LEAPSECONDSTABLE="<your IDL directory>/CDFLeapSeconds.txt" (for sh/bash shell)

    This table will be used, instead of the hard-coded one embedded in the released library. Not setting the environment variable will result in the use of the table from the library. The step is necessary when the leap second table is different from the one in the library. Need to set the environment variable before running CDF modules under IDL.
  4. Invoke IDL and use it as usual. Run showcdfversion to show the IDL-CDF and CDF versions.
Solaris:
  1. Download the following files:
    • Sparc The banner information from idl when it is run will tell whether it is in 32-bit (sunos sparc m32) or 64-bit (sunos sparc m64) mode.

      The library has the latest leap second table embedded.

    • Intel The library has the latest leap second table embedded.
    • DLM (idl_cdf.dlm)
    • Optionally, download the leap second table. Do this only if you intend to use the previous IDL patch.
    • Download script showcdfversion.pro.
  2. Set the IDL_DLM_PATH environment variable to point to the directory where you placed the patch. For example, if you placed the patch in /home/harold, then the command should be:

    setenv IDL_DLM_PATH "/home/harold:<IDL_DEFAULT>" (for csh/tcsh shell)
    export IDL_DLM_PATH="/home/harold:<IDL_DEFAULT>" (for sh/bash shell)

    Note: The above command must be entered exactly as shown, including angle brackets and double quotes, prior to invoking IDL.

    If the patch is checked out fine, you can use the downloaded files to replace the ones in the operational directory (may need the root access) at
    <your IDL directory>/bin/bin.solaris2.sparc for Sparc 32-bit mode,
    <your IDL directory>/bin/bin.solaris2.sparc64 for Sparc 64-bit mode, or
    <your IDL directory>/bin/bin.solaris2.x86_64 for Intel 64-bit mode

  3. If you have downloaded the leap second table, then set the environment variable CDF_LEAPSECONDSTABLE to the table:
    setenv CDF_LEAPSECONDSTABLE "<your IDL directory>/CDFLeapSeconds.txt" (for csh/tcsh shell)'
    export CDF_LEAPSECONDSTABLE="<your IDL directory>/CDFLeapSeconds.txt" (for sh/bash shell)

    This table will be used, instead of the hard-coded one embedded in the released library. Not setting the environment variable will result in the use of the table from the library. The step is necessary when the leap second table is different from the one in the library. Need to set the environment variable before running CDF modules under IDL.
  4. Invoke IDL "idl" to use the default, 64-bit mode or "idl -32" for 32-bit mode and use it as usual. Run showcdfversion to show the IDL-CDF and CDF versions.
Other OS:
Please contact cdfsupport to obtain a patch for your operating system.

If you have questions, need assistance, or encounter problems, please contact us at cdfsupport.