-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdl_swarm.py
More file actions
executable file
·39 lines (30 loc) · 1.21 KB
/
dl_swarm.py
File metadata and controls
executable file
·39 lines (30 loc) · 1.21 KB
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
#!/usr/env/bin/python3
"""
dl_swarm.py
Script to download and preprocess the SWARM GPS TEC data/LP data
Swarm provides a Level-2 TEC product, handily preprocessed and ready for use.
The files come as .ZIP, which contains a .DBL that is actually a CDF file
Details here:
http://swarm-wiki.spacecenter.dk/mediawiki-1.21.1/index.php/Level_2_Product_Definitions#Intermediate_and_final_products
Swarm files:
ftp://swarm-diss.eo.esa.int/Level2daily/Current/TEC/TMS/
unzip files:
"""
import datetime, pdb, sys, os
from dl_data import dl_data
instrument = 'lp'
dl_times = [datetime.datetime(2019, 2, 27), datetime.datetime(2019, 3, 14)]
if instrument == 'gps':
servername = 'data/swarm_server_names.txt'
# dl_dir = './data/swarm_tec/'
dl_dir = '/Volumes/Seagate/data/swarm/gps_tec/'
elif instrument == 'lp':
servername = 'data/swarm_lp.txt'
dl_dir = 'data/swarm/lp/'
# dl_dir = './data/swarm_lp/'
# servername = 'data/swarm_lp_adv.txt'
# dl_dir = '/Volumes/Seagate/data/swarm/lp_adv/'
elif instrument == 'efi':
servername = 'data/swarm_efi.txt'
dl_dir = '/Volumes/Seagate/data/swarm_efi/'
dl_days = dl_data(dl_times[0], dl_times[1], dl_dir, servername, datatype='swarm', dirnames='not_smart')