Initialization of Space Indices

The files of all the registered space indices can be automatically downloaded using:

SpaceIndices.init(; kwargs...) -> Nothing

If a file exists, the function checks if its expiry period has passed. If so, it downloads the file again.

julia> SpaceIndices.init()

If the user does not want to download a set of space indices, they can pass them in the keyword blocklist to the function SpaceIndices.init.

julia> SpaceIndices.init(; blocklist = [SpaceIndices.Celestrak])

If the user wants to initialize only one space index set, they can pass it to the same function:

SpaceIndices.init(::Type{T}; kwargs...) where T<:SpaceIndexSet -> Nothing

where T must be the space index set. In this case, the user have access to the following keywords:

  • force_download::Bool: If true, the remote files will be downloaded regardless of their timestamps. (Default = false)
  • filepaths::Union{Nothing, Vector{String}}: If it is nothing, the function will download the space index files from the locations specified in the urls API function. However, the user can pass a vector with the file locations, which will be used instead of downloading the data. In this case, the user must provide all the files in the space index set T. (Default = nothing)
julia> SpaceIndices.init()[ Info: Downloading the file 'DTCFILE.TXT' from 'https://sol.spacenvironment.net/JB2008/indices/DTCFILE.TXT'...
[ Info: Downloading the file 'SOLFSMY.TXT' from 'https://sol.spacenvironment.net/JB2008/indices/SOLFSMY.TXT'...
[ Info: Downloading the file 'SW-All.csv' from 'https://celestrak.org/SpaceData/SW-All.csv'...
[ Info: Downloading the file 'Hp30_ap30_complete_series.txt' from 'https://kp.gfz.de/app/files/Hp30_ap30_complete_series.txt'...
[ Info: Downloading the file 'Hp60_ap60_complete_series.txt' from 'https://kp.gfz.de/app/files/Hp60_ap60_complete_series.txt'...
[ Info: Downloading the file 'hpo_forecast_mean_bars_Hp30.json' from 'https://isdc-data.gfz.de/geomagnetism/HpoForecast/v0102/output/Hpo/json/hpo_forecast_mean_bars_Hp30.json'...
[ Info: Downloading the file 'hpo_forecast_mean_bars_Hp60.json' from 'https://isdc-data.gfz.de/geomagnetism/HpoForecast/v0102/output/Hpo/json/hpo_forecast_mean_bars_Hp60.json'...
julia> SpaceIndices.init(SpaceIndices.Celestrak; filepaths = ["./SW-All.csv"])

Dst Index Set

The Dst index set is not included in the default SpaceIndices.init() call because it downloads many monthly HTML files from the Kyoto WDC (final, provisional, and real-time quicklook data) and depends on an ap data source (Celestrak or Hpo) being initialized first. It must be initialized separately:

julia> SpaceIndices.init()                           # Initialize all default sets first
julia> SpaceIndices.init(SpaceIndices.Dst)           # Then initialize Dst

The Dst set provides two indices: :Dst (the raw hourly Dst index in nT) and :DTC_Dst (the exospheric temperature variation in K, computed from Dst using the DTCMAKEDR storm algorithm from JB2008).

By default, the non-storm dTc baseline is computed from Celestrak's 3-hour ap values. To use the higher-resolution hourly ap from the Hpo index set instead, pass the ap_source keyword:

julia> SpaceIndices.init(SpaceIndices.Hpo)           # Initialize Hpo first
julia> SpaceIndices.init(SpaceIndices.Dst; ap_source = :hpo)