You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is with xarray (0.8.2) and netCDF4 (1.2.4). It may be a bug in netCDF rather than xarray itself. See also the crash in #1002, which may or may not be related.
The text was updated successfully, but these errors were encountered:
When you use a with block with an xarray object, it closes any associated netCDF file when you leave the block. When you type dataset.mean(dim='round') the file is already closed.
For interactive use, it's usually preferable to just write dataset = xarray.open_dataset('snellman.nc') and close it explicitly later when/if desired.
I have some code that writes out a netCDF file,
https://gist.github.com/ceridwen/21f86231e86b72bf18fcc16fcee01548
When I try to do math on this dataset after loading it, though, I get an error:
Note that if I generate the dataset without writing it to a file and loading it, the same operation doesn't cause an error:
This is with xarray (0.8.2) and netCDF4 (1.2.4). It may be a bug in netCDF rather than xarray itself. See also the crash in #1002, which may or may not be related.
The text was updated successfully, but these errors were encountered: