NASA Logo, National Aeronautics and Space Administration

Accessing CDAWeb Data From IDL

This page describes an IDL library that provides easy access to CDAWeb data from an IDL program.  With this library, an IDL user can retrieve data from CDAWeb by entering a single IDL command.  The data is automatically downloaded and read into an IDL structure (with its associated metadata/documentation) in the user's local IDL environment.  The user can then write their own IDL code to analyze or visualize the data.  This is further illustrated with an IDL Jupyter notebook example.  There is also a GUI program to make discovering and retrieving CDAWeb data even easier.  Finally, there is an example program that demonstrates many of the lower-level calls for those who want to incorporate CDAWeb data access into a larger IDL program.


  1. Determine if you need the CDF patch for IDL.
  2. Download spdfcdas.sav
  3. Start IDL 8.4 or higher.
  4. IDL> restore, 'spdfcdas.sav', /skip_existing

IDL Package Installation (alternative installation procedure)

If you are using IDL version 8.7.1 or higher, you may install the SPDF_CDAS package by doing the following in an IDL session:

"One-line" Data Access

To retrieve data from the AC_H2_MFI dataset into the IDL variable "d", do the following in an IDL session:


IDL Jupyter Notebook Example

Use of this IDL library to access CDAWeb data if further illustrated in this IDL Jupyter notebook example ( ipynb file).

GUI Data Access

The purpose of this GUI is to allow the user to retrieve data from CDAWeb into their local IDL environment without having to know the values of the parameters (e.g., AC_K2_MFI, Magnitude, BGSEc, etc.) to the spdfGetData function.  Once the user selects the data they want from CDAWeb, this program can retrieve the data and place it in an IDL structure.  The user can then enter any IDL commands to analyze, alter, or visualize the data.
  1. IDL> spdfcdawebchooser
  2. Change the dataview if you wish
  3. Select one or more Mission Groups (e.g., ACE)
  4. Select one or more Instrument Types (e.g., Magnetic Fields)
  5. Select the Find Datasets button
  6. Select one or more variables from a single dataset (e.g., AC_K2_MFI: Magnitude, BGSEc)
  7. Enter a Start and Stop time
  8. Change the variable name if you wish
  9. Select the Get Data button
  10. IDL> help, data.varname.dat, /struct ; where varname is the name of a selected variable (e.g.,
  11. Perform any IDL operations on the data that you want (e.g. plot, data.magnitude.dat)

"More complete" CDAWeb Access Example

  1. IDL> spdfcdaswsexample

NASA Logo -