RavenPy icon indicating copy to clipboard operation
RavenPy copied to clipboard

Close netCDF files when overwriting existing files with the same name

Open huard opened this issue 5 years ago • 2 comments

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 when overwrite=True.

huard avatar Nov 26 '20 14:11 huard

@huard Could this be part of the issue we have with test instability?

Zeitsperre avatar May 03 '24 18:05 Zeitsperre

It may. You could check by running tests sequentially (no xdist)

huard avatar May 03 '24 19:05 huard