Skip to content

Commit 9295c25

Browse files
authored
Merge pull request #191 from boutproject/reload-docstring
Add info on reloading Datasets to open_boutdataset docstring
2 parents 98fbb5d + 8253e22 commit 9295c25

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

xbout/load.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ def open_boutdataset(
7373
Load a dataset from a set of BOUT output files, including the input options
7474
file. Can also load from a grid file.
7575
76+
Note that when reloading a Dataset that was saved by xBOUT, the state of the saved
77+
Dataset is restored, and the values of `keep_xboundaries`, `keep_yboundaries`, and
78+
`run_name` are ignored. `geometry` is treated specially, and can be passed when
79+
reloading a Dataset (along with `gridfilepath` if needed).
80+
7681
Parameters
7782
----------
7883
datapath : str or (list or tuple of xr.Dataset), optional
@@ -187,8 +192,8 @@ def attrs_remove_section(obj, section):
187192
grid = _open_grid(
188193
gridfilepath,
189194
chunks=chunks,
190-
keep_xboundaries=keep_xboundaries,
191-
keep_yboundaries=keep_yboundaries,
195+
keep_xboundaries=ds.metadata["keep_xboundaries"],
196+
keep_yboundaries=ds.metadata["keep_yboundaries"],
192197
mxg=ds.metadata["MXG"],
193198
)
194199
else:

0 commit comments

Comments
 (0)