-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Writing empty observations, parameters or responses to storage causes subsequent reading to fail #6974
Comments
Is a bug in xarray, can be reproduced by: import numpy as np
import xarray as xr
from datetime import datetime
ds = (
xr.Dataset(
{
"values": (
["name", "time"],
np.array([[]], dtype=np.float32).T,
)
},
coords={"time": [datetime(1996, 1, 3, 0, 0)], "name": []},
)
.drop_duplicates("time")
.expand_dims({"index": [0]})
)
ds.to_netcdf("file.nc", engine="scipy")
_ = xr.open_dataset("file.nc", engine="scipy") It is not known whether other cases with non-empty arrays are affected. |
Upstream bug report here: pydata/xarray#8693 |
The bug could be triggered by setting It could also be triggered by setting This would cause subsequent reads of that ensemble to fail. To stop this exact case from happening the following check was added: This turns such situations into realization failures. |
Can be reproduced by running config.ert:
params.txt:
template.txt:
and an empty |
This example is a bit misleading, as |
I will close this as intended behavior, but added an issue for validation: #7937 |
The following test fails:
with
The text was updated successfully, but these errors were encountered: