Description
Contains all solar wind data coming from observation or modelisation.
Installation
Download repository:
git clone https://gitlab.irap.omp.eu/motcor_tools/SWD_V3_MOTCOR.git
- Need Python3, Python3-dev (not sure)
- Need Cdf library (by default, look at /opt/cdf/lib). If needed modify this path in SWD_V3_MOTCOR/SRC/module_path.py). Look at https://cdf.gsfc.nasa.gov/html/sw_and_docs.html.
- First of all, in SRC, create a virtualenv with Python3. Try
cd SWD_V3_MOTCOR/SRC; virtualenv -p python3 venv
- In SRC, activate your virtualenv :
source venv/bin/activate
- Then install all requirements with the command pip:
pip install numpy utils
pip install spacepy --no-deps
pip install matplotlib spiceypy astropy paramiko sunpy netcdf4 Pillow
- Bug correction for Paramiko: pip installs Paramiko 2.4.2 along with Cryptography 2.6.1. There is a known Deprecation Warning with these 2 versions.
pip uninstall cryptography
pip install cryptography==2.4.2
Before starting
- In SRC, activate your virtualenv :
source venv/bin/activate
- In SRC, execute this line in console:
eval `./set_path`
To see if it worked:
python -c "import sys; print(sys.path)"
For fetch_euv2carmap_sdosta_XXX_date.py script:
Fetching Irap's program EUV2CARMAP need to connect to Forecast Irap's server.
Need an account on Forecast server (ask Irap team).
Need to exchange ssh keys:
ssh-keygen -t rsa
ssh-copy-id -i ~/.ssh/id_rsa.pub accountName@forecast.irap.omp.eu
In dir.fetch_map2D/interface_fetch_map2D.py, change lines 300, 325, 350:
'user' : 'swd',
with
'user' : 'accountName',
Database use
For database viewing (will be installed soon):
sqlbrowser
For database tree viewing:
./show_database
For database searching:
./search_database
Architecture
Where the SWD lies:
Useful scripts:
- clean: remove temporary files and show python file number + python line number
- call_doxygen: creation of documentation from Doxygen
- search_database: search for a file in SWD
- set_path: eval this file before database use (See section Before starting)
- show_database: show database tree
SRC: Python scripts for updating, reading the database, and more
SRC/dir.common: Common scripts
- Common constants (module_common)
- Data type definition (module_cube3D, module_map2D, module_fieldline, module_timeserie)
- Data type reading/writing (ascii_XXX, fits_XXX)
- Data type plotting and other (plot_common)
- Time class, Coordinate class (module_timespace, module_solar, spice)
- Other useful routines (module_toolbox_XXX)
SRC/dir.cron: Scripts run by crontab
- update_database_map2D: update 2D maps
SRC/dir.database: database creation, management.
- database_map2D.py: script for 2D map's database creation, updating, searching.
- search_database.py: search for a file
- show_database.py: show database tree
SRC/dir.doc: contains Doxgen doc
SRC/dir.fetch_XXX: Database downloading
For 2D maps, 3D datacube, Timeseries, Fieldlines. A main script for each fetch_type. An interface_fetch_XXX regroups all information.
- Find name and path of file on a remote database.
- Download this file.
- Reformat it: unzip, reformat data.
- Put it on local file system and/or add it in the database.
SRC/dir.read_XXX: Database reading
For 2D maps, 3D datacube, Timeseries, Fieldlines. A dedicated reading routine for each type of files. An interface_read_XXX is as an interface for each dedicated reading routines.
SRC/dir.test: Test
SRC/dir.unittest: Unit test
SRC/logs:
Log file for SWD fetching scripts.
Documentation
Documentation of Connect-tool can be found here: http://userpages.irap.omp.eu/~mindurain/doc_swd/index.html. Otherwise, to create documentation, type:
doxygen dir.doc/Doxyfile
or
call_doxygen
Html outputs are in html/index.html.
Latex files are in latex/ folder. For creating the Latex equivalent of Html outputs run:
cd latex
pdflatex refman.tex