This page was created by the IDL library routine `mk_html_help2`.

Last modified: Wed Sep 24 18:17:42 2025.

# Directory Listing of Routines

# projects/cluster/cluster_science_archive

- CL_CSA_CONFIG
  This procedure serves as the Cluster configuration file. It sets global (system)
- CL_CSA_INIT
  Initializes system variables for Cluster. Can be called from idl_startup to set
- CL_CSA_READ_CONFIG
  Reads the plug-in configuration file (cl_config.txt) for Cluster
- CL_CSA_SET_VERBOSE
  Sets verbose level in !cluster_csa.verbose and in tplot_options
- CL_LOAD_CSA[1]
  Unpacks .tar.gz or .tgz files downloaded from CSA web services, loads CDF data into tplot variables, and optionally deletes
- CL_LOAD_CSA[2]
  Load Cluster data via one of the Cluster Science Archive web services
- CL_LOAD_CSA_CRIB
  Demonstrate use of cl_load_csa routine by getting lists of valid probes and datatypes, then

# Routine Descriptions

## CL_CSA_CONFIG

[Next Routine] [List of Routines]

    NAME:    cl_csa_config

    PURPOSE:
      This procedure serves as the Cluster configuration file.  It sets global (system)
      variables and initializes devices

      This procedure will define the location of data files and the data server.
      This procedure is intended to be called from within the "CL_INIT" procedure.

      This should be the only Cluster file that requires modification for use in different
      locations.

      There is no need to modify this file if:
         - Your computer is an SSL UNIX machine that mounts "/disks/data/"   (i.e. ALL Linux and Solaris machines at SSL)
         - You use a portable computer that will be caching files on a local hard drive.

      Settings  in this file will be overridden by settings in the environment.
      (see setup_themis or setup_themis_bash for examples of setting environment
      variables on UNIX-like systems.  The environment can also be set on Windows
      systems.)

    KEYWORDS
       NO_COLOR_SETUP   Do not do color setup if taken care for already
       COLORTABLE       Overwrite the default colortable initialization

    HISTORY:
     2019-12-23, egrimes, created based on mms_init

     $LastChangedBy: jwl $
     $LastChangedDate: 2021-07-08 16:21:36 -0700 (Thu, 08 Jul 2021) $
     $LastChangedRevision: 30111 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/cluster/cluster_science_archive/cl_csa_config.pro $

(See projects/cluster/cluster_science_archive/cl_csa_config.pro)

## CL_CSA_INIT

[Previous Routine] [Next Routine] [List of Routines]

    NAME:    cl_csa_init

    PURPOSE:
       Initializes system variables for Cluster. Can be called from idl_startup to set
       custom locations.

    NOTE:
       The system variable !cluster_csa is defined here, just like !THEMIS.
       The elements of this structure are explained below:

       !cluster_csa.LOCAL_DATA_DIR    This is the root location for all cluster data files.
                      The MMS software expects all data files to reside in specific subdirectories relative
                      to this root directory.;

       !cluster_csa.REMOTE_DATA_DIR  This is the URL of the server that can provide the data files.
                      (default is: "https://spdf.gsfc.nasa.gov/pub/data/cluster/")
                      if the software does not find a needed file in LOCAL_DATA_DIR,
                      then it will attempt to download the data from the URL and REMOTE_DATA_DIR is defined,
                      the software will attempt to download the file from REMOTE_DATA_DIR, place it in LOCAL_DATA_DIR
                      with the same relative pathname, and then continue processing.

       !cluster_csa.MIRROR_DATA_DIR  - this is a mirror directory (typically over the local network); setting this
                     will cause the load routines to check this for files after checking your local data directory.
                     If files are found here, they're copied to your local data directory, and the copied files
                     are loaded

       Regarding data directory environment variables: it is highly advised to use the mission specific environment variables
                      (e.g., CLUSTER_CSA_DATA_DIR) rather than ROOT_DATA_DIR to avoid conflicts with other missions/projects

       *** please note that setting REMOTE_DATA_DIR will have no effect when loading data from the LASP SDC, due to the
           custom web services at the SDC; this still allows you override the remote path to the data at SPDF, though ***

    KEYWORDS:
       RESET:           Reset !mms to values in environment (or values in keywords).
       LOCAL_DATA_DIR:  use given value for local_data_dir, rather than environment. Only works on
                        initial call or reset.
       REMOTE_DATA_DIR: Use given value for remote_data_dir, rather than env.  Only works on inital
                        call or reset.
       MIRROR_DATA_DIR:  network mirror directory - for loading data from the local network; note that this
                        will copy files to your local data directory if they're found on the mirror, and this is
                        only checked if the files do not currently exist in the LOCAL_DATA_DIR. Only works on inital
                        call or reset.
       NO_COLOR_SETUP   do not set colors if already taken care of
       DEBUGGING_GUI:   set this keyword if you intend to put 'stop's in any GUI widget code, i.e., if you're debugging
                        any code that involves widget events (EVA or the SPEDAS GUI)

    HISTORY:
     2015-04-10, moka, Created based on 'thm_init'
     2015-02-15, egrimes, commented out dialog_message in CDF version error due to a bug on MacOS X 10.11.6/IDL 8.5
     2018-04-05, egrimes, added MIRROR_DATA_DIR functionality
     2019-08-28, egrimes, made debugging fix (!debug_process_events=0) dependent on a keyword (DEBUGGING_GUI)
                          this debugging fix is known to cause problems with widgets on some machines
     2019-12-23, egrimes, forked for Cluster

     $LastChangedBy: jwl $
     $LastChangedDate: 2021-05-20 17:50:46 -0700 (Thu, 20 May 2021) $
     $LastChangedRevision: 29980 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/cluster/cluster_science_archive/cl_csa_init.pro $

