-
Notifications
You must be signed in to change notification settings - Fork 8
/
create_config.py
51 lines (44 loc) · 2.32 KB
/
create_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env python
"""
--------------------------------------------------------------------
Creates config file for use in PREDSTORM scripts. Adjust values to
local paths and modelling preferences.
https://docs.python.org/3/library/configparser.html
--------------------------------------------------------------------
"""
import sys
import configparser
import getopt
config = configparser.ConfigParser()
# ------------
# ALL SERVERS
# ------------
config['DEFAULT'] = {'Location': 'Home'
'ScriptPath': '/home/user/Scripts/PREDSTORM'}
# Constants and variables
config['Parameters'] = {'SynodicRotation' : '26.24', # synodic sun rotation
}
# Variables and paths needed for predictions based on NOAA RTSW data
config['RealTimePred'] = {'DstPredMethod' : 'ml_dstdiff',
# Offset to the resulting Dst data (nT)
'DstOffset' : '0',
# Path to Dst prediction model to load
'DstModelPath' : '/home/user/Scripts/PREDSTORM/dst_pred_model_final.pickle',
# Number of days into the past to plot
'PlotPastDays' : '3.5',
# Number of days into the future to plot
'PlotFutureDays' : '3',
# Number of days into the future to save as prediction
'SaveFutureDays' : '14',
# Source of data for next days (options are 'recurrence' or 'STEREO-A')
'FutureSource' : 'Recurrence',
# Location to save input data e.g. real-time solar wind
'InputDataPath' : '/home/user/Scripts/PREDSTORM/data',
# Location to save realtime plots and data
'RealtimePath' : '/home/user/Scripts/PREDSTORM/realtime',
# Location to archive plots and data
'ArchivePath' : '/home/user/Scripts/PREDSTORM/archive'}
# CREATE CONFIG FILE
# ===================
with open('config.ini', 'w') as configfile:
config.write(configfile)