I have some data I'd like to download from the era5 model via the cdsapi package:
import cdsapi
c = cdsapi.Client()
url = c.retrieve(
'reanalysis-era5-single-levels',
{
'product_type': 'reanalysis',
'format': 'grib',
'variable': 'total_precipitation',
'year': '2021',
'month': '01',
'day': '01',
'time': '00:00',
},
'download.grib')
Has this downloaded the the grib file to my computer or has it been created and saved to CDS's site?
If I print url
:
Result(content_length=2076600,content_type=application/x-grib,location=https://download-0004.copernicus-climate.eu/cache-compute-0004/cache/data2/adaptor.mars.internal-1612475135.0349507-29868-7-7ed52a50-6bc6-493b-8b3e-92ac91518fd0.grib)
If it's just been saved to that online location is there any way to skip that step and download the data direclty to the computer in that same c.retrieve
call?
It has been downloaded to your computer, probably to same folder where you run your srript from.
You can also specify different location if you put custom full path instead of 'download.grib'
.
File can also be found on cds portal in your requests section