How I know when the code has finished the request and the download?


I am using a python script to download from ERA5:

import cdsapi

c = cdsapi.Client()

latitude = 43.1 # North, South
longitude = -1.5 # West , East
r = c.retrieve(
'area' : str(latitude)+'/'+str(longitude)+'/'+str(latitude)+'/'+str(longitude), # North, West, South, East. Default: global
'grid':'0.1/0.1', # Latitude/longitude grid in degrees: east-west (longitude) and north-south resolution (latitude). Default: reduced Gaussian grid
request_finished = 1'')
download_finished = 1

Is there any command on the cdsapi library to detect if the request is completed? And if the download is completed?

Dear Inigo,

I don't think there is a command available to do what you asked for. However, you can check status of your requests by logging into the CDS, and then click the 'Your requests' tab.

You can monitor your download progress by upgrading your CDS API client library to the latest version, see CDS API 0.1.6 has been released.

I hope this helps.

Kind regards,


Hello Xiaobo,

I now that you can monitor on the web and with the last version of the api, but I want to automatize the process.

I am trying to execute the request from matlab. I have the request on python (code I showed above). I integrated this code on a python function and I call this function from matlab. The thing is I need to know when the download is fulfilled to continue executing the matlab code.

Is there any option to make the request using matlab?

Best regards,


Hi Iñigo,

I have to say I do not know. I will check with our technical team.

Kind regards,


Hi Iñigo,

Our technical expert wants to know more about how you are calling the Python data request script from Matlab. Could you describe in details?

By the way, do you call your Python script with an ‘&’ at the end of the line?

Thank you,