Read and lookup CSSI Space Weather data files (legacy text format).
Compatible with CSSI Space Weather files.
The CSSI Space Weather format contains:
Space weather data type
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=dp), | public | :: | mjd | = | 0.0_dp |
Modified Julian Date |
|
| real(kind=dp), | public | :: | f107_obs | = | 0.0_dp |
Observed F10.7 solar flux |
|
| real(kind=dp), | public | :: | f107_adj | = | 0.0_dp |
Adjusted F10.7 solar flux |
|
| real(kind=dp), | public | :: | f107a_obs_ctr | = | 0.0_dp |
Observed F10.7 81-day centered average |
|
| real(kind=dp), | public | :: | f107a_adj_ctr | = | 0.0_dp |
Adjusted F10.7 81-day centered average |
|
| real(kind=dp), | public | :: | kp(8) | = | 0.0_dp |
Kp indices for 8 3-hour periods |
|
| real(kind=dp), | public | :: | ap_avg | = | 0.0_dp |
Average Ap for the day |
Space weather data management type
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=ip), | private | :: | n_records | = | 0 |
Number of valid records loaded |
|
| real(kind=dp), | private, | allocatable | :: | mjd(:) |
Modified Julian Dates for each record |
||
| real(kind=dp), | private, | allocatable | :: | f107_obs(:) |
Observed F10.7 solar flux for each record |
||
| real(kind=dp), | private, | allocatable | :: | f107_adj(:) |
Adjusted F10.7 solar flux for each record |
||
| real(kind=dp), | private, | allocatable | :: | f107a_obs_ctr(:) |
Observed F10.7 81-day centered average for each record |
||
| real(kind=dp), | private, | allocatable | :: | f107a_adj_ctr(:) |
Adjusted F10.7 81-day centered average for each record |
||
| real(kind=dp), | private, | allocatable | :: | kp(:,:) |
Kp indices for 8 3-hour periods (8, n_records) |
||
| real(kind=dp), | private, | allocatable | :: | ap_avg(:) |
Average Ap for each record |
||
| logical, | private | :: | initialized | = | .false. |
Flag to indicate if data has been loaded |
|
| real(kind=dp), | private | :: | historic_start | = | -1.0_dp |
First epoch in data |
|
| real(kind=dp), | private | :: | historic_end | = | -1.0_dp |
Last daily epoch + 1 |
|
| real(kind=dp), | private | :: | historic_daily_end | = | -1.0_dp |
Last contiguous daily data epoch |
|
| logical, | private | :: | warn_epoch_before | = | .true. |
Flag to warn if requested epoch is before data start |
|
| logical, | private | :: | warn_epoch_after | = | .true. |
Flag to warn if requested epoch is after data end |
| procedure, public :: initialize => sw_init | |
| procedure, public :: get_flux_data => sw_get_flux_data | |
| procedure, public :: destroy => sw_cleanup | |
| procedure, private :: get_record => copy_record |
Copy a single record from the space weather data
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(sw_data_type), | intent(in) | :: | me | |||
| integer(kind=ip), | intent(in) | :: | idx |
Index of the record to copy |
Output flux data structure
Initialize the space weather module by reading a CSSI file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(sw_data_type), | intent(inout) | :: | me | |||
| character(len=*), | intent(in) | :: | filename |
Path to CSSI space weather file |
||
| integer(kind=ip), | intent(out) | :: | status |
Output status (0=success, non-zero=error) |
Get space weather data for a given Modified Julian Date. Uses direct indexing for daily data and record selection for monthly data
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(sw_data_type), | intent(inout) | :: | me | |||
| real(kind=dp), | intent(in) | :: | mjd |
Modified Julian Date |
||
| type(flux_data_type), | intent(out) | :: | flux_data |
Output flux data structure |
||
| logical, | intent(out) | :: | status |
Output status (true=success, false=not initialized) |
Clean up allocated memory
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(sw_data_type), | intent(inout) | :: | me |