Sentinel-5P Downloader
The sentinel5dl project consists of a library and a command line tool which provide easy access to emission data products originating from the European Space Agency’s Sentinel-5P satellite.
Installation
Install this library using:
%> pip install sentinel5dl
Quick Example (Library)
from sentinel5dl import search, download
# Search for Sentinel-5 products
result = search(
polygon='POLYGON((7.8 49.3,13.4 49.3,13.4 52.8,7.8 52.8,7.8 49.3))',
begin_ts='2019-09-01T00:00:00.000Z',
end_ts='2019-09-17T23:59:59.999Z',
product='L2__CO____',
processing_level='L2',
processing_mode='Offline')
# Download found products to the local folder
download(result.get('products'))
Quick Example (Binary)
Download carbon monoxide sensor data taken between 2019-01-08 and 2019-01-20 to
the directory /data
using eight workers (eight parallel downloads):
sentinel5dl --worker 8 \
--begin-ts 2019-01-08 \
--end-ts 2019-01-20 \
/data
To show all available options, run:
sentinel5dl -h
Python API
Sentinel-5P Downloader
- sentinel5dl.ca_info = None
Path to Certificate Authority (CA) bundle. If this is set, the value is passed to CURLOPT_CAINFO. If not set, this option is by default set to the system path where libcurl’s cacert bundle is assumed to be stored, as established at build time. If this is not already supplied by your operating system, certifi provides an easy way of providing a cabundle.
- sentinel5dl.download(products, output_dir='.')
Download a set of products via API.
- Parameters
products – List with product information (e.g. retrieved via search). The list needs to contain dictionaries which must at least have the fields uuid and identifier.
output_dir – Directory to which the files will be downloaded.
- sentinel5dl.logger = <Logger sentinel5dl (WARNING)>
Logger used by
sentinel5dl
. Use this to specifically modify the libraries log level like this:sentinel5dl.logger.setLevel(logging.DEBUG)
- sentinel5dl.search(polygon=None, begin_ts=None, end_ts=None, product=None, processing_level='L2', processing_mode=None, per_request_limit=25)
Search for products via API.
- Parameters
polygon – WKT polygon specifying an area the data should intersect
begin_ts – Datetime specifying the earliest sensing date
end_ts – Datetime specifying the latest sensing date
product – Type of product to request
processing_level – Data processing level (
L1B
orL2
)processing_mode – Data processing mode (
Offline
,Near real time
orReprocessing
)per_request_limit – Limit number of results per request
- Returns
Dictionary containing information about found products