|
1 | 1 | # PREDSTORM |
2 | 2 |
|
3 | | -This is a python code for space weather prediction research. |
| 3 | +This is Python3 code for space weather prediction research. |
4 | 4 |
|
5 | | -The package is used for research on predicting the background solar wind, |
6 | | -high speed solar wind streams and solar storm magnetic flux ropes, |
7 | | -based on data from solar wind monitors at the Sun-Earth L1 and L5 points, |
8 | | -as well as from any spacecraft positioned east of the Sun-Earth line around or < 1 AU. |
9 | | -We also derive predictions of the geomagnetic Dst index, Kp and auroral power. |
| 5 | +The package is used for predicting the background solar wind, high speed solar wind streams and solar storm magnetic flux ropes based on data from solar wind monitors at the Sun-Earth L1 and L5 points, as well as from any spacecraft positioned east of the Sun-Earth line around or < 1 AU. We also derive predictions of the geomagnetic Dst index, Kp and auroral power. |
10 | 6 |
|
11 | | -Status: work in progress, 9 April 2019. |
| 7 | +Status in 2019: work in progress. |
12 | 8 |
|
13 | | -If you want to use parts of these codes for generating results for |
14 | | -peer-reviewed scientific publications, please contact us per email (see contributor biographies) |
15 | | -or via twitter @chrisoutofspace (Christian Moestl). |
| 9 | +If you want to use parts of this code for generating results for peer-reviewed scientific publications, please contact us per email (see contributor biographies) or via twitter @chrisoutofspace (Christian Moestl). |
16 | 10 |
|
17 | | -## Dependencies |
| 11 | +## Installation |
18 | 12 |
|
19 | | -To install the packages that need to be added to an existing anaconda python3 installation (https://www.anaconda.com/distribution/), |
| 13 | +PREDSTORM is written in Python 3. Most dependencies (numpy, scipy, matplotlib) can be downloaded and used in an anaconda environment (https://www.anaconda.com/distribution/) and can be installed using the following lines: |
20 | 14 |
|
21 | | -* sunpy (https://github.com/sunpy/sunpy), cdflib (https://github.com/MAVENSDC/cdflib), |
| 15 | + conda install scipy numpy matplotlib scikit-learn seaborn requests-ftp beautifulsoup4 |
| 16 | + conda install -c conda-forge spiceypy cftime |
| 17 | + conda install -c numba numba |
22 | 18 |
|
23 | | -use this on a command line: |
| 19 | +Remaining dependencies (particularly those for CDF handling) can be downloaded using pip: |
24 | 20 |
|
25 | | -``` |
26 | | -conda config --append channels conda-forge |
27 | | -conda install sunpy |
28 | | -pip install cdflib |
29 | | -``` |
| 21 | + pip install cdflib spacepy astropy |
30 | 22 |
|
31 | | -* predstorm_l5.py checks for an ffmpeg (for converting images, making movies) executable |
32 | | -in the current directory, otherwise the system-wide available version is used. |
| 23 | +PREDSTORM also relies on the HelioSat package for all heliospheric data downloads and SPICE kernel handling. Currently it can be downloaded from GitHub: |
| 24 | + |
| 25 | + git clone https://github.com/IWF-helio/HelioSat.git |
| 26 | + cd HelioSat |
| 27 | + python setup.py install |
| 28 | + |
| 29 | +HelioSat automatically downloads kernels and all required satellite files (e.g. STEREO, DSCOVR, ...). To set the path where these files are downloaded to, set the following environment variable (in .bashrc on Linux, .bash_profile on Mac): |
| 30 | + |
| 31 | + export HELIOSAT_DATAPATH="/path/to/data/heliosat" |
| 32 | + |
| 33 | +It's a good idea to import the package after first installation to handle first download of all required SPICE kernels. |
33 | 34 |
|
34 | 35 | ## Running the code |
35 | 36 |
|
36 | | -* On the command line: |
| 37 | +In the command line: |
37 | 38 |
|
38 | | -``` |
39 | | -python predstorm_L1.py |
40 | | -python predstorm_L5.py |
41 | | -python mfr_predict.py |
42 | | -``` |
| 39 | + python predstorm_l1.py |
| 40 | + python predstorm_l5.py |
43 | 41 |
|
44 | | -* use |
45 | | -``` |
46 | | -python predstorm_L5.py --server |
47 | | -``` |
48 | | -for Agg backend. |
| 42 | +Use the following option for the Agg backend in matplotlib: |
49 | 43 |
|
50 | | -* In ipython: |
| 44 | + python predstorm_l5.py --server |
51 | 45 |
|
52 | | -``` |
53 | | -run predstorm_l1 |
54 | | -run predstorm_l5 |
55 | | -run mfr_predict |
56 | | -``` |
| 46 | +### Notes |
57 | 47 |
|
| 48 | +* Running the scripts creates the local folder /data. OMNI2 data, among other things, are automatically downloaded into this folder. |
58 | 49 |
|
| 50 | +* Results are saved in the folder /results. |
59 | 51 |
|
60 | | -* Folder "data/" contains a position file for planets and spacecraft |
61 | | -(to be replaced with positions in spiceypy/heliopy) and an unpublished v2.0 of the HELCATS ICME catalog. |
62 | | -OMNI2 data are automatically downloaded in this folder. |
| 52 | +* Logs of the scripts are saved in predstorm.log. |
63 | 53 |
|
| 54 | +## Contributors |
64 | 55 |
|
| 56 | +IWF-Helio Group, Space Research Institute (ÖAW), Graz, Austria: |
| 57 | +* Christian Möstl |
| 58 | +* Rachel L. Bailey |
0 commit comments