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
Funnily enough, I apparently looked into this in the past, and used xarray's set_close, which does exactly the right thing: it associates the close of a (new) object with another. It was part of the open_dataarray code, but not of the UgridDataset and UgridDataArray constructors. Using it consistently does the trick (and doesn't require a new close method).
Current implementation does this:
Internally, the UgridDataset constructor creates a new dataset, and so the
ds
reference is lost, makingUgridDataset.close()
a dud.We should likely do something like:
It might be possible that
dataset
is None, though.Explicit indexes would also solve this, since we'd just use/return an ordinary xarray dataset.
The text was updated successfully, but these errors were encountered: