pyValEIA.io.download
Download functions for supported data.
Attributes
Functions
|
Download daily Swarm files and unzip them into instrument-date dirs. |
Module Contents
- pyValEIA.io.download.swarm_url = 'https://swarm-diss.eo.esa.int/?do=download&file=swarm%2FLevel'[source]
- pyValEIA.io.download.download_and_unzip_swarm(ddate, satellite, out_dir, base_url=swarm_url, level='1b', baseline='Latest_baselines', instrument='EFI', dataset='LP', f_end='0602', stime_str='000000', etime_str='235959', num_days=0, remove=False)[source]
Download daily Swarm files and unzip them into instrument-date dirs.
- Parameters:
- ddate: datetime object
Date of the desired Swarm file
- satellitestr
Satellite string ‘A’, ‘B’, or ‘C’
- out_dirstr
String specifying base directory for file output
- base_urlstr
Base URL where data can be found before Level specification (default=`swarm_url`)
- levelstr
Data level, only tested on ‘1b’ (default=’1b’)
- baselinestr
Desired baseline, have not tested ‘Entire_mission_data’ (default=’Latest_baselines’)
- instrumentstr
Desired insturment acronym, e.g. ‘EFI’ is the Electric Field Instrument (default=’EFI’)
- datasetstr
Desired dataset acronym from instrument, e.g. ‘LP’ is Langmuir Probe (default=’LP’)
- f_endstr
For different data products there are different numbers at the end The most common for EFIxLP is ‘0602’ where ‘0602’ represents the file version. Other data products also have a record type string. (default=’0602’)
- stime_strstr
Starting time using the string format “HHMMSS”. Most files start with “000000”, but if the file is not the whole day it will be different. Check website if download fails (default=”000000”)
- etime_strstr
Ending time using the string format “HHMMSS”. Most files end with “235959”, but if the file is not the whole day it will be different. Check website if download fails (default=”235959”)
- num_daysint
Number of days after the starting date to be downloaded after the initial day (default=0)
- removebool
If True, remove zip archive after unpacking (default=False)
- Raises:
- ValueError
If an unknown level is supplied
Notes
Different file options found at: https://swarm-diss.eo.esa.int/# File format information found at: https://swarmhandbook.earth.esa.int/article/product