# Trouble connecting to download source? Using downloaded file CDS API ERA5

**URL:** <https://forum.ecmwf.int/t/trouble-connecting-to-download-source-using-downloaded-file-cds-api-era5/925>\
**Category:** C3S - Access and Login\
**Tags:** api, c3s, era5\
**Created:** [13 August 2019 22:20 UTC](https://forum.ecmwf.int/t/trouble-connecting-to-download-source-using-downloaded-file-cds-api-era5/925 "2019-08-13T22:20:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rachel\_Gaal](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@Rachel\_Gaal](https://forum.ecmwf.int/u/Rachel_Gaal)\
**Post date:** [13 August 2019 22:20 UTC](https://forum.ecmwf.int/t/trouble-connecting-to-download-source-using-downloaded-file-cds-api-era5/925/1 "2019-08-13T22:20:00Z")

</div>

Hi there, I'm downloading a small test subset of total precip from ERA5 through CDS API. I&nbsp;think that my download is working properly, however, when I try to use the netcdf4 dataset command to open the file through opendap, I get an error saying the file cannot be found. Am I not opening the download correctly? I just started using this source very recently and I realize this could also be a python/netcdf4 issue (just trying to figure out where to troubleshoot). Code below&nbsp;–&nbsp;

###### _In[3]: import cdsapi_ _c = cdsapi.Client()_ _c.retrieve(_ _'reanalysis-era5-single-levels',_ _{_ _'product\_type':'reanalysis',_ _'variable':'total\_precipitation',_ _'year':'2014',_ _'month':[_ _'06'_ _],_ _'day':[_ _'01','02','03'_ _],_ _'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'_ _],_ _'format':'netcdf'_ _},_ _'[download.nc](http://download.nc)')_ _2019-08-13 17:55:30,327 INFO Sending request to [https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels](https://cds.climate.copernicus.eu/api/v2/resources/reanalysis-era5-single-levels)_ _2019-08-13 17:55:30,770 INFO Request is completed_ _2019-08-13 17:55:30,771 INFO Downloading [http://136.156.133.42/cache-compute-0014/cache/data3/adaptor.mars.internal-1565729310.0289395-13532-9-b8efddf2-abca-417a-a7ae-0d8bad2fc387.nc](http://136.156.133.42/cache-compute-0014/cache/data3/adaptor.mars.internal-1565729310.0289395-13532-9-b8efddf2-abca-417a-a7ae-0d8bad2fc387.nc) to [download.nc](http://download.nc) (142.6M)_ _2019-08-13 17:55:47,135 INFO Download rate 8.7M/s_ _Out[3]: Result(content\_length=149516548,content\_type=application/x-netcdf,location=[http://136.156.133.42/cache-compute-0014/cache/data3/adaptor.mars.internal-1565729310.0289395-13532-9-b8efddf2-abca-417a-a7ae-0d8bad2fc387.nc](http://136.156.133.42/cache-compute-0014/cache/data3/adaptor.mars.internal-1565729310.0289395-13532-9-b8efddf2-abca-417a-a7ae-0d8bad2fc387.nc))_ _In[4]: from netCDF4 import Dataset_ _data = Dataset('[http://136.156.133.42/cache-compute-0014/cache/data3/adaptor.mars.internal-1565729310.0289395-13532-9-b8efddf2-abca-417a-a7ae-0d8bad2fc387.nc](http://136.156.133.42/cache-compute-0014/cache/data3/adaptor.mars.internal-1565729310.0289395-13532-9-b8efddf2-abca-417a-a7ae-0d8bad2fc387.nc)')_ _Out[4]: from netCDF4 import Dataset_ _data = Dataset('[http://136.156.133.42/cache-compute-0014/cache/data3/adaptor.mars.internal-1565729310.0289395-13532-9-b8efddf2-abca-417a-a7ae-0d8bad2fc387.nc](http://136.156.133.42/cache-compute-0014/cache/data3/adaptor.mars.internal-1565729310.0289395-13532-9-b8efddf2-abca-417a-a7ae-0d8bad2fc387.nc)')_ _syntax error, unexpected WORD\_WORD, expecting SCAN\_ATTR or SCAN\_DATASET or SCAN\_ERROR_ _context: \<html^\>\<head\>\<title\>404 Not Found\</title\>\</head\>\<body\>\<center\>\<h1\>404 Not Found\</h1\>\</center\>\<hr\>\<center\>nginx/1.16.0\</center\>\</body\>\</html\>_ _Traceback (most recent call last):_ _File "\<ipython-input-4-5af935da6a02\>", line 2, in \<module\>_ _data = Dataset('[http://136.156.133.42/cache-compute-0014/cache/data3/adaptor.mars.internal-1565729310.0289395-13532-9-b8efddf2-abca-417a-a7ae-0d8bad2fc387.nc](http://136.156.133.42/cache-compute-0014/cache/data3/adaptor.mars.internal-1565729310.0289395-13532-9-b8efddf2-abca-417a-a7ae-0d8bad2fc387.nc)')_ _File "netCDF4/\_netCDF4.pyx", line 2135, in netCDF4.\_netCDF4.Dataset.\_\_init\_\__ _File "netCDF4/\_netCDF4.pyx", line 1752, in netCDF4.\_netCDF4.\_ensure\_nc\_success_ _OSError: [Errno -90] NetCDF: file not found: b'[http://136.156.133.42/cache-compute-0014/cache/data3/adaptor.mars.internal-1565729310.0289395-13532-9-b8efddf2-abca-417a-a7ae-0d8bad2fc387.nc](http://136.156.133.42/cache-compute-0014/cache/data3/adaptor.mars.internal-1565729310.0289395-13532-9-b8efddf2-abca-417a-a7ae-0d8bad2fc387.nc)'_

---

<div class="post-metadata">

**Author:** ![Xiaobo\_Yang](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/x/e495f1/32.png) [@Xiaobo\_Yang](https://forum.ecmwf.int/u/Xiaobo_Yang)\
**Post date:** [14 August 2019 08:23 UTC](https://forum.ecmwf.int/t/trouble-connecting-to-download-source-using-downloaded-file-cds-api-era5/925/2 "2019-08-14T08:23:00Z")

</div>

Hi Rachel,

When you finished running your Python script, the NetCDF file download.nc should be available on your local disk. Please open it as you wish. The URL you were using below points to the cache on the CDS. And data in the cache could be deleted at any time.

###### _[http://136.156.133.42/cache-compute-0014/cache/data3/adaptor.mars.internal-1565729310.0289395-13532-9-b8efddf2-abca-417a-a7ae-0d8bad2fc387.nc](http://136.156.133.42/cache-compute-0014/cache/data3/adaptor.mars.internal-1565729310.0289395-13532-9-b8efddf2-abca-417a-a7ae-0d8bad2fc387.nc)_

I hope this helps.

Regards,

Xiaobo

---

<div class="post-metadata">

**Author:** ![Rachel\_Gaal](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@Rachel\_Gaal](https://forum.ecmwf.int/u/Rachel_Gaal)\
**Post date:** [14 August 2019 12:54 UTC](https://forum.ecmwf.int/t/trouble-connecting-to-download-source-using-downloaded-file-cds-api-era5/925/3 "2019-08-14T12:54:17Z")

</div>

Thank you, Xiaobo. I did not properly locate the download.nc file my first time but redid the download in the proper directory/with a new name.

---

<div class="post-metadata">

**Author:** ![Xiaobo\_Yang](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/x/e495f1/32.png) [@Xiaobo\_Yang](https://forum.ecmwf.int/u/Xiaobo_Yang)\
**Post date:** [14 August 2019 13:47 UTC](https://forum.ecmwf.int/t/trouble-connecting-to-download-source-using-downloaded-file-cds-api-era5/925/4 "2019-08-14T13:47:44Z")

</div>

Is everything working fine now?

---

<div class="post-metadata">

**Author:** ![Rachel\_Gaal](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@Rachel\_Gaal](https://forum.ecmwf.int/u/Rachel_Gaal)\
**Post date:** [14 August 2019 13:50 UTC](https://forum.ecmwf.int/t/trouble-connecting-to-download-source-using-downloaded-file-cds-api-era5/925/5 "2019-08-14T13:50:51Z")

</div>

yes, thank you for your replies!&nbsp;

---

<div class="post-metadata">

**Author:** ![Xiaobo\_Yang](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/x/e495f1/32.png) [@Xiaobo\_Yang](https://forum.ecmwf.int/u/Xiaobo_Yang)\
**Post date:** [14 August 2019 14:29 UTC](https://forum.ecmwf.int/t/trouble-connecting-to-download-source-using-downloaded-file-cds-api-era5/925/6 "2019-08-14T14:29:11Z")

</div>

You are welcome!
