Loading Geomagnetic Indices and Solar Wind Parameters
el_paso.load_indices_solar_wind_parameters.load_indices_solar_wind_parameters
load_indices_solar_wind_parameters
load_indices_solar_wind_parameters
load_indices_solar_wind_parameters
Loads a variety of space weather indices and solar wind parameters.
This function fetches and processes data for several common space weather and solar wind indices, including Kp, Dst, solar wind plasma properties, and Tsyganenko model parameters (G1, G2, G3, W_params).
Data is downloaded and cached locally to a .elpaso directory in the user's home
directory. The function can either return the data with its original timestamps
or interpolate the data to a new set of timestamps provided by a target_time_variable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_time
|
datetime
|
The start time for the data retrieval. |
required |
end_time
|
datetime
|
The end time for the data retrieval. |
required |
requested_outputs
|
Iterable[SW_Index]
|
A list of space weather indices to load.
Supported values are defined by the |
required |
target_time_variable
|
Variable | None
|
An optional |
None
|
w_parameter_method
|
TsyWebsite | Calculation
|
The method to use for obtaining W_params. 'TsyWebsite' fetches data from the Tsyganenko website (only available until 2023), while 'Calculation' computes them from other solar wind data. Defaults to 'Calculation'. |
'Calculation'
|
Returns:
| Type | Description |
|---|---|
dict[SW_Index, tuple[Variable, Variable]] | dict[SW_Index, Variable]
|
dict[SW_Index, ep.Variable | tuple[ep.Variable, ep.Variable]]: A dictionary where each key
is a requested index and the value
is the corresponding |
Raises:
| Type | Description |
|---|---|
TypeError
|
If |
OSError
|
If the HOME environment variable is not set. |
ValueError
|
If a requested output is not a supported |
FileNotFoundError
|
If the data file from the Tsyganenko website is not found. |
Source code in el_paso/load_indices_solar_wind_parameters.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | |