RavenPy
RavenPy copied to clipboard
Close netCDF files when overwriting existing files with the same name
Description
With xarray 0.16.1, overwriting a file on disk with the same name does not clear the cache. So when opening a file with the same name, it fetches the cached file rather than the new file on disk.
Possible solutions:
- Given unique name to model outputs (.e.g uuid)
- Call
.close()on all opened netCDF files whenoverwrite=True.
@huard Could this be part of the issue we have with test instability?
It may. You could check by running tests sequentially (no xdist)