Dear All,
I am following scripit to download ERA-Interim Total Precipitation using following code: ERA-Interim: How to calculate daily total precipitation - Copernicus Knowledge Base - ECMWF Confluence Wiki
I tried all solutions but not able to fix it. I am facing following error: {
“name”: “Exception”,
“message”: “an internal error occurred processing your request. mars - ERROR - 20240628.075829 - Last error is -43
mars - ERROR - 20240628.075829 - Expected 4, got 2.
mars - ERROR - 20240628.075829 - Request failed
mars - ERROR - 20240628.075829 - Some errors reported (last error -1).”,
“stack”: "---------------------------------------------------------------------------
Exception Traceback (most recent call last)
Cell In[5], line 5
2 import cdsapi
4 c = cdsapi.Client()
----> 5 c.retrieve(‘reanalysis-era-interim’, {
6 ‘date’: ‘2018-01-01’,
7 ‘levtype’: ‘sfc’,
8 ‘param’: ‘228’,
9 ‘stream’: ‘oper’,
10 ‘time’: ‘00/12’,
11 ‘type’: ‘fc’,
12 ‘step’: ‘00/to/12’,
13 ‘area’: ‘80/-50/-25/0’,
14 ‘grid’: ‘0.75/0.75’,
15 ‘format’: ‘netcdf’,
16 }, ‘ERAI-pl-temperature-subarea.nc’) # Output file. Adapt as you wish.
File ~/miniconda3/envs/irrigation/lib/python3.12/site-packages/cdsapi/api.py:381, in Client.retrieve(self, name, request, target)
380 def retrieve(self, name, request, target=None):
→ 381 result = self._api("%s/resources/%s" % (self.url, name), request, "POST")
382 if target is not None:
383 result.download(target)
File ~/miniconda3/envs/irrigation/lib/python3.12/site-packages/cdsapi/api.py:536, in Client._api(self, url, request, method)
534 break
535 self.error(" %s", n)
→ 536 raise Exception(
537 "%s. %s."
538 % (reply["error"].get("message"), reply["error"].get("reason"))
539 )
541 raise Exception("Unknown API state [%s]" % (reply["state"],))
Exception: an internal error occurred processing your request. mars - ERROR - 20240628.075829 - Last error is -43
mars - ERROR - 20240628.075829 - Expected 4, got 2.
mars - ERROR - 20240628.075829 - Request failed
mars - ERROR - 20240628.075829 - Some errors reported (last error -1)."
}
Corrected indentation
import cdsapi
c = cdsapi.Client()
c.retrieve(‘reanalysis-era-interim’, {
‘date’: ‘2018-01-01’,
‘levtype’: ‘sfc’,
‘param’: ‘228’,
‘stream’: ‘oper’,
‘time’: ‘00/12’,
‘type’: ‘fc’,
‘step’: ‘00/12’,
‘area’: ‘60.255/-10.255/25.111/30.455’,
‘grid’: ‘0.75/0.75’,
‘format’: ‘netcdf’,
}, ‘ERAI-pl-temperature-subarea.nc’) # Output file. Adapt as you wish.