I try to do the following in a simply little python script, and the API (or queue) takes days to get a month of runoff and sometimes throws errors or stops incomplete. Is it because, in part, much of this data is offline on tape archives? Is there something else I might be doing wrong or I could be doing differently? Is there another way to get the data if the API, queue, tape drive etc are simply unavoidably slow?
import cdsapi
c = cdsapi.Client()
for year in range(1981,2018):
for mon in ["01","02","03","04","05","06","07","08","09","10","11","12"]:
c.retrieve("reanalysis-era5-single-levels", {
"product_type": "reanalysis",
"format": "netcdf",
"variable": "runoff",
"year": str(year),
"month": mon,
}, "runoff."+str(year)+mon+".nc")
I have gotten the following error, as well (but not consistently):
“Exception: Download failed: downloaded 11324683 byte(s) out of 757926348”
Thanks very much for any advice.