CDS API request fails with "Request returned no data"

, ,

If your CDS API request returns an error message similar to:

2019-10-09 01:05:14,045 ERROR   cdsinf.exceptions.NoDataException: Request returned no data

File “/Library/Python/2.7/site-packages/cdsapi/”, line 229, in retrieve
result = self._api(‘%s/resources/%s’ % (self.url, name), request)
File “/Library/Python/2.7/site-packages/cdsapi/”, line 312, in _api
raise Exception(“%s. %s.” % (reply[‘error’].get(‘message’), reply[‘error’].get(‘reason’)))
Exception: no data is available within your requested subset. Request returned no data.

Please check that the syntax of your request EXACTLY matches that given on the corresponding CDS web form e.g.!/dataset/reanalysis-era5-single-levels?tab=form

Make a valid selection on the web form and then click 'Show API request' to see the CDS API script corresponding to your selections. You can use this as the basis for your own script.

However, your CDS API script request must include the keywords as show, and values (such as variable names) should only be given in the form shown.

Missing or incorrect keywords and values can cause your script to fail (as above).

Hope that helps,