NOAA Geomagnetic Indices
The following geomagnetic indices can be loaded into tplot variables:
[“Kp”, “ap”, “Sol_Rot_Num”, “Sol_Rot_Day”, “Kp_Sum”, “ap_Mean”, “Cp”, “C9”, “Sunspot_Number”, “F10.7”, “Flux_Qualifier”]
For “Kp” and “ap”, there is one data point for every 3 hours. For all other variables, there is one data point per day.
- pyspedas.projects.noaa.noaa_load_kp(trange=['2017-03-01/00:00:00', '2017-03-31/23:59:59'], local_kp_dir=None, datatype=[], gfz=False, prefix='', suffix='', time_clip=True, force_download=False)[source]
Load geomagnetic index data into appropriate variables.
- Parameters:
trange (
listofstr) – Time range to load data for. Should be a list of two strings.local_kp_dir (
str) – Directory where data is saved locally.datatype (
listofstr, optional) –- Type of index to load. Default is an empty list, which loads all available data. Valid values:
“Kp”, “ap”, “Sol_Rot_Num”, “Sol_Rot_Day”, “Kp_Sum”, “ap_Mean”, “Cp”, “C9”, “Sunspot_Number”, “F10.7”, “Flux_Qualifier”,
gfz (
bool, optional) – Load data from the HTTPS site of the German Research Centre for Geosciences, instead of NOAA. This is the default behavior if the end time is on or after 2018. Default is False (by default, it loads data from the HTTPS server of NOAA). If this source is used, the Sunspot_Number, F10.7, and Flux_Qualifier datatypes will not be available.prefix (
str, optional) – If provided, specifies a string to be prepended to tplot variable names.suffix (
str, optional) – If provided, specifies a string to be appended to tplot variable names.time_clip (
bool, optional) – If True, data will be time clipped to the exact time range requested. Default is True.force_download (
bool) – Download file even if local version is more recent than server version. Default is False.
- Returns:
Returns the names of tplot variables that contain all the data. Data is saved in a tplot variables.
- Return type:
Example
>>> from pyspedas import noaa_load_kp >>> vars = noaa_load_kp(trange=['2014-03-23/00:00:00', '2014-03-23/23:59:59']) >>> print(vars) ['Kp', 'ap', 'Sol_Rot_Num', 'Sol_Rot_Day', 'Kp_Sum', 'ap_Mean', 'Cp', 'C9', 'Sunspot_Number', 'F10.7', 'Flux_Qualifier']
Example
import pyspedas
from pyspedas import tplot
trange = ["2017-03-23/00:00:00", "2017-04-23/23:59:59"]
noaa_vars = pyspedas.projects.noaa.noaa_load_kp(trange=trange)
print(noaa_vars)
tplot(['Kp','ap','F10.7'])
NOAA and GFZ ftp sites
Data is downloaded either from the NOAA ftp site or the GFZ (Helmholtz Centre Potsdam) ftp site.
NOAA data is available from 1932 to March 2018.<br> (ftp.ngdc.noaa.gov/STP/GEOMAGNETIC_DATA/INDICES/KP_AP/, filenames: 1932, 1933, …, 2018)
GFZ data is available from 1932 to present.<br> (ftp.gfz-potsdam.de/pub/home/obs/kp-ap/wdc/yearly/, filenames: kp1932.wdc, kp1933.wdc, …, kp2020.wdc)
A single file contains one year of data.<br> A single line inside a file contains one day of data.
File names are different in the two ftp sites.<br> Data format is a little different, the NOAA data has 72 characters per line,<br> while the GFZ data has 62 characters per line (it is missing the last 3 columns).
Example of data from NOAA and from WDC: NOAA:
1701012502 73337272323302017210 18 22 12 9 9 15 7 6 120.73---070.10
WDC:
17 1 12502 73337272323302017210 18 22 12 9 9 15 7 6 120.73
IDL SPEDAS code loads empty variables for the three missing columns in the GFZ data, python pyspedas code skips these empty variables.
FTP file data format
A description of the text file format can be found in the following file: ftp://ftp.ngdc.noaa.gov/STP/GEOMAGNETIC_DATA/INDICES/KP_AP/kp_ap.fmt
FORMAT FOR RECORDS OF SELECTED GEOMAGNETIC AND SOLAR ACTIVITY INDICES:
-------------------------------------------------------------------------------
COLUMNS FMT DESCRIPTION
-------------------------------------------------------------------------------
1- 2 I2 YEAR
3- 4 I2 MONTH
5- 6 I2 DAY
7-10 I4 BARTELS SOLAR ROTATION NUMBER--a sequence of 27-day intervals
counted continuously from February 8, 1832.
11-12 I2 NUMBER OF DAY within the Bartels 27-day cycle.
13-14 I2 Kp or PLANETARY 3-HOUR RANGE INDEX for 0000 - 0300 UT.
15-16 I2 Kp or PLANETARY 3-HOUR RANGE INDEX for 0300 - 0600 UT.
17-18 I2 Kp or PLANETARY 3-HOUR RANGE INDEX for 0600 - 0900 UT.
19-20 I2 Kp or PLANETARY 3-HOUR RANGE INDEX for 0900 - 1200 UT.
21-22 I2 Kp or PLANETARY 3-HOUR RANGE INDEX for 1200 - 1500 UT.
23-24 I2 Kp or PLANETARY 3-HOUR RANGE INDEX for 1500 - 1800 UT.
25-26 I2 Kp or PLANETARY 3-HOUR RANGE INDEX for 1800 - 2100 UT.
27-28 I2 Kp or PLANETARY 3-HOUR RANGE INDEX for 2100 - 2400 UT.
29-31 I3 SUM of the eight Kp indices for the day expressed to the near-
est third of a unit.
32-34 I3 ap or PLANETARY EQUIVALENT AMPLITUDE for 0000 - 0300 UT.
35-37 I3 ap or PLANETARY EQUIVALENT AMPLITUDE for 0300 - 0600 UT.
38-40 I3 ap or PLANETARY EQUIVALENT AMPLITUDE for 0600 - 0900 UT.
41-43 I3 ap or PLANETARY EQUIVALENT AMPLITUDE for 0900 - 1200 UT.
44-46 I3 ap or PLANETARY EQUIVALENT AMPLITUDE for 1200 - 1500 UT.
47-49 I3 ap or PLANETARY EQUIVALENT AMPLITUDE for 1500 - 1800 UT.
50-52 I3 ap or PLANETARY EQUIVALENT AMPLITUDE for 1800 - 2100 UT.
53-55 I3 ap or PLANETARY EQUIVALENT AMPLITUDE for 2100 - 2400 UT.
56-58 I3 Ap or PLANETARY EQUIVALENT DAILY AMPLITUDE--the arithmetic mean
of the day's eight ap values.
59-61 F3.1 Cp or PLANETARY DAILY CHARACTER FIGURE--a qualitative estimate
of overall level of magnetic activity for the day determined
from the sum of the eight ap amplitudes. Cp ranges, in steps
of one-tenth, from 0 (quiet) to 2.5 (highly disturbed).
62-62 I1 C9--a conversion of the 0-to-2.5 range of the Cp index to one
digit between 0 and 9.
63-65 I3 INTERNATIONAL SUNSPOT NUMBER. Records contain the Zurich num-
ber through December 31, 1980, and the International Brus-
sels number thereafter.
66-70 F5.1 OTTAWA 10.7-CM SOLAR RADIO FLUX ADJUSTED TO 1 AU--measured at
1700 UT daily and expressed in units of 10 to the -22 Watts/
meter sq/hertz. Observations began on February 14, 1947.
From that date through December 31, 1973, the fluxes given
here don't reflect the revisions Ottawa made in 1966. NOTE:
If a solar radio burst is in progress during the observation
the pre-noon or afternoon value is used (as indicated by a
flux qualifier value of 1 in column 71.
71-71 I1 FLUX QUALIFIER. "0" indicates flux required no adjustment;
"1" indicates flux required adjustment for burst in progress
at time of measurement; "2" indicates a flux approximated by
either interpolation or extrapolation; and "3" indicates no
observation.