aeroReadSpaceWeatherData
Syntax
Description
reads space weather data from the space weather data file,
matfile
= aeroReadSpaceWeatherData(spaceWeatherFile
)spaceWeatherFile
, downloaded from CelesTrak® and stores the data in a MAT file, matfile
. The function
saves the MAT file to the current working directory, and returns the filename along with its
full path in matfile
.
The fluxSolarAndGeomagnetic
function extracts the solar flux and
geomagnetic data from the MAT file.
creates matfile
= aeroReadSpaceWeatherData(spaceWeatherFile
,Name=Value
)matfile
based on additional parameters specified by one or more
name-value arguments.
[
returns the earliest date matfile
,startdate
] = aeroReadSpaceWeatherData(___)startdate
that corresponds to the data that
is saved in matfile
. Specify input argument combinations from the
previous syntaxes.
[
returns the earliest and latest dates, matfile
,startdate
,enddate
] = aeroReadSpaceWeatherData(___)startdate
and
enddate
, respectively, corresponding to the data that is saved in
matfile
.
Input Arguments
spaceWeatherFile
— Space weather data file
filename | character vector | string
Space weather data file, a comma-separated values (CSV) file containing consolidated
space weather data from https://celestrak.org/spacedata/
, specified as a character vector or string. The extension
.csv
must be appended to the file name. The filename must be on the
MATLAB® path or you must specify the path with the filename.
Data Types: char
| string
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: Format='numeric'
specifies that the space weather data is
stored as one-dimensional cell arrays (F107_DATA_TYPE
) and numeric arrays
(all other data in matfile
).
StartDate
— Earliest date to read data
earliest date in spaceWeatherFile
(default) | datetime
object | scalar
Earliest date to read data from spaceWeatherFile
, specified
as a datetime
object or scalar. The default value is the earliest
date in spaceWeatherFile
. StartDate
cannot
occur after EndDate
.
EndDate
— Latest date to read data
latest date in spaceWeatherFile
(default) | datetime
object | scalar
Latest date to read data from spaceWeatherFile
, specified as
a datetime
object or scalar. The default value is the latest date
in spaceWeatherFile
. EndDate
cannot occur
before StartDate
.
FolderName
— Folder in which to save matfile
current folder with write permissions (default) | character vector | string scalar
Folder in which to save matfile
, specified as a character
vector or string scalar. The default folder is the current folder with write
permissions. Create this folder with write permission first before specifying
FolderName
.
Format
— Format in which space weather data is stored in MAT file
'numeric'
(default) | 'timetable'
Format in which space weather data is stored in matfile
,
specified as one of these values:
'numeric'
— Data is stored as one-dimensional cell arrays (F107_DATA_TYPE
) and numeric arrays (all other data inmatfile
). These variables are stored inmatfile
.Space Weather Data File Variables Description YEAR
ISO 8601 year.
MONTH
ISO 8601 month.
DAY
ISO 8601 day.
BRSN
Bartels Solar Rotation Number. A sequence of 27-day intervals counted continuously from Feb 8, 1832.
ND
Number of day within the Bartels 27-day cycle (01-27).
KP1
Planetary 3-hour range index (Kp) for 0000-0300 coordinated universal time.
KP2
Planetary 3-hour range index (Kp) for 0300-0600 coordinated universal time.
KP3
Planetary 3-hour range index (Kp) for 0600-0900 coordinated universal time.
KP4
Planetary 3-hour range index (Kp) for 0900-1200 coordinated universal time.
KP5
Planetary 3-hour range index (Kp) for 1200-1500 coordinated universal time.
KP6
Planetary 3-hour range index (Kp) for 1500-1800 coordinated universal time.
KP7
Planetary 3-hour range index (Kp) for 1800-2100 coordinated universal time.
KP8
Planetary 3-hour range index (Kp) for 2100-0000 coordinated universal time.
KP_SUM
Sum of the 8 planetary 3-hour range indices (Kp) for the day.
AP1
Planetary equivalent amplitude (Ap) for 0000-0300 coordinated universal time.
AP2
Planetary equivalent amplitude (Ap) for 0300-0600 coordinated universal time.
AP3
Planetary 3-hour range index (Kp) for 0600-0900 coordinated universal time.
AP4
Planetary equivalent amplitude (Ap) for 0900-1200 coordinated universal time.
AP5
Planetary equivalent amplitude (Ap) for 1200-1500 coordinated universal time.
AP6
Planetary equivalent amplitude (Ap) for 1500-1800 coordinated universal time.
AP7
Planetary equivalent amplitude (Ap) for 1800-2100 coordinated universal time.
AP8
Planetary equivalent amplitude (Ap) for 2100-0000 coordinated universal time.
AP_AVG
Arithmetic average of the 8 planetary equivalent amplitude indices (Ap) for the day.
CP
Cp or planetary daily character figure. A qualitative estimate of overall level of magnetic activity for the day determined from the sum of the 8 Ap indices. Cp ranges, in steps of one tenth, from 0 (quiet) to 2.5 (highly disturbed).
C9
A conversion of the 0 to 2.5 range of the Cp index to one digit between 0 and 9.
ISN
International sunspot number. Records contain the Zurich number through December 31, 1980, and the international Brussels number thereafter.
F107_OBS
Observed 10.7-cm solar radio flux (F10.7). Measured in units of 10-22 W/m2/Hz. at:
Ottawa, Canada at 1700 coordinated universal time daily from February 14, 1947, to May 31, 1991.
Penticton, British Columbia, Canada at 2000 coordinated universal time daily from June 1, 1991.
F107_ADJ
10.7-cm solar radio flux (F10.7) (adjusted to 1 AU).
F107_DATA_TYPE
Flux qualifier:
OBS — Observed flux measurement.
INT — CelesTrak linear interpolation of missing data.
PRD — 45-Day predicted flux.
PRM — Monthly predicted flux.
F107_OBS_CENTER81
Centered 81-day arithmetic average of F10.7 (observed).
F107_OBS_LAST81
Last 81-day arithmetic average of F10.7 (observed).
F107_ADJ_CENTER81
Centered 81-day arithmetic average of F10.7 (adjusted to 1 AU).
F107_ADJ_LAST81
Last 81-day arithmetic average of F10.7 (adjusted to 1 AU).
'timetable'
— Data is stored in atimetable
.matfile
contains atimetable
variable named'fluxData'
. The columns of thetimetable
have the same names as the'numeric'
variables with the exception thatYEAR
,MONTH
, andDAY
are combined into a singleDATE
column that containsdatetime
objects.
Output Arguments
matfile
— Full path to MAT file containing space weather data
character array
Full path to new MAT file containing space weather data, specified as a character
array. The MAT file name has the format
aerospaceweatherdataYYYYMMDD.mat
,
where:
YYYY —Year when the CelesTrak file was read.
MM — Month when the CelesTrak file was read.
DD — Calendar day when the CelesTrak file was read.
startdate
— Earliest date
earliest date in spaceWeatherFile
| 3-element vector formatted as [year,dayOfYear,UTSeconds]
Earliest date corresponding to the data saved in matfile
,
specified as a 3-element vector formatted as
[year,dayOfYear,UTSeconds]
. The default value is the earliest date
in spaceWeatherFile
.
enddate
— Latest date
latest date in spaceWeatherFile
| 3-element vector formatted as [year,dayOfYear,UTSeconds]
Latest date corresponding to the data saved in matfile
,
specified as a 3-element vector formatted as
[year,dayOfYear,UTSeconds]
. The default value is the latest date in
spaceWeatherFile
.
Version History
Introduced in R2023a
See Also
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)