Hint

You can run this notebook in a live session with Binder.

The wekeo provider in EODAG#

This tutorial will show you how use EODAG to download data from WEkEO using eodag. WEkEO offers a wide range of Copernicus and Sentinel products.

Registration#

For both, searching and downloading data, authentication is required. Therefore, you first have to create an account on https://www.wekeo.eu/ to get a username and a password which have to be added to the EODAG configuration (see Configure EODAG). After registration you also have to accept the Terms and Conditions to be able to retrieve data from EODAG. This has to be done once per user by executing the following:

[1]:
import requests
from eodag import EODataAccessGateway

# instantiate EODAG API
dag = EODataAccessGateway()

# Authenticate on wekeo
auth = dag._plugins_manager.get_auth_plugin("wekeo").authenticate()

# Use your authentication to accept Copernicus Terms and Conditions
# (needed only once)
response = requests.put(
    "https://wekeo-broker.prod.wekeo2.eu/databroker/termsaccepted/Copernicus_General_License",
    data={"accepted": "true"},
    auth=auth,
)

Search and download data#

Many product types are available for wekeo provider:

[2]:
wekeo_product_types = dag.list_product_types("wekeo")
len(wekeo_product_types)
[2]:
64
[3]:
[pt["ID"] for pt in wekeo_product_types]
[3]:
['CLMS_CORINE',
 'CLMS_GLO_DMP_333M',
 'CLMS_GLO_FAPAR_333M',
 'CLMS_GLO_FCOVER_333M',
 'CLMS_GLO_GDMP_333M',
 'CLMS_GLO_LAI_333M',
 'CLMS_GLO_NDVI_1KM_LTS',
 'CLMS_GLO_NDVI_333M',
 'COP_DEM_GLO30',
 'EEA_DAILY_SSM_1KM',
 'EEA_DAILY_SWI_1KM',
 'EEA_DAILY_VI',
 'EFAS_FORECAST',
 'EFAS_HISTORICAL',
 'EFAS_REFORECAST',
 'EFAS_SEASONAL',
 'EFAS_SEASONAL_REFORECAST',
 'ERA5_LAND',
 'ERA5_LAND_MONTHLY',
 'ERA5_PL',
 'ERA5_PL_MONTHLY',
 'ERA5_SL',
 'ERA5_SL_MONTHLY',
 'FIRE_HISTORICAL',
 'GLACIERS_DIST_RANDOLPH',
 'GLACIERS_ELEVATION_AND_MASS_CHANGE',
 'GLOFAS_FORECAST',
 'GLOFAS_HISTORICAL',
 'GLOFAS_REFORECAST',
 'GLOFAS_SEASONAL',
 'GLOFAS_SEASONAL_REFORECAST',
 'S1_SAR_GRD',
 'S1_SAR_SLC',
 'S2_MSI_L1C',
 'S2_MSI_L2A',
 'S3_EFR',
 'S3_ERR',
 'S3_LAN',
 'S3_OLCI_L2LFR',
 'S3_OLCI_L2LRR',
 'S3_OLCI_L2WFR',
 'S3_OLCI_L2WRR',
 'S3_SLSTR_L1RBT',
 'S3_SLSTR_L2',
 'S3_SLSTR_L2AOD',
 'S3_SLSTR_L2FRP',
 'S3_SLSTR_L2WST',
 'S3_SRA',
 'S3_SRA_A',
 'S3_SRA_BS',
 'S3_SY_SYN',
 'S3_WAT',
 'S5P_L1B2_IR_ALL',
 'SATELLITE_CARBON_DIOXIDE',
 'SATELLITE_METHANE',
 'SATELLITE_SEA_LEVEL_BLACK_SEA',
 'SEASONAL_MONTHLY_PL',
 'SEASONAL_MONTHLY_SL',
 'SEASONAL_ORIGINAL_PL',
 'SEASONAL_ORIGINAL_SL',
 'SEASONAL_POSTPROCESSED_PL',
 'SEASONAL_POSTPROCESSED_SL',
 'SIS_HYDRO_MET_PROJ',
 'UERRA_EUROPE_SL']

Search for data on one these product types:

[4]:
products, total_count = dag.search(
    productType="GLOFAS_FORECAST",
    start="2023-01-01",
    end="2023-01-02",
    geom=[0.25, 43.2, 2.8, 43.9],
    provider="wekeo"
)
products
[4]:
SearchResult([EOProduct(id=47ec0e9810aa8304e8204780c10dbc5a, provider=wekeo)])

Download found product to /tmp:

[5]:
path = products[0].download(outputs_prefix="/tmp")
path
Downloaded product is not a Zip File. Please check its file type before using it
[5]:
'/tmp/47ec0e9810aa8304e8204780c10dbc5a'

The WEkEO data viewer#

If you go to the WEkEO homepage and click on “Data” in the top menu, you can search for products online. You can choose a product type (called dataset in WEkEO) by clicking on the “+” button next to “Layers” on the left side. Then you can choose some filter parameters and create a data request job which will show up in the next tab. If you are logged in with the same user that is configured for EODAG, you can also see the jobs created by EODAG. You can use this functionality to check their status and to directly download the products that have been found.