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

Last modified: Sat Aug 2 18:17:35 2025.

# Directory Listing of Routines

# projects/kompsat

- KOMPSAT_LOAD_CSV
- KOMPSAT_LOAD_DATA
- KOMPSAT_READ_PASSWORD
- KOMPSAT_TO_TPLOT

# Routine Descriptions

## KOMPSAT_LOAD_CSV

[Next Routine] [List of Routines]

     Procedure:
             kompsat_load_csv

     Purpose:
             Load KOMPSAT data from a local CSV file into tplot variables.
             Data files can contain either magnetometer data (SOSMAG intrument) or particle data (particle detector).

     Keywords:
             filename : the csv filename, including the full path
             dataset: string, 'recalib' (default, can be omitted), '1m', 'p', 'e'
             tformat (optional): string, time format, for example 'DD.MM.YYYY hh:mm:ss'
                                 default time format is 'YYYY-MM-DDThh:mm:ss.fffZ'
             desc (optional): string, description of the data
             prefix (optional): string, prefix for tplot variables
             suffix (optional): string, suffix for tplot variables

     Notes:
       First, the user must register at the ESA web site, then download a csv file to his computer,
       and then load the csv file data into SPEDAS using "kompsat_load_csv, filename".

       To register, the user can go to the following web site and click on "capabilities".
         https://swe.ssa.esa.int/hapi/
       A new page will appear which includes the link for registration.

       To download data as csv files, the user can use a web browser with the ESA HAPI web server.

       For example, the following URL downloads SOSMAG calibrated data (data product d3s_gk2a_sosmag_recalib):
       https://swe.ssa.esa.int/hapi/data?id=spase://SSA/NumericalData/D3S/d3s_gk2a_sosmag_recalib&time.min=2024-05-11T01:00:00.000Z&time.max=2024-05-11T02:00:00.000Z&format=csv

       The following downloads SOSMAG real-time data (data product d3s_gk2a_sosmag_1m):
       https://swe.ssa.esa.int/hapi/data?id=spase://SSA/NumericalData/D3S/d3s_gk2a_sosmag_1m&time.min=2024-05-11T01:00:00.000Z&time.max=2024-05-11T02:00:00.000Z&format=csv

       The following downloads proton flux data (data product kma_gk2a_ksem_pd_p_l1):
       https://swe.ssa.esa.int/hapi/data?id=spase://SSA/NumericalData/GEO-KOMPSAT-2A/kma_gk2a_ksem_pd_p_l1&time.min=2024-05-11T01:00:00.000Z&time.max=2024-05-11T02:00:00.000Z&format=csv

       The following downloads electron flux data (data product kma_gk2a_ksem_pd_e_l1):
       https://swe.ssa.esa.int/hapi/data?id=spase://SSA/NumericalData/GEO-KOMPSAT-2A/kma_gk2a_ksem_pd_e_l1&time.min=2024-05-11T01:00:00.000Z&time.max=2024-05-11T02:00:00.000Z&format=csv

       To find information on the variables for each data set, use the above links with 'info' instead of 'data' and 'json' instead of 'csv'. For example:
       https://swe.ssa.esa.int/hapi/info?id=spase://SSA/NumericalData/D3S/d3s_gk2a_sosmag_recalib&time.min=2024-05-11T01:00:00.000Z&time.max=2024-05-11T02:00:00.000Z&format=json

     $LastChangedBy: nikos $
     $LastChangedDate: 2025-03-14 13:38:31 -0700 (Fri, 14 Mar 2025) $
     $LastChangedRevision: 33177 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kompsat/kompsat_load_csv.pro $

(See projects/kompsat/kompsat_load_csv.pro)

## KOMPSAT_LOAD_DATA

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

     Procedure:
      kompsat_load_data

     Purpose:
      Load data from KOMPSAT.
      This code works only for IDL 9.1 or higher.

     Keywords:
         trange:     Time range of interest (array with 2 elements, start and end time)
         dataset:    Four datasets are available: recalib (default), 1m, p, e
                     Two datasets for SOSMAG magnetometer: recalib (recalibrated, default) and 1m (1 min, real-time):
                          'spase://SSA/NumericalData/D3S/d3s_gk2a_sosmag_recalib'
                          'spase://SSA/NumericalData/D3S/d3s_gk2a_sosmag_1m'
                     Two datasets for particle detector: e (electrons), p (protons):
                          'spase://SSA/NumericalData/GEO-KOMPSAT-2A/kma_gk2a_ksem_pd_e_l1'
                          'spase://SSA/NumericalData/GEO-KOMPSAT-2A/kma_gk2a_ksem_pd_p_l1'
         prefix:     String to append to the beginning of the loaded tplot variable names
         suffix:     String to append to the end of the loaded tplot variable names
         tplotvars:  Returned array of strings, with the tplot variables that were loaded

    $LastChangedBy: nikos $
    $LastChangedDate: 2025-03-14 13:38:31 -0700 (Fri, 14 Mar 2025) $
    $LastChangedRevision: 33177 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kompsat/kompsat_load_data.pro $

(See projects/kompsat/kompsat_load_data.pro)

## KOMPSAT_READ_PASSWORD

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

     Procedure:
      kompsat_read_password

     Purpose:
      Read the username and password for ESA HAPI server.

     Notes:
       ESA HAPI server requires a username and password for each user.
       These should be saved in a file 'kompsat_password.txt'
       that resides in the same directory as the present file.
       It should contain the username and password separated by =,
       for example:
         username=spedas
         password=adg4kgpGf9Bh26v2

    $LastChangedBy: nikos $
    $LastChangedDate: 2024-11-09 15:31:36 -0800 (Sat, 09 Nov 2024) $
    $LastChangedRevision: 32939 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kompsat/kompsat_read_password.pro $

(See projects/kompsat/kompsat_read_password.pro)

## KOMPSAT_TO_TPLOT

[Previous Routine] [List of Routines]

     Procedure:
      kompsat_to_tplot

     Purpose:
      Create tplot variables from KOMPSAT data.
      Works with kompsat_load_data.pro and kompsat_load_csv.pro

     Keywords:
     data, dataset=dataset, param=param, desc=desc, prefix=prefix, suffix=suffix, tplotvars=tplotvars
         data:       An array of data
         dataset:    Four datasets are available: recalib (default), 1m, p, e
         param:      Optional parameters with descriptions
         desc:       Optional description
         prefix:     String to append to the beginning of the loaded tplot variable names
         suffix:     String to append to the end of the loaded tplot variable names
         tplotvars:  Returned array of strings, with the tplot variables that were loaded

    $LastChangedBy: nikos $
    $LastChangedDate: 2024-11-09 15:31:36 -0800 (Sat, 09 Nov 2024) $
    $LastChangedRevision: 32939 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/projects/kompsat/kompsat_to_tplot.pro $

(See projects/kompsat/kompsat_to_tplot.pro)