Package: esahub-wegaw
esahub: Downloading data from ESA scihubesahubprovides a simple interface for downloading satellite data from the European Sentinel missions.It allows multiple downloads to be performed in parallel, from multiple data servers.
The full range of Copernicus data servers are supported, including:https://scihub.copernicus.eu/dhushttps://scihub.copernicus.eu/apihubhttps://scihub.copernicus.eu/s3(guest access)https://s5phub.copernicus.eu/dhus(guest access)https://tmphub.copernicus.eu/dhushttps://colhub.copernicus.eu/dhushttps://colhub2.copernicus.eu/dhusSetupInstallesahub:$ pip install esahubThis will also create a YAML configuration file in~/.esahub.conf(unless that file exists) by copyingconfig.yaml. The configuration settings in~/.esahub.confhave precedence over the settings inconfig.yaml.You should overwrite the required settings in your~/.esahub.conf, especially:GENERAL.DATA_DIRFor the majority of the data servers you will need to provide your own authentication details inSERVERS.Testing the installationThe recommended way of running tests is:$ python setup.py testNote:Running the tests may take a while as it includes testing live downloads from SciHub (although with very small files).Command Line Usage$ esahub [cmd] [args] ...Available commands:CommandDescriptionlsQueries SciHub for archives matching the specified query parameters. Prints the total number of files and data size.getQueries SciHub likels, but then downloads the files.doctorChecks local satellite products for consistency, either by validating the zip/NetCDF format or by comparing to the MD5 checksum from SciHub. Allows to either delete or repair broken files.OptionsOptionArgumentAvailable forDescription<SAT>allSatellite to query, e.g. S1A, S1B, S2A, S2B, S3A-d,--dir<DIR>allraw data directory (defaults to configGENERAL.DATA_DIR)-o,--out<FILE>lswrite files to JSON-i,--in<FILE>getread files from JSON-m,--mission<MISSION>ls,gete.g.Sentinel-1,Sentinel-2,Sentinel-3-g,--geo<WKT>ls,getgeospatial location in WKT format--location<LOCATION>ls,getlocation as defined in configLOCATIONS-t,--time<ARG>ls,getSupports a variety of datetime string formats.--type<TYPE>ls,gete.g.GRD--orbit<ORBIT>ls,getASCorDESC--id<ID>ls,getproduct identifier, may include wildcards (*), e.g.*SDV*-q,--query<QUERY>ls,getcustom query for SciHub, e.g. for single archive:identifier:...--restartgetForce restart incomplete downloads--logallwrite log file--quietallSuppress terminal output--mode<MODE>doctorzip|file--deletedoctordelete corrupt files--repairdoctorredownload corrupt files--emailallsend email reportDatetime parsingThe following are examples of datetime formats that will be automatically parsed into a date or date range:The following single dates will be explicitly converted to the date range covering the given year, month, or day:--time 2016--time 06/2018--time 2018/06--time "Sep 1, 2018"Date ranges may also be specified explicitly:--time "2016 to 2017"--time "Jan 2016 - Feb 2016"--time "01/01/2016, 14/01/2016"One-sided date ranges are also possible:--time "to 2017"--time "01/2017-"--time "01/12/2017,"ExamplesEx 1.Retrieve the number of archives and total file size of Sentinel-3 archives uploaded to SciHub during the past midnight-to-midnight period intersecting Ireland (only works ifIrelandis defined in the config itemLOCATIONS):$ esahub ls -t yesterday --location=IrelandEx 2.Download the archives uploaded yesterday for four locations.$ esahub get -t yesterday --location=Ireland_Mace_Head --location=Namibia_Gobabeb --location=Italy_Rome_Tor_Vergata --location=France_La_CrauEx 3.Query SciHub for all available Sentinel-2 data for Ireland and write the result to a JSON file. Then read that JSON file by thegetcommand, thus downloading the specified files.Note:Since the JSON file may be edited manually, this approach offers the most flexibility.$ esahub ls --location=Ireland --mission=Sentinel-2 --out=Sen2_IE.json
$ esahub get --in=Sen2_IE.json --logEx 4.Check all zip archives in a custom directory for MD5 consistency and generate a log file.$ esahub doctor --dir=/path/to/dir/ --mode=md5 --logPython APIfromesahubimportscihubquery={'mission':'Sentinel-1','geo':'POINT(-9.0 53.0)','time':'today'}files=scihub.search(query)scihub.download(files)DependenciesRequiredpyyamlnumpylxmlshapelypython-dateutilpytztqdmOptionalpyprojnetCDF4Librarieslibgeos_c