Does anyone have experience of using the Python API to download ERA5 datasets using a SSL decryption certificate. I am able to generate requests successfully but my download is terminated after 6999 bytes regardless of the request.
if not os.path.exists(era_filepath):
print(f"> Downloading: {era_filepath}“)
dates_in_range = [d.strftime(”%Y-%m-%d") for d in dates_in_range]
# Define the data_dict for downloading ERA5 data
key = f"{str(zone).zfill(2)}_BGZ{str(zone).zfill(2)}"
data_dict = {
“product_type”: era5_product,
“variable”: era5_variables,
“date”: dates_in_range,
“time”: era5_times,
“data_format”: out_type,
“area”: bgz_bboxes[key]
}
print(f"> Retrieving: {data_dict}")
try:
cds.retrieve(era5_dataset, data_dict, era_filepath)
print(f"> Successful download: {era_filepath}")
except Exception as e:
print(f"> ERA5 download failed: {era_filepath}")
print(f"> Reason: {e}")
# Remove partial file if it exists
if os.path.exists(era_filepath):
os.remove(era_filepath)
print("> Removed partial ERA5 file")
continue
else:
print(f"> Skipped: {era_filepath}")
> Downloading: /home/olivergutteridge/Desktop/S1_coherence/2017/Sentinel-1/COH/ERA5/bgz1_y2017_m10-d21-22-23-24-25-26-27.nc
> Retrieving: {'product_type': 'reanalysis', 'variable': ['10m_u_component_of_wind', '10m_v_component_of_wind', 'snowfall', 'total_precipitation'], 'date': ['2017-10-27', '2017-10-26', '2017-10-25', '2017-10-24', '2017-10-23', '2017-10-22', '2017-10-21'], 'time': ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00'], 'data_format': 'netcdf', 'area': [55.14234482494376, -3.7303864221390897, 53.867827915271, -1.7664264501927462]}
2025-12-17 14:28:00,100 INFO [2025-12-11T00:00:00] Please note that a dedicated catalogue entry for this dataset, post-processed and stored in Analysis Ready Cloud Optimized (ARCO) format (Zarr), is available for optimised time-series retrievals (i.e. for retrieving data from selected variables for a single point over an extended period of time in an efficient way). You can discover it [here](https://cds.climate.copernicus.eu/datasets/reanalysis-era5-single-levels-timeseries?tab=overview)
2025-12-17 14:28:00,100 INFO Request ID is e752a09d-79b6-409e-8a64-eb99b297ff41
2025-12-17 14:28:00,169 INFO status has been updated to accepted
2025-12-17 14:28:08,550 INFO status has been updated to successful
> ERA5 download failed: /home/olivergutteridge/Desktop/S1_coherence/2017/Sentinel-1/COH/ERA5/bgz1_y2017_m10-d21-22-23-24-25-26-27.nc
> Reason: Download failed: downloaded 6999 byte(s) out of 144423
> Removed partial ERA5 file