The EWDS API is a Python service that enables access to CEMS-Flood data on the EWDS. It is ideal for users that retrieve large volumes of data or need to automate tasks. This page collects a number of scripts that can work as blueprints for more user-specific requests.
EWDS API Installation
Instructions about the installation and set-up of the EWDS API can be found in How to use the EWDS API.
A user will indicate the data they wish to download by using the radio buttons on the 'Data Download' tab of their chosen dataset on the EWDS. After a selection is made on the form, to generate the API request click the 'Show API request' button. This will show the python code to be used to download the data of the bottom of the form.
How to run the scripts:
You should copy the content of the script into a python file (ex: retrieve_<dataset>.py) and then launch it from a terminal:
user@host:~$ python retrieve_<dataset>.py
API script examples:
The following are some examples of API scripts to download the various CEMS-Floods datasets from the EWDS.
- In the EWDS the keyword 'format' has been replaced by two keywords: 'data_format' which can be 'netcdf' or 'grib', and 'download_format' which can be 'zip' or 'unarchived'. This is to allow users more flexibility in the format of the returned data.
- In the EWDS the hmonth/month value format has been changed from a full month name ["January"] to numeric months format ["01"] .
- In the legacy CDS, data would include the boundary points of the specified area, whereas in the EWDS, the data consists of all the points inside the specified area. Please ensure that all the points of your region of interest are included in the bounding box.
An example request:
This will return a zipped folder containing a netcdf file called 'data_version-5.nc'.