id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 532647948,MDU6SXNzdWU1MzI2NDc5NDg=,3593,xr.open_dataset not reloading data in jupyter-notebook,58510627,closed,0,,,1,2019-12-04T12:17:13Z,2022-04-09T02:27:17Z,2022-04-09T02:27:17Z,NONE,,,,"First, I reported this issue on Jupyter-Notebook and was told, that it might be an issue of xarry: https://github.com/jupyter/notebook/issues/5101 I load an .nc file and print it Cell 1 ```python 3 import xarray as xr data_file = 'path_to_file/WMI_Lear.nc' ``` Cell 2 ```python 3 data = '' data = xr.open_dataset(data_file) print(data) ``` and I get the correct output: ```python Dimensions: (time: 180) Coordinates: * time (time) datetime64[ns] 2003-07-06T06:30:13 ... 2003-07-06T06:59:59 Data variables: altitude (time) float32 ... latitude (time) float32 ... longitude (time) float32 ... pressure (time) float32 ... tdry (time) float32 ... dp (time) float32 ... mr (time) float32 ... wspd (time) float32 ... wdir (time) float32 ... Drops (time) float64 ... Attributes: history: $Id: TrackFile.java,v 1.20 2003/05/07 04:53:23 maclean Exp $ ``` Now I **(re)move** the data in a terminal so that does not exist under the same name ```bash mv path_to_file/WMI_Lear.nc path_to_file/WMI_Lear.nc_new ``` Cell 3 ```python 3 data = '' data = xr.open_dataset(data_file) print(data) ``` and I correctly get an error, that the file does not exist ```python FileNotFoundError: [Errno 2] No such file or directory: b'/path_to_file/WMI_Lear.nc' ``` Now I move the data in a terminal **backwards** so that it exits again under the correct name ```bash mv path_to_file/WMI_Lear.nc_new path_to_file/WMI_Lear.nc ``` Cell 4 ```python 3 data = '' data = xr.open_dataset(data_file) print(data) ``` And again the output is correct as after cell 2 Now I **(re)emove** the data in a terminal so that does not exist under the same name **again** ```bash mv path_to_file/WMI_Lear.nc path_to_file/WMI_Lear.nc_new ``` Cell 5 ```python 3 data = '' data = xr.open_dataset(data_file) print(data) ``` Now I **expect** again the error message that I follows after cell 3, which says that the file does not exist. **But**, I get the output as If the file would exist. ``` If I replace ```python3 data = xr.open_dataset(data_file) ``` with ```python3 data = xr.open_dataset(data_file,cache='old') ``` I get the same problem. The same issue occurs, if I only change the file. Then the changed file isn't loaded anymore. Deleting the file is just a drastic example. **The same issue occurs, if I just repeatedly run the cell** which is supposed to load the file. Then the file change is not loaded anymore. This is a real issue since I would need to restart the kernel always which is just not practical.. Attached you'll find the simple .nc file. [WMI_Lear.nc.zip](https://github.com/pydata/xarray/files/3921712/WMI_Lear.nc.zip) ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3593/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue