Hi everyone,
I am trying to download the ERA5 pressure level data using the following python script:
import cdsapi
c = cdsapi.Client(timeout=600,quiet=False,debug=True)
c.retrieve('reanalysis-era5-complete',{
'class':'ea',
'date':'20190101/to/20190110',
'area':'65/-20/25/40',
'expver':'1',
'levtype':'sfc',
'param':'msl/sp/skt/2t/10u/10v/2d/z/lsm/sst/ci/sd/stl1/stl2/stl3/stl4/swvl1/swvl2/swvl3/swvl4',
'stream':'oper',
'time':'00:00:00/03:00:00/06:00:00/09:00:00/12:00:00/15:00:00/18:00:00/21:00:00',
'type':'an',
'grid':"0.25/0.25",
},'ERA5-20190101-20190110-sfc.grb')
However, I always got the error:
2022-04-21 14:48:53,480 DEBUG CDSAPI {'full_stack': False, 'timeout': 600, 'url': u'https://cds.climate.copernicus.eu/api/v2', 'verify': True, 'retry_max': 500, 'ss': True, 'sleep_max': 120, 'delete': True}
2022-04-21 14:48:53,480 INFO Sending request to https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-complete
2022-04-21 14:48:53,481 DEBUG POST https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-complete {"grid": "0.25/0.25", "param": "msl/sp/skt/2t/10u/1": "oper", "area": "65/-20/25/40", "date": "20190101/to/20190110", "levtype": "sfc", "time": "00:00:00/03:00:00/06:00:00/09:00:00/12:00:00/15:00:00/18:00:00/21:00
2022-04-21 14:48:53,482 DEBUG Starting new HTTPS connection (1): cds.climate.copernicus.eu
Traceback (most recent call last):
File "/dss/dsstumfs01/pn69ki/pn69ki-dss-0004/ERA5/get_era5_cds.py", line 653, in <module>
file2d + estr + tstr)
File "/dss/dsshome1/lxc00/ga62kuy2/spack/opt/linux-sles15-haswell/py-cdsapi/0.2.3-gcc-8.4.0-wn3dp4h/lib/python3.7/site-packages/cdsapi/api.py", line 310, in retrieve
result = self._api('%s/resources/%s' % (self.url, name), request, 'POST')
File "/dss/dsshome1/lxc00/ga62kuy2/spack/opt/linux-sles15-haswell/py-cdsapi/0.2.3-gcc-8.4.0-wn3dp4h/lib/python3.7/site-packages/cdsapi/api.py", line 347, in _api
timeout=self.timeout)
File "/dss/dsshome1/lxc00/ga62kuy2/spack/opt/linux-sles15-haswell/py-cdsapi/0.2.3-gcc-8.4.0-wn3dp4h/lib/python3.7/site-packages/cdsapi/api.py", line 512, in wrapped
r = call(*args, **kwargs)
File "/dss/dsshome1/lxc00/ga62kuy2/.conda/envs/my-python/lib/python2.7/site-packages/requests/sessions.py", line 565, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/dss/dsshome1/lxc00/ga62kuy2/.conda/envs/my-python/lib/python2.7/site-packages/requests/sessions.py", line 518, in request
resp = self.send(prep, **send_kwargs)
File "/dss/dsshome1/lxc00/ga62kuy2/.conda/envs/my-python/lib/python2.7/site-packages/requests/sessions.py", line 639, in send
r = adapter.send(request, **kwargs)
File "/dss/dsshome1/lxc00/ga62kuy2/.conda/envs/my-python/lib/python2.7/site-packages/requests/adapters.py", line 514, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='cds.climate.copernicus.eu', port=443): Read timed out. (read timeout=60)
It seems that the request is not able to send to the sever because of the delays in communication. Do you have some suggestions to solve it?
Cheers
Xinxu