(See projects/cluster/cluster_science_archive/cl_csa_init.pro)

## CL_CSA_READ_CONFIG

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
       cl_csa_read_config

     PURPOSE:
       Reads the plug-in configuration file (cl_config.txt) for Cluster

     CALLING SEQUENCE:
       cstruct = cl_csa_read_config()

     OUTPUT:
       cstruct = a structure with the changeable fields of the !istp
               structure

     HISTORY:
       Cleaned up for new plug-ins by egrimes 14-may-2018
       Copied from thm_read_config and tt2000_read_config lphilpott 20-jun-2012

    $LastChangedBy: jwl $
    $LastChangedDate: 2021-05-20 17:50:46 -0700 (Thu, 20 May 2021) $
    $LastChangedRevision: 29980 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/cluster/cluster_science_archive/cl_csa_read_config.pro $

(See projects/cluster/cluster_science_archive/cl_csa_read_config.pro)

## CL_CSA_SET_VERBOSE

[Previous Routine] [Next Routine] [List of Routines]

    NAME:
     cl_csa_set_verbose
    PURPOSE:
     Sets verbose level in !cluster_csa.verbose and in tplot_options
    CALLING SEQUENCE:
     cl_csa_set_verbose, vlevel
    INPUT:
     vlevel = a verbosity level, if not set then !cluster_csa.verbose is used
              (this is how you would propagate the !cluster_csa.verbose value
              into tplot options)
    HISTORY:
     21-aug-2012, jmm, jimm@ssl.berkeley.edu
     12-oct-2012, jmm, Added this comment to test SVN
     12-oct-2012, jmm, Added this comment to test SVN, again
     18-oct-2012, jmm, Another SVN test
     10-apr-2015, moka, adapted for MMS from 'thm_set_verbose'
     23-dec-2019, egrimes, forked for Cluster

     $LastChangedBy: jwl $
     $LastChangedDate: 2021-05-20 17:50:46 -0700 (Thu, 20 May 2021) $
     $LastChangedRevision: 29980 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/cluster/cluster_science_archive/cl_csa_set_verbose.pro $

(See projects/cluster/cluster_science_archive/cl_csa_set_verbose.pro)

## CL_LOAD_CSA[1]

[Previous Routine] [Next Routine] [List of Routines]

     PROCEDURE:
             cl_load_csa_postprocess

     PURPOSE:
             Unpacks .tar.gz or .tgz files downloaded from CSA web services, loads CDF data into tplot variables, and optionally deletes
             temporary files when finished

     KEYWORDS:
             netobj:       IDLNetURL object used to download data

             filedir:      Directory where files should be unpacked

             filename:     File name of downloaded data

             get_support_data: If set, loads support data from downloaded CDFs

             verbose:       Higher values result in more progress/diagnostic output

             nocleanup:     If specified, do not delete downloaded and unpacked files from the temp directory

     OUTPUT

     EXAMPLE:

     NOTES:

    $LastChangedBy: jwl $
    $LastChangedDate: 2021-10-08 16:03:55 -0700 (Fri, 08 Oct 2021) $
    $LastChangedRevision: 30344 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/cluster/cluster_science_archive/cl_load_csa.pro $

(See projects/cluster/cluster_science_archive/cl_load_csa.pro)

## CL_LOAD_CSA[2]

[Previous Routine] [Next Routine] [List of Routines]

     PROCEDURE:
             cl_load_csa

     PURPOSE:
             Load Cluster data via one of the Cluster Science Archive web services

     KEYWORDS:
             trange:       time range of interest [starttime, endtime] containing either Unix timestamps,
                           or strings with the format YYYY-MM-DDThh:mm:ssZ

             probes:       list of probes, valid values for Cluster probes are C1, C2, C3, C4 (wildcards accepted)

             datatypes:    list of datatypes to download.  Names are case sensitive!  Wildcards accepted.  See
                           definition of master_datatypes below for valid names

             valid_names:   If specified, returns the list of valid probes and datatypes through their respective keyword arguments

             get_support_data: If specified, load support data variables from downloaded CDFs.

             verbose:          Higher values print more diagnostic/progress information

             use_tap:          If specified, use the newer TAP interface rather than the default CAIO interface

             nocleanup:        If specified, do not remove downloaded files from the temp directory when finished

     OUTPUT:

     EXAMPLE:

     NOTES:

    $LastChangedBy: jwl $
    $LastChangedDate: 2021-10-08 16:03:55 -0700 (Fri, 08 Oct 2021) $
    $LastChangedRevision: 30344 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/cluster/cluster_science_archive/cl_load_csa.pro $

(See projects/cluster/cluster_science_archive/cl_load_csa.pro)

## CL_LOAD_CSA_CRIB

[Previous Routine] [List of Routines]

     PROCEDURE:
             cl_load_csa_crib

     PURPOSE:
             Demonstrate use of cl_load_csa routine by getting lists of valid probes and datatypes, then
             loading each datatype individually for probe C1 on a default test time range.

     KEYWORDS:
            get_support_data: If set, loads support data from downloaded CDFs

            use_tap:          If set, use newer TAP interface rather than default CAIO interface

     OUTPUT

     EXAMPLE:

     NOTES:

    $LastChangedBy: jwl $
    $LastChangedDate: 2021-10-08 16:03:55 -0700 (Fri, 08 Oct 2021) $
    $LastChangedRevision: 30344 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/cluster/cluster_science_archive/cl_load_csa_crib.pro $

(See projects/cluster/cluster_science_archive/cl_load_csa_crib.pro)