How to deal with license issues when downloading 2D wave spectra?

I am trying to get 2D wave spectra from Complete ERA5 global atmospheric reanalysis, using the following query:
#!/usr/bin/env python
import cdsapi

c = cdsapi.Client()

c.retrieve(“reanalysis-era5-complete”, {
“class”: “ea”,
“date”: “2020-04-01/to/2020-04-30”,
“direction”: “1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24”,
“domain”: “g”,
“expver”: “1”,
“frequency”: “1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30”,
“param”: “251.140”,
“stream”: “wave”,
“time”: “00:00:00/01:00:00/02:00:00/03:00:00/04:00:00/05:00:00/06:00:00/07:00:00/08:00:00/09:00:00/10:00:00/11:00:00/12:00:00/13:00:00/14:00:00/15:00:00/16:00:00/17:00:00/18:00:00/19:00:00/20:00:00/21:00:00/22:00:00/23:00:00”,
“type”: “an”,
‘area’ : ‘5/120’,
‘grid’ : ‘0.5/0.5’,
‘format’ : ‘netcdf’,

}, “output202004.nc”)

I got some errors as the following:
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://cds-beta.climate.copernicus.eu/api/retrieve/v1/processes/reanalysis-era5-complete/execute
required licences not accepted
required licences not accepted; please accept the following licences to proceed: [{‘id’: ‘licence-to-use-copernicus-products’, ‘revision’: 12}]

I have accepted all three terms & conditions. In addition, I have got to the Complete ERA5 global atmospheric reanalysis webform but there was not Accept Terms click.

So, I want to know, how can I resolve this problem?
Thanks very much!

1 Like

import cdsapi

c = cdsapi.Client()

c.retrieve(“reanalysis-era5-complete”, {
“class”: “ea”,
“date”: “2020-04-01/to/2020-04-30”,
“direction”: “1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24”,
“domain”: “g”,
“expver”: “1”,
“frequency”: “1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30”,
“param”: “251.140”,
“stream”: “wave”,
“time”: “00:00:00/01:00:00/02:00:00/03:00:00/04:00:00/05:00:00/06:00:00/07:00:00/08:00:00/09:00:00/10:00:00/11:00:00/12:00:00/13:00:00/14:00:00/15:00:00/16:00:00/17:00:00/18:00:00/19:00:00/20:00:00/21:00:00/22:00:00/23:00:00”,
“type”: “an”,
‘area’ : ‘5/120’,
‘grid’ : ‘0.5/0.5’,
‘format’ : ‘netcdf’,
‘target’ :‘output202004.nc’ })

Hi, did you resolve thsi issue? can you download sample ERA5 data from the CDS-beta web interface? (this should prompt you to accept the required licences). You should then be able to access era5-complete,
Thanks

1 Like

Thank you, using the web interface to accept the licence worked for me !

1 Like