SWDatabase
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Readme

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
  1. Need Python3, Python3-dev (not sure)
  2. 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.
  3. First of all, in SRC, create a virtualenv with Python3. Try
    cd SWD_V3_MOTCOR/SRC; virtualenv -p python3 venv
  4. In SRC, activate your virtualenv :
    source venv/bin/activate
  5. 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
    
  6. 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

  1. In SRC, activate your virtualenv :
    source venv/bin/activate
  2. 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:

SRC: Python scripts for updating, reading the database, and more

SRC/dir.common: Common scripts

SRC/dir.cron: Scripts run by crontab

SRC/dir.database: database creation, management.

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.

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