We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7db6609 + 0768edb commit fb89188Copy full SHA for fb89188
xbout/load.py
@@ -203,6 +203,10 @@ def attrs_remove_section(obj, section):
203
204
# Restore metadata from attrs
205
metadata = attrs_to_dict(ds, "metadata")
206
+ if "is_restart" not in metadata:
207
+ # Loading data that was saved with a version of xbout from before
208
+ # "is_restart" was added, so need to add it to the metadata.
209
+ metadata["is_restart"] = int(is_restart)
210
ds.attrs["metadata"] = metadata
211
# Must do this for all variables and coordinates in dataset too
212
for da in chain(ds.data_vars.values(), ds.coords.values()):
0 commit comments