Command Line User Guide
EUMDAC’s command line interface (CLI) is a program named eumdac
.
The CLI allows you to build workflows using shell commands, either interactively at the command prompt or with a script. Many common cases are covered by CLI sub-commands and it is often more convenient to use a ready-made command as opposed to implementing similar functionality as a python script.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$ eumdac --help
usage: eumdac [-h] [--version] [--collections] [--set-credentials ConsumerKey ConsumerSecret] [--debug] {describe,search,download} ...
Eumetsat Data Access Client
positional arguments:
{describe,search,download}
describe describe a collection or product
search search for products at the collection level
download download product(s) from a collection
optional arguments:
--help show this help message and exit
--version show program's version number and exit
--collections list collections and exit
--set-credentials ConsumerKey ConsumerSecret
permanently set consumer key and secret and exit, see https://api.eumetsat.int/api-key
--debug show backtrace for errors
Setup
Before using the CLI for the first time, ensure that you’re registered at the EUMETSAT EO Portal: https://eoportal.eumetsat.int
Now, you can set your personal credentials:
1
eumdac --set-credentials ConsumerKey ConsumerSecret
You can find your ConsumerKey and ConsumerSecret here: https://api.eumetsat.int/api-key/
Example:
1
eumdac --set-credentials XclkbXXXXXXXXXXXXXXXhO7GYI8a bVLv6CXXXXXXXXXXXXXXXXXU5FYa
Commands
describe |
| Using |
---|---|---|
|
| Show the help message for this command |
|
| Specifies the collection to describe Output:
Example: |
|
| Specifies the product to describe [Optional] Output:
Example: |
search |
| Using |
|
| Show the help message for this command |
|
| Specifies the collection for product search Output:
Example: |
|
| Filter by start date (UTC) Format: Example: |
|
| Filter by end date (UTC) Format: Example: |
|
| Find products which has a spatial extent overlapping the defined bounding box, the box is defined in EPSG:4326 decimal degrees Format: Example: |
|
| Find products which has a spatial extent overlapping the defined Format: Find examples on how to create WKT geometries here: https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry Example: |
|
| Filter products by satellite Example: |
|
| Sort results |
|
| Max Items to return (default = 10) Example: Please, be aware of current limitations of the Data Store API. The search and browse APIs are limited to return a maximum of 10.000 items. |
download |
| Download products |
|
| Show the help message for this command |
|
| Specifies the collection for product search Output:
Example: |
|
| Specifies the products to download Example: |
|
| Define the download directory Example: |
|
| Filter product files Format: Example: |
| --time-range | Download all products of a collection of the defined time range Format: Example: |
subscribe |
| Subscribe a server for a collection |
|
| Show the help message for this command |
| --list | List current active subscriptions |
|
| Specifies which collection to subscribe to Example: |
| -u | Specifies the public URL of the listener server |
|
| Subscribe to products which has a spatial extent overlapping the defined Format: Find examples on how to create WKT geometries here: https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry Example: |
| --delete | Delete subscriptions Example: |
Examples
List all existing collections
To see which collections you can search for, you just have to use this simple argument:
1
$ eumdac describe
Output:
1
2
3
4
5
EO:EUM:DAT:MSG:MSG15-RSS - Rapid Scan High Rate SEVIRI Level 1.5 Image Data - MSG
EO:EUM:DAT:MSG:RSS-CLM - Rapid Scan Cloud Mask - MSG
EO:EUM:DAT:MSG:HRSEVIRI - High Rate SEVIRI Level 1.5 Image Data - MSG - 0 degree
EO:EUM:DAT:MSG:CLM - Cloud Mask - MSG - 0 degree
...
Get recent products of a defined area
Sometimes we want the most recent products of a specific collection and area. For this we want to search with specific parameters:
Collection ID
Area as WKT Polygon
We can use this parameter in a call like this:
1
$ eumdac search -c EO:EUM:DAT:MSG:MSG15-RSS --geometry 'POLYGON ((10.09 56.09, 10.34 56.09, 10.34 56.19, 10.09 56.19, 10.09 56.09))'
In this case, we get a list of the 10 most recent products that match our search parameters:
1
2
3
4
5
6
7
8
9
10
MSG3-SEVI-MSG15-0100-NA-20211109085915.989000000Z-NA
MSG3-SEVI-MSG15-0100-NA-20211109085417.273000000Z-NA
MSG3-SEVI-MSG15-0100-NA-20211109084918.557000000Z-NA
MSG3-SEVI-MSG15-0100-NA-20211109084418.639000000Z-NA
MSG3-SEVI-MSG15-0100-NA-20211109083918.721000000Z-NA
MSG3-SEVI-MSG15-0100-NA-20211109083418.803000000Z-NA
MSG3-SEVI-MSG15-0100-NA-20211109082917.684000000Z-NA
MSG3-SEVI-MSG15-0100-NA-20211109082416.564000000Z-NA
MSG3-SEVI-MSG15-0100-NA-20211109081915.445000000Z-NA
MSG3-SEVI-MSG15-0100-NA-20211109081415.527000000Z-NA
If you want to have more or less than 10 products, just add the --limit
argument in your call. Now, we want to download one or more products.
If you just want to download one specific product, you just can use the product ID to start the download.
1
$ eumdac download -c EO:EUM:DAT:MSG:MSG15-RSS -p MSG3-SEVI-MSG15-0100-NA-20211109084418.639000000Z-NA
But sometimes, we want to download multiple products. Therefore, we save all products from the previous search with the > products.txt
argument in a text file:
1
$ eumdac search -c EO:EUM:DAT:MSG:MSG15-RSS --geometry 'POLYGON ((10.09 56.09, 10.34 56.09, 10.34 56.19, 10.09 56.19, 10.09 56.09))' > products.txt
Now, we can import the text file and download all products from it:
1
eumdac download -c EO:EUM:DAT:MSG:MSG15-RSS -p @products.txt